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

[Bug]: S3 Plotting Requires Matplotlib >=3.6 #560

Closed jbrande closed 1 year ago

jbrande commented 1 year ago

FAQ check

Instrument

Other (any stage)

What happened?

When making figs 3101/3102, we call matplotlib.Figure.set_layout_engine(), which is new in 3.6 to handle all the various layout changes in a common method. Earlier versions don't have this method, and so the code crashes when we hit this line. We should update the environment file to enforce this matplotlib version.

Error traceback output

Generating figure
Traceback (most recent call last):
  File "/mnt/c/Users/j670b842/Yoni/Planetary/eureka/eureka_data/hst/ecfs/run_eureka_wfc3.py", line 16, in <module>
    s3_spec, s3_meta = s3.reduce(eventlabel, ecf_path=ecf_path)
  File "/mnt/c/Users/j670b842/Yoni/Planetary/eureka/Eureka/src/eureka/S3_data_reduction/s3_reduce.py", line 687, in reduce
    plots_s3.lc_nodriftcorr(meta, spec.wave_1d, spec.optspec,
  File "/mnt/c/Users/j670b842/Yoni/Planetary/eureka/Eureka/src/eureka/S3_data_reduction/plots_s3.py", line 119, in lc_nodriftcorr
    fig1.set_layout_engine('tight')
AttributeError: 'Figure' object has no attribute 'set_layout_engine'

What operating system are you using?

No response

What version of Python are you running?

python 3.9.7

What Python packages do you have installed?

matplotlib 3.5.2

Code of Conduct