PyMcaPhysics Package¶
PyMcaPhysics
Package¶
SixCircle
Module¶
Methods to convert single point or complete images to reciprocal space. It is fully vectorized and therefore very fast for converting complete images.
-
class
PyMca5.PyMcaPhysics.SixCircle.
SixCircle
[source]¶ Bases:
object
-
getChiMatrix
(chi)[source]¶ Parameters: chi (float) – the chi angle in degree Returns: the rotation matrix of the chi Return type: numpy.ndarray
-
getDeltaMatrix
(delta)[source]¶ Parameters: delta (float) – the delta angle in Degree Returns: the rotation matrix of the delta axis Return type: numpy.ndarray
-
getGammaMatrix
(gamma)[source]¶ Parameters: gamma (float) – the gamma angle in Degree Returns: the rotation matrix of the gamma axis Return type: numpy.ndarray
-
getHKL
(phi=0.0, chi=0.0, theta=0.0, mu=0.0, delta=0.0, gamma=0.0, gamma_first=False)[source]¶ Parameters: - phi (float) – angle in Degrees
- chi (float) – angle in Degrees
- theta (float) – angle in Degrees
- mu (float) – angle in Degrees
- delta (float or numpy.ndarray) – angle in Degrees
- gamma (float or numpy.ndarray) – angle in Degrees
- gamma_first (boolean) – if delta and gamma are arrays, which one variates first.
Returns: HKL values for all the given delta, gamma values
-
getMuMatrix
(mu)[source]¶ Parameters: mu (float) – the mu angle in degree Returns: the rotation matrix of the mu axis Return type: numpy.ndarray
-
getPhiMatrix
(phi)[source]¶ Parameters: phi (float) – the phi angle in degree Returns: the rotation matrix of the phi axis for a given angle Return type: numpy.ndarray
-
getQLab
(mu=0.0, delta=0.0, gamma=0.0, gamma_first=False)[source]¶ Parameters: - mu (float) – angle in Degrees
- delta (float or numpy.ndarray) – angle in Degrees
- gamma (float or numpy.ndarray) – angle in Degrees
- gamma_first (boolean) – if delta and gamma are arrays, which one variates first.
Returns: the Q coordinates in the Lab system
Return type: numpy.ndarray ()
Q = Kf - Ki = (2 * pi / lambda) * (MU DELTA GAMMA - I) * (0, 1, 0)
This gives (transforming angles to radians):
- (2*pi/lambda) * ( sin(delta) cos(gamma),
- cos(mu) cos(delta) cos(gamma) - sin(mu) sin(gamma) - 1, sin(mu) cos(delta) cos(gamma) + cos(mu) sin(gamma))
or, in terms of DG = numpy.dot(DELTA, GAMMA):
- (2*pi/lambda) * ( DG[0,1],
- cos(mu)* DG[1,1] - sin(mu) * DG[2,1] - 1 sin(mu)* DG[1,1] + cos(mu) * DG[2,1])
-
getQMu
(phi=0.0, chi=0.0, theta=0.0, mu=0.0, delta=0.0, gamma=0.0, gamma_first=False)[source]¶ Parameters: - phi (float) – angle in Degrees
- chi (float) – angle in Degrees
- theta (float) – angle in Degrees
- mu (float) – angle in Degrees
- delta (float or numpy.ndarray) – angle in Degrees
- gamma (float or numpy.ndarray) – angle in Degrees
- gamma_first (boolean) – if delta and gamma are arrays, which one variates first.
Returns: Q coordinates for all the given delta, gamma values
Return type: numpy.ndarray (len(delta), len(gamma), 3)
-
getQSurface
(phi=0.0, chi=0.0, theta=0.0, mu=0.0, delta=0.0, gamma=0.0, gamma_first=False)[source]¶ Parameters: - phi (float) – angle in Degrees
- chi (float) – angle in Degrees
- theta (float) – angle in Degrees
- mu (float) – angle in Degrees
- delta (float or numpy.ndarray) – angle in Degrees
- gamma (float or numpy.ndarray) – angle in Degrees
- gamma_first (boolean) – if delta and gamma are arrays, which one variates first.
Returns: Q values for all the given delta, gamma values
This is only true if the diffractometer has been properly aligned.
-
getThetaMatrix
(th)[source]¶ Parameters: th (float) – the theta angle in Degree Returns: the rotation matrix of the theta axis Return type: numpy.ndarray
-
-
PyMca5.PyMcaPhysics.SixCircle.
getHKL
(wavelength, ub, phi=0.0, chi=0.0, theta=0.0, mu=0.0, delta=0.0, gamma=0.0, gamma_first=False)[source]¶ A convenience function that takes the whole input in one go.
Parameters: - wavelength (float) – the wavelength in Angstroms
- ub (list(float)) – the ub matrix element values
- phi (float) – angle in Degrees
- chi (float) – angle in Degrees
- theta (float) – angle in Degrees
- mu (float) – angle in Degrees
- delta (float or numpy.ndarray) – angle in Degrees
- gamma (float or numpy.ndarray) – angle in Degrees
- gamma_first (boolean) – if delta and gamma are arrays, which one variates first.
Returns: HKL values for all the given delta, gamma values
Subpackages¶
- xas Package
- xrf Package
BindingEnergies
ModuleClassMcaTheory
ModuleCoherentScattering
ModuleConcentrationsTool
ModuleElementHtml
ModuleElements
ModuleFastXRFLinearFit
ModuleFisxHelper
ModuleGenerateXCOMCrossSections
ModuleIncoherentScattering
ModuleKShell
ModuleLShell
ModuleMShell
ModuleMcaAdvancedFitBatch
ModulePyMcaEPDL97
ModuleScofield1973
ModuleSingleLayerStrategy
ModuleStrategies
ModuleXRayTubeEbel
Module- Subpackages