tomasstolker / species

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

Retrieval with radial velocity / rotational broadening vsini #91

Closed Tenivar closed 4 months ago

Tenivar commented 8 months ago

While trying to run a retrieval on an object, I saw that the vsini and rad_vel parameters (that I included in the bounds of my multinest retrieval dictionary ) are not passed to the algorithm. While looking at the source code, it seems that these parameters are not passed to calc_spectrum_clouds. Is it possible to add it? Thanks !

Tenivar commented 8 months ago

I've implemented the possibility of retrieving rad_vel / vsini in my fork of species. I am, however, not sure on how to tell species to apply vsini only on a spectrum (or a subset of spectra) if various spectra covering different wavelength regions are provided (ie, applying a vsini only to the J band of a spectrum, not touching H/K/L bands).

tomasstolker commented 8 months ago

Thanks for opening this issue! Those parameters were indeed implemented in the grid retrievals with FitModel but not yet in the free retrievals with petitRADTRANS.

Sorry for not noticing your last message any earlier, but I implemented the parameters in the AtmosphericRetrieval class in the meanwhile (see commit 3f07949). A description of the rad_vel and vsini parameters can be found here.

I also added the apply_rad_vel and apply_vsini parameters so you can provide a subset of the spectra, to speed up the computation a bit. All spectra from inc_spec are included when the apply_ arguments are set to None.

You can pull the update from Github. Let me know in case you have any questions or run into any problem!