Skip to content

Commit

Permalink
refs #6667 enabled check_background property
Browse files Browse the repository at this point in the history
It is apparently used by new SNS reduction, in the meaning similar to background property. It is easy to modify DirectEnergyConversion to enable it for current isis reduction to simplify move
  • Loading branch information
abuts committed Jul 18, 2013
1 parent 39e22fd commit 0c3a72f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 26 deletions.
8 changes: 2 additions & 6 deletions Code/Mantid/instrument/LET_Parameters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,9 @@
</parameter>

<!-- Remove the count rate seen in the regions of the histograms defined as the background regions -->
<parameter name="background" type="bool">
<value val="False"/>
</parameter>
<!-- True if background is to be checked UNUSED PROPERTY !!!
<parameter name="check_background" type="bool">
<value val="True"/>
<value val="False"/>
</parameter>
-->

<!-- detector_van_range- integratin in E(mev) for detector(white beam) vanadium data [20,100] -->
<parameter name="wb-integr-min">
Expand Down Expand Up @@ -351,6 +346,7 @@
sum_runs=sum;
wb_integr_range=detector_van_range;
van_mass=vanadium-mass;
check_background = background;
mon1_norm_spec=norm-mon1-spec;
scale_factor=scale-factor;
wb_scale_factor=wb-scale-factor;
Expand Down
8 changes: 2 additions & 6 deletions Code/Mantid/instrument/MAPS_Parameters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,9 @@
</parameter>

<!-- Remove the count rate seen in the regions of the histograms defined as the background regions -->
<parameter name="background" type="bool">
<value val="False"/>
</parameter>
<!-- True if background is to be checked UNUSED PROPERTY !!!
<parameter name="check_background" type="bool">
<value val="True"/>
<value val="False"/>
</parameter>
-->

<!-- detector_van_range- integratin in E(mev) for detector(white beam) vanadium data [20,100] -->
<parameter name="wb-integr-min">
Expand Down Expand Up @@ -350,6 +345,7 @@
sum_runs=sum;
wb_integr_range=detector_van_range;
van_mass=vanadium-mass;
check_background = background;
mon1_norm_spec=norm-mon1-spec;
scale_factor=scale-factor;
wb_scale_factor=wb-scale-factor;
Expand Down
8 changes: 2 additions & 6 deletions Code/Mantid/instrument/MARI_Parameters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,9 @@
</parameter>

<!-- Remove the count rate seen in the regions of the histograms defined as the background regions -->
<parameter name="background" type="bool">
<value val="True"/>
</parameter>
<!-- True if background is to be checked UNUSED PROPERTY !!!
<parameter name="check_background" type="bool">
<value val="True"/>
<value val="True"/>
</parameter>
-->

<!-- detector_van_range- integratin in E(mev) for detector(white beam) vanadium data [20,100] -->
<parameter name="wb-integr-min">
Expand Down Expand Up @@ -354,6 +349,7 @@
sum_runs=sum;
wb_integr_range=detector_van_range;
van_mass=vanadium-mass;
check_background = background;
mon1_norm_spec=norm-mon1-spec;
scale_factor=scale-factor;
wb_scale_factor=wb-scale-factor;
Expand Down
8 changes: 2 additions & 6 deletions Code/Mantid/instrument/MERLIN_Parameters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,9 @@
</parameter>

<!-- Remove the count rate seen in the regions of the histograms defined as the background regions -->
<parameter name="background" type="bool">
<value val="False"/>
</parameter>
<!-- True if background is to be checked UNUSED PROPERTY !!!
<parameter name="check_background" type="bool">
<value val="True"/>
<value val="False"/>
</parameter>
-->

<!-- detector_van_range- integratin in E(mev) for detector(white beam) vanadium data [20,100] -->
<parameter name="wb-integr-min">
Expand Down Expand Up @@ -350,6 +345,7 @@
sum_runs=sum;
wb_integr_range=detector_van_range;
van_mass=vanadium-mass;
check_background = background;
mon1_norm_spec=norm-mon1-spec;
scale_factor=scale-factor;
wb_scale_factor=wb-scale-factor;
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/scripts/Inelastic/DirectEnergyConversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def _do_mono(self, data_ws, monitor_ws, result_name, ei_guess,

# For event mode, we are going to histogram in energy first, then go back to TOF
if (self.__facility == "SNS"):
if self.background == True:
if self.check_background== True:
# Extract the time range for the background determination before we throw it away
background_bins = "%s,%s,%s" % (self.bkgd_range[0] + bin_offset, (self.bkgd_range[1]-self.bkgd_range[0]), self.bkgd_range[1] + bin_offset)
Rebin(InputWorkspace=result_name,OutputWorkspace= "background_origin_ws",Params=background_bins)
Expand Down Expand Up @@ -416,7 +416,7 @@ def _do_mono(self, data_ws, monitor_ws, result_name, ei_guess,
CopyInstrumentParameters(InputWorkspace=self.__det_cal_file_ws,OutputWorkspace=result_name)
self.log('_do_mono: Copying detectors positions complete','debug')

if self.background == True:
if self.check_background == True:
# Remove the count rate seen in the regions of the histograms defined as the background regions, if the user defined such region
ConvertToDistribution(Workspace=result_name)
if (self.__facility == "SNS"):
Expand Down

0 comments on commit 0c3a72f

Please sign in to comment.