diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..5d824e9 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,13 @@ +========= +Changelog +========= + +All notable changes to PyEBSDIndex will be documented in this file. The format is based +on `Keep a Changelog `_. + +Unreleased +========== + +Added +----- +- PC conventions for Bruker, EDAX, EMsoft, kikuchipy, and Oxford. diff --git a/pyebsdindex/band_detect.py b/pyebsdindex/band_detect.py index 1c21046..d6f9e91 100644 --- a/pyebsdindex/band_detect.py +++ b/pyebsdindex/band_detect.py @@ -401,7 +401,7 @@ def radon2pole(self,bandData,PC=None,vendor='EDAX'): stheta = np.sin(theta) ctheta = np.cos(theta) - t = (np.asfarray(PC)).copy() + t = np.asfarray(PC).copy() shapet = t.shape if len(shapet) < 2: t = np.tile(t, nPats).reshape(nPats,3) @@ -409,16 +409,15 @@ def radon2pole(self,bandData,PC=None,vendor='EDAX'): if shapet[0] != nPats: t = np.tile(t[0,:], nPats).reshape(nPats,3) - dimf = np.array(self.patDim, dtype=np.float32) - if (ven in ['EDAX', 'OXFORD']) : - t *= np.array([dimf[1],dimf[1],-1.0 * dimf[1]]) - if (ven == 'EMSOFT'): - t += np.array([dimf[1] / 2.0,dimf[0] / 2.0,0.0]) - t[2,:] *= -1.0 + if ven in ['EDAX', 'OXFORD']: + t *= np.array([dimf[1], dimf[1], -dimf[1]]) + if ven == 'EMSOFT': + t += np.array([dimf[1] / 2.0, dimf[0] / 2.0, 0.0]) + t[:, 2] *= -1.0 if ven in ['KIKUCHIPY', 'BRUKER']: - t *= np.array([dimf[1],dimf[0],-1.0 *dimf[0]]) - t[1,:] = dimf[0] - t[1,:] + t *= np.array([dimf[1], dimf[0], -dimf[0]]) + t[:, 1] = dimf[0] - t[:, 1] # describes the translation from the bottom left corner of the pattern image to the point on the detector # perpendicular to where the beam contacts the sample.