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

White light curve with times all zero #535

Closed jkteske closed 1 year ago

jkteske commented 1 year ago

Instrument

Light curve fitting (Stages 4-6)

What happened?

I'm running Eureka! v.0.9.dev0+gc38bb2c7.d20230510 on a publicly available data set (from our program :)). I started by downloading the .uncal files from MAST. First I wanted to generate a white light curve for NRS1.

Eureka! Stages 1-4 run without errors (and continues merrily to Stage 5), but the output of the white light curve looks wrong, see the attached plot. fig4102_white_1D_LC

It looks like the time array is assigned to all zeros. I checked that INT_TIMES is included the file headers, and they have the same dimensions for each segment, e.g., the dimensions for my INT_TIMES for segment 1 of NRS1 for the uncal, rateints, calints, and x1dints files are all 1505 x 7. My Stage 3 outputs looks fairly normal (comparing to a colleague's), and I am using the same Stage 4 .ecf file parameters as she is.

I'm happy to share more intermediate data products, but figured maybe this is something silly I'm missing and is an easy fix. I wasn't able to find any fixes in the open or closed issues, but please feel free to point me to something I missed.

Error traceback output

No response

What operating system are you using?

Mac OS 13.3.1

What version of Python are you running?

Python 3.9.7

What Python packages do you have installed?

Name Version Build Channel

alabaster 0.7.13 pyhd8ed1ab_0 conda-forge aom 3.5.0 hf0c8a7f_0 conda-forge appnope 0.1.3 pyhd8ed1ab_0 conda-forge arviz 0.15.1 pyhd8ed1ab_0 conda-forge asdf 2.15.0 pyhd8ed1ab_0 conda-forge asdf-astropy 0.4.0 pyhd8ed1ab_1 conda-forge asdf-coordinates-schemas 0.2.0 pyhd8ed1ab_1 conda-forge asdf-standard 1.0.3 pyhd8ed1ab_0 conda-forge asdf-transform-schemas 0.3.0 pyhd8ed1ab_0 conda-forge asdf-unit-schemas 0.1.0 pyhd8ed1ab_0 conda-forge asdf-wcs-schemas 0.1.1 pyhd8ed1ab_0 conda-forge asteval 0.9.29 pyhd8ed1ab_0 conda-forge astraeus 0.3 pypi_0 pypi astropy 5.2.2 py39hfc8b457_0 conda-forge astropy-healpix 0.7 py39h7cc1f47_2 conda-forge astroscrappy 1.1.0 py39h7cc1f47_2 conda-forge asttokens 2.2.1 pyhd8ed1ab_0 conda-forge attrs 23.1.0 pyh71513ae_1 conda-forge babel 2.12.1 pyhd8ed1ab_1 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 pyhd8ed1ab_3 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge backports.zoneinfo 0.2.1 py39h6e9494a_7 conda-forge batman-package 2.4.9 py39h7cc1f47_1 conda-forge bayesicfitting 3.1.1 pypi_0 pypi beautifulsoup4 4.12.2 pyha770c72_0 conda-forge blas 1.0 openblas
bleach 6.0.0 pyhd8ed1ab_0 conda-forge blosc 1.21.2 hebb52c4_0 conda-forge bokeh 2.4.3 pyhd8ed1ab_3 conda-forge bottleneck 1.3.7 py39h7cc1f47_0 conda-forge brotli 1.0.9 hb7f2c08_8 conda-forge brotli-bin 1.0.9 hb7f2c08_8 conda-forge brotlipy 0.7.0 py39ha30fb19_1005 conda-forge brunsli 0.1 h046ec9c_0 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge c-ares 1.18.1 h0d85af4_0 conda-forge c-blosc2 2.8.0 had5f71b_1 conda-forge ca-certificates 2023.5.7 h8857fd0_0 conda-forge cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge cachetools 5.3.0 pypi_0 pypi ccdproc 2.4.0 pyhd8ed1ab_0 conda-forge celerite 0.4.2 py39hecff1ad_3 conda-forge certifi 2022.5.18.1 pypi_0 pypi cffi 1.15.1 py39h131948b_3 conda-forge cfitsio 4.2.0 hd56cc12_0 conda-forge charls 2.4.1 hf0c8a7f_0 conda-forge charset-normalizer 3.1.0 pyhd8ed1ab_0 conda-forge click 8.1.3 unix_pyhd8ed1ab_2 conda-forge cloudpickle 2.2.1 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge contourpy 1.0.7 py39h92daf61_0 conda-forge corner 2.2.2 pyhd8ed1ab_0 conda-forge coverage 7.2.5 py39hdc70f33_0 conda-forge crds 11.17.0 pypi_0 pypi cryptography 39.0.0 py39h7eb6a14_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge cython 0.29.34 py39h7a8716b_0 conda-forge cytoolz 0.12.0 py39ha30fb19_1 conda-forge dask 2022.6.0 pypi_0 pypi dask-core 2023.4.1 pyhd8ed1ab_0 conda-forge dav1d 1.0.0 hac89ed1_1 conda-forge decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge dill 0.3.6 pypi_0 pypi docutils 0.18.1 py39hecd8cb5_3
drizzle 1.13.7 pypi_0 pypi dynesty 2.1.1 pyhd8ed1ab_0 conda-forge emcee 3.1.4 pyhd8ed1ab_0 conda-forge entrypoints 0.4 pyhd8ed1ab_0 conda-forge eureka 0.9.dev0+gc38bb2c7.d20230510 pypi_0 pypi exceptiongroup 1.1.1 pyhd8ed1ab_0 conda-forge executing 1.2.0 pyhd8ed1ab_0 conda-forge exotic-ld 3.0.0 pypi_0 pypi filelock 3.12.0 pypi_0 pypi fonttools 4.39.3 py39ha30fb19_0 conda-forge freetype 2.12.1 h3f81eb7_1 conda-forge fsspec 2023.5.0 pyh1a96a4e_0 conda-forge future 0.18.3 pyhd8ed1ab_0 conda-forge george 0.4.0 py39hecff1ad_5 conda-forge giflib 5.2.1 hb7f2c08_3 conda-forge gwcs 0.18.3 pyhd8ed1ab_0 conda-forge h5netcdf 1.1.0 pyhd8ed1ab_1 conda-forge h5py 3.1.0 nompi_py39hdc2b67d_100 conda-forge hdf5 1.10.6 nompi_hc5d9132_1114 conda-forge hypothesis 6.75.2 pyha770c72_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge image-registration 0.2.7.dev16+g24e5018 pypi_0 pypi imagecodecs 2023.1.23 py39hd51fd57_2 conda-forge imageio 2.28.1 pyh24c5eb1_0 conda-forge imagesize 1.4.1 pyhd8ed1ab_0 conda-forge importlib-metadata 6.6.0 pyha770c72_0 conda-forge importlib_resources 5.12.0 pyhd8ed1ab_0 conda-forge iniconfig 2.0.0 pyhd8ed1ab_0 conda-forge ipython 8.13.2 pyhd1c38e8_0 conda-forge jedi 0.18.2 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge jmespath 1.0.1 pyhd8ed1ab_0 conda-forge joblib 1.2.0 pyhd8ed1ab_0 conda-forge jsonschema 4.9.1 pypi_0 pypi jupyter_client 8.2.0 pyhd8ed1ab_0 conda-forge jupyter_core 5.3.0 py39h6e9494a_0 conda-forge jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge jwst 1.8.2 pypi_0 pypi jxrlib 1.1 h35c211d_2 conda-forge kiwisolver 1.4.4 py39h92daf61_1 conda-forge krb5 1.20.1 h0165f36_0 conda-forge lcms2 2.15 h2dcdeff_1 conda-forge lerc 4.0.0 hb486fe8_0 conda-forge libaec 1.0.6 hf0c8a7f_1 conda-forge libavif 0.11.1 he9a59b1_0 conda-forge libblas 3.9.0 16_osx64_openblas conda-forge libbrotlicommon 1.0.9 hb7f2c08_8 conda-forge libbrotlidec 1.0.9 hb7f2c08_8 conda-forge libbrotlienc 1.0.9 hb7f2c08_8 conda-forge libcblas 3.9.0 16_osx64_openblas conda-forge libcurl 7.87.0 haf73cf8_0 conda-forge libcxx 16.0.3 hd57cbcb_0 conda-forge libdeflate 1.18 hac1461d_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgfortran 5.0.0 11_3_0_h97931a8_31 conda-forge libgfortran5 12.2.0 he409387_31 conda-forge libjpeg-turbo 2.1.5.1 hb7f2c08_0 conda-forge liblapack 3.9.0 16_osx64_openblas conda-forge libnghttp2 1.51.0 h0dd9d14_0 conda-forge libopenblas 0.3.21 openmp_h429af6e_3 conda-forge libpng 1.6.39 ha978bb4_0 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libsqlite 3.40.0 ha978bb4_1 conda-forge libssh2 1.10.0 h7535e13_3 conda-forge libtiff 4.5.0 hedf67fa_6 conda-forge libwebp-base 1.3.0 hb7f2c08_0 conda-forge libxcb 1.13 h0d85af4_1004 conda-forge libzlib 1.2.13 hfd90126_4 conda-forge libzopfli 1.0.3 h046ec9c_0 conda-forge llvm-openmp 16.0.3 hff08bdf_0 conda-forge lmfit 1.2.1 pyhd8ed1ab_0 conda-forge locket 1.0.0 pyhd8ed1ab_0 conda-forge lz4-c 1.9.4 hf0c8a7f_0 conda-forge markdown-it-py 2.2.0 pypi_0 pypi markupsafe 2.1.2 py39ha30fb19_0 conda-forge matplotlib 3.7.1 py39h6e9494a_0 conda-forge matplotlib-base 3.7.1 py39hb2f573b_0 conda-forge matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge mdit-py-plugins 0.3.5 pypi_0 pypi mdurl 0.1.2 pypi_0 pypi mistune 2.0.5 pyhd8ed1ab_0 conda-forge mkl 2022.2.1 h44ed08c_16952 conda-forge mkl-service 2.4.0 py39hcf0e074_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge myst-parser 1.0.0 pypi_0 pypi nbclient 0.7.4 pyhd8ed1ab_0 conda-forge nbconvert 7.3.1 pyhd8ed1ab_0 conda-forge nbconvert-core 7.3.1 pyhd8ed1ab_0 conda-forge nbconvert-pandoc 7.3.1 pyhd8ed1ab_0 conda-forge nbformat 5.8.0 pyhd8ed1ab_0 conda-forge nbsphinx 0.9.1 pyhd8ed1ab_0 conda-forge ncurses 6.3 h96cf925_1 conda-forge networkx 3.1 pyhd8ed1ab_0 conda-forge numpy 1.21.6 pypi_0 pypi numpydoc 1.5.0 pypi_0 pypi opencv-python 4.7.0.72 pypi_0 pypi openjpeg 2.5.0 h13ac156_2 conda-forge openssl 1.1.1t hfd90126_0 conda-forge packaging 23.1 pyhd8ed1ab_0 conda-forge pandas 2.0.1 py39h11b3245_0 conda-forge pandoc 2.19.2 h694c41f_2 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge parsley 1.3 pypi_0 pypi parso 0.8.3 pyhd8ed1ab_0 conda-forge partd 1.4.0 pyhd8ed1ab_0 conda-forge patsy 0.5.3 pypi_0 pypi pexpect 4.8.0 pyh1a96a4e_2 conda-forge photutils 1.7.0 py39hfc8b457_0 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 9.5.0 py39h77c96bc_0 conda-forge pip 23.1.2 pyhd8ed1ab_0 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge platformdirs 3.5.0 pyhd8ed1ab_0 conda-forge pluggy 1.0.0 pyhd8ed1ab_5 conda-forge pooch 1.7.0 pyha770c72_3 conda-forge poppy 1.0.3 pypi_0 pypi prompt-toolkit 3.0.38 pyha770c72_0 conda-forge prompt_toolkit 3.0.38 hd8ed1ab_0 conda-forge psutil 5.9.5 py39ha30fb19_0 conda-forge pthread-stubs 0.4 hc929b4f_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyerfa 2.0.0.3 py39h7cc1f47_0 conda-forge pygments 2.15.1 pyhd8ed1ab_0 conda-forge pyopenssl 23.1.1 pyhd8ed1ab_0 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pyrsistent 0.19.3 py39ha30fb19_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge pytest 7.3.1 pyhd8ed1ab_0 conda-forge pytest-arraydiff 0.3 py_0 conda-forge pytest-astropy 0.10.0 pyhd8ed1ab_0 conda-forge pytest-astropy-header 0.1.2 py_0 conda-forge pytest-cov 4.0.0 pyhd8ed1ab_0 conda-forge pytest-doctestplus 0.12.1 pyhd8ed1ab_0 conda-forge pytest-filter-subpackage 0.1.1 py_0 conda-forge pytest-mock 3.10.0 pyhd8ed1ab_0 conda-forge pytest-openfiles 0.5.0 py_0 conda-forge pytest-remotedata 0.4.0 pyhd8ed1ab_0 conda-forge python 3.9.7 h1248fe1_3_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.16.3 pyhd8ed1ab_0 conda-forge python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge python_abi 3.9 3_cp39 conda-forge pytz 2023.3 pyhd8ed1ab_0 conda-forge pywavelets 1.4.1 py39h7cc1f47_0 conda-forge pyyaml 6.0 py39ha30fb19_5 conda-forge pyzmq 25.0.2 py39hed8f129_0 conda-forge readline 8.2 h9e318b2_1 conda-forge reproject 0.10.0 py39h7cc1f47_0 conda-forge requests 2.30.0 pypi_0 pypi scikit-image 0.19.3 py39hecff1ad_2 conda-forge scikit-learn 1.2.2 py39h151e6e4_1 conda-forge scipy 1.7.3 pypi_0 pypi semantic_version 2.10.0 pyhd8ed1ab_0 conda-forge setuptools 67.7.2 pyhd8ed1ab_0 conda-forge setuptools-scm 7.1.0 pyhd8ed1ab_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge snappy 1.1.10 h225ccf5_0 conda-forge snowballstemmer 2.2.0 pyhd8ed1ab_0 conda-forge sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge spherical-geometry 1.2.23 pypi_0 pypi sphinx 6.2.1 pypi_0 pypi sphinx-rtd-theme 1.2.0 pypi_0 pypi sphinxcontrib-applehelp 1.0.4 pyhd8ed1ab_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 2.0.1 pyhd8ed1ab_0 conda-forge sphinxcontrib-jquery 4.1 pypi_0 pypi sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.5 pyhd8ed1ab_2 conda-forge sqlite 3.40.0 h9ae0607_1 conda-forge stack_data 0.6.2 pyhd8ed1ab_0 conda-forge stcal 1.2.2 pypi_0 pypi stdatamodels 0.4.5 pypi_0 pypi stpipe 0.5.0 pypi_0 pypi stsci-image 2.3.5 pypi_0 pypi stsci-imagestats 1.6.3 pypi_0 pypi stsci-stimage 0.2.6 pypi_0 pypi svo-filters 0.4.4 pypi_0 pypi tbb 2021.9.0 hb8565cd_0 conda-forge threadpoolctl 3.1.0 pyh8a188c0_0 conda-forge tifffile 2023.4.12 pyhd8ed1ab_0 conda-forge tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge tk 8.6.12 h5dbffcc_0 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.3.1 pypi_0 pypi tqdm 4.65.0 pyhd8ed1ab_1 conda-forge traitlets 5.9.0 pyhd8ed1ab_0 conda-forge tweakwcs 0.8.2 pypi_0 pypi typing-extensions 4.5.0 hd8ed1ab_0 conda-forge typing_extensions 4.5.0 pyha770c72_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge uncertainties 3.1.7 pyhd8ed1ab_0 conda-forge unicodedata2 15.0.0 py39ha30fb19_0 conda-forge urllib3 2.0.2 pypi_0 pypi wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.40.0 pyhd8ed1ab_0 conda-forge wiimatch 0.3.1 pypi_0 pypi wrapt 1.15.0 pypi_0 pypi xarray 2023.4.2 pyhd8ed1ab_0 conda-forge xarray-einstats 0.5.1 pyhd8ed1ab_0 conda-forge xorg-libxau 1.0.9 h35c211d_0 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xz 5.2.6 h775f41a_0 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge zeromq 4.3.4 he49afe7_1 conda-forge zfp 1.0.0 ha894c9a_3 conda-forge zipp 3.15.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 hfd90126_4 conda-forge zlib-ng 2.0.7 hb7f2c08_0 conda-forge zstd 1.5.2 hbc0c0cd_6 conda-forge

Code of Conduct

jkteske commented 1 year ago

UPDATE: Apparently when STScI "reprocesses" the data, at least in some cases (three separate observations I have checked), the BJD time stamps in the uncal files all become zeros. E.g.,

hdul=fits.open('jw02512008001_04102_00001-seg001_nrs1_uncal.fits') hdul.info() Filename: jw02512008001_04102_00001-seg001_nrs1_uncal.fits No. Name Ver Type Cards Dimensions Format 0 PRIMARY 1 PrimaryHDU 195 () 1 SCI 1 ImageHDU 66 (2048, 32, 3, 1505) int16 (rescales to uint16) 2 GROUP 1 BinTableHDU 38 129R x 13C [I, I, I, J, I, 26A, I, I, I, I, 36A, D, D] 3 INT_TIMES 1 BinTableHDU 24 1505R x 7C [J, D, D, D, D, D, D] 4 ASDF 1 BinTableHDU 11 1R x 1C [7999B] hdul['INT_TIMES'].data FITS_rec([( 1, 59991.55015492, 59991.55017067, 59991.55018642, 0., 0., 0.), ( 2, 59991.55019692, 59991.55021267, 59991.55022842, 0., 0., 0.), ( 3, 59991.55023892, 59991.55025467, 59991.55027041, 0., 0., 0.), ..., (1503, 59991.61323684, 59991.61325259, 59991.61326833, 0., 0., 0.), (1504, 59991.61327883, 59991.61329458, 59991.61331033, 0., 0., 0.), (1505, 59991.61332083, 59991.61333658, 59991.61335233, 0., 0., 0.)], dtype=(numpy.record, [('integration_number', '>i4'), ('int_start_MJD_UTC', '>f8'), ('int_mid_MJD_UTC', '>f8'), ('int_end_MJD_UTC', '>f8'), ('int_start_BJD_TDB', '>f8'), ('int_mid_BJD_TDB', '>f8'), ('int_end_BJD_TDB', '>f8')]))

The MJD time stamps are still there, though. And the BJD time stamps are there in data that is downloaded right away after it is observed, just not after "reprocessing". I've put in a Helpdesk ticket with MAST, but it might be worth documenting this somewhere in Eureka!, or using MJD instead of BJD if BJD is zero.

jkteske commented 1 year ago

UPDATE v2: From STSCI:

_This is a known bug and that crept into the reprocessing software and is currently being worked by our developers. Once that fix is installed and the data reprocessed the INTTIMES values should be populated once again.

kevin218 commented 1 year ago

Thanks for the updates! This is the second case that I know of where the times array went missing after reprocessing the data. I'm glad they're working on a fix.

I'm going to close this issue since it's unrelated to Eureka!.