Skip to content

Commit

Permalink
Fix some incorrectly resolved conflicts
Browse files Browse the repository at this point in the history
Remove old check accidentally reintroduced in rebase. Fix naming
anglesToDVec -> angles_to_dvec.

Signed-off-by: Brianna Major <brianna.major@taloid.khq.kitware.com>
  • Loading branch information
Brianna Major committed Sep 20, 2024
1 parent b0fd0b4 commit ea55b11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions hexrd/instrument/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@
make_rmat_of_expmap,
oscill_angles_of_hkls,
mapAngle,
anglesToDVec,
angles_to_dvec,
)

from hexrd.utils.decorators import memoize
from hexrd.gridutil import cellIndices
from hexrd.instrument import detector_coatings

if ct.USE_NUMBA:
import numba

distortion_registry = distortion_pkg.Registry()

max_workers_DFLT = max(1, os.cpu_count() - 1)
Expand Down Expand Up @@ -1736,7 +1733,7 @@ def calc_physics_package_transmission(self, energy, rMat_s, physics_package):
angs = np.vstack((tth.flatten(), eta.flatten(),
np.zeros(tth.flatten().shape))).T

dvecs = anglesToDVec(angs, bHat_l=bvec)
dvecs = angles_to_dvec(angs, beam_vec=bvec)

secb = np.abs(1./np.dot(dvecs, sample_normal).reshape(self.shape))

Expand Down Expand Up @@ -1769,7 +1766,7 @@ def calc_effective_pinhole_area(self, physics_package):
tth, eta = self.pixel_angles()
angs = np.vstack((tth.flatten(), eta.flatten(),
np.zeros(tth.flatten().shape))).T
dvecs = anglesToDVec(angs, bHat_l=bvec)
dvecs = angles_to_dvec(angs, beam_vec=bvec)

cth = -dvecs[:,2].reshape(self.shape)
tanth = np.tan(np.arccos(cth))
Expand Down
4 changes: 2 additions & 2 deletions hexrd/instrument/planar_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xy_to_gvec,
gvec_to_xy,
make_beam_rmat,
anglesToDVec,
angles_to_dvec,
)
from hexrd.utils.decorators import memoize

Expand Down Expand Up @@ -134,7 +134,7 @@ def calc_filter_coating_transmission(self, energy):
angs = np.vstack((tth.flatten(), eta.flatten(),
np.zeros(tth.flatten().shape))).T

dvecs = anglesToDVec(angs, bHat_l=bvec)
dvecs = angles_to_dvec(angs, beam_vec=bvec)

secb = 1./np.dot(dvecs, det_normal).reshape(self.shape)

Expand Down

0 comments on commit ea55b11

Please sign in to comment.