Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate PowderCalibrator to the one in hexrd #1244

Merged
merged 2 commits into from
Jun 15, 2022

Conversation

psavery
Copy link
Collaborator

@psavery psavery commented Jun 9, 2022

We were previously using a custom PowderCalibrator class for the
"Laue and Powder" calibration in hexrdgui. However, this class is
not maintained and no longer works properly.

Migrate over to using the PowderCalibrator from hexrd. This one
is more maintained and updated.

The migration required modifying the data input, since the
PowderCalibrator from hexrd expects the input data to be in a different
format.

There may be some options we should be using and are not using yet.

We were previously using a custom PowderCalibrator class for the
"Laue and Powder" calibration in hexrdgui. However, this class is
not maintained and no longer works properly.

Migrate over to using the PowderCalibrator from hexrd. This one
is more maintained and updated.

The migration required modifying the data input, since the
PowderCalibrator from hexrd expects the input data to be in a different
format.

There may be some options we should be using and are not using yet.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Because the instrument gets updated for every iteration, the conversion
to cartesian coordinates was being changed for every iteration. This
would cause the least squares to diverge significantly.

Fix it so that we use a consistent conversion to cartesian coordinates
by using a copy of the original HEDMInstrument.

This also makes a few small modifications so that it is more consistent
with hexrd's InstrumentCalibrator.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@psavery psavery marked this pull request as ready for review June 10, 2022 21:26
@psavery
Copy link
Collaborator Author

psavery commented Jun 10, 2022

@joelvbernier I believe this should be working properly now.

There are some very slight differences in the results when compared to the "Auto Powder" method, but I confirmed these slight differences are only caused by a small loss of precision when converting between polar and Cartesian in the "Laue and Powder" workflow.

@joelvbernier joelvbernier merged commit b6289b3 into HEXRD:master Jun 15, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants