def getXY_UGLY(xCenter,yCenter,distance,energy,alpha,beta,rotation,Q, chi,pixelLength,pixelHeight,cos_beta=None, sin_beta=None, cos_alpha=None, sin_alpha=None, cos_rotation = None, sin_rotation = None): # call wrapped c code. if cos_beta == None or sin_beta == None or \ cos_alpha == None or sin_alpha == None or\ cos_rotation == None or sin_rotation == None: return DiffractionAnalysisWrap.getXY(xCenter,yCenter,distance,energy, alpha,beta,rotation,Q,chi,pixelLength,pixelHeight) return DiffractionAnalysisWrap.getXY(xCenter,yCenter,distance,energy,alpha, beta,rotation,Q,chi,pixelLength,pixelHeight,cos_beta,sin_beta, cos_alpha,sin_alpha,cos_rotation,sin_rotation)
def getXY(calibrationData, Q, chi, cos_beta=None, sin_beta=None, cos_alpha=None, sin_alpha=None, cos_rotation=None, sin_rotation=None): """ calibrationData is a CalibrationData object holding the x and y center of the image in pixels, the distance from detector to sample, the energy of the incoming photons, and the alpha and beta tilt parameters of the experiment. CalibrationData also holds the rotation angle and the pixel length and pixel height in micron units (1mm = 1000 microns). Q and chi are the coordinates to convert to x,y pixel values. chi is in units of degrees. """ # call wrapped c code. if cos_beta == None or sin_beta == None or \ cos_alpha == None or sin_alpha == None or\ cos_rotation == None or sin_rotation == None: return DiffractionAnalysisWrap.getXY( calibrationData.getCenterX()['val'], calibrationData.getCenterY()['val'], calibrationData.getDistance()['val'], calibrationData.getEnergy()['val'], calibrationData.getAlpha()['val'], calibrationData.getBeta()['val'], calibrationData.getRotation()['val'], Q, chi, calibrationData.getPixelLength()['val'], calibrationData.getPixelHeight()['val']) return DiffractionAnalysisWrap.getXY( calibrationData.getCenterX()['val'], calibrationData.getCenterY()['val'], calibrationData.getDistance()['val'], calibrationData.getEnergy()['val'], calibrationData.getAlpha()['val'], calibrationData.getBeta()['val'], calibrationData.getRotation()['val'], Q, chi, calibrationData.getPixelLength()['val'], calibrationData.getPixelHeight()['val'], cos_beta, sin_beta, cos_alpha, sin_alpha, cos_rotation, sin_rotation)
def getXY(calibrationData,Q,chi, cos_beta=None, sin_beta=None, cos_alpha=None, sin_alpha=None, cos_rotation = None,sin_rotation = None): """ calibrationData is a CalibrationData object holding the x and y center of the image in pixels, the distance from detector to sample, the energy of the incoming photons, and the alpha and beta tilt parameters of the experiment. CalibrationData also holds the rotation angle and the pixel length and pixel height in micron units (1mm = 1000 microns). Q and chi are the coordinates to convert to x,y pixel values. chi is in units of degrees. """ # call wrapped c code. if cos_beta == None or sin_beta == None or \ cos_alpha == None or sin_alpha == None or\ cos_rotation == None or sin_rotation == None: return DiffractionAnalysisWrap.getXY( calibrationData.getCenterX()['val'], calibrationData.getCenterY()['val'], calibrationData.getDistance()['val'], calibrationData.getEnergy()['val'], calibrationData.getAlpha()['val'], calibrationData.getBeta()['val'], calibrationData.getRotation()['val'], Q,chi, calibrationData.getPixelLength()['val'], calibrationData.getPixelHeight()['val']) return DiffractionAnalysisWrap.getXY( calibrationData.getCenterX()['val'], calibrationData.getCenterY()['val'], calibrationData.getDistance()['val'], calibrationData.getEnergy()['val'], calibrationData.getAlpha()['val'], calibrationData.getBeta()['val'], calibrationData.getRotation()['val'], Q,chi, calibrationData.getPixelLength()['val'], calibrationData.getPixelHeight()['val'], cos_beta,sin_beta, cos_alpha,sin_alpha, cos_rotation,sin_rotation)