BEAST-Fitting / beast

Bayesian Extinction And Stellar Tool
http://beast.readthedocs.io
23 stars 34 forks source link

Add evolutionary tracks as a 2nd option for generating the stellar grid #18

Open karllark opened 7 years ago

karllark commented 7 years ago

The stellar grid is currently based on isochrones. This the grid has uniform spacing in age, but non-uniform in mass. Isochrones are best for dealing with ensembles of stars, but not necessarily for individual stars. The issue for the BEAST is that the age spacing must be fine enough to sample the evolution of high mass stars and this severely over samples the evolution of low mass stars.

One solution is to change from using isochrones to evolutionary tracks. Stellar interior models create the evolutionary tracks which are then interpolated to isochrones. The tracks are given for a set of stars with a range of initial masses. Thus the stellar grid created from them will have a uniform spacing in mass, and a non-uniform spacing in age. This should create a significantly smaller grid with the same effective coverage of stellar parameters. Smaller grids mean faster run times or the ability to create grids with finer sampling of stellar parameters.

Basing the stellar grid on evolutionary tracks is definitely possible as this was what the original version of the BEAST did (in IDL).

Leo Girardi stated in an email to me that he has code for doing efficient/good interpolation on the stellar evolutionary tracks. Hopefully, this is in python.

karllark commented 7 years ago

Changing the grid to using stellar evolutionary tracks will require updates to the prior weight calculation as the parameter that is not-uniform will change from mass to age.

lcjohnso commented 7 years ago

A first step would be adding PARSEC tracks -- available here.

mfouesneau commented 7 years ago

A bit of hack: each archive contains many files. Each can be read in as

numpy.recfromtxt('Z0.0001Y0.249OUTA1.74_F7_M0.505.HB.DAT', names=True)

or

df = pandas.DataFrame.from_csv('Z0.0001Y0.249OUTA1.74_F7_M0.505.HB.DAT', header=0, sep='\ +')
karllark commented 7 years ago

This effort should focus on adding the option of using stellar evolutionary tracks to generate the grid. Discussion during the Feb 2017 BEAST hack week made it clear that we should not lose the isochrone option, but having a 2nd option would expand the different stellar evolution models the BEAST could use. This is a 2nd motivation in addition to the original one discussed above (smaller BEAST grids).

Adding the tracks as an option will have an impact on other parts of the BEAST, in particular the code that generates the grid and prior weights will need to use slightly different logic if tracks are used for the stellar grid.

karllark commented 6 years ago

Working on other tasks, I have found that adding in the evolutionary tracks should be fairly straightforward. Need to provide a new function that gets the tracks, interpolates them to the desired uniform mass spacing, and provides the needed 'pts' (e.g., logg, logTeff, etc.) for use in generating the grid. The only additional change is to handle the switch to non-uniform spacing in age instead of mass. This mainly affects the computation of the stellar priors and (possibly) the 1d pPDFs.

s-goldman commented 6 years ago

I created a new fits file which includes interpolated Padova tracks from Phil Rosenfield (http://philrosenfield.github.io/padova_tracks/). I have been able to import this file in model_grid.py where the star model library is imported on line 66. This was just to test to see if the beast would run with the new file, full well knowing the end results would be incorrect. More work to come.

s-goldman commented 6 years ago

I have a table (fits) of all the Padova data including the eeps (evolutionary points), the index, and the metallicities. Now working on creating an N-dimensional mesh grid to interpolate over. What we currently have is something like this:

karls_plot1

but we need it evenly sampled.

karllark commented 6 years ago

Why does the mass change on a single track? Are you plotting the initial or current mass? The interpolation should be done in initial mass.

s-goldman commented 6 years ago

Yeah the models only have initial masses, I think this was just all the models for a given metallicity. Not sure about the squiggle to the right of everything though.

s-goldman commented 6 years ago

New plan, I am downloading the full Parsec evolutionary tracks and interpolating them. In the end I should have an finely sampled HR diagram of initial mass and age.

s-goldman commented 6 years ago

new new plan, working on creating grid from the full Padova models where each evolutionary track only has 20 points (in intervals of 5%). Doing interpolation over indices to the 5% intervals and then interpolation of each column of the tracks.

karllark commented 6 years ago

The 20 points we used in the example today was only that, an example. The number of points per evolutionary track will vary depending on how after the luminosity, etc. changes. Right?

karllark commented 4 years ago

Potential way to interface to evolutionary tracks. Looks to only support MIST tracks fro now. https://github.com/timothydmorton/isochrones