kevin218 / Eureka

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

[Bug]: HSTRamp parameters can not be of "fixed" type when using mult_white. #636

Open astroRez opened 8 months ago

astroRez commented 8 months ago

FAQ check

Instrument

Other (any stage)

What happened?

When performing a joint fit of multiple white curves, if an HSTRampModel coefficient (e.g. h5 or h6) is set to "fixed", only the first transit is fitted.

Unfortunaly, the kernel crashes without providing an error.

Examples of the program fitting the first transit, but failing to fit the remaining transits are attached. fig5101_ch0_lc_emcee fig5101_ch1_lc_emcee fig5101_ch2_lc_emcee fig5101_ch3_lc_emcee fig5101_ch4_lc_emcee

Error traceback output

No response

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

taylorbell57 commented 5 months ago

@kevin218 and I discussed this issue in a previous Eureka! team meeting, and my best guess at the time was that there was some issue where the orbital phase of HST was being shared between multiple observations assuming a stable, non-precessing orbit. HST's orbit varies quite a bit from one observation to the next, so fixing both h5 (HST's orbital period) and h6 (something like the zero-phase time for HST) across multiple visits seems like a bad idea to me; I'm quite new to working with HST data though, so I could be wrong.

Additionally, it's possible that there is some bug in the code that computes something like time_batch or time_local, which is only buggy for mult_white fits.

Beyond that, it's hard for me to troubleshoot without an error message or putting a bunch of print statements throughout to see what unexpected things are happening. I might be able to find time to investigate this, but probably not for a while (>2 weeks) since I'm pretty over-commited right now. If you or anyone else figures out a solution to this, please feel free to submit a PR or describe what your solution was and I can help you implement the patch.

taylorbell57 commented 3 months ago

@kevin218, is this known bug something we'd like to resolve for v1.0?

kevin218 commented 2 months ago

@taylorbell57 I don't think this is something that needs to be done for v1.0, maybe v1.1.

taylorbell57 commented 1 day ago

@astroRez, would you mind double checking whether this is still an issue with the current version of the pipeline?

astroRez commented 23 hours ago

Unfortunately, using the current version of Eureka!, other preceding errors are encountered when attempting Stage 5 multwhite light curve fitting of HST data:

Screenshot 2024-11-18 at 7 43 14 PM

taylorbell57 commented 23 hours ago

Ah sorry about that - I just made a super quick pull request that will resolve that new issue which should let you test whether your older issue still exists