Skip to content
Snippets Groups Projects
Commit b875db3e authored by Joe Ramsay's avatar Joe Ramsay
Browse files

Re #21722 Mask out prompt pulses for HRPD

parent 707fbc79
No related branches found
No related tags found
No related merge requests found
......@@ -39,11 +39,11 @@ window_30_130_params = {
}
window_100_200_params = {
"vanadium_tof_cropping": (1e5, 2.15e5),
"vanadium_tof_cropping": (1e5, 200500),
"focused_cropping_values": [
(1e5, 2e5), # Bank 1
(8.7e4, 2.1e5), # Bank 2
(9.9e4, 2.1e5) # Bank 3
(100200, 1.99e5), # Bank 1
(100100, 1.99e5), # Bank 2
(100100, 1.99e5) # Bank 3
]
}
......
......@@ -283,12 +283,27 @@ def load_current_normalised_ws_list(run_number_string, instrument, input_batchin
remove_intermediate_workspace(raw_ws_list)
raw_ws_list = [summed_ws]
if instrument._inst_prefix == "HRPD":
for ws in raw_ws_list:
_mask_all_prompt_pulses(ws)
normalised_ws_list = _normalise_workspaces(ws_list=raw_ws_list, run_details=run_information,
instrument=instrument)
return normalised_ws_list
def _mask_prompt_pulse(workspace, middle, left_crop, right_crop):
min_crop = middle - left_crop
max_crop = middle + right_crop
mantid.MaskBins(InputWorkspace=workspace, OutputWorkspace=workspace, XMin=min_crop, XMax=max_crop)
def _mask_all_prompt_pulses(workspace):
for i in range(6):
_mask_prompt_pulse(workspace=workspace, middle=100000 + 20000 * i, left_crop=30, right_crop=140)
def rebin_workspace(workspace, new_bin_width, start_x=None, end_x=None):
"""
Rebins the specified workspace with the specified new bin width. Allows the user
......
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