tomasstolker / species

Toolkit for atmospheric characterization of directly imaged exoplanets
https://species.readthedocs.io
MIT License
22 stars 10 forks source link

Can not find the atmosphere model associated with the 'linder2019-petitCODE-metal_0.0' when running get_photometry #73

Closed maxwellmb closed 11 months ago

maxwellmb commented 11 months ago

When I try to use the get_photometry function with the linder2019 grid, I get the following error: ValueError: Can not find the atmosphere model associated with the 'linder2019-petitCODE-metal_0.0' evolutionary model.

Getting the isochrones with get_isochrone seems to work though, odd!

Here's some code to reproduce the error.

import species
species.SpeciesInit()
database = species.Database()

## This works
# database.add_isochrones(model='atmo')
# tag = 'atmo-ceq'

## This doesn't
database.add_isochrones(model='linder2019') 
tag = "linder2019-petitCODE-metal_0.0"

read_iso_bex = species.ReadIsochrone(tag=tag)
phot_box = read_iso_bex.get_photometry(age=24., mass=1., distance=20., filter_name='JWST/NIRCam.F360M')

I make sure to pull the most recent commit before testing.

tomasstolker commented 11 months ago

The model spectra associated with Linder et al. (2019) had indeed not yet been included. I wasn't sure which petitCODE grid this should be, since it is going to lower Teff than the regular grid. I have now found the data on the website of Paul Mollière, both the clear and cloudy models.

If you pull the latest commit then it should hopefully work! To check which model spectra are available, you can use the available_models method of Database. The get_photometry should automatically select the correct model though and also set the extra_param attribute. Otherwise, you can also set the parameters manually.

I hope this helps and let me know in case you run into any problems!

maxwellmb commented 11 months ago

The definitely helped, thanks for all your efforts Tomas!