Skip to content
Snippets Groups Projects
Commit 267085bf authored by David Fairbrother's avatar David Fairbrother
Browse files

Re #19575 Added initial reference guide for Pearl

parent 3cc931ba
No related merge requests found
......@@ -346,8 +346,6 @@ the run number corresponding to the vanadium. However it
must be in the correct cycle according to the
:ref:`calibration_mapping_gem-isis-powder-ref`.
Additionally the run
Example Input:
.. code-block:: Python
......@@ -422,6 +420,27 @@ Example Input:
# Or
gem_example.focus(multiple_scattering=False, ...)
.. _output_directory_gem_isis-powder-diffraction-ref:
output_directory
^^^^^^^^^^^^^^^^
Specifies the path to the output directory to save resulting files
into. The script will automatically create a folder
with the label determined from the
:ref:`calibration_mapping_file_gem_isis-powder-diffraction-ref`
and within that create another folder for the current
:ref:`user_name_gem_isis-powder-diffraction-ref`.
Within this folder processed data will be saved out in
several formats.
Example Input:
.. code-block:: Python
output_dir = r"C:\path\to\output_dir"
gem_example = Gem(output_directory=output_dir, ...)
.. _run_number_gem_isis-powder-diffraction-ref:
run_number
......@@ -479,27 +498,6 @@ Example Input:
# Or a range of numbers
gem_example.focus(sample_empty="100-110", ...)
.. _output_directory_gem_isis-powder-diffraction-ref:
output_directory
^^^^^^^^^^^^^^^^
Specifies the path to the output directory to save resulting files
into. The script will automatically create a folder
with the label determined from the
:ref:`calibration_mapping_file_gem_isis-powder-diffraction-ref`
and within that create another folder for the current
:ref:`user_name_gem_isis-powder-diffraction-ref`.
Within this folder processed data will be saved out in
several formats.
Example Input:
.. code-block:: Python
output_dir = r"C:\path\to\output_dir"
gem_example = Gem(output_directory=output_dir, ...)
.. _unit_to_keep_gem_isis-powder-diffraction-ref:
unit_to_keep
......
This diff is collapsed.
......@@ -124,7 +124,6 @@ set then the following parameter is also required:
- :ref:`sample_empty_scale_polaris_isis-powder-diffraction-ref`
Example
=======
......@@ -387,8 +386,6 @@ the run number corresponding to the vanadium. However it
must be in the correct cycle according to the
:ref:`calibration_mapping_polaris-isis-powder-ref`.
Additionally the run
Example Input:
.. code-block:: Python
......@@ -443,6 +440,27 @@ Example Input:
# Or
polaris_example.focus(multiple_scattering=False, ...)
.. _output_directory_polaris_isis-powder-diffraction-ref:
output_directory
^^^^^^^^^^^^^^^^
Specifies the path to the output directory to save resulting files
into. The script will automatically create a folder
with the label determined from the
:ref:`calibration_mapping_file_polaris_isis-powder-diffraction-ref`
and within that create another folder for the current
:ref:`user_name_polaris_isis-powder-diffraction-ref`.
Within this folder processed data will be saved out in
several formats.
Example Input:
.. code-block:: Python
output_dir = r"C:\path\to\output_dir"
polaris_example = Polaris(output_directory=output_dir, ...)
.. _run_number_polaris_isis_powder-diffraction-ref:
run_number
......@@ -524,27 +542,6 @@ Example Input:
# Scale sample empty to 90% of original
polaris_example.focus(sample_empty_scale=0.9, ...)
.. _output_directory_polaris_isis-powder-diffraction-ref:
output_directory
^^^^^^^^^^^^^^^^
Specifies the path to the output directory to save resulting files
into. The script will automatically create a folder
with the label determined from the
:ref:`calibration_mapping_file_polaris_isis-powder-diffraction-ref`
and within that create another folder for the current
:ref:`user_name_polaris_isis-powder-diffraction-ref`.
Within this folder processed data will be saved out in
several formats.
Example Input:
.. code-block:: Python
output_dir = r"C:\path\to\output_dir"
polaris_example = Polaris(output_directory=output_dir, ...)
.. _user_name_polaris_isis-powder-diffraction-ref:
user_name
......
......@@ -63,7 +63,7 @@ class Pearl(AbstractInst):
def _generate_output_file_name(self, run_number_string):
inst = self._inst_settings
return pearl_algs.generate_out_name(run_number_string=run_number_string, absorb_on=inst.absorb_corrections,
return pearl_algs.generate_out_name(run_number_string=run_number_string,
long_mode_on=inst.long_mode, tt_mode=inst.tt_mode)
def _attenuate_workspace(self, input_workspace):
......
......@@ -6,10 +6,10 @@ general_params = {
"spline_coefficient": 60,
"file_names": {
"vanadium_absorb_file": "pearl_absorp_sphere_10mm_newinst2_long.nxs",
"tt88_grouping": "pearl_group_12_1_TT88.cal",
"tt70_grouping": "pearl_group_12_1_TT70.cal",
"tt35_grouping": "pearl_group_12_1_TT35.cal"
"vanadium_absorb_filename": "pearl_absorp_sphere_10mm_newinst2_long.nxs",
"tt88_grouping_filename": "pearl_group_12_1_TT88.cal",
"tt70_grouping_filename": "pearl_group_12_1_TT70.cal",
"tt35_grouping_filename": "pearl_group_12_1_TT35.cal"
},
}
......@@ -19,7 +19,7 @@ long_mode_off_params = {
# This needs to be greater than the bank TOF cropping values or you will get data that divides to 0/inf
"raw_data_tof_cropping": (0, 19995),
"vanadium_tof_cropping": (1400, 19990),
"tof_cropping_ranges": [
"focused_cropping_values": [
(1500, 19900), # Bank 1
(1500, 19900), # Bank 2
(1500, 19900), # Bank 3
......@@ -44,7 +44,7 @@ long_mode_on_params = {
# you will get data that divides to 0 or inf
"raw_data_tof_cropping": (20280, 39995),
"vanadium_tof_cropping": (20295, 39993),
"tof_cropping_ranges": [
"focused_cropping_values": [
(20300, 39990), # Bank 1
(20300, 39990), # Bank 2
(20300, 39990), # Bank 3
......@@ -66,17 +66,17 @@ long_mode_on_params = {
variable_help = {
"long_mode_<on/off>_params": {
"file_names": {
"vanadium_absorb_file_name": "Takes the name of the calculated vanadium absorption corrections. This file "
" must be located in the top level of the calibration folder",
"vanadium_absorb_filename": "Takes the name of the calculated vanadium absorption corrections. This file "
" must be located in the top level of the calibration folder",
"tt88_grouping_name": "The name of the .cal file that defines the grouping of detectors in banks for TT88. "
"This file must be located in the top level of the calibration folder.",
"tt88_grouping_filename": "The name of the .cal file that defines the grouping of detectors in banks for "
"TT88. This file must be located in the top level of the calibration folder.",
"tt70_grouping_name": "The name of the .cal file that defines the grouping of detectors in banks for TT70. "
"This file must be located in the top level of the calibration folder.",
"tt70_grouping_filename": "The name of the .cal file that defines the grouping of detectors in banks for "
"TT70. This file must be located in the top level of the calibration folder.",
"tt35_grouping_name": "The name of the .cal file that defines the grouping of detectors in banks for TT35. "
"This file must be located in the top level of the calibration folder.",
"tt35_grouping_filename": "The name of the .cal file that defines the grouping of detectors in banks for "
"TT35. This file must be located in the top level of the calibration folder.",
},
"monitor_lambda_crop_range": "The range in wavelength to crop a monitor workspace to before calculating "
......@@ -86,9 +86,9 @@ variable_help = {
"raw_data_tof_cropping": "The crop values for to apply when loading raw data. This step is applied before any "
"processing takes place. This is to crop from 40,000 microseconds in the "
"raw data to 20,000 microseconds worth of data",
"tof_cropping_ranges": "These values are used to determine the TOF range to crop a focused (not Vanadium "
"calibration) workspace to. These are applied on a bank by bank basis. They must be "
"less than the values specified for raw_data_tof_cropping."
"focused_cropping_values": "These values are used to determine the TOF range to crop a focused (not Vanadium "
"calibration) workspace to. These are applied on a bank by bank basis. They must "
"be less than the values specified for raw_data_tof_cropping."
},
"general_params": {
......
......@@ -40,11 +40,10 @@ def apply_vanadium_absorb_corrections(van_ws, run_details):
return van_ws
def generate_out_name(run_number_string, absorb_on, long_mode_on, tt_mode):
def generate_out_name(run_number_string, long_mode_on, tt_mode):
output_name = "PRL" + str(run_number_string)
# Append each mode of operation
output_name += "_" + str(tt_mode)
output_name += "_absorb" if absorb_on else ""
output_name += "_long" if long_mode_on else ""
return output_name
......@@ -70,8 +69,6 @@ def generate_vanadium_absorb_corrections(van_ws):
def get_run_details(run_number_string, inst_settings, is_vanadium_run):
splined_name_list = ["_tt-" + inst_settings.tt_mode]
if inst_settings.absorb_corrections:
splined_name_list.append("_abs")
if inst_settings.long_mode:
splined_name_list.append("_long")
......
......@@ -8,10 +8,11 @@ attr_mapping = \
[
ParamMapEntry(ext_name="attenuation_file_path", int_name="attenuation_file_path"),
ParamMapEntry(ext_name="config_file", int_name="config_file_name"),
ParamMapEntry(ext_name="calibration_config_path", int_name="cal_mapping_path"),
ParamMapEntry(ext_name="calibration_mapping_file", int_name="cal_mapping_path"),
ParamMapEntry(ext_name="calibration_directory", int_name="calibration_dir"),
ParamMapEntry(ext_name="do_absorb_corrections", int_name="absorb_corrections"),
ParamMapEntry(ext_name="file_ext", int_name="file_extension", optional=True),
ParamMapEntry(ext_name="focused_cropping_values", int_name="tof_cropping_values"),
ParamMapEntry(ext_name="focus_mode", int_name="focus_mode", enum_class=PEARL_FOCUS_MODES),
ParamMapEntry(ext_name="long_mode", int_name="long_mode"),
ParamMapEntry(ext_name="monitor_lambda_crop_range", int_name="monitor_lambda"),
......@@ -24,13 +25,12 @@ attr_mapping = \
ParamMapEntry(ext_name="run_in_cycle", int_name="run_in_range"),
ParamMapEntry(ext_name="run_number", int_name="run_number"),
ParamMapEntry(ext_name="spline_coefficient", int_name="spline_coefficient"),
ParamMapEntry(ext_name="tof_cropping_ranges", int_name="tof_cropping_values"),
ParamMapEntry(ext_name="tt88_grouping", int_name="tt88_grouping"),
ParamMapEntry(ext_name="tt70_grouping", int_name="tt70_grouping"),
ParamMapEntry(ext_name="tt35_grouping", int_name="tt35_grouping"),
ParamMapEntry(ext_name="tt88_grouping_filename", int_name="tt88_grouping"),
ParamMapEntry(ext_name="tt70_grouping_filename", int_name="tt70_grouping"),
ParamMapEntry(ext_name="tt35_grouping_filename", int_name="tt35_grouping"),
ParamMapEntry(ext_name="tt_mode", int_name="tt_mode", enum_class=PEARL_TT_MODES),
ParamMapEntry(ext_name="user_name", int_name="user_name"),
ParamMapEntry(ext_name="vanadium_absorb_file", int_name="van_absorb_file"),
ParamMapEntry(ext_name="vanadium_absorb_filename", int_name="van_absorb_file"),
ParamMapEntry(ext_name="vanadium_tof_cropping", int_name="van_tof_cropping"),
ParamMapEntry(ext_name="vanadium_normalisation", int_name="van_norm")
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment