kevin218 / Eureka

Eureka! is a data reduction and analysis pipeline intended for time-series observations with JWST.
https://eurekadocs.readthedocs.io/
MIT License
56 stars 43 forks source link

Allow setting of matplotlib backend and layout engine #665

Open taylorbell57 opened 2 weeks ago

taylorbell57 commented 2 weeks ago

This PR adds support for inputting matplotlib backend to lib.plots.set_rc().

Additionally, this PR ensures that the matplotlib layout engine is always set, which resolves #647

I've tested this on my computer and importing eureka is enough to make sure all the plots are made successfully, but users should still run the eureka.lib.plots.set_rc(style='eureka') step. I didn't want to force the eureka style on everyone who ever imports eureka, but I needed to make sure the layout engine and figure filetype were defined, so I tried to strike a minimally intrusive balance.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 64.28571% with 5 lines in your changes missing coverage. Please review.

Project coverage is 54.27%. Comparing base (a939236) to head (e13467d).

Files Patch % Lines
src/eureka/lib/plots.py 72.72% 3 Missing :warning:
...eureka/S1_detector_processing/update_saturation.py 0.00% 1 Missing :warning:
src/eureka/S6_planet_spectra/s6_spectra.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #665 +/- ## ========================================== + Coverage 54.24% 54.27% +0.03% ========================================== Files 101 101 Lines 12793 12802 +9 ========================================== + Hits 6939 6948 +9 Misses 5854 5854 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.