kevin218 / Eureka

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

[Bug]: Stage 5 crashed with num_planets > 1 #704

Closed Witchblade101 closed 1 week ago

Witchblade101 commented 2 weeks ago

FAQ check

Instrument

Light curve fitting (Stages 4-6)

What happened?

I installed the latest version:

commit b79744612deca1dde10cad3b5e8fd666245ce606 (HEAD -> main, origin/main, origin/HEAD)
Merge: 6919a484 6e14b1ff
Author: Kevin Stevenson <kbstevenson@gmail.com>
Date:   Tue Sep 24 16:48:31 2024 -0400

    Merge pull request #701 from kevin218/dev/tjb3

    Better documenting multi-channel and multi-planet EPF settings

I reran stages 2 - 4 using new .ecf files to avoid any potential problems. Everything looked good.

On Stage 5, I added num_planets and pl1 where needed as described in the updated documentation. Stage 5 crashed.

Error traceback output

(eureka) dlong@hikaru obs3 % python run_eureka_t1be_3.py
WARNING: There are 8 metadata save files in the folder: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/
  Using the metadata file inside: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-26_t1be_3_run1/ap3_bg7/
  and will consider aperture ranges listed there. If this metadata file is not a part
  of the run you intended, please provide a more precise folder for the metadata file.
Finished loading parameters from /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-26_t1be_3_run1/ap3_bg7//S4_t1be_3_ap3_bg7_LCData.h5

Starting Stage 5: Light Curve Fitting

Input directory: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-26_t1be_3_run1/ap3_bg7/
Output directory: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage5/S5_2024-09-26_t1be_3_run1/ap3_bg7/
Copying S5 control file
Copying S5 parameter control file

Starting Channel 0 of 47

=========================
Starting dynesty fit.
Traceback (most recent call last):
  File "/Users/dlong/DataAnalysis/JWST/eureka/t1be/obs3/run_eureka_t1be_3.py", line 31, in <module>
    meta = s5.fitlc(eventlabel, ecf_path=ecf_path)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/s5_fit.py", line 473, in fitlc
    meta, params = fit_channel(meta, time_temp, flux, channel,
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/s5_fit.py", line 964, in fit_channel
    lc_model.fit(model, meta, log, fitter='dynesty')
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/lightcurve.py", line 181, in fit
    fit_model = self.fitter_func(self, model, meta, log, **kwargs)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/fitters.py", line 856, in dynestyfitter
    start_lnprob = lnprob(freepars, lc, model, prior1, prior2, priortype,
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/likelihood.py", line 206, in lnprob
    ln_like_val = ln_like(theta, lc, model, freenames)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/likelihood.py", line 85, in ln_like
    model_lc = model.eval()
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/Model.py", line 370, in eval
    flux *= component.eval(channel=channel, **kwargs)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/AstroModel.py", line 400, in eval
    starFlux *= self.transit_model.eval(channel=chan,
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/BatmanModels.py", line 139, in eval
    m_transit = self.transit_model(pl_params, time,
  File "/Users/dlong/miniconda3/envs/eureka/lib/python3.10/site-packages/batman/transitmodel.py", line 138, in __init__
    self.ds = _rsky._rsky(self.t_supersample, params.t0, params.per, params.a, params.inc*pi/180., params.ecc, params.w*pi/180., self.transittype, self.nthreads)
TypeError: must be real number, not NoneType
(eureka) dlong@hikaru obs3 %

What operating system are you using?

Mac OS Sonoma 14.6.1

What version of Python are you running?

Python 3.10.14

What Python packages do you have installed?

# packages in environment at /Users/dlong/miniconda3/envs/eureka:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.16                   pypi_0    pypi
appnope                   0.1.4              pyhd8ed1ab_0    conda-forge
asciitree                 0.3.3                    pypi_0    pypi
asdf                      3.2.0                    pypi_0    pypi
asdf-astropy              0.6.1                    pypi_0    pypi
asdf-coordinates-schemas  0.3.0                    pypi_0    pypi
asdf-standard             1.1.1                    pypi_0    pypi
asdf-transform-schemas    0.5.0                    pypi_0    pypi
asdf-wcs-schemas          0.4.0                    pypi_0    pypi
asteval                   1.0.0                    pypi_0    pypi
astraeus                  0.3                      pypi_0    pypi
astropy                   6.1.1                    pypi_0    pypi
astropy-healpix           1.0.3                    pypi_0    pypi
astropy-iers-data         0.2024.7.1.0.34.3          pypi_0    pypi
astroquery                0.4.7                    pypi_0    pypi
astroscrappy              1.2.0                    pypi_0    pypi
asttokens                 2.4.1                    pypi_0    pypi
attrs                     23.2.0                   pypi_0    pypi
babel                     2.15.0                   pypi_0    pypi
backports-tarfile         1.2.0                    pypi_0    pypi
batman-package            2.4.9                    pypi_0    pypi
bayesicfitting            3.2.1                    pypi_0    pypi
beautifulsoup4            4.12.3                   pypi_0    pypi
bokeh                     2.4.3                    pypi_0    pypi
bottleneck                1.4.0                    pypi_0    pypi
bzip2                     1.0.8                h93a5062_5    conda-forge
ca-certificates           2024.7.4             hf0a4a13_0    conda-forge
ccdproc                   2.4.2                    pypi_0    pypi
celerite2                 0.3.2                    pypi_0    pypi
certifi                   2024.6.2           pyhd8ed1ab_0    conda-forge
cftime                    1.6.4                    pypi_0    pypi
charset-normalizer        3.3.2                    pypi_0    pypi
click                     8.1.7                    pypi_0    pypi
cloudpickle               3.0.0                    pypi_0    pypi
comm                      0.2.2              pyhd8ed1ab_0    conda-forge
contourpy                 1.2.1                    pypi_0    pypi
corner                    2.2.2                    pypi_0    pypi
crds                      11.17.25                 pypi_0    pypi
cycler                    0.12.1                   pypi_0    pypi
dask                      2024.6.2                 pypi_0    pypi
debugpy                   1.8.2           py310hcf9f62a_0    conda-forge
decorator                 5.1.1                    pypi_0    pypi
dill                      0.3.8                    pypi_0    pypi
docutils                  0.21.2                   pypi_0    pypi
drizzle                   1.15.2                   pypi_0    pypi
dynesty                   2.1.4                    pypi_0    pypi
emcee                     3.1.6                    pypi_0    pypi
eureka                    0.11.dev663+gb7974461          pypi_0    pypi
exceptiongroup            1.2.1                    pypi_0    pypi
executing                 2.0.1                    pypi_0    pypi
exotic-ld                 3.2.0                    pypi_0    pypi
fasteners                 0.19                     pypi_0    pypi
filelock                  3.15.4                   pypi_0    pypi
fleck                     1.1.2                    pypi_0    pypi
fonttools                 4.53.0                   pypi_0    pypi
fsspec                    2024.6.1                 pypi_0    pypi
future                    1.0.0                    pypi_0    pypi
george                    0.4.2                    pypi_0    pypi
gwcs                      0.21.0                   pypi_0    pypi
h5netcdf                  1.3.0                    pypi_0    pypi
h5py                      3.11.0                   pypi_0    pypi
html5lib                  1.1                      pypi_0    pypi
idna                      3.7                      pypi_0    pypi
imageio                   2.34.2                   pypi_0    pypi
imagesize                 1.4.1                    pypi_0    pypi
importlib-metadata        8.0.0                    pypi_0    pypi
importlib_metadata        8.0.0                hd8ed1ab_0    conda-forge
iniconfig                 2.0.0                    pypi_0    pypi
ipykernel                 6.29.5             pyh57ce528_0    conda-forge
ipython                   8.26.0                   pypi_0    pypi
jaraco-classes            3.4.0                    pypi_0    pypi
jaraco-context            5.3.0                    pypi_0    pypi
jaraco-functools          4.0.1                    pypi_0    pypi
jedi                      0.19.1                   pypi_0    pypi
jinja2                    3.1.4                    pypi_0    pypi
jmespath                  1.0.1                    pypi_0    pypi
jsonschema                4.22.0                   pypi_0    pypi
jsonschema-specifications 2023.12.1                pypi_0    pypi
jupyter_client            8.6.2              pyhd8ed1ab_0    conda-forge
jupyter_core              5.7.2           py310hbe9552e_0    conda-forge
jwst                      1.14.0                   pypi_0    pypi
keyring                   25.2.1                   pypi_0    pypi
kiwisolver                1.4.5                    pypi_0    pypi
krb5                      1.21.3               h237132a_0    conda-forge
lazy-loader               0.4                      pypi_0    pypi
libcxx                    17.0.6               h0812c0d_3    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libsodium                 1.0.18               h27ca646_1    conda-forge
libsqlite                 3.46.0               hfb93653_0    conda-forge
libzlib                   1.3.1                hfb2fe0b_1    conda-forge
lmfit                     1.3.1                    pypi_0    pypi
locket                    1.0.0                    pypi_0    pypi
markupsafe                2.1.5                    pypi_0    pypi
matplotlib                3.9.0                    pypi_0    pypi
matplotlib-inline         0.1.7                    pypi_0    pypi
mc3                       3.2.0                    pypi_0    pypi
more-itertools            10.3.0                   pypi_0    pypi
ncurses                   6.5                  hb89a1cb_0    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
netcdf4                   1.6.5                    pypi_0    pypi
networkx                  3.3                      pypi_0    pypi
numcodecs                 0.12.1                   pypi_0    pypi
numpy                     1.24.4                   pypi_0    pypi
numpydoc                  1.7.0                    pypi_0    pypi
opencv-python-headless    4.10.0.84                pypi_0    pypi
openssl                   3.3.1                hfb2fe0b_1    conda-forge
packaging                 24.1                     pypi_0    pypi
pandas                    2.2.2                    pypi_0    pypi
parsley                   1.3                      pypi_0    pypi
parso                     0.8.4                    pypi_0    pypi
partd                     1.4.2                    pypi_0    pypi
pexpect                   4.9.0                    pypi_0    pypi
photutils                 1.13.0                   pypi_0    pypi
pillow                    10.4.0                   pypi_0    pypi
pip                       24.0               pyhd8ed1ab_0    conda-forge
platformdirs              4.2.2              pyhd8ed1ab_0    conda-forge
pluggy                    1.5.0                    pypi_0    pypi
poppy                     1.1.1                    pypi_0    pypi
prompt-toolkit            3.0.47                   pypi_0    pypi
psutil                    6.0.0                    pypi_0    pypi
ptyprocess                0.7.0                    pypi_0    pypi
pure-eval                 0.2.2                    pypi_0    pypi
pyerfa                    2.0.1.4                  pypi_0    pypi
pygments                  2.18.0                   pypi_0    pypi
pyparsing                 3.1.2                    pypi_0    pypi
pysynphot                 2.0.0                    pypi_0    pypi
pytest                    8.2.2                    pypi_0    pypi
python                    3.10.14         h2469fbe_0_cpython    conda-forge
python-dateutil           2.9.0.post0              pypi_0    pypi
python_abi                3.10                    4_cp310    conda-forge
pytz                      2024.1                   pypi_0    pypi
pyvo                      1.5.2                    pypi_0    pypi
pyyaml                    6.0.1                    pypi_0    pypi
pyzmq                     26.0.3          py310h16e08c9_0    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
referencing               0.35.1                   pypi_0    pypi
reproject                 0.13.1                   pypi_0    pypi
requests                  2.32.3                   pypi_0    pypi
rpds-py                   0.18.1                   pypi_0    pypi
scikit-image              0.24.0                   pypi_0    pypi
scipy                     1.14.0                   pypi_0    pypi
semantic-version          2.10.0                   pypi_0    pypi
setuptools                70.1.1             pyhd8ed1ab_0    conda-forge
setuptools-scm            8.1.0                    pypi_0    pypi
shapely                   2.0.6                    pypi_0    pypi
six                       1.16.0                   pypi_0    pypi
snowballstemmer           2.2.0                    pypi_0    pypi
soupsieve                 2.5                      pypi_0    pypi
spherical-geometry        1.3.2                    pypi_0    pypi
sphinx                    7.3.7                    pypi_0    pypi
sphinxcontrib-applehelp   1.0.8                    pypi_0    pypi
sphinxcontrib-devhelp     1.0.6                    pypi_0    pypi
sphinxcontrib-htmlhelp    2.0.5                    pypi_0    pypi
sphinxcontrib-jsmath      1.0.1                    pypi_0    pypi
sphinxcontrib-qthelp      1.0.7                    pypi_0    pypi
sphinxcontrib-serializinghtml 1.1.10                   pypi_0    pypi
stack-data                0.6.3                    pypi_0    pypi
stcal                     1.7.2                    pypi_0    pypi
stdatamodels              1.10.1                   pypi_0    pypi
stpipe                    0.5.2                    pypi_0    pypi
stsci-image               2.3.9                    pypi_0    pypi
stsci-imagestats          1.6.3                    pypi_0    pypi
stsci-stimage             0.2.9                    pypi_0    pypi
svo-filters               0.4.4                    pypi_0    pypi
synphot                   1.4.0                    pypi_0    pypi
tabulate                  0.9.0                    pypi_0    pypi
tifffile                  2024.7.2                 pypi_0    pypi
tk                        8.6.13               h5083fa2_1    conda-forge
tomli                     2.0.1                    pypi_0    pypi
toolz                     0.12.1                   pypi_0    pypi
tornado                   6.4.1                    pypi_0    pypi
tqdm                      4.66.4                   pypi_0    pypi
traitlets                 5.14.3                   pypi_0    pypi
tweakwcs                  0.8.7                    pypi_0    pypi
typing-extensions         4.12.2                   pypi_0    pypi
tzdata                    2024.1                   pypi_0    pypi
uncertainties             3.2.1                    pypi_0    pypi
urllib3                   2.2.2                    pypi_0    pypi
wcwidth                   0.2.13                   pypi_0    pypi
webencodings              0.5.1                    pypi_0    pypi
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
wiimatch                  0.3.2                    pypi_0    pypi
xarray                    2024.6.0                 pypi_0    pypi
xz                        5.2.6                h57fd34a_0    conda-forge
zarr                      2.18.2                   pypi_0    pypi
zeromq                    4.3.5                hcc0f68c_4    conda-forge
zipp                      3.19.2                   pypi_0    pypi

Code of Conduct

Witchblade101 commented 2 weeks ago

I can't attach .ecf or .epf files, so they're pasted below:

# Eureka! Control File for Stage 5: Lightcurve Fitting

# Stage 5 Documentation: https://eurekadocs.readthedocs.io/en/latest/ecf.html#stage-5

ncpu            12 # The number of CPU threads to use when running emcee or dynesty in parallel

multwhite       False  # Are you simultaneously fitting multiple white lightcurves? (if so, use inputdirlist and see docs)

allapers        False  # Run S5 on all of the apertures considered in S4? Otherwise will use newest output in the inputdir

# Manual clipping in time
manual_clip     None    # A list of lists specifying the start and end integration numbers for manual removal.

fit_par         ./S5_t1be_3.epf   # What fitting epf do you want to use?
fit_method      [dynesty]                   #options are: lsq, emcee, dynesty (can list multiple types separated by commas)
run_myfuncs     [batman_tr,polynomial]      # options are: batman_tr, batman_ecl, sinusoid_pc, quasilambert_pc, poet_tr, poet_ecl, poet_pc, fleck_tr, expramp, polynomial, step, xpos, ypos, xwidth, ywidth, lorentzian, damped_osc, and GP (can list multiple types separated by commas)
compute_ltt     False                       # options are: True (correct model for the light travel time effect), or False (ignore the light travel time effect)
num_planets     2
force_positivity False                      # Optional boolean for sinusoid_pc and poet_pc models.  Set True to force positive phase variations.

# Limb darkening controls
# IMPORTANT: limb-darkening coefficients are not automatically fixed then, change to 'fixed' in .epf file whether they should be fixed or fitted!
use_generate_ld  None  # use the generated limb-darkening coefficients from Stage 4? Options: exotic-ld, spam, None. For exotic-ld and spam, the limb-darkening laws available are linear, quadratic, 3-parameter and 4-parameter non-linear.
ld_file          None  # Fully qualified path to the location of a limb darkening file that you want to use
ld_file_white    None  # Fully qualified path to the location of a limb darkening file that you want to use for the white-light light curve (required if ld_file is not None and any EPF parameters are set to white_free or white_fixed).

# General fitter
old_fitparams   None # filename relative to topdir that points to a fitparams csv to resume where you left off (set to None to start from scratch)

# lsq fitter
lsq_method      Powell  # The scipy.optimize.minimize optimization method to use
lsq_tol         1e-7    # The tolerance for the scipy.optimize.minimize optimization method
lsq_maxiter     None    # Maximum number of iterations to perform. Depending on the method each iteration may use several function evaluations. Set to None to use the default value

# emcee fitter
old_chain       None    # Output folder relative to topdir that contains an old emcee chain to resume where you left off (set to None to start from scratch)
lsq_first       True    # Initialize with an initial lsq call (can help shorten burn-in, but turn off if lsq fails). Only used if old_chain is None
run_nsteps      1000
run_nwalkers    200
run_nburn       500     # How many of run_nsteps should be discarded as burn-in steps

# dynesty fitter
run_nlive       'min'    # Must be > ndim * (ndim + 1) // 2
run_bound       'multi'
run_sample      'auto'
run_tol         0.1

# PyMC3 NUTS fitter
exoplanet_first False   # Initialize with an initial exoplanet optimizer call (generally not recommended, but can sometimes be helpful if your initial manual guess is quite poor)
tune            3000
draws           1500
chains          3
target_accept   0.85

#GP inputs
kernel_inputs   ['time'] #options: time
kernel_class    ['Matern32'] #options: ExpSquared, Matern32, Exp, RationalQuadratic for george, Matern32 for celerite (sums of kernels possible for george separated by commas)
GP_package      'celerite' #options: george, celerite

# Plotting controls
interp          False   # Should astrophysical model be interpolated (useful for uneven sampling like that from HST)

# Diagnostics
isplots_S5      5       # Generate few (1), some (3), or many (5) figures (Options: 1 - 5)
nbin_plot       None    # The number of bins that should be used for figures 5104 and 5304
hide_plots      True    # If True, plots will automatically be closed rather than popping up
verbose         True    # If True, more details will be printed about steps

# Project directory
topdir          /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/

# Directories relative to topdir
inputdir        Stage4   # The folder containing the outputs from Eureka!'s S4 pipeline (will be overwritten if calling S4 and S5 sequentially)
inputdirlist    None     # list of extra folders to read in from after inputdir for multwhite fits. Must be strings.
outputdir       Stage5

# inputdirlist    []       # A list of additional Stage 4 input folders to use in a joint white lightcurve fit (e.g., NIRSpec NRS1+NRS2, or NIRCam+MIRI). Only relevant if multwhite is set to True
# Stage 5 Fit Parameters Documentation: https://eurekadocs.readthedocs.io/en/latest/ecf.html#stage-5-fit-parameters

# Name       Value         Free?          PriorPar1    PriorPar2    PriorType
# "Free?" can be free, fixed, white_free, white_fixed, shared, or independent
# PriorType can be U (Uniform), LU (Log Uniform), or N (Normal).
# If U/LU, PriorPar1 and PriorPar2 represent upper and lower limits of the parameter/log(the parameter).
# If N, PriorPar1 is the mean and PriorPar2 is the standard deviation of a Gaussian prior.
#-------------------------------------------------------------------------------------------------------
# ------------------
# ** Transit/eclipse parameters **
# ------------------
rprs           0.07         'free'         0.000000     0.200000      U # Natalie
rprs_pl1       0.08         'free'         0.000000     0.200000      U # Natalie

# ------------------
# ** Orbital parameters **
# ------------------
per         6.101012       'free'        6.101012     0.000017     N # Natalie
per_pl1     1.510826       'free'       1.510826     0.000006     N # Natalie
t0          .24   'free'  0.23    0.25         U # 
t0_pl11     .42   'free'  0.41    0.43         U #  
time_offset  60502.0              'independent'

inc          89.813         'fixed'       89.813       60           N # 
inc_pl1      89.809         'fixed'       89.809       60           N # 
ars          52.72         'free'  52.72           0.13          N # Natalie
ars_pl1      20.809884     'free'  20.84           0.16         N # Natalie
ecc          0.0            'fixed'        0            1            U
ecc_pl1      0.0            'fixed'        0            1            U
w            90.            'fixed'        0            180          U
w_pl1        90.            'fixed'        0            180          U

# ----------------------
# ** Sinusoid_pc Phase Curve Parameters **
# ----------------------
# AmpCos1      0.4           'free'         0            1            U
# AmpSin1      0.01          'free'         -1           1            U
# AmpCos2      0.01          'free'         -1           1            U
# AmpSin2      0.01          'free'         -1           1            U
# ----------------------
# ** POET_pc Phase Curve Parameters **
# ----------------------
# cos1_amp     0.4           'free'         0            1            U
# cos1_off     0.00          'free'         -180         180          U
# cos2_amp     0.1           'free'         0            1            U
# cos2_off     0.00          'free'         0            180          U
# ----------------------
# ** quasilambert_pc Phase Curve Parameters **
# ----------------------
# quasi_gamma  4             'free'         2            40           U
# quasi_offset 0             'free'         -90          90           U

# -------------------------
# ** Limb darkening parameters **
# For BATMAN, choose limb_dark from ['uniform', 'linear', 'quadratic', 'kipping2013', 'squareroot', 'logarithmic', 'exponential','3-parameter', '4-parameter']
# For POET, choose limb_dark from ['uniform', 'linear', 'quadratic', '4-parameter']
# When using generated limb-darkening coefficients from exotic-ld or spam, choose from ['linear', 'quadratic', '3-parameter', '4-parameter'] and set their state to 'fixed' or use `recenter_ld_prior`.
# -------------------------
limb_dark   'kipping2013'   'independent'
u1          0.2             'free'          0           1           U
u2          0.2             'free'          0           1           U

# -------------------------
# ** Stellar variability parameters **
# A modified Lorentzian model can be used to fit stellar flares
# A damped oscillator model can be used to fit quasi-periodic pulsations
# -------------------------
# lor_amp_lhs     0.03    'free'          0            0.1            U
# lor_amp_rhs     0.03    'free'          0            0.1            U
# lor_hwhm_lhs    0       'fixed'         0            0.1            U
# lor_hwhm_rhs    1e-5    'free'          0            0.1            U
# lor_t0          0.3163  'free'          0.3160       0.3166         U
# lor_power       0.7     'free'          0.1          2              U

# osc_amp         0.0003  'free'          0            0.01           U
# osc_amp_decay   1       'free'          0            20             U
# osc_per         0.03    'free'          0            0.1            U
# osc_per_decay   0.      'fixed'         0            10             U
# osc_t0          0.3163  'fixed'         0            1              U
# osc_t1          0.3163  'free'          0.3          0.4            U

# ------------------
# ** Star Spot parameters **
# Each spot needs rad, lat, lon. See docs for details!
# For fleck: can only have one spot contrast (spotcon), spotnpts is the number of temporal points to evaluate at (~200-500)
# For starry: assign one spotcon per spot (spotcon, spotcon1, etc), spotnpts is the ydeg of the star map (~30)
# ------------------
# spotstari    90       'fixed'
# spotrot      100      'fixed'
# spotnpts     300      'independent'

# spotcon      0.9      'free'          0         1       U  # Should be between 0 and 1
# spotrad      0.2      'free'          0         1       U  # Should be between 0 and 1
# spotlat      0        'free'          -90       90      U  # Should be between -90 and 90
# spotlon      0        'free'          -90       90      U  # Should be between -90 and 90 to be on observer-facing hemisphere

# spotcon1     0.95     'free'          0         1       U  # Only use for starry! fleck cannot have different contrasts for each spot
# spotrad1     0.1      'free'          0         1       U  # Should be between 0 and 1
# spotlat1     10       'free'          -90       90      U  # Should be between -90 and 90
# spotlon1     45       'free'          -90       90      U  # Should be between -90 and 90 to be on observer-facing hemisphere

# --------------------
# ** Systematic variables **
# Polynomial model variables (c0--c9 for 0th--3rd order polynomials in time); Fitting at least c0 is very strongly recommended!
# Exponential ramp model variables (r0--r1 for one exponential ramp, r2--r3 for a second exponential ramp)
# GP model parameters (A, m for the first kernel; A1, m1 for the second kernel; etc.) in log scale
# Step-function model variables (step# and steptime# for step-function model #; e.g. step0 and steptime0)
# Drift model variables (xpos, ypos, xwidth, ywidth)
# --------------------
c0          1.015           'free'          1           0.05        N
c1          0               'free'          0           0.01        N
# A           -15             'free'          -25         0           U
# m           -4              'free'          -7          0           U

# -----------
# ** White noise **
# Use scatter_mult to fit a multiplier to the expected noise level from Stage 3 (recommended)
# Use scatter_ppm to fit the noise level in ppm
# -----------
scatter_mult 1.1            'free'         0.8          10           U
kevin218 commented 2 weeks ago

I wonder if you also need to specify time_offset_pl1?

Witchblade101 commented 2 weeks ago

I gave that a try, but it looks like the same error:

(eureka) dlong@hikaru obs3 % python run_eureka_t1be_3.py
WARNING: There are 8 metadata save files in the folder: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/
  Using the metadata file inside: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-26_t1be_3_run1/ap3_bg7/
  and will consider aperture ranges listed there. If this metadata file is not a part
  of the run you intended, please provide a more precise folder for the metadata file.
Finished loading parameters from /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-26_t1be_3_run1/ap3_bg7//S4_t1be_3_ap3_bg7_LCData.h5

Starting Stage 5: Light Curve Fitting

Input directory: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-26_t1be_3_run1/ap3_bg7/
Output directory: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage5/S5_2024-09-26_t1be_3_run1/ap3_bg7/
Copying S5 control file
Copying S5 parameter control file

Starting Channel 0 of 47

=========================
Starting dynesty fit.
Traceback (most recent call last):
  File "/Users/dlong/DataAnalysis/JWST/eureka/t1be/obs3/run_eureka_t1be_3.py", line 31, in <module>
    meta = s5.fitlc(eventlabel, ecf_path=ecf_path)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/s5_fit.py", line 473, in fitlc
    meta, params = fit_channel(meta, time_temp, flux, channel,
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/s5_fit.py", line 964, in fit_channel
    lc_model.fit(model, meta, log, fitter='dynesty')
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/lightcurve.py", line 181, in fit
    fit_model = self.fitter_func(self, model, meta, log, **kwargs)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/fitters.py", line 856, in dynestyfitter
    start_lnprob = lnprob(freepars, lc, model, prior1, prior2, priortype,
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/likelihood.py", line 206, in lnprob
    ln_like_val = ln_like(theta, lc, model, freenames)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/likelihood.py", line 85, in ln_like
    model_lc = model.eval()
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/Model.py", line 370, in eval
    flux *= component.eval(channel=channel, **kwargs)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/AstroModel.py", line 400, in eval
    starFlux *= self.transit_model.eval(channel=chan,
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/BatmanModels.py", line 139, in eval
    m_transit = self.transit_model(pl_params, time,
  File "/Users/dlong/miniconda3/envs/eureka/lib/python3.10/site-packages/batman/transitmodel.py", line 138, in __init__
    self.ds = _rsky._rsky(self.t_supersample, params.t0, params.per, params.a, params.inc*pi/180., params.ecc, params.w*pi/180., self.transittype, self.nthreads)
TypeError: must be real number, not NoneType
(eureka) dlong@hikaru obs3 %
# Stage 5 Fit Parameters Documentation: https://eurekadocs.readthedocs.io/en/latest/ecf.html#stage-5-fit-parameters

# Name       Value         Free?          PriorPar1    PriorPar2    PriorType
# "Free?" can be free, fixed, white_free, white_fixed, shared, or independent
# PriorType can be U (Uniform), LU (Log Uniform), or N (Normal).
# If U/LU, PriorPar1 and PriorPar2 represent upper and lower limits of the parameter/log(the parameter).
# If N, PriorPar1 is the mean and PriorPar2 is the standard deviation of a Gaussian prior.
#-------------------------------------------------------------------------------------------------------
# ------------------
# ** Transit/eclipse parameters **
# ------------------
rprs           0.07         'free'         0.000000     0.200000      U # Natalie
rprs_pl1       0.08         'free'         0.000000     0.200000      U # Natalie

# ------------------
# ** Orbital parameters **
# ------------------
per         6.101012       'free'        6.101012     0.000017     N # Natalie
per_pl1     1.510826       'free'       1.510826     0.000006     N # Natalie
t0          .24   'free'  0.23    0.25         U # 
t0_pl11     .42   'free'  0.41    0.43         U #  
time_offset  60502.0              'independent'
time_offset_pl1  60502.0              'independent'

inc          89.813         'fixed'       89.813       60           N # 
inc_pl1      89.809         'fixed'       89.809       60           N # 
ars          52.72         'free'  52.72           0.13          N # Natalie
ars_pl1      20.809884     'free'  20.84           0.16         N # Natalie
ecc          0.0            'fixed'        0            1            U
ecc_pl1      0.0            'fixed'        0            1            U
w            90.            'fixed'        0            180          U
w_pl1        90.            'fixed'        0            180          U

# ----------------------
# ** Sinusoid_pc Phase Curve Parameters **
# ----------------------
# AmpCos1      0.4           'free'         0            1            U
# AmpSin1      0.01          'free'         -1           1            U
# AmpCos2      0.01          'free'         -1           1            U
# AmpSin2      0.01          'free'         -1           1            U
# ----------------------
# ** POET_pc Phase Curve Parameters **
# ----------------------
# cos1_amp     0.4           'free'         0            1            U
# cos1_off     0.00          'free'         -180         180          U
# cos2_amp     0.1           'free'         0            1            U
# cos2_off     0.00          'free'         0            180          U
# ----------------------
# ** quasilambert_pc Phase Curve Parameters **
# ----------------------
# quasi_gamma  4             'free'         2            40           U
# quasi_offset 0             'free'         -90          90           U

# -------------------------
# ** Limb darkening parameters **
# For BATMAN, choose limb_dark from ['uniform', 'linear', 'quadratic', 'kipping2013', 'squareroot', 'logarithmic', 'exponential','3-parameter', '4-parameter']
# For POET, choose limb_dark from ['uniform', 'linear', 'quadratic', '4-parameter']
# When using generated limb-darkening coefficients from exotic-ld or spam, choose from ['linear', 'quadratic', '3-parameter', '4-parameter'] and set their state to 'fixed' or use `recenter_ld_prior`.
# -------------------------
limb_dark   'kipping2013'   'independent'
u1          0.2             'free'          0           1           U
u2          0.2             'free'          0           1           U

# -------------------------
# ** Stellar variability parameters **
# A modified Lorentzian model can be used to fit stellar flares
# A damped oscillator model can be used to fit quasi-periodic pulsations
# -------------------------
# lor_amp_lhs     0.03    'free'          0            0.1            U
# lor_amp_rhs     0.03    'free'          0            0.1            U
# lor_hwhm_lhs    0       'fixed'         0            0.1            U
# lor_hwhm_rhs    1e-5    'free'          0            0.1            U
# lor_t0          0.3163  'free'          0.3160       0.3166         U
# lor_power       0.7     'free'          0.1          2              U

# osc_amp         0.0003  'free'          0            0.01           U
# osc_amp_decay   1       'free'          0            20             U
# osc_per         0.03    'free'          0            0.1            U
# osc_per_decay   0.      'fixed'         0            10             U
# osc_t0          0.3163  'fixed'         0            1              U
# osc_t1          0.3163  'free'          0.3          0.4            U

# ------------------
# ** Star Spot parameters **
# Each spot needs rad, lat, lon. See docs for details!
# For fleck: can only have one spot contrast (spotcon), spotnpts is the number of temporal points to evaluate at (~200-500)
# For starry: assign one spotcon per spot (spotcon, spotcon1, etc), spotnpts is the ydeg of the star map (~30)
# ------------------
# spotstari    90       'fixed'
# spotrot      100      'fixed'
# spotnpts     300      'independent'

# spotcon      0.9      'free'          0         1       U  # Should be between 0 and 1
# spotrad      0.2      'free'          0         1       U  # Should be between 0 and 1
# spotlat      0        'free'          -90       90      U  # Should be between -90 and 90
# spotlon      0        'free'          -90       90      U  # Should be between -90 and 90 to be on observer-facing hemisphere

# spotcon1     0.95     'free'          0         1       U  # Only use for starry! fleck cannot have different contrasts for each spot
# spotrad1     0.1      'free'          0         1       U  # Should be between 0 and 1
# spotlat1     10       'free'          -90       90      U  # Should be between -90 and 90
# spotlon1     45       'free'          -90       90      U  # Should be between -90 and 90 to be on observer-facing hemisphere

# --------------------
# ** Systematic variables **
# Polynomial model variables (c0--c9 for 0th--3rd order polynomials in time); Fitting at least c0 is very strongly recommended!
# Exponential ramp model variables (r0--r1 for one exponential ramp, r2--r3 for a second exponential ramp)
# GP model parameters (A, m for the first kernel; A1, m1 for the second kernel; etc.) in log scale
# Step-function model variables (step# and steptime# for step-function model #; e.g. step0 and steptime0)
# Drift model variables (xpos, ypos, xwidth, ywidth)
# --------------------
c0          1.015           'free'          1           0.05        N
c1          0               'free'          0           0.01        N
# A           -15             'free'          -25         0           U
# m           -4              'free'          -7          0           U

# -----------
# ** White noise **
# Use scatter_mult to fit a multiplier to the expected noise level from Stage 3 (recommended)
# Use scatter_ppm to fit the noise level in ppm
# -----------
scatter_mult 1.1            'free'         0.8          10           U
taylorbell57 commented 2 weeks ago

Hmm, strange - it's possible that the ars and rprs aliases for a and rp (respectively) are broken either in general or for multi-planet fits. I'm quite sure that time_offset_pl1 won't ever be used and that the time_offset parameter doesn't change between planets. While I debug this (likely tomorrow given that my work day is just ending), I recommend you try replacing all instances of ars with a and rprs with rp and see if that resolves the issue. If it does, then I'll know which exact part of the code to patch tomorrow morning (US Pacific time)

Witchblade101 commented 2 weeks ago

Unfortunately, same error:

(eureka) dlong@hikaru obs3 % python run_eureka_t1be_3.py
WARNING: There are 8 metadata save files in the folder: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/
  Using the metadata file inside: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-26_t1be_3_run1/ap3_bg7/
  and will consider aperture ranges listed there. If this metadata file is not a part
  of the run you intended, please provide a more precise folder for the metadata file.
Finished loading parameters from /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-26_t1be_3_run1/ap3_bg7//S4_t1be_3_ap3_bg7_LCData.h5

Starting Stage 5: Light Curve Fitting

Input directory: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-26_t1be_3_run1/ap3_bg7/
Output directory: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage5/S5_2024-09-26_t1be_3_run2/ap3_bg7/
Copying S5 control file
Copying S5 parameter control file

Starting Channel 0 of 47

=========================
Starting dynesty fit.
Traceback (most recent call last):
  File "/Users/dlong/DataAnalysis/JWST/eureka/t1be/obs3/run_eureka_t1be_3.py", line 31, in <module>
    meta = s5.fitlc(eventlabel, ecf_path=ecf_path)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/s5_fit.py", line 473, in fitlc
    meta, params = fit_channel(meta, time_temp, flux, channel,
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/s5_fit.py", line 964, in fit_channel
    lc_model.fit(model, meta, log, fitter='dynesty')
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/lightcurve.py", line 181, in fit
    fit_model = self.fitter_func(self, model, meta, log, **kwargs)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/fitters.py", line 856, in dynestyfitter
    start_lnprob = lnprob(freepars, lc, model, prior1, prior2, priortype,
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/likelihood.py", line 206, in lnprob
    ln_like_val = ln_like(theta, lc, model, freenames)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/likelihood.py", line 85, in ln_like
    model_lc = model.eval()
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/Model.py", line 370, in eval
    flux *= component.eval(channel=channel, **kwargs)
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/AstroModel.py", line 400, in eval
    starFlux *= self.transit_model.eval(channel=chan,
  File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/BatmanModels.py", line 139, in eval
    m_transit = self.transit_model(pl_params, time,
  File "/Users/dlong/miniconda3/envs/eureka/lib/python3.10/site-packages/batman/transitmodel.py", line 138, in __init__
    self.ds = _rsky._rsky(self.t_supersample, params.t0, params.per, params.a, params.inc*pi/180., params.ecc, params.w*pi/180., self.transittype, self.nthreads)
TypeError: must be real number, not NoneType
(eureka) dlong@hikaru obs3 %
# Stage 5 Fit Parameters Documentation: https://eurekadocs.readthedocs.io/en/latest/ecf.html#stage-5-fit-parameters

# Name       Value         Free?          PriorPar1    PriorPar2    PriorType
# "Free?" can be free, fixed, white_free, white_fixed, shared, or independent
# PriorType can be U (Uniform), LU (Log Uniform), or N (Normal).
# If U/LU, PriorPar1 and PriorPar2 represent upper and lower limits of the parameter/log(the parameter).
# If N, PriorPar1 is the mean and PriorPar2 is the standard deviation of a Gaussian prior.
#-------------------------------------------------------------------------------------------------------
# ------------------
# ** Transit/eclipse parameters **
# ------------------
rp           0.07         'free'         0.000000     0.200000      U # Natalie
rp_pl1       0.08         'free'         0.000000     0.200000      U # Natalie

# ------------------
# ** Orbital parameters **
# ------------------
per         6.101012       'free'        6.101012     0.000017     N # Natalie
per_pl1     1.510826       'free'       1.510826     0.000006     N # Natalie
t0          .24   'free'  0.23    0.25         U # 
t0_pl11     .42   'free'  0.41    0.43         U #  
time_offset  60502.0              'independent'
time_offset_pl1  60502.0              'independent'

inc          89.813         'fixed'       89.813       60           N # 
inc_pl1      89.809         'fixed'       89.809       60           N # 
a          52.72         'free'  52.72           0.13          N # Natalie
a_pl1      20.809884     'free'  20.84           0.16         N # Natalie
ecc          0.0            'fixed'        0            1            U
ecc_pl1      0.0            'fixed'        0            1            U
w            90.            'fixed'        0            180          U
w_pl1        90.            'fixed'        0            180          U

# ----------------------
# ** Sinusoid_pc Phase Curve Parameters **
# ----------------------
# AmpCos1      0.4           'free'         0            1            U
# AmpSin1      0.01          'free'         -1           1            U
# AmpCos2      0.01          'free'         -1           1            U
# AmpSin2      0.01          'free'         -1           1            U
# ----------------------
# ** POET_pc Phase Curve Parameters **
# ----------------------
# cos1_amp     0.4           'free'         0            1            U
# cos1_off     0.00          'free'         -180         180          U
# cos2_amp     0.1           'free'         0            1            U
# cos2_off     0.00          'free'         0            180          U
# ----------------------
# ** quasilambert_pc Phase Curve Parameters **
# ----------------------
# quasi_gamma  4             'free'         2            40           U
# quasi_offset 0             'free'         -90          90           U

# -------------------------
# ** Limb darkening parameters **
# For BATMAN, choose limb_dark from ['uniform', 'linear', 'quadratic', 'kipping2013', 'squareroot', 'logarithmic', 'exponential','3-parameter', '4-parameter']
# For POET, choose limb_dark from ['uniform', 'linear', 'quadratic', '4-parameter']
# When using generated limb-darkening coefficients from exotic-ld or spam, choose from ['linear', 'quadratic', '3-parameter', '4-parameter'] and set their state to 'fixed' or use `recenter_ld_prior`.
# -------------------------
limb_dark   'kipping2013'   'independent'
u1          0.2             'free'          0           1           U
u2          0.2             'free'          0           1           U

# -------------------------
# ** Stellar variability parameters **
# A modified Lorentzian model can be used to fit stellar flares
# A damped oscillator model can be used to fit quasi-periodic pulsations
# -------------------------
# lor_amp_lhs     0.03    'free'          0            0.1            U
# lor_amp_rhs     0.03    'free'          0            0.1            U
# lor_hwhm_lhs    0       'fixed'         0            0.1            U
# lor_hwhm_rhs    1e-5    'free'          0            0.1            U
# lor_t0          0.3163  'free'          0.3160       0.3166         U
# lor_power       0.7     'free'          0.1          2              U

# osc_amp         0.0003  'free'          0            0.01           U
# osc_amp_decay   1       'free'          0            20             U
# osc_per         0.03    'free'          0            0.1            U
# osc_per_decay   0.      'fixed'         0            10             U
# osc_t0          0.3163  'fixed'         0            1              U
# osc_t1          0.3163  'free'          0.3          0.4            U

# ------------------
# ** Star Spot parameters **
# Each spot needs rad, lat, lon. See docs for details!
# For fleck: can only have one spot contrast (spotcon), spotnpts is the number of temporal points to evaluate at (~200-500)
# For starry: assign one spotcon per spot (spotcon, spotcon1, etc), spotnpts is the ydeg of the star map (~30)
# ------------------
# spotstari    90       'fixed'
# spotrot      100      'fixed'
# spotnpts     300      'independent'

# spotcon      0.9      'free'          0         1       U  # Should be between 0 and 1
# spotrad      0.2      'free'          0         1       U  # Should be between 0 and 1
# spotlat      0        'free'          -90       90      U  # Should be between -90 and 90
# spotlon      0        'free'          -90       90      U  # Should be between -90 and 90 to be on observer-facing hemisphere

# spotcon1     0.95     'free'          0         1       U  # Only use for starry! fleck cannot have different contrasts for each spot
# spotrad1     0.1      'free'          0         1       U  # Should be between 0 and 1
# spotlat1     10       'free'          -90       90      U  # Should be between -90 and 90
# spotlon1     45       'free'          -90       90      U  # Should be between -90 and 90 to be on observer-facing hemisphere

# --------------------
# ** Systematic variables **
# Polynomial model variables (c0--c9 for 0th--3rd order polynomials in time); Fitting at least c0 is very strongly recommended!
# Exponential ramp model variables (r0--r1 for one exponential ramp, r2--r3 for a second exponential ramp)
# GP model parameters (A, m for the first kernel; A1, m1 for the second kernel; etc.) in log scale
# Step-function model variables (step# and steptime# for step-function model #; e.g. step0 and steptime0)
# Drift model variables (xpos, ypos, xwidth, ywidth)
# --------------------
c0          1.015           'free'          1           0.05        N
c1          0               'free'          0           0.01        N
# A           -15             'free'          -25         0           U
# m           -4              'free'          -7          0           U

# -----------
# ** White noise **
# Use scatter_mult to fit a multiplier to the expected noise level from Stage 3 (recommended)
# Use scatter_ppm to fit the noise level in ppm
# -----------
scatter_mult 1.1            'free'         0.8          10           U
taylorbell57 commented 1 week ago

Huh, strange - I just tested the multi-planet fitting code on one of my own datasets and it works just fine. Can you please confirm that all of your plots out of Stage 4 all look reasonable?

Witchblade101 commented 1 week ago

They all look good. As another check I just ran stage 4 again, tightening up the wavelength range a little and setting it for a single channel. The resulting light curve is identical to the white LC, as expected. Stage 5 still fails with the same error:

(eureka) dlong@hikaru obs3 % python run_eureka_t1be_3.py WARNING: There are 14 metadata save files in the folder: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/ Using the metadata file inside: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-27_t1be_3_run3/ap3_bg7/ and will consider aperture ranges listed there. If this metadata file is not a part of the run you intended, please provide a more precise folder for the metadata file. Finished loading parameters from /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-27_t1be_3_run3/ap3_bg7//S4_t1be_3_ap3_bg7_LCData.h5

Starting Stage 5: Light Curve Fitting

Input directory: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage4/S4_2024-09-27_t1be_3_run3/ap3_bg7/ Output directory: /Users/dlong/DataANalysis/JWST/eureka/t1be/obs3/Stage5/S5_2024-09-27_t1be_3_run5/ap3_bg7/ Copying S5 control file Copying S5 parameter control file

Starting Channel 0 of 1

========================= Starting dynesty fit. Traceback (most recent call last): File "/Users/dlong/DataAnalysis/JWST/eureka/t1be/obs3/run_eureka_t1be_3.py", line 31, in meta = s5.fitlc(eventlabel, ecf_path=ecf_path) File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/s5_fit.py", line 473, in fitlc meta, params = fit_channel(meta, time_temp, flux, channel, File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/s5_fit.py", line 964, in fit_channel lc_model.fit(model, meta, log, fitter='dynesty') File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/lightcurve.py", line 181, in fit fit_model = self.fitter_func(self, model, meta, log, *kwargs) File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/fitters.py", line 856, in dynestyfitter start_lnprob = lnprob(freepars, lc, model, prior1, prior2, priortype, File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/likelihood.py", line 206, in lnprob ln_like_val = ln_like(theta, lc, model, freenames) File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/likelihood.py", line 85, in ln_like model_lc = model.eval() File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/Model.py", line 370, in eval flux = component.eval(channel=channel, *kwargs) File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/AstroModel.py", line 400, in eval starFlux = self.transit_model.eval(channel=chan, File "/Users/dlong/Eureka/src/eureka/S5_lightcurve_fitting/models/BatmanModels.py", line 139, in eval m_transit = self.transit_model(pl_params, time, File "/Users/dlong/miniconda3/envs/eureka/lib/python3.10/site-packages/batman/transitmodel.py", line 138, in init self.ds = _rsky._rsky(self.t_supersample, params.t0, params.per, params.a, params.incpi/180., params.ecc, params.wpi/180., self.transittype, self.nthreads) TypeError: must be real number, not NoneType

Witchblade101 commented 1 week ago

And just as a quick check, I changed the fitter from Dynesty to LSQ. Same error.

Witchblade101 commented 1 week ago

I think I found it! In my epf file I had 't0_pl11' instead of 't0_pl1'. Every time I looked at it my brain mushed all of those ls and 1s together, apparently.

taylorbell57 commented 1 week ago

Hah yeah that'd do it! Glad you were able to sort it out!