Skip to content
Snippets Groups Projects
Commit f254cf5d authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony
Browse files

Fix for diag script overwriting masks from successive diagnose calls. This...

Fix for diag script overwriting masks from successive diagnose calls. This will allow them to be combined. Re #1762
parent 99ba4f4d
No related branches found
No related tags found
No related merge requests found
......@@ -96,14 +96,24 @@ class DirectEnergyConversion(object):
print_results - If True then the results are printed to std out
inst_name - The name of the instrument to perform the diagnosis.
If it is not provided then the default instrument is used (default = None)
"""
self.spectra_masks = \
diagnostics.diagnose(white_run, sample_run, other_white, remove_zero,
tiny, large, median_lo, median_hi, signif,
bkgd_threshold, bkgd_range, variation,
bleed_test, bleed_maxrate, bleed_pixels,
hard_mask, print_results, self.instr_name)
return self.spectra_masks
"""
lhs_names = lhs_info('names')
if len(lhs_names) > 0:
var_name = lhs_names[0]
else:
var_name = None
__diagnostic_mask = diagnostics.diagnose(white_run, sample_run, other_white, remove_zero,
tiny, large, median_lo, median_hi, signif,
bkgd_threshold, bkgd_range, variation,
bleed_test, bleed_maxrate, bleed_pixels,
hard_mask, print_results, self.instr_name)
if var_name is not None:
result = RenameWorkspace(str(__diagnostic_mask), var_name).workspace()
else:
result = __diagnostic_mask
self.spectra_masks = result
return result
def do_white(self, white_run, spectra_masks, map_file):
"""
......
......@@ -74,7 +74,12 @@ def diagnose(white_run, sample_run=None, other_white=None, remove_zero=None,
##
## Accumulate the masking on this workspace
##
diag_total_mask = 'diag_total_mask'
# What shall we call the output
lhs_names = lhs_info('names')
if len(lhs_names) > 0:
diag_total_mask = lhs_names[0]
else:
diag_total_mask = 'diag_total_mask'
##
## White beam Test
......
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