astropy-tutorials
astropy-tutorials copied to clipboard
Color-excess tutorial to use new API in synphot 0.3
When synphot 0.3 is released (no set release date yet), the color excess tutorial can be updated to use new API to dust-extinction as per spacetelescope/synphot_refactor#251, like this:
from synphot import ReddeningLaw
ex = ReddeningLaw(ext).extinction_curve(Av / ext.Rv, wavelengths=wav)
I hope this new API looks a little better than the current
from synphot import ExtinctionModel1D
from synphot.reddening import ExtinctionCurve
ex = ExtinctionCurve(ExtinctionModel1D,
points=wav, lookup_table=ext.extinguish(wav, Av=Av))
cc @karllark and @krislars