Closed gabrielastro closed 1 week ago
An (unofficial) thanks for already having added the feature! That was fast and is practical.
I am a bit confused or surprised about the bounds in FitEvolution
. I did:
fit_evol = FitEvolution(evolution_model='baraffe2015', log_lum=(-3.6, 0.1),
mass_prior=(10, 9.), radius_prior=None,
bounds={'age': (3., 150.)})
and got
----------------------
Fit evolutionary model
----------------------
Evolution model: baraffe2015
Luminosity log(L/Lsun): (-3.6, 0.1)
Age prior: None
Mass prior (Rjup): (10, 9.0)
Radius prior (Rjup): None
Fitting 2 parameters:
- age
- mass_0
Uniform priors (min, max):
- age = (3.0, 150.0)
- mass_0 = (10.475655146604772, 1466.591720524668)
Now, in hindsight it makes sense that the uniform prior for the mass be much larger than the normal priors I set but at first I was surprised why the range is so large (and the lower limit actually larger than the prior I put in). Correspondingly, even with only 50 points, the run was taking forever and actually never finishing. I guess it is some issue of going off the model grid but maybe it could be helpful if some bounds were re-adjusted automatically and/or warnings given?
Two small things in passing:
I have made some improvements for when a prior or luminosity is outside the grid range. Could you test once more 😊?
Thanks! Indeed, with the same FitEvolution()
call (see above), I get
[…]/species/fit/fit_evolution.py:241: UserWarning: The lower bound on mass_0 (0.5) is smaller
than the lower bound from the available evolution model grid (10.475655146604772).
The lower bound of the mass_0 prior will be adjusted to 10.475655146604772.
and in another context, I did run into ValueError: The input value of 'teff' is smaller than the lower boundary of the model grid (1457.404357917523 < 1500.0)
, both of which were useful. (I think both are from the same commit.)
However, baraffe2015
is still not working, somehow. It is running forever and even with only 50 points still not producing any output. Plotting the raw data, it looks as though there should be a solution:
The black line is -3.6 dex, and there should be many solutions for masses between 10.48 MJ (= 10 millisolarmasses :nerd_face:) and whatever, and ages between 3 Myr and 150 Myr, with the normal priors not even very tight. Is it a units issue somewhere? Or is it because of the non-monotonic behaviour (due to the deuterium-burning shoulder)?
bounds['disk_teff'] = (3., 1000.)
for fit = FitModel(…, bounds=bounds)
, instead of the minimum 10 K ("teff range": [10, 20000]
in species/data/model_data/model_data.json
)), I get from MultiNest:
File "[…]/species/fit/fit_model.py", line 1658, in _lnlike_func
disk_flux = self.diskphot[phot_idx].spectrum_interp(
File "[…]/.local/lib/python3.8/site-packages/scipy/interpolate/_rgi.py", line 320, in __call__
raise ValueError("One of the requested xi is out of bounds "
ValueError: One of the requested xi is out of bounds in dimension 0
but it is not so obvious right away what the cause is, and it requires killing the session (pausing ipython3
with Ctrl+Z and then doing in the same terminal kill %%
). Maybe this too could/should be caught by species
before MultiNest
is called.
Hmm might indeed be non-monotonic behavior. Perhaps use ReadIsochrone
to check if the interpolated isochrones seem fine. Please open a separate issue with a full but minimal example if you still encounter the issue. Thanks!
I tried again baraffe15
with another set of values and it took much longer than in the run above but it eventually worked. I suspect that the acceptance rate is just very low because the mass is close to the lower limit of 10 mMsol. So everything is probably ok!
Hello Tomas,
A logical and useful extension to
plot_cooling
would be to plot the effective temperature!Thanks,
Gabriel