-
Notifications
You must be signed in to change notification settings - Fork 4
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 load_img #58
Conversation
Checks whether it is FixedOffset or Autojitter.
This is done to help in adding in Edge correction and make the code more manageable and extendable.
Codecov Report
@@ Coverage Diff @@
## devel #58 +/- ##
=====================================
Coverage 0.92% 0.92%
=====================================
Files 26 26
Lines 2281 2281
=====================================
Hits 21 21
Misses 2260 2260
Continue to review full report at Codecov.
|
This is a full refactor of load_img to a more object oriented approach. All instruments are now classes that inherit from a generic Instrument parent/base class.
This now makes it much easier for me to add a few more fixes for image issues associated with edges. But before I do that, I wanted to merge a full working copy that reproduces the previous load_img functionality and makes it arguably easier to add new instruments.
The plan is to move most of this to an instruments.py file, and keep load_img.py a much smaller file that actually loads images. But that can be left to the future after the edge checking has also been implemented.
I will open some issues to track the other upcoming refactors.
Passing tests locally on python 3.7+ and a manual test of the run_photometry file. (Which we should also add as a unit test?)
Two caveats: we use spaces instead of tabs. This just made it much easier to read these multiline conditionals. I suggest we move to default 4 spaces following most major libraries and python black, as I would like to eventually enable it for automatic code formatting (to reduce code formatting maintenance overhead).
(I did a rebase onto devel before the merge to run the tests and run_photometry as flows table format had changed)
Fixes #29