Skip to content

Commit

Permalink
Fix old tilt to assume None Euler convention
Browse files Browse the repository at this point in the history
This is what the old tilt *actually* is...

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
  • Loading branch information
psavery committed Oct 10, 2024
1 parent 179b189 commit f2813a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hexrd/fitting/calibration/lmfit_param_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
class RelativeConstraints(Enum):
"""These are relative constraints between the detectors"""
# 'none' means no relative constraints
none = 0
none = 'None'
# 'group' means constrain tilts/translations within a group
group = 1
group = 'Group'
# 'system' means constrain tilts/translations within the whole system
system = 2
system = 'System'


def create_instr_params(instr, euler_convention=DEFAULT_EULER_CONVENTION,
Expand Down Expand Up @@ -265,7 +265,8 @@ def update_system_constrained_detector_parameters(instr, params, euler_conventio
# and translations.
new_mean_tilt = np.array([params[x].value for x in tilt_names])

old_rmat = _tilt_to_rmat(mean_tilt, euler_convention)
# The old mean tilt was in the None convention
old_rmat = _tilt_to_rmat(mean_tilt, None)
new_rmat = _tilt_to_rmat(new_mean_tilt, euler_convention)

# Compute the rmat used to convert from old to new
Expand Down

0 comments on commit f2813a7

Please sign in to comment.