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 19, 2024
1 parent b0fd0b4 commit 76d8b5b
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(),

Check warning on line 1733 in hexrd/instrument/detector.py

View check run for this annotation

Codecov / codecov/patch

hexrd/instrument/detector.py#L1732-L1733

Added lines #L1732 - L1733 were not covered by tests
np.zeros(tth.flatten().shape))).T

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

Check warning on line 1736 in hexrd/instrument/detector.py

View check run for this annotation

Codecov / codecov/patch

hexrd/instrument/detector.py#L1736

Added line #L1736 was not covered by tests

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

Check warning on line 1738 in hexrd/instrument/detector.py

View check run for this annotation

Codecov / codecov/patch

hexrd/instrument/detector.py#L1738

Added line #L1738 was not covered by tests

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(),

Check warning on line 1767 in hexrd/instrument/detector.py

View check run for this annotation

Codecov / codecov/patch

hexrd/instrument/detector.py#L1766-L1767

Added lines #L1766 - L1767 were not covered by tests
np.zeros(tth.flatten().shape))).T
dvecs = anglesToDVec(angs, bHat_l=bvec)
dvecs = angles_to_dvec(angs, bHat_l=bvec)

Check warning on line 1769 in hexrd/instrument/detector.py

View check run for this annotation

Codecov / codecov/patch

hexrd/instrument/detector.py#L1769

Added line #L1769 was not covered by tests

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(),

Check warning on line 134 in hexrd/instrument/planar_detector.py

View check run for this annotation

Codecov / codecov/patch

hexrd/instrument/planar_detector.py#L133-L134

Added lines #L133 - L134 were not covered by tests
np.zeros(tth.flatten().shape))).T

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

Check warning on line 137 in hexrd/instrument/planar_detector.py

View check run for this annotation

Codecov / codecov/patch

hexrd/instrument/planar_detector.py#L137

Added line #L137 was not covered by tests

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

Check warning on line 139 in hexrd/instrument/planar_detector.py

View check run for this annotation

Codecov / codecov/patch

hexrd/instrument/planar_detector.py#L139

Added line #L139 was not covered by tests

Expand Down

0 comments on commit 76d8b5b

Please sign in to comment.