Skip to content

Commit

Permalink
refs #6667 Minor comments and enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Jun 27, 2013
1 parent dc00e5a commit f081441
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/instrument/MAPS_Parameters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<value val="20"/>
</parameter>
<parameter name="wb-integr-max">
<value val="300"/>
<value val="100"/>
</parameter>
<parameter name="wb_integr_range" type="string">
<value val="wb-integr-min:wb-integr-max"/>
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/scripts/Inelastic/DirectEnergyConversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def _do_mono(self, data_ws, monitor_ws, result_name, ei_guess,
# But this one passes...
ConvertUnits(InputWorkspace=result_name,OutputWorkspace=result_name, Target="DeltaE",EMode='Direct')
self.log("_do_mono: finished ConvertUnits for "+result_name)
iws = mtd[result_name]



if not self.energy_bins is None:
Expand Down
13 changes: 7 additions & 6 deletions Code/Mantid/scripts/Inelastic/dgreduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ def arb_units(wb_run,sample_run,ei_guess,rebin,map_file='default',monovan_run=No


if mtd.doesExist(str(sample_run))==True and Reducer.det_cal_file != None:
print 'For data input type: workspace detector calibration must be specified'
print 'use Keyword det_cal_file with a valid detctor file or run number'
Reducer.log('For data input type: workspace detector calibration must be specified','error')
Reducer.log('use Keyword det_cal_file with a valid detctor file or run number','error')
return


Expand Down Expand Up @@ -278,6 +278,7 @@ def arb_units(wb_run,sample_run,ei_guess,rebin,map_file='default',monovan_run=No
second_white = None,variation=1.1,print_results=True)
if not Reducer.use_hard_mask_only : # in this case the masking2 is different but points to the same workspace Should be better soulution for that.
masking += masking2
DeleteWorkspace(masking2)


else: # if Reducer.mono_correction_factor != None :
Expand All @@ -287,6 +288,7 @@ def arb_units(wb_run,sample_run,ei_guess,rebin,map_file='default',monovan_run=No
if Reducer.save_and_reuse_masks and not masks_done:
SaveMask(InputWorkspace=masking,OutputFile = mask_file_name,GroupedDetectors=True)

# Very important statement propagating masks for further usage in convert_to_energy
Reducer.spectra_masks=masking
# estimate and report the number of failing detectors
failed_sp_list,nSpectra = get_failed_spectra_list_from_masks(masking)
Expand All @@ -307,8 +309,8 @@ def arb_units(wb_run,sample_run,ei_guess,rebin,map_file='default',monovan_run=No
RenameWorkspace(InputWorkspace=results_name,OutputWorkspace=wksp_out)


#ei= (deltaE_wkspace_sample.getRun().getLogData("Ei").value)
print 'Incident energy found for sample run: ',Reducer.incident_en,' meV'
ei= (deltaE_wkspace_sample.getRun().getLogData("Ei").value)
print 'Incident energy found for sample run: ',ei,' meV'

end_time=time.time()
print 'Elapsed time =',end_time-start_time, 's'
Expand Down Expand Up @@ -435,8 +437,6 @@ def abs_units(wb_for_run,sample_run,monovan_run,wb_for_monovanadium,samp_rmm,sam





def apply_absolute_normalization(Reducer,deltaE_wkspace_sample,monovan_run,ei_guess,wb_mono):
""" Function applies absolute normalization factor to the target workspace
and calculates this factor if nececcary
Expand Down Expand Up @@ -499,6 +499,7 @@ def process_legacy_parameters(**kwargs) :

return params


def get_abs_normalization_factor(Reducer,deltaE_wkspaceName,ei_monovan) :
"""get absolute normalization factor for monochromatic vanadium
Expand Down

0 comments on commit f081441

Please sign in to comment.