FormingWorlds / MORS

Code for stellar properties, rotation, and activity evolution. Originally developed by Colin Johnstone.
https://fwl-mors.readthedocs.io
MIT License
0 stars 0 forks source link

Baraffe #8

Closed lsoucasse closed 3 months ago

lsoucasse commented 3 months ago

This work creates a BaraffeTrack class which loads and interpolates Baraffe track data to provide star luminosity, bolometric flux and stellar radius as a function of star mass and star age. The interpolation in time works as it is currently done in Poteus, I just added the mass interpolation (linear).

I tested the BaraffeSolarConstant function against the InterpolateStellarLuminosity function in Janus (which uses a different interpolation method) and it gives the same results (relative difference of 1e-6).

lsoucasse commented 3 months ago

Looks good - I am happy with these changes.

However, it would be useful to add a check for when FWL_DATA hasn't been set by the user. We implemented something similar in PROTEUS, but it would be useful to have a check in MORS too if it is to be standalone.

Good catch, actually the DownloadEvolutionTracks function does this check. To complement, I now check if the Baraffe track file actually exists when trying to access it.