Skip to content

Commit 0724819

Browse files
committed
color-excess: update synphot call
1 parent a688a94 commit 0724819

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tutorials/color-excess/color-excess.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"from astropy.table import Table\n",
7474
"from dust_extinction.parameter_averages import CCM89, F99\n",
7575
"from synphot import units, config\n",
76-
"from synphot import SourceSpectrum,SpectralElement,Observation,ExtinctionModel1D\n",
76+
"from synphot import SourceSpectrum,SpectralElement,Observation,ReddeningLaw\n",
7777
"from synphot.models import BlackBodyNorm1D\n",
7878
"from synphot.spectrum import BaseUnitlessSpectrum\n",
7979
"from synphot.reddening import ExtinctionCurve\n",
@@ -540,8 +540,7 @@
540540
"wav = np.arange(0.1, 3, 0.001)*u.micron\n",
541541
"\n",
542542
"# Make the extinction model in synphot using a lookup table.\n",
543-
"ex = ExtinctionCurve(ExtinctionModel1D, \n",
544-
" points=wav, lookup_table=ext.extinguish(wav, Av=Av))\n",
543+
"ex = ReddeningLaw(ext).extinction_curve(Av / ext.Rv, wavelengths=wav)\n",
545544
"sp_ext = sp_norm*ex\n",
546545
"sp_ext.plot(left=1, right=15000, flux_unit='flam',\n",
547546
" title='Normed Blackbody with Extinction')"

0 commit comments

Comments
 (0)