FormingWorlds / PROTEUS

Coupled atmosphere-interior framework to simulate the temporal evolution of rocky planets.
https://proteus-code.readthedocs.io
Apache License 2.0
10 stars 1 forks source link

Get PHOENIX spectra #56

Open nichollsh opened 7 months ago

nichollsh commented 7 months ago

It would be very easy to generalise the 'get stellar spectrum' script in tools/ to cover a much wider range of stars by using the following Python library: https://github.com/bmorris3/expecto

Particularly useful for modelling planets around less well-studied stars (e.g. LP 791-18)

timlichtenberg commented 7 months ago

Amazing! Does this work neatly together with Mors?

nichollsh commented 7 months ago

Yes I think so. Mors provides us with the band-integrated fluxes, which are then used to scale the spectrum. Currently we've been semi-manually obtaining spectra from Muscles (etc.) but this could make it much simpler by taking the stellar parameters from the configuration file.

The main downside is that it increases the number of dependencies.

nichollsh commented 3 months ago

I've tested this in a standalone notebook by using the Baraffe tracks to get Teff and logg at a given age, and then using these to find the appropriate spectrum.

Seems to work, although it's quite slow since this python package downloads the spectra via FTP from the PHOENIX database as required.

I still think this is worth thinking about, but it needs more investigation.

nichollsh commented 1 month ago

The library mentioned above gets PHOENIX spectra from the Goettingen spectral library. However, this doesn't seem to cover wavelengths below 60 nm. For escape calculations we will want wavelengths shorter than this.

The BT-Settl models cover ~1e-4 to ~1e5 nm, which is better (and also overkill).

Can view/obtain these here: http://svo2.cab.inta-csic.es/theory/newov2/index.php

And also potentially from here: https://zenodo.org/records/8015969

nichollsh commented 1 month ago

I have scraped the model spectra from the website above for the BT-Settl CIFIST grid. This covers a wide range of Teff and log(g). It also covers X-ray and EUV.

These are stored as individual npy files, packaged into a single tar.gz file on OSF. https://osf.io/8r2sw/

We could easily write a script to take Teff and log(g) from an evolution track, and then interpolate or find the appropriate spectrum from this grid. The file size is only ~1 GB.

nichollsh commented 3 weeks ago

Also check out: https://msg.readthedocs.io/en/stable