joshjchayes / TransitFit

Transit light curve fitting using nested sampling
GNU General Public License v3.0
4 stars 1 forks source link

WASP-150 b ValueError: log-likelihood (nan) of live point #8

Closed sourestdeeds closed 3 years ago

sourestdeeds commented 3 years ago
Traceback (most recent call last):
  File "/Users/sourestdeeds/miniforge3/lib/python3.8/site-packages/firefly-0.7.9-py3.8.egg/firefly/auto_retrieval.py", line 337, in firefly
    _retrieval(
  File "/Users/sourestdeeds/miniforge3/lib/python3.8/site-packages/firefly-0.7.9-py3.8.egg/firefly/_utils.py", line 388, in _retrieval
    run_retrieval(
  File "/Users/sourestdeeds/miniforge3/lib/python3.8/site-packages/transitfit-2.2.0-py3.8.egg/transitfit/_pipeline.py", line 322, in run_retrieval
    results = retriever.run_retrieval(ld_fit_method, fitting_mode,
  File "/Users/sourestdeeds/miniforge3/lib/python3.8/site-packages/transitfit-2.2.0-py3.8.egg/transitfit/retriever.py", line 584, in run_retrieval
    results = self._run_folded_retrieval(ld_fit_method, detrend, normalise,
  File "/Users/sourestdeeds/miniforge3/lib/python3.8/site-packages/transitfit-2.2.0-py3.8.egg/transitfit/retriever.py", line 405, in _run_folded_retrieval
    results, priors, lightcurves = self._run_batched_retrieval(self.all_lightcurves,
  File "/Users/sourestdeeds/miniforge3/lib/python3.8/site-packages/transitfit-2.2.0-py3.8.egg/transitfit/retriever.py", line 342, in _run_batched_retrieval
    results, ndof = self._run_dynesty(batch_lightcurves, batch_prior, maxiter,
  File "/Users/sourestdeeds/miniforge3/lib/python3.8/site-packages/transitfit-2.2.0-py3.8.egg/transitfit/retriever.py", line 205, in _run_dynesty
    sampler = NestedSampler(lnlike, prior_transform, n_dims, bound=bound,
  File "/Users/sourestdeeds/miniforge3/lib/python3.8/site-packages/dynesty-1.0.1-py3.8.egg/dynesty/dynesty.py", line 519, in NestedSampler
    raise ValueError("The log-likelihood ({0}) of live "
ValueError: The log-likelihood (nan) of live point 601 located at u=[0.72419545 0.25480297 0.19069517 0.67672543 0.99959465 0.71899461
 0.19184027 0.70198139 0.81413367 0.54258239 0.51992503 0.63454535
 0.53596911 0.94994306 0.49819023 0.56403135 0.64514187 0.35634934
 0.67959331 0.24724995 0.53149946 0.54578245 0.14043088] v=[ 5.64454303e+00  2.45721726e+06  8.96521392e+00  8.43952374e+01
  1.00964509e+00  6.95588064e-02  1.91840269e-01  7.01981386e-01
  6.28267344e+00  8.51647769e-01  3.98500538e-01  2.69090702e+00
  7.19382292e-01  8.99886111e+00 -3.61953407e-02  1.28062702e+00
  2.90283731e+00 -2.87301322e+00  2.10888403e-04  2.09335368e-04
  2.09498041e-04  2.09664633e-04  2.06646023e-04] is invalid.
Priors generated from the NASA Archive for WASP-150 b (TIC 321668398).

+-------------+----------------+----------------+-----------------------+----------+
| Parameter   | Distribution   |        Input A | Input B               | Filter   |
|-------------+----------------+----------------+-----------------------+----------|
| P           | gaussian       |    5.64421     | 0.0005644207          |          |
| t0          | gaussian       |    2.45722e+06 | 0.007                 |          |
| a           | gaussian       |    0.0694      | 0.0006940000000000001 |          |
| inc         | gaussian       |   84.01        | 0.8401000000000001    |          |
| w           | fixed          |   90           |                       |          |
| ecc         | gaussian       |    0.3775      | 0.18875               |          |
| rp          | uniform        |    0.059976    | 0.07330404870466668   | 0        |
| t14         |                |  187.056       |                       |          |
| host_T      |                | 6218           | 124.36                |          |
| host_z      |                |    0.156       | 0.1                   |          |
| host_r      |                |    1.65        | 0.0825                |          |
| host_logg   |                |    4.15        | 0.083                 |          |
+-------------+----------------+----------------+-----------------------+----------+

Searching MAST for WASP-150 b (TIC 321668398).

Query from MAST returned 3 data products for WASP-150 b (TIC 321668398).

+-------------------------------------------------+-----------+-----------+--------+-----------+
| Product                                         |    TIC ID |   Cadence | HLSP   | Mission   |
|-------------------------------------------------+-----------+-----------+--------+-----------|
| tess2020106103520-s0024-0000000321668398-0180-s | 321668398 |       120 | SPOC   | TESS      |
| tess2020133194932-s0025-0000000321668398-0182-s | 321668398 |       120 | SPOC   | TESS      |
| tess2020160202036-s0026-0000000321668398-0188-s | 321668398 |       120 | SPOC   | TESS      |
+-------------------------------------------------+-----------+-----------+--------+-----------+
sourestdeeds commented 3 years ago

The same with HATS-60 b. As both of these have fixed w and gaussian eccentricity I'm assuming this is a priors input issue. I'm not sure on the physics here, but I'm guessing w and ecc both need to be fixed or vary, not one or the other?

Traceback (most recent call last):
  File "/data/anaconda3/lib/python3.7/site-packages/firefly-0.7.9-py3.7.egg/firefly/auto_retrieval.py", line 375, in firefly
    binned_color=binned_color,
  File "/data/anaconda3/lib/python3.7/site-packages/firefly-0.7.9-py3.7.egg/firefly/_utils.py", line 424, in _retrieval
    binned_color=binned_color,
  File "/data/anaconda3/lib/python3.7/site-packages/transitfit/_pipeline.py", line 330, in run_retrieval
    walks, slices)
  File "/data/anaconda3/lib/python3.7/site-packages/transitfit/retriever.py", line 589, in run_retrieval
    plot_folder, marker_color, line_color, max_parameters, overlap, bound, walks, slices, print_progress)
  File "/data/anaconda3/lib/python3.7/site-packages/transitfit/retriever.py", line 420, in _run_folded_retrieval
    print_progress=print_progress)
  File "/data/anaconda3/lib/python3.7/site-packages/transitfit/retriever.py", line 345, in _run_batched_retrieval
    dlogz, bound, plot_folder, walks, slices, print_progress)
  File "/data/anaconda3/lib/python3.7/site-packages/transitfit/retriever.py", line 208, in _run_dynesty
    print_progress=print_progress)
  File "/data/anaconda3/lib/python3.7/site-packages/dynesty/dynesty.py", line 523, in NestedSampler
    live_points[1][i]))
ValueError: The log-likelihood (nan) of live point 0 located at u=[0.4215001  0.53368608 0.48690309 0.13712363 0.88628777 0.13391538
 0.57118715 0.63662522 0.78290812 0.27298726 0.52304579 0.51161499
 0.04587589 0.81050014 0.3868567  0.32176076 0.65468109 0.30810274
 0.88649533 0.36272118 0.1563729  0.64205369 0.77058521] v=[ 3.56075848e+00  2.45801572e+06  6.93177381e+00  8.53366716e+01
  3.06270406e-01  7.52124939e-02  5.71187148e-01  6.36625222e-01
  5.65816246e+00 -4.54025477e+00  4.60915878e-01  2.32299739e-01
 -9.08248227e+00  6.21000281e+00 -2.26286598e+00 -3.56478481e+00
  3.09362182e+00 -3.83794527e+00  2.85643484e-04  2.82682791e-04
  2.81257106e-04  2.83882904e-04  2.84222871e-04] is invalid.
Priors generated from the NASA Archive for HATS-60 b (TIC 145750719).

+-------------+----------------+----------------+---------------------+----------+
| Parameter   | Distribution   |        Input A | Input B             | Filter   |
|-------------+----------------+----------------+---------------------+----------|
| P           | gaussian       |    3.56083     | 0.0003560829        |          |
| t0          | gaussian       |    2.45802e+06 | 0.007               |          |
| a           | gaussian       |    0.04708     | 0.0004708           |          |
| inc         | gaussian       |   86.28        | 0.8628              |          |
| w           | fixed          |   90           |                     |          |
| ecc         | gaussian       |    0.191       | 0.0955              |          |
| rp          | uniform        |    0.0730389   | 0.08926980377556851 | 0        |
| t14         |                |  231.552       |                     |          |
| host_T      |                | 5688           | 113.76              |          |
| host_z      |                |    0.335       | 0.028               |          |
| host_r      |                |    1.46        | 0.073               |          |
| host_logg   |                |    4.15        | 0.083               |          |
+-------------+----------------+----------------+---------------------+----------+

Searching MAST for HATS-60 b (TIC 145750719).

Query from MAST returned 1 data products for HATS-60 b (TIC 145750719).

+-------------------------------------------------+-----------+-----------+--------+-----------+
| Product                                         |    TIC ID |   Cadence | HLSP   | Mission   |
|-------------------------------------------------+-----------+-----------+--------+-----------|
| tess2020238165205-s0029-0000000145750719-0193-s | 145750719 |       120 | SPOC   | TESS      |
+-------------------------------------------------+-----------+-----------+--------+-----------+
sourestdeeds commented 3 years ago

Tested with fixing both w and ecc yet the same error.

Priors generated from the NASA Archive for HATS-60 b (TIC 145750719).

+-------------+----------------+----------------+---------------------+----------+
| Parameter   | Distribution   |        Input A | Input B             | Filter   |
|-------------+----------------+----------------+---------------------+----------|
| P           | gaussian       |    3.56083     | 0.0003560829        |          |
| t0          | gaussian       |    2.45802e+06 | 0.007               |          |
| a           | gaussian       |    0.04708     | 0.0004708           |          |
| inc         | gaussian       |   86.28        | 0.8628              |          |
| w           | fixed          |   90           |                     |          |
| ecc         | fixed          |    0           |                     |          |
| rp          | uniform        |    0.0730389   | 0.08926980377556851 | 0        |
| t14         |                |  231.552       |                     |          |
| host_T      |                | 5688           | 113.76              |          |
| host_z      |                |    0.335       | 0.028               |          |
| host_r      |                |    1.46        | 0.073               |          |
| host_logg   |                |    4.15        | 0.083               |          |
+-------------+----------------+----------------+---------------------+----------+

Searching MAST for HATS-60 b (TIC 145750719).

Query from MAST returned 1 data products for HATS-60 b (TIC 145750719).

+-------------------------------------------------+-----------+-----------+--------+-----------+
| Product                                         |    TIC ID |   Cadence | HLSP   | Mission   |
|-------------------------------------------------+-----------+-----------+--------+-----------|
| tess2020238165205-s0029-0000000145750719-0193-s | 145750719 |       120 | SPOC   | TESS      |
+-------------------------------------------------+-----------+-----------+--------+-----------+
joshjchayes commented 3 years ago

I'm not totally sure if this is a TransitFit or dynesty issue, but you should be fitting either both ecc and w or neither.