def __init__(self, hkls, *args, **kwargs): self.phaseID = None self.__doTThSort = True self.__exclusions = None self.__tThMax = None # if len(args) == 4: lparms, laueGroup, wavelength, strainMag = args tThWidth = None self.__wavelength = processWavelength(wavelength) self.__lparms = self.__parseLParms(lparms) elif len(args) == 1 and hasattr(args[0],'getParams'): other = args[0] lparms, laueGroup, wavelength, strainMag, tThWidth = other.getParams() self.__wavelength = wavelength self.__lparms = lparms self.phaseID = other.phaseID self.__doTThSort = other.__doTThSort self.__exclusions = other.__exclusions self.__tThMax = other.__tThMax if hkls is None: hkls = other.__hkls else: raise NotImplementedError, 'args : '+str(args) self.__laueGroup = laueGroup self.__qsym = symmetry.quatOfLaueGroup(self.__laueGroup) self.__hkls = copy.deepcopy(hkls) self.__strainMag = strainMag self.tThWidth = tThWidth # ... need to implement tThMin too if kwargs.has_key('phaseID'): self.phaseID = kwargs.pop('phaseID') if kwargs.has_key('doTThSort'): self.__doTThSort = kwargs.pop('doTThSort') if kwargs.has_key('exclusions'): self.__exclusions = kwargs.pop('exclusions') if kwargs.has_key('tThMax'): self.__tThMax = toFloat(kwargs.pop('tThMax'), 'radians') if kwargs.has_key('tThWidth'): self.tThWidth = kwargs.pop('tThWidth') if len(kwargs) > 0: raise RuntimeError, 'have unparsed keyword arguments with keys: '+str(kwargs.keys()) self.__calc() return
def set_tThMax(self, tThMax): self.__tThMax = toFloat(tThMax, "radians") # self.__calc() # no need to redo calc for tThMax return
def set_tThMax(self, tThMax): self.__tThMax = toFloat(tThMax, 'radians') # self.__calc() # no need to redo calc for tThMax return