Commit 3750b70e authored by Martyn Gigg's avatar Martyn Gigg Committed by GitHub
Browse files

Merge pull request #19983 from mantidproject/19966_Add_workflow_diagrams_for_ISIS_Powder

Add workflow diagrams for ISIS Powder + Minor refactor
parents 15a34ad8 3265e4b9
......@@ -7,6 +7,9 @@
# should compress well
*.xml hooks.MaxObjectKiB130902=2048
# .dot files are diff'd using Word on Windows by default
*.dot !diff
# Allowing gSoap generated files to be committed.
/Code/Mantid/Framework/ICat/inc/MantidICat/ICat3/GSoapGenerated/ICat3H.h hooks.MaxObjectKiB131025=2048
/Code/Mantid/Framework/ICat/src/ICat3/GSoapGenerated/ICat3C.cpp hooks.MaxObjectKiB131025=5120
......
digraph isisPowderGenericAlgs{
label="ISISPowder - Apply absorption corrections"
$global_style
// **Labels
label_GEM [label="Apply absorption corrections - GEM"]
label_PEARL [label="Apply absorption corrections - PEARL"]
label_POLARIS [label="Apply absorption corrections - POLARIS"]
// **Parameters
subgraph params {
$param_style
// General
param_MayersInputs [label="User/Adv config:\n\n Chemical Formula\n Cylinder Height\n Cylinder Position\n Cylinder Radius\n Number Density\n"]
// PEARL
param_advAbsFilename [label="Adv config: Absorption Filename"]
}
// **Processes (inc. bespoke inst steps)
subgraph {
$process_style
}
// **Algorithms
subgraph algorithms{
$algorithm_style
// General
alg_MayersSampleCorr [label="Mayers Sample Correction"]
// GEM
alg_GEM_maskDetector [label="Mask detectors 1-100"]
// PEARL
alg_PEARL_Divide [label="Divide: Van ws / Absorb ws"]
alg_PEARL_Load [label="Load"]
alg_PEARL_RebinWorkspace [label="Rebin: Van ws to match Absorb ws"]
// POLARIS
alg_POLARIS_maskDetector [label="Mask detectors 1-54"]
}
// **Decisions
subgraph decisions{
$decision_style
// GEM
if_GEM_isVanadium [label="If: Is Vanadium"]
// POLARIS
if_POLARIS_isVanadium [label="If: Is Vanadium"]
}
// **Graph layout for GEM / POLARIS
subgraph ApplyAbsorbCorrGemPolaris{
// *GEM
label_GEM -> if_GEM_isVanadium
// Is Vanadium
if_GEM_isVanadium -> alg_GEM_maskDetector [label="True"]
alg_GEM_maskDetector -> alg_MayersSampleCorr [label="Use Adv Config"]
// Not Vanadium
if_GEM_isVanadium -> alg_MayersSampleCorr [label="False - Use User Config"]
// *POLARIS
label_POLARIS -> if_POLARIS_isVanadium
// Is Vanadium
if_POLARIS_isVanadium -> alg_POLARIS_maskDetector [label="True"]
alg_POLARIS_maskDetector -> alg_MayersSampleCorr [label="Use Adv Config"]
// Not Vanadium
if_POLARIS_isVanadium -> alg_MayersSampleCorr [label="False - Use User Config"]
// Vanadium params
param_MayersInputs -> alg_MayersSampleCorr
}
// **Graph layout for PEARL
subgraph ApplyAbsorbPearl{
// Load previously calculated Abs corrections
label_PEARL -> alg_PEARL_Load
param_advAbsFilename -> alg_PEARL_Load
// Rebin and divide
alg_PEARL_Load -> alg_PEARL_RebinWorkspace
alg_PEARL_RebinWorkspace -> alg_PEARL_Divide
}
}
\ No newline at end of file
digraph isisPowderCreateVanadium{
label="ISISPowder - 'create_vanadium'"
$global_style
// **Labels
label_start [label="Start ISISPowder 'create_vanadium'"]
// **Parameters
subgraph params {
$param_style
// User input
param_apply_absorb [label="User param: absorption corrections"]
// From user provided files
param_calFileName [label="Calibration file name"]
param_calMapping_1 [label="Calibration mapping file"]
param_calMapping_2 [label="Calibration mapping file"]
param_emptyRunNumber [label="Empty run number(s)"]
param_vanadiumRunNumber [label="Vanadium run number(s)"]
// From advanced config
param_groupingCalFile [label="Adv config: Grouping cal file name"]
param_rawTOFCropValues [label="Adv config: Raw TOF cropping values"]
param_vanadiumTOFCropValues [label="Adv config: Vanadium TOF cropping values"]
param_vanadiumSplineCoefficient [label="Adv config: Vanadium Spline Coefficient"]
}
// **Processes (inc. bespoke inst steps)
subgraph {
$process_style
// Common
proc_LoadCurrentNormWS_1 [label="Load current normalised workspace(s)"]
// Bespoke
proc_InstApplyAbsorbCorr [label="Inst specific: Apply absorption corrections"]
proc_InstMaskPeaks [label="Inst specific: Mask peaks in Vanadium data"]
proc_InstSaveFocused [label="Inst specific: Save focused banks"]
}
// **Algorithms
subgraph algorithms{
$algorithm_style
alg_Align [label="Align Detectors"]
alg_CropRawTOF [label="Crop data to expected TOF"]
alg_CropVanTOF [label="Crop data to expected TOF"]
alg_DiffractionFocusing [label="Diffraction Focusing"]
alg_ExtractWsSpectra [label="Extract spectra into individual banks"]
alg_SaveNexusProcessed [label="Save Nexus file"]
alg_SplineVanadium [label="Spline Background"]
alg_Subtract_van_empty [label="Subtract: vanadium - empty"]
}
// **Decisions
subgraph decisions{
$decision_style
if_apply_absorb [label="If: absorb corrections"]
}
// **Graph layout
subgraph ISISPwd_create_van {
// Load current normalised vanadium file
label_start -> param_calMapping_1
param_calMapping_1 -> param_vanadiumRunNumber
param_vanadiumRunNumber -> proc_LoadCurrentNormWS_1
// Load current normalised empty file
param_calMapping_1 -> param_emptyRunNumber
param_emptyRunNumber -> proc_LoadCurrentNormWS_1
// Subtract empty from vanadium
proc_LoadCurrentNormWS_1 -> alg_Subtract_van_empty
// Crop to expected raw TOF
param_rawTOFCropValues -> alg_CropRawTOF
alg_Subtract_van_empty -> alg_CropRawTOF
// Align detectors
param_calMapping_2 -> param_calFileName
param_calFileName -> alg_Align
alg_CropRawTOF -> alg_Align
// Apply absorption corrections
alg_Align -> if_apply_absorb
param_apply_absorb -> if_apply_absorb
if_apply_absorb -> proc_InstApplyAbsorbCorr [label="True"]
// Focusing
param_groupingCalFile -> alg_DiffractionFocusing
if_apply_absorb -> alg_DiffractionFocusing [label="False"]
proc_InstApplyAbsorbCorr -> alg_DiffractionFocusing
// Save focused spectra
alg_DiffractionFocusing -> proc_InstSaveFocused
// Extract and crop vanadium spectra for spline
alg_DiffractionFocusing -> alg_ExtractWsSpectra [label="Creating vanadium splines"]
param_vanadiumTOFCropValues -> alg_CropVanTOF
alg_ExtractWsSpectra -> alg_CropVanTOF
alg_CropVanTOF -> proc_InstMaskPeaks
// Spline the vanadium
param_vanadiumSplineCoefficient -> alg_SplineVanadium
proc_InstMaskPeaks -> alg_SplineVanadium
alg_SplineVanadium -> alg_SaveNexusProcessed
}
}
\ No newline at end of file
digraph isisPowderfocus{
label="ISISPowder - 'focus'"
$global_style
// **Labels
label_start [label="Start ISISPowder 'focus'"]
// **Parameters
subgraph params {
$param_style
// User input
param_runNumbers [label="User param: Run number(s)"]
param_sampleEmptyRunNumber [label="User param: Sample empty run number(s)"]
param_vanNorm [label="User param: Vanadium normalisation"]
// From user provided files
param_calFileName [label="Calibration file name"]
param_calMapping_1 [label="Calibration mapping file"]
param_calMapping_2 [label="Calibration mapping file"]
param_emptyRunNumber [label="Empty run number(s)"]
// From advanced config
param_groupingCalFile [label="Adv config: Grouping cal file name"]
param_rawTOFCropValues [label="Adv config: Raw TOF cropping values"]
}
// **Processes (inc. bespoke inst steps)
subgraph {
$process_style
// Common
proc_LoadCurrentNormWS_1 [label="Load current normalised workspace(s)"]
// Bespoke
proc_InstApplyAbsorbCorr [label="Inst specific: Apply absorption corrections"]
proc_InstReduceBinWidths [label="Inst specific: Rebin to reduce final bin widths"]
proc_InstSaveFocused [label="Inst specific: Save focused banks"]
}
// **Algorithms
subgraph algorithms{
$algorithm_style
alg_Align [label="Align Detectors"]
alg_ConvertUnitsTOFVan [label="Convert Units: TOF"]
alg_CropRawTOF [label="Crop data to expected TOF"]
alg_CropFinalTOF [label="Crop data to final TOF range"]
alg_DiffractionFocusing [label="Diffraction Focusing"]
alg_DivideVan [label="Divide: data / Vanadium"]
alg_ExtractWsSpectra [label="Extract spectra into individual banks"]
alg_LoadNexusVan [label="Load splined Vanadium from 'create_vanadium'"]
alg_RebinToWorkspaceVan [label="Rebin: Van ws to match data binning"]
alg_Subtract_sample_empty [label="Subtract: runs - sample empty"]
alg_Subtract_van_empty [label="Subtract: runs - instrument empty"]
}
// **Decisions
subgraph decisions{
$decision_style
if_apply_absorb [label="If: absorb corrections"]
if_van_normalisation [label="If: Vanadium normalisation"]
if_sample_empty_provided_1 [label="If: Sample empty given"]
}
// **Graph layout
subgraph ISISPwd_focus {
// Load workspace to be processed
label_start -> param_runNumbers
param_runNumbers -> proc_LoadCurrentNormWS_1
// Load empty workspace
param_calMapping_1 -> param_emptyRunNumber
param_emptyRunNumber -> proc_LoadCurrentNormWS_1
// Load sample empty run numbers
if_sample_empty_provided_1 -> param_sampleEmptyRunNumber
param_sampleEmptyRunNumber -> proc_LoadCurrentNormWS_1
// Subtract empty instrument
proc_LoadCurrentNormWS_1 -> alg_Subtract_van_empty
// Subtract sample empty
alg_Subtract_van_empty -> alg_Subtract_sample_empty [label="If: Sample empty given"]
// Crop raw data in TOF
param_rawTOFCropValues -> alg_CropRawTOF
alg_Subtract_sample_empty -> alg_CropRawTOF
alg_Subtract_van_empty -> alg_CropRawTOF
// Align detectors
param_calMapping_2 -> param_calFileName
param_calFileName -> alg_Align
alg_CropRawTOF -> alg_Align
// Apply absorption corrections
alg_Align -> if_apply_absorb
param_apply_absorb -> if_apply_absorb
if_apply_absorb -> proc_InstApplyAbsorbCorr [label="True"]
// Focusing
param_groupingCalFile -> alg_DiffractionFocusing
if_apply_absorb -> alg_DiffractionFocusing [label="False"]
proc_InstApplyAbsorbCorr -> alg_DiffractionFocusing
// Splitting into banks
alg_DiffractionFocusing -> alg_ConvertUnitsTOFVan
alg_ConvertUnitsTOFVan -> alg_ExtractWsSpectra
// Vanadium normalisation
alg_ExtractWsSpectra -> if_van_normalisation
param_vanNorm -> if_van_normalisation
if_van_normalisation -> alg_LoadNexusVan [label="True"]
alg_LoadNexusVan -> alg_RebinToWorkspaceVan
alg_RebinToWorkspaceVan -> alg_DivideVan
// Crop data to final TOF range
if_van_normalisation -> alg_CropFinalTOF [label="False"]
alg_DivideVan -> alg_CropFinalTOF
alg_CropFinalTOF -> proc_InstReduceBinWidths
// Save data
proc_InstReduceBinWidths -> proc_InstSaveFocused
}
}
\ No newline at end of file
digraph isisPowderGenericAlgs{
label="ISISPowder - Generic Processes"
$global_style
// **Labels
label_LoadCurrentNormWs [label="Load Current Normalised WS"]
// **Parameters
subgraph params {
$param_style
// General
param_runNumbers [label="Param: Run number(s)"]
// User input
param_inputMode [label="User param: input mode"]
}
// **Processes (inc. bespoke inst steps)
subgraph {
$process_style
// Bespoke
proc_instNormaliseWorkspaces [label="Inst specific: Normalise Workspace(s)"]
}
// **Algorithms
subgraph algorithms{
$algorithm_style
alg_Load [label="Load Workspace(s)"]
alg_MergeWorkspaces [label="Merge Runs"]
}
// **Decisions
subgraph decisions{
$decision_style
if_inputMode [label="If: input mode"]
}
// **Graph layout for Load Current Normalised WS
subgraph LoadCurrentNormalisedWs{
// Load the list / single workspace to process
label_LoadCurrentNormWs -> alg_Load
param_runNumbers -> alg_Load
// Sum if input batching set
alg_Load -> if_inputMode
param_inputMode -> if_inputMode
if_inputMode -> alg_MergeWorkspaces [label="'Summed' or not set"]
// Normalise workspaces
alg_MergeWorkspaces -> proc_instNormaliseWorkspaces
if_inputMode -> proc_instNormaliseWorkspaces [label="'Individual'"]
}
}
\ No newline at end of file
digraph isisPowderCreateVanadium{
label="ISISPowder - Normalise By Current"
$global_style
// **Labels
label_normaliseByCurrentGeneric [label="Normalise by Current - Generic"]
label_normaliseByCurrentPearl [label="Normalise by Current - PEARL"]
// **Parameters
subgraph params {
$param_style
param_advConfigMonitorSpectrum [label="Adv config: Monitor spectrum"]
param_advConfigMonitorLambdaCropRange [label="Adv config:\n Monitor lambda crop range"]
param_advConfigMonitorSplineCoefficient [label="Adv config:\n Monitor spline coefficient"]
param_inputWorkspace [label="Workspace to normalise"]
}
// **Processes (inc. bespoke inst steps)
subgraph {
$process_style
}
// **Algorithms
subgraph algorithms{
$algorithm_style
alg_NormaliseByCurrent [label="Normalise by Current"]
// PEARL specific
alg_ConvertUnitsTOF [label="Convert Units: TOF"]
alg_ConvertUnitsWavelength [label="Convert Units: Wavelength"]
alg_ConvertUnitsWavelengthInputWs [label="Convert Units: Wavelength"]
alg_CropWorkspace [label="Crop Workspace"]
alg_ExtractSpectrumPearl [label="Extract Spectrum"]
alg_MaskBins [label="Mask Bins"]
alg_NormaliseToMonitor [label="Normalise to monitor"]
alg_SplineBackground [label="Spline Background"]
}
// **Decisions
subgraph decisions{
$decision_style
}
// Normalise by current on GEM and POLARIS
subgraph NormaliseByCurrentGeneric{
label_normaliseByCurrentGeneric -> alg_NormaliseByCurrent
}
// Normalise by current on PEARL
subgraph NormaliseByCurrentPearl{
// Extract the spectrum containing the monitor workspace
label_normaliseByCurrentPearl -> alg_ExtractSpectrumPearl
param_inputWorkspace -> alg_ExtractSpectrumPearl
param_advConfigMonitorSpectrum -> alg_ExtractSpectrumPearl
// Convert and crop to correct values
alg_ExtractSpectrumPearl -> alg_ConvertUnitsWavelength
param_advConfigMonitorLambdaCropRange -> alg_CropWorkspace
alg_ConvertUnitsWavelength -> alg_CropWorkspace
// Mask and spline
alg_CropWorkspace -> alg_MaskBins
alg_MaskBins -> alg_SplineBackground
param_advConfigMonitorSplineCoefficient -> alg_SplineBackground
// Convert Input WS to wavelength
param_inputWorkspace -> alg_ConvertUnitsWavelengthInputWs
// Finally normalise to monitor using splined ws
alg_SplineBackground -> alg_NormaliseToMonitor
alg_ConvertUnitsWavelengthInputWs -> alg_NormaliseToMonitor
alg_NormaliseToMonitor -> alg_ConvertUnitsTOF
}
}
\ No newline at end of file
digraph isisPowderCreateVanadium{
label="ISISPowder - Save Focused Banks"
$global_style
// **Labels
label_saveFocusedGeneric [label="Save Focused Banks - Generic"]
// **Parameters
subgraph params {
$param_style
param_processedBanksGeneric [label="Processed banks"]
// PEARL params
param_focusModePearl [label="User param: focus mode"]
}
// **Processes (inc. bespoke inst steps)
subgraph {
$process_style
// Bespoke
proc_focusModeAllPearl [label="Focus mode: All"]
proc_focusModeGroupsPearl [label="Focus mode: Groups"]
proc_focusModeTransPearl [label="Focus mode: Trans"]
proc_focusModeModsPearl [label="Focus mode: Mods"]
}
// **Algorithms
subgraph algorithms{
$algorithm_style
// Generic
alg_SaveNexusProcessedGeneric [label="Save Nexus Processed - TOF"]
alg_SaveGSSProcessedGeneric [label="Save GSS - TOF"]
alg_SaveXyeDSpacing [label="Save GSS - dSpacing"]
alg_SaveXyeTofGeneric [label="Save XYE - TOF"]
}
// **Decisions
subgraph decisions{
$decision_style
// Pearl
if_focusModePearl [label="If: focus mode"]
}
// **Graph layout - Generic method
subgraph SaveFocusedBanksGeneric{
// NXS
label_saveFocusedGeneric -> alg_SaveNexusProcessedGeneric
param_processedBanksGeneric -> alg_SaveNexusProcessedGeneric
// GSS
alg_SaveNexusProcessedGeneric -> alg_SaveGSSProcessedGeneric
// XYE
alg_SaveGSSProcessedGeneric -> alg_SaveXyeDSpacing [label="XYE files saved into subdirectory"]
alg_SaveXyeDSpacing -> alg_SaveXyeTofGeneric
}
subgraph SaveFocusedBankPearl{
// Determine focus mode from user input
label_saveFocusedPearl -> if_focusModePearl
param_focusModePearl -> if_focusModePearl
// Switch to various sub-processes detailed in different file
if_focusModePearl -> proc_focusModeAllPearl
if_focusModePearl -> proc_focusModeGroupsPearl
if_focusModePearl -> proc_focusModeModsPearl
if_focusModePearl -> proc_focusModeTransPearl
}
}
\ No newline at end of file
digraph isisPowderCreateVanadium{
label="ISISPowder - PEARL Focus Mode saving"
$global_style
// **Labels
// PEARL Focus modes - this helps keeps the graph tidy
label_focusModeAllPearl [label="Focus mode: All"]
label_focusModeGroupsPearl [label="Focus mode: Groups"]
label_focusModeModsPearl [label="Focus mode: Mods"]
label_focusModeTransPearl [label="Focus mode: Trans"]
label_attenuateWorkspacePearl [label="Attenuate Workspace"]
// **Parameters
subgraph params {
$param_style
param_attenuatePearl_all [label="User param: attenuate"]
param_attenuatePearl_trans [label="User param: attenuate"]
param_attenuatePearlFilePath [label="User param:\n Full file path to attenuation file"]
}
// **Processes (inc. bespoke inst steps)
subgraph {
$process_style
proc_attenuatePearl_all [label="Pearl: Attenuate workspace"]
proc_attenuatePearl_trans [label="Pearl: Attenuate workspace"]
}
// **Algorithms
subgraph algorithms{
$algorithm_style
// Focus mode: All
alg_MergeRuns_all [label="Merge Runs: Banks 1-9 (inc.)"]
alg_Scale_all [label="Scale: 0.11111111 (1/9)"]
alg_SaveGss_all [label="Save GSS: TOF\n Appending banks 10-12 (inc.) to merged runs"]
alg_SaveGssSummed_all [label="Save GSS: TOF"]
alg_SaveNexusProcessedSummed_all [label="Save Nexus Processed: dSpacing"]