def setup(instname=None,reload=False): """ setup('mar') setup instrument reduction parameters from instname_parameter.xml file if the instrument has already been defined, does nothing unless reload = True is specified """ global Reducer if instname == None : instname = config['default.instrument'] if not (Reducer is None) : old_name=Reducer.prop_man.instr_name if old_name.upper()[0:3] == instname.upper()[0:3] : if not reload : return # has been already defined Reducer = DRC.setup_reducer(instname,reload)
def setup(instname=None,reload=False): """ setup('mar') setup instrument reduction parameters from instname_parameter.xml file if the instrument has already been defined, does nothing unless reload = True is specified """ global Reducer if instname == None : instname = config['default.instrument'] if not (Reducer is None) : old_name=Reducer.prop_man.instr_name; if old_name.upper()[0:3] == instname.upper()[0:3] : if not reload : return # has been already defined Reducer = DRC.setup_reducer(instname,reload)
def setup(instname=None,reload=False): """ setup('mar') setup instrument reduction parameters from instname_parameter.xml file if the instrument has already been defined, does nothing unless reload = True is specified """ global Reducer if instname == None : instname = config['default.instrument'] if not (Reducer is None) : if Reducer.instr_name.upper()[0:3] == instname.upper()[0:3] : if not reload : # reinitialize idf parameters to defaults. Reducer.init_idf_params(True); return # has been already defined Reducer = DRC.setup_reducer(instname)
tiny=1e-10 huge=1e10 v_out_lo = 0.01 v_out_hi = 100. vv_lo = 0.1 vv_hi = 2.0 vv_sig = 0.0 sv_sig = 3.3 sv_hi = 1.5 sv_lo = 0.0 s_zero = True reducer = reduction.setup_reducer('MAPS') diag_mask = reducer.diagnose(white, sample=sample, tiny=tiny, huge=huge, van_out_lo=v_out_lo, van_out_hi=v_out_hi, van_lo=vv_lo, van_hi=vv_hi, van_sig=vv_sig, samp_lo=sv_lo, samp_hi=sv_hi, samp_sig=sv_sig, samp_zero=s_zero) Load("/home/pf9/code/systemtests/Data/MAP17269.raw", OutputWorkspace="MAP17269") #print "***have mask" #sample_ws = mtd[sample] #print "***applying mask" #MaskDetectors(sample_ws, MaskedWorkspace=diag_mask) #print "***mask applied" # Save the masked spectra nmubers to a simple ASCII file for comparison #self.saved_diag_file = os.path.join(mtd.settings['defaultsave.directory'], 'CurrentDirectInelasticDiag.txt') #handle = file(self.saved_diag_file, 'w') #for index in range(sample_ws.getNumberHistograms()):