def LimitsQXY(qmin, qmax, step, type): """ To set the bin parameters for the algorithm Qxy() @param qmin: the first Q value to include @param qmaz: the last Q value to include @param step: bin width @param type: pass LOG for logarithmic binning """ _printMessage('LimitsQXY(' + str(qmin) + ', ' + str(qmax) +', ' + str(step) + ', ' + str(type) + ')') settings = ReductionSingleton().user_settings if settings is None: raise RuntimeError('MaskFile() first') settings.readLimitValues('L/QXY ' + str(qmin) + ' ' + str(qmax) + ' ' + str(step) + '/' + type, ReductionSingleton())
def LimitsQ(*args): settings = ReductionSingleton().user_settings if settings is None: raise RuntimeError('MaskFile() first') # If given one argument it must be a rebin string if len(args) == 1: val = args[0] if type(val) == str: _printMessage("LimitsQ(" + val + ")") settings.readLimitValues("L/Q " + val, ReductionSingleton()) else: issueWarning("LimitsQ can only be called with a single string or 4 values") elif len(args) == 4: qmin,qmax,step,step_type = args _printMessage('LimitsQ(' + str(qmin) + ', ' + str(qmax) +', ' + str(step) + ',' + str(step_type) + ')') settings.readLimitValues('L/Q ' + str(qmin) + ' ' + str(qmax) + ' ' + str(step) + '/' + step_type, ReductionSingleton()) else: issueWarning("LimitsQ called with " + str(len(args)) + " arguments, 1 or 4 expected.")