diff --git a/Code/Mantid/docs/source/algorithms/ISISIndirectDiffractionReduction-v1.rst b/Code/Mantid/docs/source/algorithms/ISISIndirectDiffractionReduction-v1.rst index 00846e2250bb..3a315f589372 100644 --- a/Code/Mantid/docs/source/algorithms/ISISIndirectDiffractionReduction-v1.rst +++ b/Code/Mantid/docs/source/algorithms/ISISIndirectDiffractionReduction-v1.rst @@ -15,15 +15,8 @@ inelastic instruments at ISIS. Workflow -------- -The workflow of this algoirhm is shown in the following flowchart. - .. diagram:: ISISIndirectDiffractionReduction-v1_wkflw.dot -This workflow uses routines from the IndirectReductionCommon Python file which -are described in the following flowchart. - -.. diagram:: IndirectReductionCommon_wkflw.dot - Usage ----- diff --git a/Code/Mantid/docs/source/algorithms/ISISIndirectEnergyTransfer-v1.rst b/Code/Mantid/docs/source/algorithms/ISISIndirectEnergyTransfer-v1.rst index 011e7626dd9a..c0d2f42e1b5f 100644 --- a/Code/Mantid/docs/source/algorithms/ISISIndirectEnergyTransfer-v1.rst +++ b/Code/Mantid/docs/source/algorithms/ISISIndirectEnergyTransfer-v1.rst @@ -15,15 +15,8 @@ indirect geometry instrument at ISIS. Workflow -------- -The workflow of this algoirhm is shown in the following flowchart. - .. diagram:: ISISIndirectEnergyTransfer-v1_wkflw.dot -This workflow uses routines from the IndirectReductionCommon Python file which -are described in the following flowchart. - -.. diagram:: IndirectReductionCommon_wkflw.dot - Usage ----- diff --git a/Code/Mantid/docs/source/diagrams/ISISIndirectDiffractionReduction-v1_wkflw.dot b/Code/Mantid/docs/source/diagrams/ISISIndirectDiffractionReduction-v1_wkflw.dot index 80fb0e3ccd0f..ff7f0c2ab820 100644 --- a/Code/Mantid/docs/source/diagrams/ISISIndirectDiffractionReduction-v1_wkflw.dot +++ b/Code/Mantid/docs/source/diagrams/ISISIndirectDiffractionReduction-v1_wkflw.dot @@ -29,17 +29,17 @@ digraph ISISIndirectDiffractionReduction { subgraph processes { $process_style - load_files - get_multi_frame_rebin - identify_bad_detectors - unwrap_monitor - process_monitor_efficiency - scale_monitor - scale_detectors - rebin_reduction - group_spectra - fold_chopped - rename_reduction + load_files [label="load_files\nLoads run files and instrument parameters.\nChops data into multiple frames if required.\nSumms runs if required."] + get_multi_frame_rebin [label="get_multi_frame_rebin\nGets a rebin string for rebinning\nmultiple frames."] + identify_bad_detectors [label="identify_bad_detectors\nGets a list of noisy detectors using\nthe IdentifyNoisyDetectors algorithm."] + unwrap_monitor [label="unwrap_monitor\nUnwraps monitor based on IPF options\nusing UnwrapMonitor algorithm."] + process_monitor_efficiency [label="process_monitor_efficiency\nCorrects for monitor efficiency by\narea, thickness and attenuation."] + scale_monitor [label="scale_monitor\nApplies monitor scaling\nas per the IPF."] + scale_detectors [label="scale_detectors\nScales detectors by the\nmonitor intensity."] + rebin_reduction [label="rebin_reduction\nRebins the reduction based\non the RebinParam option."] + group_spectra [label="group_spectra\nGroups spectra based\non the GroupingPolicy."] + fold_chopped [label="fold_chopped\nFolds multiple frames into\na single reduction."] + rename_reduction [label="rename_reduction\nRenames reduced workspaces\nas per the IPF options."] } subgraph values { diff --git a/Code/Mantid/docs/source/diagrams/ISISIndirectEnergyTransfer-v1_wkflw.dot b/Code/Mantid/docs/source/diagrams/ISISIndirectEnergyTransfer-v1_wkflw.dot index 126c8cb1edb6..4d5383966c42 100644 --- a/Code/Mantid/docs/source/diagrams/ISISIndirectEnergyTransfer-v1_wkflw.dot +++ b/Code/Mantid/docs/source/diagrams/ISISIndirectEnergyTransfer-v1_wkflw.dot @@ -4,15 +4,15 @@ digraph ISISIndirectEnergyTransfer { subgraph decisions { $decision_style - is_multi_frame [label="Is Data Multiple Frames?"] - is_x_unit_mev [label="Is UnitX in meV?"] - should_fold [label="FoldMultipleFrames?"] - have_scale_factor [label="ScaleFactor is not 1?"] - have_background_range [label="Have BackgroundRange?"] - have_calibration_workspace [label="Have CalibrationWorksapce"] - have_detailed_balance [label="Have DetailedBalance?"] - have_save_formats [label="Have SaveFormats?"] - need_to_unwrap [label="Need to Unwrap Monitor?"] + is_multi_frame [label="Is Data Multiple Frames?"] + is_x_unit_mev [label="Is UnitX in meV?"] + should_fold [label="FoldMultipleFrames?"] + have_scale_factor [label="ScaleFactor is not 1?"] + have_background_range [label="Have BackgroundRange?"] + have_calibration_workspace [label="Have CalibrationWorksapce"] + have_detailed_balance [label="Have DetailedBalance?"] + have_save_formats [label="Have SaveFormats?"] + need_to_unwrap [label="Need to Unwrap Monitor?"] } subgraph params { @@ -38,9 +38,9 @@ digraph ISISIndirectEnergyTransfer { subgraph algorithms { $algorithm_style - ConvertUnits - ConvertUnits_DeltaE [label="ConvertUnits"] - ConvertUnits_Output [label="ConvertUnits"] + ConvertUnits_unwrap_monitor [label="ConvertUnits"] + ConvertUnits_DeltaE [label="ConvertUnits"] + ConvertUnits_Output [label="ConvertUnits"] ConvertToDistribution ConvertFromDistribution ExponentialCorrection @@ -53,19 +53,18 @@ digraph ISISIndirectEnergyTransfer { subgraph processes { $process_style - load_files - get_multi_frame_rebin - identify_bad_detectors - unwrap_monitor - scale_monitor - process_monitor_efficiency - scale_monitor - scale_detectors - rebin_reduction - group_spectra - fold_chopped - rename_reduction - save_reduction + load_files [label="load_files\nLoads run files and instrument parameters.\nChops data into multiple frames if required.\nSumms runs if required."] + get_multi_frame_rebin [label="get_multi_frame_rebin\nGets a rebin string for rebinning\nmultiple frames."] + identify_bad_detectors [label="identify_bad_detectors\nGets a list of noisy detectors using\nthe IdentifyNoisyDetectors algorithm."] + unwrap_monitor [label="unwrap_monitor\nUnwraps monitor based on IPF options\nusing UnwrapMonitor algorithm."] + process_monitor_efficiency [label="process_monitor_efficiency\nCorrects for monitor efficiency by\narea, thickness and attenuation."] + scale_monitor [label="scale_monitor\nApplies monitor scaling\nas per the IPF."] + scale_detectors [label="scale_detectors\nScales detectors by the\nmonitor intensity."] + rebin_reduction [label="rebin_reduction\nRebins the reduction based\non the RebinParam option."] + group_spectra [label="group_spectra\nGroups spectra based\non the GroupingPolicy."] + fold_chopped [label="fold_chopped\nFolds multiple frames into\na single reduction."] + rename_reduction [label="rename_reduction\nRenames reduced workspaces\nas per the IPF options."] + save_reduction [label="save_reduction\nSaves reduced files in formats\ngiven by SaveFormats."] } subgraph values { @@ -74,6 +73,11 @@ digraph ISISIndirectEnergyTransfer { multi_frame_num_bins [label="Maximum Number of Bins"] masked_detectors [label="Masked Detectors"] detailed_balance_corr_factor [label="11.606 / (2 * DetailedBalance)"] + e_mode_unwrap_monitor [label="Elastic"] + unit_unwrap_monitor [label="Wavelength"] + e_mode [label="Indirect"] + energy_unit [label="DeltaE"] + e_mode_output_unit [label="Indirect"] } InputFiles -> load_files @@ -89,55 +93,61 @@ digraph ISISIndirectEnergyTransfer { load_files -> identify_bad_detectors identify_bad_detectors -> masked_detectors load_files -> need_to_unwrap - need_to_unwrap -> unwrap_monitor [label="Yes"] - unwrap_monitor -> ConvertUnits - ConvertUnits -> process_monitor_efficiency - need_to_unwrap -> process_monitor_efficiency [label="No"] + need_to_unwrap -> unwrap_monitor [label="Yes"] + unwrap_monitor -> ConvertUnits_unwrap_monitor + unit_unwrap_monitor -> ConvertUnits_unwrap_monitor [label="Target"] + e_mode_unwrap_monitor -> ConvertUnits_unwrap_monitor [label="EMode"] + ConvertUnits_unwrap_monitor -> process_monitor_efficiency + need_to_unwrap -> process_monitor_efficiency [label="No"] process_monitor_efficiency -> scale_monitor scale_monitor -> have_background_range - have_background_range -> ConvertToDistribution [label="Yes"] + have_background_range -> ConvertToDistribution [label="Yes"] ConvertToDistribution -> CalculateFlatBackground BackgroundRange -> CalculateFlatBackground CalculateFlatBackground -> ConvertFromDistribution ConvertFromDistribution -> have_calibration_workspace - have_background_range -> have_calibration_workspace [label="No"] - have_calibration_workspace -> Divide [label="Yes"] + have_background_range -> have_calibration_workspace [label="No"] + have_calibration_workspace -> Divide [label="Yes"] CalibrationWorksapce -> Divide Divide -> scale_detectors - have_calibration_workspace -> scale_detectors [label="No"] + have_calibration_workspace -> scale_detectors [label="No"] scale_detectors -> ConvertUnits_DeltaE + energy_unit -> ConvertUnits_DeltaE [label="Target"] + e_mode -> ConvertUnits_DeltaE [label="EMode"] ConvertUnits_DeltaE -> CorrectKiKf + e_mode -> CorrectKiKf [label="EMode"] CorrectKiKf -> rebin_reduction RebinString -> rebin_reduction multi_frame_rebin_string -> rebin_reduction multi_frame_num_bins -> rebin_reduction rebin_reduction -> have_detailed_balance - have_detailed_balance -> ExponentialCorrection [label="Yes"] + have_detailed_balance -> ExponentialCorrection [label="Yes"] DetailedBalance -> detailed_balance_corr_factor - detailed_balance_corr_factor -> ExponentialCorrection [label="C1"] + detailed_balance_corr_factor -> ExponentialCorrection [label="C1"] ExponentialCorrection -> have_scale_factor - have_detailed_balance -> have_scale_factor [label="No"] - have_scale_factor -> Scale [label="Yes"] + have_detailed_balance -> have_scale_factor [label="No"] + have_scale_factor -> Scale [label="Yes"] ScaleFactor -> Scale Scale -> group_spectra - have_scale_factor -> group_spectra [label="No"] + have_scale_factor -> group_spectra [label="No"] masked_detectors -> group_spectra GroupingMethod -> group_spectra MapFile -> group_spectra GroupingWorkspace -> group_spectra group_spectra -> is_multi_frame - is_multi_frame -> should_fold [label="Yes"] - should_fold -> fold_chopped [label="Yes"] - should_fold -> is_x_unit_mev [label="No"] + is_multi_frame -> should_fold [label="Yes"] + should_fold -> fold_chopped [label="Yes"] + should_fold -> is_x_unit_mev [label="No"] fold_chopped -> is_x_unit_mev - is_multi_frame -> is_x_unit_mev [label="No"] - is_x_unit_mev -> ConvertUnits_Output [label="No"] - UnitX -> ConvertUnits_Output + is_multi_frame -> is_x_unit_mev [label="No"] + is_x_unit_mev -> ConvertUnits_Output [label="No"] + UnitX -> ConvertUnits_Output [label="Target"] + e_mode_output_unit -> ConvertUnits_Output [label="EMode"] ConvertUnits_Output -> rename_reduction - is_x_unit_mev -> rename_reduction [label="Yes"] + is_x_unit_mev -> rename_reduction [label="Yes"] rename_reduction -> GroupWorkspaces rename_reduction -> have_save_formats - have_save_formats -> save_reduction [label="Yes"] + have_save_formats -> save_reduction [label="Yes"] SaveFormats -> save_reduction GroupWorkspaces -> OutputWorkspace } diff --git a/Code/Mantid/docs/source/diagrams/IndirectReductionCommon_wkflw.dot b/Code/Mantid/docs/source/diagrams/IndirectReductionCommon_wkflw.dot deleted file mode 100644 index 207b1b59abe5..000000000000 --- a/Code/Mantid/docs/source/diagrams/IndirectReductionCommon_wkflw.dot +++ /dev/null @@ -1,51 +0,0 @@ -digraph ISISIndirectReductionCommon { - label="ISISIndirectReductionCommon Flowchart" - $global_style - - subgraph decisions { - $decision_style - load_files_ShouldChopData [label="Should Chop Data?"] - load_files_IsChopped [label="Data Is Chopped?"] - load_files_SumFiles [label="Sum Files?"] - } - - subgraph params { - $param_style - } - - subgraph algorithms { - $algorithm_style - load_files_Load [label="Load"] - load_files_LoadParameterFile [label="LoadParameterFile"] - load_files_ChopData [label="ChopData"] - load_files_ExtractSingleSpectrum [label="ExtractSingleSpectrum"] - load_files_CropWorkspace [label="CropWorkspace"] - } - - subgraph processes { - $process_style - load_files_SumRegular [label="sum_regular"] - load_files_SumChopped [label="sum_chopped"] - } - - load_files_Start [label="load_files"] - load_files_End [label="End"] - - subgraph load_files { - load_files_Start -> load_files_Load - load_files_Load -> load_files_LoadParameterFile - load_files_LoadParameterFile -> load_files_ShouldChopData - load_files_ShouldChopData -> load_files_ChopData [label="Yes"] - load_files_ChopData -> load_files_ExtractSingleSpectrum - load_files_ShouldChopData -> load_files_ExtractSingleSpectrum [label="No"] - load_files_ExtractSingleSpectrum -> load_files_CropWorkspace - load_files_CropWorkspace -> load_files_SumFiles - load_files_SumFiles -> load_files_IsChopped [label="Yes"] - load_files_IsChopped -> load_files_SumRegular [label="No"] - load_files_IsChopped -> load_files_SumChopped [label="Yes"] - load_files_SumFiles -> load_files_End [label="No"] - load_files_SumRegular -> load_files_End - load_files_SumChopped -> load_files_End - } - -} diff --git a/Code/Mantid/scripts/Inelastic/IndirectReductionCommon.py b/Code/Mantid/scripts/Inelastic/IndirectReductionCommon.py index ca9de3ed664c..7193cef0d9ce 100644 --- a/Code/Mantid/scripts/Inelastic/IndirectReductionCommon.py +++ b/Code/Mantid/scripts/Inelastic/IndirectReductionCommon.py @@ -351,7 +351,7 @@ def scale_monitor(workspace_name): def scale_detectors(workspace_name, e_mode='Indirect'): """ - Scales detectors by monitor intnesity. + Scales detectors by monitor intensity. @param workspace_name Name of detector workspace @param e_mode Energy mode (Indirect for spectroscopy, Elastic for diffraction)