Mantid
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions | Variables
Mantid::DataHandling::NXcanSAS Namespace Reference

Namespaces

namespace  PolProperties
 
namespace  SpinStateNXcanSAS
 
namespace  StandardProperties
 Property names for save algorithms.
 

Classes

class  DataDimensions
 
struct  DataSpaceInformation
 
struct  InstrumentNameInfo
 
struct  InstrumentPolarizer
 
class  LoadNXcanSAS
 LoadNXcanSAS : Tries to load an NXcanSAS file type into a Workspace2D. More...
 
struct  SpinState
 
struct  SpinVectorBuilder
 

Enumerations

enum  WorkspaceDataAxes : std::uint8_t { Y = 0 , YErr = 1 , X = 2 , XErr = 3 }
 
enum class  WorkspaceDimensionality : std::uint8_t { other = 0 , oneD = 1 , twoD = 2 }
 

Functions

void MANTID_DATAHANDLING_DLL addData1D (H5::Group &data, const MatrixWorkspace_sptr &workspace)
 Adds signal and Q data to the data group from 1D reduced SANS data.
 
void MANTID_DATAHANDLING_DLL addData2D (H5::Group &data, const MatrixWorkspace_sptr &workspace)
 Stores the 2D signal and Q data in the HDF5 file.
 
void MANTID_DATAHANDLING_DLL addDetectors (H5::Group &group, const MatrixWorkspace_sptr &workspace, const std::vector< std::string > &detectorNames)
 Adds detector info to the sas group.
 
std::string MANTID_DATAHANDLING_DLL addDigit (size_t index)
 
void MANTID_DATAHANDLING_DLL addEMFieldDirection (H5::Group &group, const std::string &emFieldDir)
 Adds the Field direction of either the magnetic or the electric field on the sample.
 
void MANTID_DATAHANDLING_DLL addInstrument (H5::Group &group, const MatrixWorkspace_sptr &workspace, const std::string &radiationSource, const std::string &geometry, double beamHeight, double beamWidth, const std::vector< std::string > &detectorNames)
 Add the instrument group to the NXcanSAS file.
 
void MANTID_DATAHANDLING_DLL addPolarizedData (H5::Group &data, const WorkspaceGroup_sptr &wsGroup, const std::string &inputSpinStates)
 Adds signal, Q and spin data to the data group from 1D or 2D reduced polarized SANS data.
 
void MANTID_DATAHANDLING_DLL addPolarizer (H5::Group &group, const MatrixWorkspace_sptr &workspace, const std::string &componentName, const std::string &componentType, const std::string &groupSuffix)
 Add the polarizer component information to the instrument cansas group.
 
void MANTID_DATAHANDLING_DLL addProcess (H5::Group &group, const Mantid::API::MatrixWorkspace_sptr &workspace)
 
void MANTID_DATAHANDLING_DLL addProcess (H5::Group &group, const MatrixWorkspace_sptr &workspace, const MatrixWorkspace_sptr &canWorkspace)
 Add the process information to the NXcanSAS file.
 
void MANTID_DATAHANDLING_DLL addProcessEntry (H5::Group &group, const std::string &entryName, const std::string &entryValue)
 
void MANTID_DATAHANDLING_DLL addSample (H5::Group &group, const double &sampleThickness)
 Adds sample thickness information to the sas sample group.
 
void MANTID_DATAHANDLING_DLL addSampleEMFields (H5::Group &group, const MatrixWorkspace_sptr &workspace, const std::string &emFieldStrengthLog, const std::string &emFieldDir)
 Adds the direction and strength of either magnetic or electric field on the sample.
 
void MANTID_DATAHANDLING_DLL addTransmission (H5::Group &group, const MatrixWorkspace_const_sptr &workspace, const std::string &transmissionName)
 Add a transmission group to the cansas file, including metadata extracted from the transmission workspace.
 
DataSpaceInformation getDataSpaceInfo (const H5::DataSet &dataSet)
 
WorkspaceDimensionality getWorkspaceDimensionality (const MatrixWorkspace_sptr &workspace)
 Retrieves workspace dimensionality enum value: oneD , twoD, other (error)
 
std::string MANTID_DATAHANDLING_DLL makeCanSASRelaxedName (const std::string &input)
 This makes out of an input a relaxed name, something conforming to "[A-Za-z_][\w_]*" For now "-" is converted to "_", "." is converted to "_", else we throw.
 
H5::H5File MANTID_DATAHANDLING_DLL prepareFile (const std::filesystem::path &path)
 Creates and opens a H5 File in the given path.
 
std::filesystem::path MANTID_DATAHANDLING_DLL prepareFilename (const std::string &baseFilename, bool addDigitSuffix=false, size_t index=0)
 

Variables

const std::string NX_CANSAS_EXTENSION = ".h5"
 
const std::string nxDataClassAttr = "NXdata"
 
const std::string nxEntryClassAttr = "NXentry"
 
const std::string nxInstrumentApertureClassAttr = "NXaperture"
 
const std::string nxInstrumentClassAttr = "NXinstrument"
 
const std::string nxInstrumentCollimationClassAttr = "NXcollimator"
 
const std::string nxInstrumentDetectorClassAttr = "NXdetector"
 
const std::string nxInstrumentSampleClassAttr = "NXsample"
 
const std::string nxInstrumentSourceClassAttr = "NXsource"
 
const std::string nxNoteClassAttr = "NXnote"
 
const std::string nxProcessClassAttr = "NXprocess"
 
const std::string nxTransmissionSpectrumClassAttr = "NXdata"
 
const std::string sasAngstrom = "A"
 
const std::string sasBeamAndSampleSizeUnitAttrValue = "mm"
 
const std::string sasCanSASclass = "canSAS_class"
 
const std::string sasDataClassAttr = "SASdata"
 
const std::string sasDataGroupName = "sasdata"
 
const std::string sasDataI = "I"
 
const std::string sasDataIAxesAttr = "I_axes"
 
const std::string sasDataIdev = "Idev"
 
const std::string sasDataIUncertaintiesAttr = "I_uncertainties"
 
const std::string sasDataIUncertaintyAttr = "I_uncertainty"
 
const std::string sasDataMask = "Mask"
 
const std::string sasDataMaskIndicesAttr = "Mask_indices"
 
const std::string sasDataPin = "Pin"
 
const std::string sasDataPinIndicesAttr = "Pin_indices"
 
constexpr int sasDataPinIndicesValue = 0
 
const std::string sasDataPolarizationUnitAttr = "none"
 
const std::string sasDataPout = "Pout"
 
const std::string sasDataPoutIndicesAttr = "Pout_indices"
 
constexpr int sasDataPoutIndicesValue = 1
 
const std::string sasDataQ = "Q"
 
const std::string sasDataQdev = "Qdev"
 
const std::string sasDataQIndicesAttr = "Q_indices"
 
const std::string sasDataQUncertaintiesAttr = "Q_uncertainties"
 
const std::string sasDataQUncertaintyAttr = "Q_uncertainty"
 
const std::string sasDataQx = "Qx"
 
const std::string sasDataQy = "Qy"
 
const std::string sasEntryClassAttr = "SASentry"
 
const std::string sasEntryDefaultSuffix = "01"
 
const std::string sasEntryDefinition = "definition"
 
const std::string sasEntryDefinitionFormat = "NXcanSAS"
 
const std::string sasEntryGroupName = "sasentry"
 
const std::string sasEntryRun = "run"
 
const std::string sasEntryRunInLogs = "run_number"
 
const std::string sasEntryTitle = "title"
 
const std::string sasEntryVersionAttr = "version"
 
const std::string sasEntryVersionAttrValue = "1.1"
 
const std::string sasInstrumentApertureClassAttr = "SASaperture"
 
const std::string sasInstrumentApertureGapHeight = "y_gap"
 
const std::string sasInstrumentApertureGapWidth = "x_gap"
 
const std::string sasInstrumentApertureGroupName = "sasaperture"
 
const std::string sasInstrumentApertureShape = "shape"
 
const std::string sasInstrumentClassAttr = "SASinstrument"
 
const std::string sasInstrumentCollimationClassAttr = "SAScollimation"
 
const std::string sasInstrumentCollimationGroupName = "sascollimation"
 
const std::string sasInstrumentDetectorClassAttr = "SASdetector"
 
const std::string sasInstrumentDetectorGroupName = "sasdetector"
 
const std::string sasInstrumentDetectorName = "name"
 
const std::string sasInstrumentDetectorSdd = "SDD"
 
const std::string sasInstrumentDetectorSddUnitAttrValue = "m"
 
const std::string sasInstrumentGroupName = "sasinstrument"
 
const std::string sasInstrumentIDF = "idf"
 
const std::string sasInstrumentName = "name"
 
const std::string sasInstrumentSampleClassAttr = "SASsample"
 
const std::string sasInstrumentSampleGroupAttr = "sassample"
 
const std::string sasInstrumentSampleId = "ID"
 
const std::string sasInstrumentSampleThickness = "thickness"
 
const std::string sasInstrumentSourceClassAttr = "SASsource"
 
const std::string sasInstrumentSourceGroupName = "sassource"
 
const std::string sasInstrumentSourceRadiation = "type"
 
const std::string sasIntensity = "1/cm"
 
const std::string sasMomentumTransfer = "1/A"
 
const std::string sasNone = "none"
 
const std::string sasNoteClassAttr = "SASnote"
 
const std::string sasNoteGroupName = "sasnote"
 
const std::string sasNxclass = "NX_class"
 
const std::string sasProcessBatchFileInLogs = "BatchFile"
 
const std::string sasProcessClassAttr = "SASprocess"
 
const std::string sasProcessDate = "date"
 
const std::string sasProcessGroupName = "sasprocess"
 
const std::string sasProcessName = "name"
 
const std::string sasProcessNameValue = "Mantid_generated_NXcanSAS"
 
const std::string sasProcessTermBatchFile = "batch_file"
 
const std::string sasProcessTermCan = "can_trans_run"
 
const std::string sasProcessTermCanDirect = "can_direct_run"
 
const std::string sasProcessTermCanScatter = "can_scatter_run"
 
const std::string sasProcessTermSampleDirect = "sample_direct_run"
 
const std::string sasProcessTermSampleTrans = "sample_trans_run"
 
const std::string sasProcessTermScaledBgSubScaleFactor = "scaled_bgsub_scale_factor"
 
const std::string sasProcessTermScaledBgSubWorkspace = "scaled_bgsub_workspace"
 
const std::string sasProcessTermSvn = "svn"
 
const std::string sasProcessTermUserFile = "user_file"
 
const std::string sasProcessUserFileInLogs = "UserFile"
 
const std::string sasSampleEMFieldDirectionAttr = "direction"
 
const std::string sasSampleEMFieldDirectionAzimuthal = "azimuthal_angle"
 
const std::string sasSampleEMFieldDirectionPolar = "polar_angle"
 
const std::string sasSampleEMFieldDirectionRotation = "rotation_angle"
 
const std::string sasSampleEMFieldDirectionSphericalAttr = "direction_spherical"
 
const std::string sasSampleEMFieldDirectionUnitsAttr = "degrees"
 
const std::string sasSampleMagneticField = "magnetic_field"
 
const std::string sasSeparator = ","
 
const std::string sasSignal = "signal"
 
const std::string sasTransmissionSpectrumClassAttr = "SAStransmission_spectrum"
 
const std::string sasTransmissionSpectrumGroupName = "sastransmission_spectrum"
 
const std::string sasTransmissionSpectrumLambda = "lambda"
 
const std::string sasTransmissionSpectrumNameAttr = "name"
 
const std::string sasTransmissionSpectrumNameCanAttrValue = "can"
 
const std::string sasTransmissionSpectrumNameSampleAttrValue = "sample"
 
const std::string sasTransmissionSpectrumT = "T"
 
const std::string sasTransmissionSpectrumTdev = "Tdev"
 
const std::string sasTransmissionSpectrumTimeStampAttr = "timestamp"
 
const std::string sasTransmissionSpectrumTIndices = "T_indices"
 
const std::string sasTransmissionSpectrumTUncertainties = "T_uncertainties"
 
const std::string sasTransmissionSpectrumTUncertainty = "T_uncertainty"
 
const std::string sasUncertaintiesAttr = "uncertainties"
 
const std::string sasUncertaintyAttr = "uncertainty"
 Standards state that "uncertainties" should be used, however different facilities interpret the standards differently.
 
const std::string sasUnitAttr = "units"
 

Enumeration Type Documentation

◆ WorkspaceDataAxes

Enumerator
YErr 
XErr 

Definition at line 16 of file NXcanSASUtil.h.

◆ WorkspaceDimensionality

Enumerator
other 
oneD 
twoD 

Definition at line 17 of file NXcanSASUtil.h.

Function Documentation

◆ addData1D()

void Mantid::DataHandling::NXcanSAS::addData1D ( H5::Group &  data,
const MatrixWorkspace_sptr workspace 
)

Adds signal and Q data to the data group from 1D reduced SANS data.

Parameters
dataThe data group
workspaceThe reduced SANS workspace

Definition at line 696 of file SaveNXcanSASHelper.cpp.

References sasDataI, sasDataIdev, sasUnitAttr, and workspace.

Referenced by Mantid::DataHandling::SaveNXcanSASBase::addData().

◆ addData2D()

void Mantid::DataHandling::NXcanSAS::addData2D ( H5::Group &  data,
const MatrixWorkspace_sptr workspace 
)

Stores the 2D signal and Q data in the HDF5 file.

Qx and Qy values are stored as a meshgrid of point data.

Parameters
dataThe data group
workspaceThe reduced 2D sans workspace

Workspace shape Mantid Matrix (Qx) 0 1 2 ... M (first dimension) (QY) 0 IQx0Qy0 IQx1Qy0 IQx2Qy0 ... IQxMQy0 1 IQx0Qy1 IQx1Qy1 IQx2Qy1 ... IQxMQy1 2 IQx0Qy2 IQx1Qy2 IQx2Qy2 ... IQxMQy2 3 IQx0Qy3 IQx1Qy3 IQx2Qy3 ... IQxMQy3 . . N IQx0QyN IQx1QyN IQx2QyN ... IQxMQyN (second dimension)

The layout below is how it would appear in the HDFView. The vertical axis is the first dimension. We map the Mantid Matrix layout 1-to-1. Note that this will swap the matrix indices, but this is how it is done in the other 2Dloaders

In HDF5 the Qx would need to be stored as: Qx1 Qx2 ... QxM Qx1 Qx2 ... QxM Qx1 Qx2 ... QxM . . Qx1 Qx2 ... QxM

In HDF5 the Qy would need to be stored as: Qy1 Qy1 ... Qy1 Qy2 Qy2 ... Qy2 Qy3 Qy3 ... Qy3 . . QxN QxN ... QxN

Definition at line 753 of file SaveNXcanSASHelper.cpp.

References index, sasDataI, sasDataIdev, sasDataQ, sasSeparator, sasUnitAttr, and workspace.

Referenced by Mantid::DataHandling::SaveNXcanSASBase::addData().

◆ addDetectors()

void Mantid::DataHandling::NXcanSAS::addDetectors ( H5::Group &  group,
const MatrixWorkspace_sptr workspace,
const std::vector< std::string > &  detectorNames 
)

◆ addDigit()

std::string Mantid::DataHandling::NXcanSAS::addDigit ( size_t  index)

◆ addEMFieldDirection()

void Mantid::DataHandling::NXcanSAS::addEMFieldDirection ( H5::Group &  group,
const std::string &  emFieldDir 
)

Adds the Field direction of either the magnetic or the electric field on the sample.

Parameters
groupThe sas group to add the data to.
emFieldDirComma separated string representing spherical vector with directions polar,azimuthal and rotation.

Definition at line 532 of file SaveNXcanSASHelper.cpp.

References group, sasSampleEMFieldDirectionAzimuthal, sasSampleEMFieldDirectionPolar, sasSampleEMFieldDirectionRotation, sasSampleEMFieldDirectionUnitsAttr, sasUnitAttr, Mantid::Kernel::VectorHelper::splitStringIntoVector< double >(), and Mantid::Nexus::H5Util::writeScalarDataSetWithStrAttributes().

Referenced by addSampleEMFields().

◆ addInstrument()

void Mantid::DataHandling::NXcanSAS::addInstrument ( H5::Group &  group,
const MatrixWorkspace_sptr workspace,
const std::string &  radiationSource,
const std::string &  geometry,
double  beamHeight,
double  beamWidth,
const std::vector< std::string > &  detectorNames 
)

Add the instrument group to the NXcanSAS file.

This adds the instrument name and the IDF

Parameters
groupThe sasEntry
workspaceThe workspace which is being stored
radiationSourceThe selected radiation source
detectorNamesThe names of the detectors to store
geometryGeometry type of collimation
beamHeightHeight of collimation element in mm
beamWidthWidth of collimation element in mm

Definition at line 442 of file SaveNXcanSASHelper.cpp.

References addDetectors(), Mantid::Nexus::H5Util::createGroupCanSAS(), group, nxInstrumentApertureClassAttr, nxInstrumentClassAttr, nxInstrumentSourceClassAttr, sasBeamAndSampleSizeUnitAttrValue, sasInstrumentApertureClassAttr, sasInstrumentApertureGapHeight, sasInstrumentApertureGapWidth, sasInstrumentApertureGroupName, sasInstrumentApertureShape, sasInstrumentClassAttr, sasInstrumentGroupName, sasInstrumentIDF, sasInstrumentName, sasInstrumentSourceClassAttr, sasInstrumentSourceGroupName, sasInstrumentSourceRadiation, sasUnitAttr, workspace, Mantid::Nexus::H5Util::write(), and Mantid::Nexus::H5Util::writeScalarDataSetWithStrAttributes().

Referenced by Mantid::DataHandling::SaveNXcanSASBase::addStandardMetadata().

◆ addPolarizedData()

void Mantid::DataHandling::NXcanSAS::addPolarizedData ( H5::Group &  data,
const WorkspaceGroup_sptr wsGroup,
const std::string &  inputSpinStates 
)

Adds signal, Q and spin data to the data group from 1D or 2D reduced polarized SANS data.

Parameters
dataThe data group
wsGroupThe reduced SANS workspace group
inputSpinStatesA string of comma separated PinPout pairs, each corresponding to a workspace on wsGroup.

Definition at line 780 of file SaveNXcanSASHelper.cpp.

References getWorkspaceDimensionality(), oneD, sasDataI, sasDataIdev, sasDataPin, sasDataPout, sasDataQ, sasSeparator, sasUnitAttr, Mantid::Kernel::SpinStateHelpers::splitSpinStateString(), and twoD.

Referenced by Mantid::DataHandling::SaveNXcanSASBase::addPolarizedData().

◆ addPolarizer()

void Mantid::DataHandling::NXcanSAS::addPolarizer ( H5::Group &  group,
const MatrixWorkspace_sptr workspace,
const std::string &  componentName,
const std::string &  componentType,
const std::string &  groupSuffix 
)

Add the polarizer component information to the instrument cansas group.

Parameters
groupThe sasEntry
workspaceThe workspace from which component information is extracted
componentNameThe name of the polarizer component as found in the IDF
componentTypeType of component: flipper, analyzer or polarizer
groupSuffixSuffix to add to the component group when there is more than one component per type

Definition at line 497 of file SaveNXcanSASHelper.cpp.

References Mantid::Nexus::H5Util::createGroupCanSAS(), group, sasInstrumentGroupName, sasUnitAttr, workspace, Mantid::Nexus::H5Util::write(), and Mantid::Nexus::H5Util::writeScalarDataSetWithStrAttributes().

Referenced by Mantid::DataHandling::SaveNXcanSASBase::addPolarizedMetadata().

◆ addProcess() [1/2]

void MANTID_DATAHANDLING_DLL Mantid::DataHandling::NXcanSAS::addProcess ( H5::Group &  group,
const Mantid::API::MatrixWorkspace_sptr workspace 
)

◆ addProcess() [2/2]

void Mantid::DataHandling::NXcanSAS::addProcess ( H5::Group &  group,
const MatrixWorkspace_sptr workspace,
const MatrixWorkspace_sptr canWorkspace 
)

Add the process information to the NXcanSAS file.

It contains information about the run number, the Mantid version and the user file (if available)

Parameters
groupThe sasEntry
workspaceThe workspace which is being stored
canWorkspaceWorkspace for the can run

Definition at line 609 of file SaveNXcanSASHelper.cpp.

References Mantid::Nexus::H5Util::createGroupCanSAS(), group, nxProcessClassAttr, sasProcessBatchFileInLogs, sasProcessClassAttr, sasProcessDate, sasProcessGroupName, sasProcessName, sasProcessNameValue, sasProcessTermBatchFile, sasProcessTermCan, sasProcessTermSvn, sasProcessTermUserFile, sasProcessUserFileInLogs, std::to_string(), Mantid::Kernel::MantidVersion::version(), workspace, and Mantid::Nexus::H5Util::write().

◆ addProcessEntry()

void MANTID_DATAHANDLING_DLL Mantid::DataHandling::NXcanSAS::addProcessEntry ( H5::Group &  group,
const std::string &  entryName,
const std::string &  entryValue 
)

◆ addSample()

void Mantid::DataHandling::NXcanSAS::addSample ( H5::Group &  group,
const double &  sampleThickness 
)

Adds sample thickness information to the sas sample group.

Parameters
groupThe parent sas group in which to store the sample group
sampleThicknessSample thickness

Definition at line 587 of file SaveNXcanSASHelper.cpp.

References Mantid::Nexus::H5Util::createGroupCanSAS(), group, nxInstrumentSampleClassAttr, sasBeamAndSampleSizeUnitAttrValue, sasInstrumentSampleClassAttr, sasInstrumentSampleGroupAttr, sasInstrumentSampleThickness, sasUnitAttr, and Mantid::Nexus::H5Util::writeScalarDataSetWithStrAttributes().

Referenced by Mantid::DataHandling::SaveNXcanSASBase::addStandardMetadata().

◆ addSampleEMFields()

void Mantid::DataHandling::NXcanSAS::addSampleEMFields ( H5::Group &  group,
const MatrixWorkspace_sptr workspace,
const std::string &  emFieldStrengthLog,
const std::string &  emFieldDir 
)

Adds the direction and strength of either magnetic or electric field on the sample.

Parameters
groupThe sas group to add the data to.
workspaceThe workspace from which to extract the information
emFieldStrengthLogThe log name in the workspace that contains information about the electric or magnetic field.
emFieldDirComma separated string representing spherical vector with directions polar,azimuthal androtation.

Definition at line 554 of file SaveNXcanSASHelper.cpp.

References addEMFieldDirection(), Mantid::Nexus::H5Util::createGroupCanSAS(), group, nxInstrumentSampleClassAttr, sasInstrumentSampleClassAttr, sasInstrumentSampleGroupAttr, sasSampleMagneticField, sasUnitAttr, workspace, and Mantid::Nexus::H5Util::writeScalarDataSetWithStrAttributes().

Referenced by Mantid::DataHandling::SaveNXcanSASBase::addPolarizedMetadata().

◆ addTransmission()

void Mantid::DataHandling::NXcanSAS::addTransmission ( H5::Group &  group,
const MatrixWorkspace_const_sptr workspace,
const std::string &  transmissionName 
)

◆ getDataSpaceInfo()

DataSpaceInformation Mantid::DataHandling::NXcanSAS::getDataSpaceInfo ( const H5::DataSet &  dataSet)

◆ getWorkspaceDimensionality()

WorkspaceDimensionality Mantid::DataHandling::NXcanSAS::getWorkspaceDimensionality ( const MatrixWorkspace_sptr workspace)

Retrieves workspace dimensionality enum value: oneD , twoD, other (error)

Parameters
workspaceThe workspace from which to get the data dimensionality

Definition at line 125 of file NXcanSASUtil.cpp.

References workspace.

Referenced by Mantid::DataHandling::SaveNXcanSASBase::addData(), addPolarizedData(), Mantid::DataHandling::SaveNXcanSASBase::savePolarizedGroup(), and Mantid::DataHandling::SaveNXcanSASBase::validatePolarizedInputWorkspace().

◆ makeCanSASRelaxedName()

std::string Mantid::DataHandling::NXcanSAS::makeCanSASRelaxedName ( const std::string &  input)

This makes out of an input a relaxed name, something conforming to "[A-Za-z_][\w_]*" For now "-" is converted to "_", "." is converted to "_", else we throw.

Parameters
inputInput string in which to apply the relaxed format

Definition at line 394 of file SaveNXcanSASHelper.cpp.

Referenced by addDetectors().

◆ prepareFile()

H5::H5File Mantid::DataHandling::NXcanSAS::prepareFile ( const std::filesystem::path &  path)

Creates and opens a H5 File in the given path.

Parameters
pathPath in which to create the file

Definition at line 829 of file SaveNXcanSASHelper.cpp.

References Mantid::Nexus::H5Util::defaultFileAcc().

Referenced by Mantid::DataHandling::SaveNXcanSASBase::savePolarizedGroup(), and Mantid::DataHandling::SaveNXcanSASBase::saveSingleWorkspaceFile().

◆ prepareFilename()

std::filesystem::path Mantid::DataHandling::NXcanSAS::prepareFilename ( const std::string &  baseFilename,
bool  addDigitSuffix = false,
size_t  index = 0 
)

Variable Documentation

◆ NX_CANSAS_EXTENSION

const std::string Mantid::DataHandling::NXcanSAS::NX_CANSAS_EXTENSION = ".h5"

Definition at line 55 of file NXcanSASDefinitions.h.

Referenced by prepareFilename().

◆ nxDataClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxDataClassAttr = "NXdata"

◆ nxEntryClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxEntryClassAttr = "NXentry"

◆ nxInstrumentApertureClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxInstrumentApertureClassAttr = "NXaperture"

Definition at line 124 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ nxInstrumentClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxInstrumentClassAttr = "NXinstrument"

Definition at line 113 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ nxInstrumentCollimationClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxInstrumentCollimationClassAttr = "NXcollimator"

Definition at line 132 of file NXcanSASDefinitions.h.

◆ nxInstrumentDetectorClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxInstrumentDetectorClassAttr = "NXdetector"

Definition at line 137 of file NXcanSASDefinitions.h.

Referenced by addDetectors().

◆ nxInstrumentSampleClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxInstrumentSampleClassAttr = "NXsample"

Definition at line 145 of file NXcanSASDefinitions.h.

Referenced by addSample(), and addSampleEMFields().

◆ nxInstrumentSourceClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxInstrumentSourceClassAttr = "NXsource"

Definition at line 118 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ nxNoteClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxNoteClassAttr = "NXnote"

Definition at line 207 of file NXcanSASDefinitions.h.

◆ nxProcessClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxProcessClassAttr = "NXprocess"

Definition at line 193 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ nxTransmissionSpectrumClassAttr

const std::string Mantid::DataHandling::NXcanSAS::nxTransmissionSpectrumClassAttr = "NXdata"

Definition at line 218 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasAngstrom

const std::string Mantid::DataHandling::NXcanSAS::sasAngstrom = "A"

Definition at line 61 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasBeamAndSampleSizeUnitAttrValue

const std::string Mantid::DataHandling::NXcanSAS::sasBeamAndSampleSizeUnitAttrValue = "mm"

Definition at line 151 of file NXcanSASDefinitions.h.

Referenced by addInstrument(), and addSample().

◆ sasCanSASclass

const std::string Mantid::DataHandling::NXcanSAS::sasCanSASclass = "canSAS_class"

Definition at line 66 of file NXcanSASDefinitions.h.

◆ sasDataClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataClassAttr = "SASdata"

◆ sasDataGroupName

const std::string Mantid::DataHandling::NXcanSAS::sasDataGroupName = "sasdata"

◆ sasDataI

const std::string Mantid::DataHandling::NXcanSAS::sasDataI = "I"

◆ sasDataIAxesAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataIAxesAttr = "I_axes"

Definition at line 94 of file NXcanSASDefinitions.h.

◆ sasDataIdev

const std::string Mantid::DataHandling::NXcanSAS::sasDataIdev = "Idev"

◆ sasDataIUncertaintiesAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataIUncertaintiesAttr = "I_uncertainties"

Definition at line 96 of file NXcanSASDefinitions.h.

◆ sasDataIUncertaintyAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataIUncertaintyAttr = "I_uncertainty"

Definition at line 95 of file NXcanSASDefinitions.h.

◆ sasDataMask

const std::string Mantid::DataHandling::NXcanSAS::sasDataMask = "Mask"

Definition at line 109 of file NXcanSASDefinitions.h.

◆ sasDataMaskIndicesAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataMaskIndicesAttr = "Mask_indices"

Definition at line 100 of file NXcanSASDefinitions.h.

◆ sasDataPin

const std::string Mantid::DataHandling::NXcanSAS::sasDataPin = "Pin"

Definition at line 158 of file NXcanSASDefinitions.h.

Referenced by addPolarizedData().

◆ sasDataPinIndicesAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataPinIndicesAttr = "Pin_indices"

Definition at line 160 of file NXcanSASDefinitions.h.

◆ sasDataPinIndicesValue

constexpr int Mantid::DataHandling::NXcanSAS::sasDataPinIndicesValue = 0
constexpr

Definition at line 162 of file NXcanSASDefinitions.h.

◆ sasDataPolarizationUnitAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataPolarizationUnitAttr = "none"

Definition at line 163 of file NXcanSASDefinitions.h.

◆ sasDataPout

const std::string Mantid::DataHandling::NXcanSAS::sasDataPout = "Pout"

Definition at line 157 of file NXcanSASDefinitions.h.

Referenced by addPolarizedData().

◆ sasDataPoutIndicesAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataPoutIndicesAttr = "Pout_indices"

Definition at line 159 of file NXcanSASDefinitions.h.

◆ sasDataPoutIndicesValue

constexpr int Mantid::DataHandling::NXcanSAS::sasDataPoutIndicesValue = 1
constexpr

Definition at line 161 of file NXcanSASDefinitions.h.

◆ sasDataQ

const std::string Mantid::DataHandling::NXcanSAS::sasDataQ = "Q"

◆ sasDataQdev

const std::string Mantid::DataHandling::NXcanSAS::sasDataQdev = "Qdev"

◆ sasDataQIndicesAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataQIndicesAttr = "Q_indices"

Definition at line 97 of file NXcanSASDefinitions.h.

◆ sasDataQUncertaintiesAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataQUncertaintiesAttr = "Q_uncertainties"

Definition at line 99 of file NXcanSASDefinitions.h.

◆ sasDataQUncertaintyAttr

const std::string Mantid::DataHandling::NXcanSAS::sasDataQUncertaintyAttr = "Q_uncertainty"

Definition at line 98 of file NXcanSASDefinitions.h.

◆ sasDataQx

const std::string Mantid::DataHandling::NXcanSAS::sasDataQx = "Qx"

◆ sasDataQy

const std::string Mantid::DataHandling::NXcanSAS::sasDataQy = "Qy"

◆ sasEntryClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasEntryClassAttr = "SASentry"

◆ sasEntryDefaultSuffix

const std::string Mantid::DataHandling::NXcanSAS::sasEntryDefaultSuffix = "01"

◆ sasEntryDefinition

const std::string Mantid::DataHandling::NXcanSAS::sasEntryDefinition = "definition"

◆ sasEntryDefinitionFormat

const std::string Mantid::DataHandling::NXcanSAS::sasEntryDefinitionFormat = "NXcanSAS"

◆ sasEntryGroupName

const std::string Mantid::DataHandling::NXcanSAS::sasEntryGroupName = "sasentry"

◆ sasEntryRun

const std::string Mantid::DataHandling::NXcanSAS::sasEntryRun = "run"

◆ sasEntryRunInLogs

const std::string Mantid::DataHandling::NXcanSAS::sasEntryRunInLogs = "run_number"

Definition at line 87 of file NXcanSASDefinitions.h.

◆ sasEntryTitle

const std::string Mantid::DataHandling::NXcanSAS::sasEntryTitle = "title"

◆ sasEntryVersionAttr

const std::string Mantid::DataHandling::NXcanSAS::sasEntryVersionAttr = "version"

◆ sasEntryVersionAttrValue

const std::string Mantid::DataHandling::NXcanSAS::sasEntryVersionAttrValue = "1.1"

◆ sasInstrumentApertureClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentApertureClassAttr = "SASaperture"

Definition at line 123 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ sasInstrumentApertureGapHeight

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentApertureGapHeight = "y_gap"

Definition at line 129 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ sasInstrumentApertureGapWidth

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentApertureGapWidth = "x_gap"

Definition at line 128 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ sasInstrumentApertureGroupName

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentApertureGroupName = "sasaperture"

Definition at line 126 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ sasInstrumentApertureShape

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentApertureShape = "shape"

Definition at line 127 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ sasInstrumentClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentClassAttr = "SASinstrument"

Definition at line 112 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ sasInstrumentCollimationClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentCollimationClassAttr = "SAScollimation"

Definition at line 131 of file NXcanSASDefinitions.h.

◆ sasInstrumentCollimationGroupName

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentCollimationGroupName = "sascollimation"

Definition at line 134 of file NXcanSASDefinitions.h.

◆ sasInstrumentDetectorClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentDetectorClassAttr = "SASdetector"

Definition at line 136 of file NXcanSASDefinitions.h.

Referenced by addDetectors().

◆ sasInstrumentDetectorGroupName

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentDetectorGroupName = "sasdetector"

Definition at line 139 of file NXcanSASDefinitions.h.

Referenced by addDetectors().

◆ sasInstrumentDetectorName

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentDetectorName = "name"

Definition at line 140 of file NXcanSASDefinitions.h.

Referenced by addDetectors().

◆ sasInstrumentDetectorSdd

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentDetectorSdd = "SDD"

Definition at line 141 of file NXcanSASDefinitions.h.

Referenced by addDetectors().

◆ sasInstrumentDetectorSddUnitAttrValue

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentDetectorSddUnitAttrValue = "m"

Definition at line 142 of file NXcanSASDefinitions.h.

Referenced by addDetectors().

◆ sasInstrumentGroupName

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentGroupName = "sasinstrument"

◆ sasInstrumentIDF

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentIDF = "idf"

Definition at line 153 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ sasInstrumentName

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentName = "name"

◆ sasInstrumentSampleClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentSampleClassAttr = "SASsample"

Definition at line 144 of file NXcanSASDefinitions.h.

Referenced by addSample(), and addSampleEMFields().

◆ sasInstrumentSampleGroupAttr

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentSampleGroupAttr = "sassample"

◆ sasInstrumentSampleId

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentSampleId = "ID"

Definition at line 148 of file NXcanSASDefinitions.h.

◆ sasInstrumentSampleThickness

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentSampleThickness = "thickness"

Definition at line 149 of file NXcanSASDefinitions.h.

Referenced by addSample().

◆ sasInstrumentSourceClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentSourceClassAttr = "SASsource"

Definition at line 117 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ sasInstrumentSourceGroupName

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentSourceGroupName = "sassource"

Definition at line 120 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ sasInstrumentSourceRadiation

const std::string Mantid::DataHandling::NXcanSAS::sasInstrumentSourceRadiation = "type"

Definition at line 121 of file NXcanSASDefinitions.h.

Referenced by addInstrument().

◆ sasIntensity

const std::string Mantid::DataHandling::NXcanSAS::sasIntensity = "1/cm"

Definition at line 63 of file NXcanSASDefinitions.h.

◆ sasMomentumTransfer

const std::string Mantid::DataHandling::NXcanSAS::sasMomentumTransfer = "1/A"

Definition at line 64 of file NXcanSASDefinitions.h.

◆ sasNone

const std::string Mantid::DataHandling::NXcanSAS::sasNone = "none"

Definition at line 62 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasNoteClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasNoteClassAttr = "SASnote"

Definition at line 206 of file NXcanSASDefinitions.h.

◆ sasNoteGroupName

const std::string Mantid::DataHandling::NXcanSAS::sasNoteGroupName = "sasnote"

Definition at line 208 of file NXcanSASDefinitions.h.

◆ sasNxclass

const std::string Mantid::DataHandling::NXcanSAS::sasNxclass = "NX_class"

Definition at line 65 of file NXcanSASDefinitions.h.

◆ sasProcessBatchFileInLogs

const std::string Mantid::DataHandling::NXcanSAS::sasProcessBatchFileInLogs = "BatchFile"

Definition at line 203 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ sasProcessClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasProcessClassAttr = "SASprocess"

Definition at line 192 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ sasProcessDate

const std::string Mantid::DataHandling::NXcanSAS::sasProcessDate = "date"

Definition at line 197 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ sasProcessGroupName

const std::string Mantid::DataHandling::NXcanSAS::sasProcessGroupName = "sasprocess"

◆ sasProcessName

const std::string Mantid::DataHandling::NXcanSAS::sasProcessName = "name"

Definition at line 195 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ sasProcessNameValue

const std::string Mantid::DataHandling::NXcanSAS::sasProcessNameValue = "Mantid_generated_NXcanSAS"

Definition at line 196 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ sasProcessTermBatchFile

const std::string Mantid::DataHandling::NXcanSAS::sasProcessTermBatchFile = "batch_file"

Definition at line 202 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ sasProcessTermCan

const std::string Mantid::DataHandling::NXcanSAS::sasProcessTermCan = "can_trans_run"

Definition at line 199 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ sasProcessTermCanDirect

const std::string Mantid::DataHandling::NXcanSAS::sasProcessTermCanDirect = "can_direct_run"

◆ sasProcessTermCanScatter

const std::string Mantid::DataHandling::NXcanSAS::sasProcessTermCanScatter = "can_scatter_run"

◆ sasProcessTermSampleDirect

const std::string Mantid::DataHandling::NXcanSAS::sasProcessTermSampleDirect = "sample_direct_run"

◆ sasProcessTermSampleTrans

const std::string Mantid::DataHandling::NXcanSAS::sasProcessTermSampleTrans = "sample_trans_run"

◆ sasProcessTermScaledBgSubScaleFactor

const std::string Mantid::DataHandling::NXcanSAS::sasProcessTermScaledBgSubScaleFactor = "scaled_bgsub_scale_factor"

◆ sasProcessTermScaledBgSubWorkspace

const std::string Mantid::DataHandling::NXcanSAS::sasProcessTermScaledBgSubWorkspace = "scaled_bgsub_workspace"

◆ sasProcessTermSvn

const std::string Mantid::DataHandling::NXcanSAS::sasProcessTermSvn = "svn"

Definition at line 198 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ sasProcessTermUserFile

const std::string Mantid::DataHandling::NXcanSAS::sasProcessTermUserFile = "user_file"

Definition at line 200 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ sasProcessUserFileInLogs

const std::string Mantid::DataHandling::NXcanSAS::sasProcessUserFileInLogs = "UserFile"

Definition at line 201 of file NXcanSASDefinitions.h.

Referenced by addProcess().

◆ sasSampleEMFieldDirectionAttr

const std::string Mantid::DataHandling::NXcanSAS::sasSampleEMFieldDirectionAttr = "direction"

Definition at line 184 of file NXcanSASDefinitions.h.

◆ sasSampleEMFieldDirectionAzimuthal

const std::string Mantid::DataHandling::NXcanSAS::sasSampleEMFieldDirectionAzimuthal = "azimuthal_angle"

Definition at line 187 of file NXcanSASDefinitions.h.

Referenced by addEMFieldDirection().

◆ sasSampleEMFieldDirectionPolar

const std::string Mantid::DataHandling::NXcanSAS::sasSampleEMFieldDirectionPolar = "polar_angle"

Definition at line 186 of file NXcanSASDefinitions.h.

Referenced by addEMFieldDirection().

◆ sasSampleEMFieldDirectionRotation

const std::string Mantid::DataHandling::NXcanSAS::sasSampleEMFieldDirectionRotation = "rotation_angle"

Definition at line 188 of file NXcanSASDefinitions.h.

Referenced by addEMFieldDirection().

◆ sasSampleEMFieldDirectionSphericalAttr

const std::string Mantid::DataHandling::NXcanSAS::sasSampleEMFieldDirectionSphericalAttr = "direction_spherical"

Definition at line 185 of file NXcanSASDefinitions.h.

◆ sasSampleEMFieldDirectionUnitsAttr

const std::string Mantid::DataHandling::NXcanSAS::sasSampleEMFieldDirectionUnitsAttr = "degrees"

Definition at line 189 of file NXcanSASDefinitions.h.

Referenced by addEMFieldDirection().

◆ sasSampleMagneticField

const std::string Mantid::DataHandling::NXcanSAS::sasSampleMagneticField = "magnetic_field"

◆ sasSeparator

const std::string Mantid::DataHandling::NXcanSAS::sasSeparator = ","

Definition at line 60 of file NXcanSASDefinitions.h.

Referenced by addData2D(), and addPolarizedData().

◆ sasSignal

const std::string Mantid::DataHandling::NXcanSAS::sasSignal = "signal"

Definition at line 59 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasTransmissionSpectrumClassAttr

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumClassAttr = "SAStransmission_spectrum"

Definition at line 217 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasTransmissionSpectrumGroupName

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumGroupName = "sastransmission_spectrum"

◆ sasTransmissionSpectrumLambda

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumLambda = "lambda"

Definition at line 227 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasTransmissionSpectrumNameAttr

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumNameAttr = "name"

Definition at line 223 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasTransmissionSpectrumNameCanAttrValue

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumNameCanAttrValue = "can"

◆ sasTransmissionSpectrumNameSampleAttrValue

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumNameSampleAttrValue = "sample"

◆ sasTransmissionSpectrumT

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumT = "T"

◆ sasTransmissionSpectrumTdev

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumTdev = "Tdev"

Definition at line 229 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasTransmissionSpectrumTimeStampAttr

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumTimeStampAttr = "timestamp"

Definition at line 226 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasTransmissionSpectrumTIndices

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumTIndices = "T_indices"

Definition at line 220 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasTransmissionSpectrumTUncertainties

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumTUncertainties = "T_uncertainties"

Definition at line 222 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasTransmissionSpectrumTUncertainty

const std::string Mantid::DataHandling::NXcanSAS::sasTransmissionSpectrumTUncertainty = "T_uncertainty"

Definition at line 221 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasUncertaintiesAttr

const std::string Mantid::DataHandling::NXcanSAS::sasUncertaintiesAttr = "uncertainties"

Definition at line 75 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasUncertaintyAttr

const std::string Mantid::DataHandling::NXcanSAS::sasUncertaintyAttr = "uncertainty"

Standards state that "uncertainties" should be used, however different facilities interpret the standards differently.

At time of writing, 01/19, both "uncertainty" and "uncertainties" are needed so that Mantid NXcanSAS output is compatible with all other NXcanSAS files.

Definition at line 74 of file NXcanSASDefinitions.h.

Referenced by addTransmission().

◆ sasUnitAttr

const std::string Mantid::DataHandling::NXcanSAS::sasUnitAttr = "units"