HEXRD / hexrd

A cross-platform, open-source library for the analysis of X-ray diffraction data.
Other
54 stars 26 forks source link

Refactor calibrators to work with lmfit #628

Closed psavery closed 3 months ago

psavery commented 3 months ago

Calibrators (instrument, powder, and laue) now utilize lmfit for their calibration. This allows bound constraints to be applied to the various parameters, and more complicated expression constraints (such as engineering constraints) as well.

The instrument calibrator takes as arguments powder and laue calibrators. The instrument calibrator creates its own lmfit parameters for the instrument. The powder and laue calibrators create their own lmfit parameters for their respective parameters. All calibrators keep track of the names of their own parameters, utilize these when performing calibration, and update their parameter values.

The composite calibrator was completely removed, since it was almost identical to the instrument calibrator (which is now preferred).

pep8speaks commented 3 months ago

Hello @psavery! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 99:29: E231 missing whitespace after ','