kevin218 / Eureka

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

Changing the MAD computation direction #541

Closed taylorbell57 closed 1 year ago

taylorbell57 commented 1 year ago

Resolves #304

Previously, the MAD was computed along the wavelength axis and then an average value was computed. Minimizing this 2D MAD is essentially minimizing noise in the spectral direction. Instead, we typically want to minimize noise in the temporal direction, so I've rotated the MAD calculation so that it is computed along the time axis for each wavelength, and then averaged. I also separately handle each WFC3 scan direction to avoid issues there.

I also had to fix a couple of WFC3-related bugs and testing issues in order to get the tests to pass (resolves #542 and other unsubmitted bugs).

codecov-commenter commented 1 year ago

Codecov Report

Merging #541 (02a0dba) into main (8808897) will decrease coverage by 0.35%. The diff coverage is 55.49%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #541      +/-   ##
==========================================
- Coverage   58.08%   57.74%   -0.35%     
==========================================
  Files          91       92       +1     
  Lines       10937    11082     +145     
==========================================
+ Hits         6353     6399      +46     
- Misses       4584     4683      +99     
Impacted Files Coverage Δ
src/eureka/S3_data_reduction/plots_s3.py 68.53% <27.50%> (-6.80%) :arrow_down:
src/eureka/S3_data_reduction/s3_reduce.py 89.20% <50.00%> (+0.02%) :arrow_up:
src/eureka/lib/centerdriver.py 67.56% <60.86%> (-24.75%) :arrow_down:
src/eureka/lib/gaussian_min.py 87.17% <87.17%> (ø)
src/eureka/lib/util.py 79.56% <91.66%> (+0.16%) :arrow_up:
src/eureka/S3_data_reduction/nircam.py 74.86% <100.00%> (+1.17%) :arrow_up:
src/eureka/S3_data_reduction/wfc3.py 89.68% <100.00%> (+2.70%) :arrow_up:
src/eureka/S4_generate_lightcurves/wfc3.py 100.00% <100.00%> (ø)
src/eureka/lib/__init__.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more