-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor fit bragg peaks and add unit tests #53
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of new tests which is great 👍 I have a few code suggestions but feel free to push back if you disagree
unpackaged/vesuvio_calibration/calibrate_vesuvio_uranium_martyn_MK5.py
Outdated
Show resolved
Hide resolved
unpackaged/vesuvio_calibration/calibrate_vesuvio_uranium_martyn_MK5.py
Outdated
Show resolved
Hide resolved
unpackaged/vesuvio_calibration/calibrate_vesuvio_uranium_martyn_MK5.py
Outdated
Show resolved
Hide resolved
I get one failure locally:
is this expected? |
Yes that's expected, going to let that failure go for now and fix in a later PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, happy to approve in that case 👍
Description of work:
Refactors the
_fit_bragg_peaks
portion ofEVSCalibrationFit
, making it easier to follow and unit test. This was probably the most convoluted function.Unit tests have been added where the code has been refactored.
To test:
Review code.
Review test changes.
Ensure all automated tests pass.
Ensure the tests in
test_system.py
pass locally (You can run the system tests usingpython -m unittest discover -s ./unpackaged/vesuvio_calibration/tests/system
from the root of the repository.) Note thattest_fit_bragg_peaks_copper
andtest_fit_bragg_peaks_lead
are unreliable and fail on different detectors on different PCs. Please post the stack trace if they fail on your machine.