Skip to content

Refactor photometry#67

Merged
emirkmo merged 8 commits intoSNflows:develfrom
emirkmo:refactor_photometry
May 16, 2022
Merged

Refactor photometry#67
emirkmo merged 8 commits intoSNflows:develfrom
emirkmo:refactor_photometry

Conversation

@emirkmo
Copy link
Member

@emirkmo emirkmo commented May 16, 2022

Very basic refactor of photometry.py, still needs more work.

Adds some abstractions for:

  • References/catalogs
  • Photometry
  • Magnitude calculation
  • Creation of output tables etc.
  • Bump python version needed to 3.10.
  • Make image match an optional dependency for now due to pip install issues with VTK (and it's currently unused inside flows).
  • Solidify abstraction of image and instrument (need to be moved still).

Will need changes to tests

Future work: refactor to separate out the steps so that flows photometry is a nice ETL pipeline, but the ingest is an ELT pipeline. AInstead of working with raw tables as output work with stateful classes (or the database) so that plotting can be separated away from the calculation, and either autophot or alternative phot methods, can be plugged in. Also so that outputs can be easily used in a calibration (e.g., color-terms) module.

@codecov
Copy link

codecov bot commented May 16, 2022

Codecov Report

Merging #67 (0b1f368) into devel (961db6b) will not change coverage.
The diff coverage is 11.11%.

@@           Coverage Diff           @@
##            devel      #67   +/-   ##
=======================================
  Coverage   16.02%   16.02%           
=======================================
  Files          26       26           
  Lines        2503     2503           
=======================================
  Hits          401      401           
  Misses       2102     2102           
Impacted Files Coverage Δ
run_photometry.py 0.00% <0.00%> (ø)
flows/photometry.py 9.94% <5.19%> (ø)
flows/reference_cleaning.py 12.35% <11.62%> (ø)
flows/load_image.py 31.49% <38.18%> (ø)
flows/__init__.py 100.00% <100.00%> (ø)
flows/epsfbuilder/__init__.py 100.00% <100.00%> (ø)
flows/epsfbuilder/epsfbuilder.py 39.13% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 961db6b...0b1f368. Read the comment docs.

@emirkmo emirkmo marked this pull request as ready for review May 16, 2022 21:26
@emirkmo
Copy link
Member Author

emirkmo commented May 16, 2022

All tests pass but I also made a UML class diagram to catch any changes to the runner scripts since we don't have good test coverage. Merging into devel.

@emirkmo emirkmo merged commit 92503fa into SNflows:devel May 16, 2022
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.

1 participant