Skip to content

Commit

Permalink
use try for loading mask
Browse files Browse the repository at this point in the history
  • Loading branch information
fanchercm committed Sep 11, 2023
1 parent 34d75d6 commit 2768848
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pyrs/core/nexus_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def __load_mask(self, mask_file_name):
mask_ws_name = os.path.basename(mask_file_name.split('.')[0])

try:
mask_ws = LoadMask(Instrument='hidra', InputFile=mask_file_name, RefWorkspace=self._event_wksp,
mask_ws = LoadMask(Instrument='hb2b', InputFile=mask_file_name,
OutputWorkspace=mask_ws_name)
except RuntimeError: # second mask load added for old data measured prior to instrument rename
mask_ws = LoadMask(Instrument='nrsf2', InputFile=mask_file_name, RefWorkspace=self._event_wksp,
Expand Down Expand Up @@ -642,7 +642,6 @@ def convert(self, use_mantid=False):
# set counts to each sub run
sub_runs = self.split_events_sub_runs()

print(sub_runs)
# set mask
if self.mask_array is not None:
self._hidra_workspace.set_detector_mask(self.mask_array, is_default=True)
Expand Down

0 comments on commit 2768848

Please sign in to comment.