kevin218 / Eureka

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

Logging Eureka! version and CRDS pmap #581

Closed taylorbell57 closed 10 months ago

taylorbell57 commented 10 months ago

To help strengthen reproducibility and to allow users to manually control the used pmap, we now (silently) log the Eureka! version for Stages 1-6 and the CRDS pmap from Stages 1-3 (4-6 aren't relevant). For all future analyses, warnings will be printed to the terminal if the Eureka! version or CRDS pmap changes (only in the relevant stages), but this will not apply to previous partial reductions of the data (e.g., running the new code on v0.10 Stage 1 files won't raise any pmap or Eureka! version warnings).

taylorbell57 commented 10 months ago

I just remembered that the pmap differs between JWST and HST, and the current code also doesn't check if the user has set their pmap in their .bashrc file, so I'll switch to using crds.get_context_name('jwst') (and crds.get_context_name('hst') if there are any reference files that are automatically downloaded for HST, which I don't think there are) instead of the crds.get_default_context() I'm using right now

taylorbell57 commented 10 months ago

Hah, the automated testing also caught a bug in the cases where pmap is not explicitly set (File 'jwst_jwst_1148.pmap.pmap' is not known to CRDS.)

taylorbell57 commented 10 months ago

What's the motivation behind muting the Eureka! version in the output? Are you worried about information overload on the screen or is there something else?

Yeah, I feel like that's not really something you want to know while running the code but rather is something you'd want to know a month or few later when you can't quite remember what you did

codecov-commenter commented 10 months ago

Codecov Report

Attention: 333 lines in your changes are missing coverage. Please review.

Comparison is base (559f703) 57.02% compared to head (f3e50e1) 57.71%. Report is 148 commits behind head on main.

Files Patch % Lines
src/eureka/S5_lightcurve_fitting/models/GPModel.py 5.00% 152 Missing :warning:
src/eureka/S5_lightcurve_fitting/s5_fit.py 36.11% 23 Missing :warning:
src/eureka/S3_data_reduction/nirspec.py 28.00% 18 Missing :warning:
src/eureka/S3_data_reduction/niriss_python.py 11.76% 15 Missing :warning:
src/eureka/S5_lightcurve_fitting/plots_s5.py 71.15% 15 Missing :warning:
src/eureka/S3_data_reduction/s3_reduce.py 81.33% 14 Missing :warning:
src/eureka/S5_lightcurve_fitting/likelihood.py 54.83% 14 Missing :warning:
src/eureka/S3_data_reduction/nircam.py 61.90% 8 Missing :warning:
...curve_fitting/differentiable_models/PyMC3Models.py 71.42% 8 Missing :warning:
src/eureka/S5_lightcurve_fitting/fitters.py 76.47% 8 Missing :warning:
... and 20 more

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #581 +/- ## ========================================== + Coverage 57.02% 57.71% +0.69% ========================================== Files 94 96 +2 Lines 11282 11600 +318 ========================================== + Hits 6433 6695 +262 - Misses 4849 4905 +56 ```

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