astropy-tutorials icon indicating copy to clipboard operation
astropy-tutorials copied to clipboard

Color-excess tutorial to use new API in synphot 0.3

Open pllim opened this issue 5 years ago • 0 comments

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

pllim avatar Feb 25 '20 19:02 pllim