ucl-exoplanets / ExoTETHyS

GNU General Public License v3.0
17 stars 3 forks source link

Update blackbody import to newer version of astropy #23

Closed jeroenbouwman closed 3 years ago

jeroenbouwman commented 3 years ago

The latest version of astropy (4.3) the following import call on line 18 in boats.py stopped working :

from astropy.modeling.blackbody import blackbody_lambda

Could this be updated to the following:

from astropy.modeling.models import BlackBody

the usage would then be: bb_nu = BlackBody(temperature=temperature) bb_lam = BlackBody(temperature, scale=1.0 * u.erg / (u.cm * 2 u.AA u.s u.sr))

B_nu = bb_nu(wavelength) B_lam = bb_lam(wavelength)

this should also work with older versions of astropy.

gmorello commented 3 years ago

Done, many thanks for this note