Closed lheinke closed 4 months ago
Thanks for submitting this - very strange, I've been running Stage 3 myself lately and haven't encountered this. There are multiple checks before the point where it crashed that should've populated meta.photfile with a value. I'm just confused because the below-linked lines shouldn't let this happen: https://github.com/kevin218/Eureka/blob/7d7f7041ba77d086cb03ad1eb3ac167ef39ae8ea/src/eureka/S3_data_reduction/bright2flux.py#L305-L314
Oh wait, I see what happened here. You downloaded the Stage 2 files (_calints) from MAST which isn't recommended since they automatically run the photometric calibration step; this step is not helpful for time-series observations and is a bit hard to undo cleanly. I strongly recommend you download the Stage 1 files (_rateints) from MAST at a minimum, and also consider starting instead with the raw _uncal files from MAST (there are some potential improvements to be made during Stage 1, including increaseing the jump threshold value to something higher like 7 which will give fewer false positives and may give better overall results, but that should be verified by you).
That said, while starting from the MAST Stage 2 files is strongly discouraged, there is nonetheless a bug that you've encountered. Because you've provided a gain value in your ECF you ended up triggering this clause:
https://github.com/kevin218/Eureka/blob/7d7f7041ba77d086cb03ad1eb3ac167ef39ae8ea/src/eureka/S3_data_reduction/bright2flux.py#L292-L295
which does not populate the photfile
attribute of meta
since I'd mistakenly assumed we wouldn't need the photfile
in that case.
This should be an easy fix for me and I'll hopefully have a patch submitted today/tomorrow, but if you don't want to wait for that, in the meantime you have two options:
photfile
and gainfile
attributes with the current defaults from CRDS pmap. I believe there's been a new gainfile
released which is more accurate than the old constant value of 5.5 that STScI had assumed and might be more accurate than the constant 3.1 value I'd estimated.Thanks for the quick response, Taylor! In the meantime, I did already run Eureka! starting from stage 1 and indeed the problem disappears.
I was aware that photometric flux calibration is not needed for transit spectroscopy, but did not know that it would cause problems if applied. Is this mentioned somewhere in the Eureka! docs? Otherwise, it might be useful to warn against using the MAST stage 2 output explicitly.
FAQ check
Instrument
MIRI (Stages 1-3)
What happened?
I am trying to reduce MIRI transit spectroscopy data starting from stage 2
calints
outputs of thejwst
pipeline that I downloaded from MAST. The pipeline seems to recognize that the output is not from previous Eureka! stages, but nonetheless quickly fails at the last line of output:Error traceback output
What operating system are you using?
Ubuntu 20.04.6 LTS
What version of Python are you running?
Python 3.9.7
What Python packages do you have installed?
Code of Conduct