Skip to content

Commit

Permalink
More work on workflow diagrams
Browse files Browse the repository at this point in the history
Refs #10855
  • Loading branch information
DanNixon committed May 18, 2015
1 parent 10e9539 commit 832f4cb
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 123 deletions.
Expand Up @@ -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
-----

Expand Down
Expand Up @@ -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
-----

Expand Down
Expand Up @@ -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 {
Expand Down
Expand Up @@ -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 {
Expand All @@ -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
Expand All @@ -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 {
Expand All @@ -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
Expand All @@ -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
}
51 changes: 0 additions & 51 deletions Code/Mantid/docs/source/diagrams/IndirectReductionCommon_wkflw.dot

This file was deleted.

2 changes: 1 addition & 1 deletion Code/Mantid/scripts/Inelastic/IndirectReductionCommon.py
Expand Up @@ -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)
Expand Down

0 comments on commit 832f4cb

Please sign in to comment.