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 44 forks source link

[Bug]:Manual Clipping in Shared Fitting of White Light Curves -- Not Working for WFC3 #601

Closed astroRez closed 4 months ago

astroRez commented 6 months ago

FAQ check

Instrument

Light curve fitting (Stages 4-6)

What happened?

I'm using Eureka to perform joint white light curve fitting of several transits simultaneously (HST WFC3 Observations). When I manual_clip list set to anything other than None, the program crashes.

White the data in the lc object gets clipped as it should, the corresponding data points in meta.scandir arent being clipped. I attempted fixing this myself, but then clipping even a single data point caused the fitting to go berserk.

Can somebody please help fix this issue with the manual clipping in shared white light curve fitting?

Error traceback output

{ "name": "IndexError", "message": "boolean index did not match indexed array along dimension 0; dimension is 87 but corresponding boolean dimension is 88", "stack": "--------------------------------------------------------------------------- IndexError Traceback (most recent call last) Cell In[6], line 3 1 if name == 'main': 2 # s5_meta = s5.fitlc(eventlabel, ecf_path=ecf_path, s4_meta=s4_meta) ----> 3 s5_meta = s5.fitlc(eventlabel, ecf_path=ecf_path, s4_meta=None) # Shared 4 # s6_meta = s6.plot_spectra(eventlabel, ecf_path=ecf_path, s5_meta=s5_meta)

File ~/miniconda3/envs/eureka/lib/python3.9/site-packages/eureka/S5_lightcurve_fitting/s5_fit.py:211, in fitlc(eventlabel, ecf_path, s4_meta, input_meta) 208 if meta.multwhite: 209 for p in range(len(meta.inputdirlist)+1): 210 meta, lc_whites[p], log = \ --> 211 util.manual_clip(lc_whites[p], meta, log) 212 meta.nints[p] = len(lc_whites[p].time.values) 213 else:

File ~/miniconda3/envs/eureka/lib/python3.9/site-packages/eureka/lib/util.py:154, in manual_clip(lc, meta, log) 152 lc = lc.isel(time=time_inds) 153 if hasattr(meta, 'scandir'): --> 154 meta.scandir = meta.scandir[time_bool[::meta.nreads]] 156 return meta, lc, log

IndexError: boolean index did not match indexed array along dimension 0; dimension is 87 but corresponding boolean dimension is 88" }

What operating system are you using?

No response

What version of Python are you running?

No response

What Python packages do you have installed?

No response

Code of Conduct