Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Bug in stage 5 during dynesty fitting. #694

Open
2 tasks done
Paulinappl opened this issue Aug 22, 2024 · 2 comments
Open
2 tasks done

[Bug]: Bug in stage 5 during dynesty fitting. #694

Paulinappl opened this issue Aug 22, 2024 · 2 comments
Assignees
Labels
bug Something isn't working LC Fit

Comments

@Paulinappl
Copy link

Paulinappl commented Aug 22, 2024

FAQ check

  • Yes, I checked the FAQ and my question has not been addressed.

Instrument

Light curve fitting (Stages 4-6)

What happened?

For my stage 5 I set for fit method dynesty and I got the error below, I choose dynesty because that's the method in the demo file, but, should I use this method?, or does it matter if I pick a different one, because I ran again stage 5 but with fit method as lsq, is that correct?, because my results with lsq looked decent.

Error traceback output

55643it [1:18:22, 11.18it/s, bound: 338 | nc: 30 | ncall: 1596070 | eff(%):  3.486 | loglstar:   -inf < 1678.602 <    inf | logz: 1621.999 +/-  0.235 | d
55643it [1:18:22, 11.83it/s, bound: 338 | nc: 30 | ncall: 1596070 | eff(%):  3.486 | loglstar:   -inf < 1678.602 <    inf | logz: 1621.999 +/-  0.235 | dlogz:  2.392 >  0.100]
Traceback (most recent call last):
  File "/home/iaunam/Escritorio/Verano_2024/ECF_files_byme/run_eureka_wasp39_2.py", line 34, in <module>
    meta = s5.fitlc(eventlabel, ecf_path=ecf_path)
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/eureka/S5_lightcurve_fitting/s5_fit.py", line 460, in fitlc
    meta, params = fit_channel(meta, time, flux, channel,
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/eureka/S5_lightcurve_fitting/s5_fit.py", line 856, in fit_channel
    lc_model.fit(model, meta, log, fitter='dynesty')
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/eureka/S5_lightcurve_fitting/lightcurve.py", line 179, in fit
    fit_model = self.fitter_func(self, model, meta, log, **kwargs)
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/eureka/S5_lightcurve_fitting/fitters.py", line 817, in dynestyfitter
    sampler.run_nested(dlogz=tol, print_progress=True)  # output progress bar
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/dynesty/sampler.py", line 1025, in run_nested
    for it, results in enumerate(
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/dynesty/sampler.py", line 848, in sample
    u, v, logl, nc = self._new_point(loglstar_new)
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/dynesty/sampler.py", line 439, in _new_point
    self.update_bound_if_needed(loglstar, ncall=ncall)
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/dynesty/sampler.py", line 327, in update_bound_if_needed
    bound = self.update(subset=subset)
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/dynesty/nestedsamplers.py", line 679, in update
    self.mell.update(self.live_u[subset, :self.ncdim],
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/dynesty/bounding.py", line 580, in update
    ells = _bounding_ellipsoids(points, firstell)
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/dynesty/bounding.py", line 1414, in _bounding_ellipsoids
    k2_res = kmeans2(points / scale,
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/scipy/cluster/vq.py", line 788, in kmeans2
    label = vq(data, code_book)[0]
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/scipy/cluster/vq.py", line 200, in vq
    obs = _asarray_validated(obs, check_finite=check_finite)
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/scipy/_lib/_util.py", line 287, in _asarray_validated
    a = toarray(a)
  File "/home/iaunam/anaconda3/envs/eureka/lib/python3.9/site-packages/numpy/lib/function_base.py", line 628, in asarray_chkfinite
    raise ValueError(
ValueError: array must not contain infs or NaNs

What operating system are you using?

Ubuntu 18.04.6 LTS

What version of Python are you running?

Python 3.9.7

What Python packages do you have installed?

# packages in environment at /home/iaunam/anaconda3/envs/eureka:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
alabaster                 0.7.16                   pypi_0    pypi
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.0.1                    pypi_0    pypi
astropy-healpix           1.0.3                    pypi_0    pypi
astropy-iers-data         0.2024.7.8.0.31.19          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
ca-certificates           2024.7.2             h06a4308_0  
ccdproc                   2.4.2                    pypi_0    pypi
celerite                  0.4.3                    pypi_0    pypi
certifi                   2024.7.4                 pypi_0    pypi
cffi                      1.16.0                   pypi_0    pypi
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
contourpy                 1.2.1                    pypi_0    pypi
corner                    2.2.2                    pypi_0    pypi
crds                      11.17.26                 pypi_0    pypi
cryptography              42.0.8                   pypi_0    pypi
cycler                    0.12.1                   pypi_0    pypi
dask                      2024.7.0                 pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
dill                      0.3.8                    pypi_0    pypi
docutils                  0.21.2                   pypi_0    pypi
drizzle                   1.15.1                   pypi_0    pypi
dynesty                   2.1.4                    pypi_0    pypi
emcee                     3.1.6                    pypi_0    pypi
eureka                    0.10                     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
fonttools                 4.53.1                   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-resources       6.4.0                    pypi_0    pypi
iniconfig                 2.0.0                    pypi_0    pypi
intel-openmp              2021.4.0          h06a4308_3561  
ipython                   8.18.1                   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
jeepney                   0.8.0                    pypi_0    pypi
jinja2                    3.1.4                    pypi_0    pypi
jmespath                  1.0.1                    pypi_0    pypi
jsonschema                4.23.0                   pypi_0    pypi
jsonschema-specifications 2023.12.1                pypi_0    pypi
jwst                      1.11.4                   pypi_0    pypi
keyring                   25.2.1                   pypi_0    pypi
kiwisolver                1.4.5                    pypi_0    pypi
lazy-loader               0.4                      pypi_0    pypi
ld_impl_linux-64          2.38                 h1181459_1  
libffi                    3.3                  he6710b0_2  
libgcc-ng                 11.2.0               h1234567_1  
libgomp                   11.2.0               h1234567_1  
libstdcxx-ng              11.2.0               h1234567_1  
lmfit                     1.3.1                    pypi_0    pypi
locket                    1.0.0                    pypi_0    pypi
markupsafe                2.1.5                    pypi_0    pypi
matplotlib                3.9.1                    pypi_0    pypi
matplotlib-inline         0.1.7                    pypi_0    pypi
mkl                       2021.4.0           h06a4308_640  
mkl-service               2.4.0            py39h7f8727e_0  
more-itertools            10.3.0                   pypi_0    pypi
ncurses                   6.4                  h6a678d5_0  
netcdf4                   1.7.1.post1              pypi_0    pypi
networkx                  3.2.1                    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                   1.1.1w               h7f8727e_0  
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.11.0                   pypi_0    pypi
pillow                    10.4.0                   pypi_0    pypi
pip                       24.0             py39h06a4308_0  
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
pycparser                 2.22                     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.9.7                h12debd9_1  
python-dateutil           2.9.0.post0              pypi_0    pypi
pytz                      2024.1                   pypi_0    pypi
pyvo                      1.5.2                    pypi_0    pypi
pyyaml                    6.0.1                    pypi_0    pypi
readline                  8.2                  h5eee18b_0  
referencing               0.35.1                   pypi_0    pypi
reproject                 0.13.0                   pypi_0    pypi
requests                  2.32.3                   pypi_0    pypi
rpds-py                   0.19.0                   pypi_0    pypi
scikit-image              0.24.0                   pypi_0    pypi
scipy                     1.9.3                    pypi_0    pypi
secretstorage             3.3.3                    pypi_0    pypi
semantic-version          2.10.0                   pypi_0    pypi
setuptools                69.5.1           py39h06a4308_0  
setuptools-scm            8.1.0                    pypi_0    pypi
six                       1.16.0             pyhd3eb1b0_1  
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
sqlite                    3.45.3               h5eee18b_0  
stack-data                0.6.3                    pypi_0    pypi
stcal                     1.4.4                    pypi_0    pypi
stdatamodels              1.7.2                    pypi_0    pypi
stpipe                    0.5.1                    pypi_0    pypi
stsci-image               2.3.9                    pypi_0    pypi
stsci-imagestats          1.8.3                    pypi_0    pypi
stsci-stimage             0.2.9                    pypi_0    pypi
svo-filters               0.4.4                    pypi_0    pypi
tabulate                  0.9.0                    pypi_0    pypi
tifffile                  2024.7.2                 pypi_0    pypi
tk                        8.6.14               h39e8969_0  
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.2                    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           py39h06a4308_0  
wiimatch                  0.3.2                    pypi_0    pypi
xarray                    2024.6.0                 pypi_0    pypi
xz                        5.4.6                h5eee18b_1  
zarr                      2.18.2                   pypi_0    pypi
zipp                      3.19.2                   pypi_0    pypi
zlib                      1.2.13               h5eee18b_1  

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Paulinappl Paulinappl added the bug Something isn't working label Aug 22, 2024
@taylorbell57
Copy link
Collaborator

Have you closely looked at the figures output at the start of the fit, and have you closely looked at your ECF settings and made sure that all of your priors are reasonable?

@taylorbell57
Copy link
Collaborator

@Paulinappl, are you still dealing with this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LC Fit
Projects
None yet
Development

No branches or pull requests

4 participants