Home | Trees | Indices | Help |
---|
|
Definitions of interstellar reddening curves
Use the general interface to get different curves:
>>> wave = np.r_[1e3:1e5:10] >>> for name in ['chiar2006','fitzpatrick1999','fitzpatrick2004','cardelli1989','seaton1979']: ... wave_,mag_ = get_law(name,wave=wave) ... p = pl.plot(1e4/wave_,mag_,label=name) >>> p = pl.xlim(0,10) >>> p = pl.ylim(0,12)
Use the general interface to get the same curves but with different Rv:
>>> for Rv in [2.0,3.1,5.1]: ... wave_,mag_ = get_law('cardelli1989',wave=wave,Rv=Rv) ... p = pl.plot(1e4/wave_,mag_,'--',lw=2,label='cardelli1989 Rv=%.1f'%(Rv)) >>> p = pl.xlim(0,10) >>> p = pl.ylim(0,12) >>> p = pl.xlabel('1/$\lambda$ [1/$\mu$m]') >>> p = pl.ylabel(r'Extinction E(B-$\lambda$) [mag]') >>> p = pl.legend(prop=dict(size='small'),loc='lower right')
]include figure]]ivs_sed_reddening_curves.png]
Get the curves seperately:
>>> wave1,mag1 = cardelli1989() >>> wave2,mag2 = chiar2006() >>> wave3,mag3 = seaton1979() >>> wave4,mag4 = fitzpatrick1999() >>> wave5,mag5 = fitzpatrick2004()
>>> wave = np.logspace(3,6,1000) >>> photbands = ['JOHNSON.V','JOHNSON.K']
Retrieve two interstellar reddening laws, normalise them to Av and
see what the ratio between Ak and Av is. Since the chiar2006 law is not defined in the optical, this
procedure actually doesn't make sense for that law. In the case of cardelli1989, compute the ratio Ak/Av
.
Note that you cannot ask for the chiar2006 to be normalised in the visual, since the
curve is not defined their! If you really want to do that anyway, you
need to derive a Ak/Av factor from another curve (e.g. the cardelli1989).
>>> p = pl.figure() >>> for name,norm in zip(['chiar2006','cardelli1989'],['Ak','Av']): ... wave_,mag_ = get_law(name,wave=wave,norm=norm) ... photwave,photflux = get_law(name,wave=wave,norm=norm,photbands=photbands) ... p = pl.plot(wave_/1e4,mag_,label=name) ... p = pl.plot(photwave/1e4,photflux,'s') ... if name=='cardelli1989': print 'Ak/Av = %.3g'%(photflux[1]/photflux[0]) Ak/Av = 0.114 >>> p = pl.gca().set_xscale('log') >>> p = pl.gca().set_yscale('log') >>> p = pl.xlabel('Wavelength [micron]') >>> p = pl.ylabel('Extinction A($\lambda$)/Av [mag]')
]include figure]]ivs_sed_reddening_02.png]
Compute the Cardelli law normalised to Ak and Av.
>>> p = pl.figure() >>> wave_av1,mag_av1 = get_law('cardelli1989',wave=wave,norm='Av') >>> wave_av2,mag_av2 = get_law('cardelli1989',wave=wave,norm='Av',photbands=['JOHNSON.V']) >>> p = pl.plot(wave_av1,mag_av1,'k-',lw=2,label='Av') >>> p = pl.plot(wave_av2,mag_av2,'ks')
>>> wave_ak1,mag_ak1 = get_law('cardelli1989',wave=wave,norm='Ak') >>> wave_ak2,mag_ak2 = get_law('cardelli1989',wave=wave,norm='Ak',photbands=['JOHNSON.K']) >>> p = pl.plot(wave_ak1,mag_ak1,'r-',lw=2,label='Ak') >>> p = pl.plot(wave_ak2,mag_ak2,'rs')
>>> p = pl.gca().set_xscale('log') >>> p = pl.gca().set_yscale('log') >>> p = pl.xlabel('Wavelength [micron]') >>> p = pl.ylabel('Extinction A($\lambda$)/A($\mu$) [mag]')
]include figure]]ivs_sed_reddening_03.png]
|
|||
Main interface | |||
---|---|---|---|
(ndarray,ndarray) |
|
||
ndarray (floats) |
|
||
ndarray (floats) |
|
||
Curve definitions | |||
(ndarray,ndarray) |
|
||
(ndarray,ndarray) |
|
||
(ndarray,ndarray) |
|
||
(ndarray,ndarray) |
|
||
(ndarray,ndarray) |
|
||
(ndarray,ndarray) |
|
|
|||
logger = logging.getLogger("SED.RED")
|
|||
basename = os.path.join(os.path.dirname(__file__), 'redlaws')
|
|
Retrieve an interstellar reddening law. Parameter By default, the law will be interpolated on a grid from 100 angstrom
to 10 micron in steps of 10 angstrom. This can be adjusted with the
parameter By default, the curve is normalised with respect to E(B-V) (you get
A(l)/E(B-V)). You can set the A(V) = Rv * E(B-V) The parameter Extra accepted keywords depend on the type of reddening law used. Example usage: >>> wave = np.r_[1e3:1e5:10] >>> wave,mag = get_law('cardelli1989',wave=wave,Rv=3.1)
|
Redden flux or magnitudes The reddening parameters If it is negative, we deredden. If you give the keyword If you give the keyword
|
Deredden flux or magnitudes.
|
Extinction curve at infrared wavelengths from Chiar and Tielens (2006) We return A(lambda)/E(B-V), by multiplying A(lambda)/Av with Rv. This is only defined for Rv=3.1. If it is different, this will raise an AssertionError Extra kwags are to catch unwanted keyword arguments. UNCERTAIN NORMALISATION
|
From Fitzpatrick 1999 (downloaded from ASAGIO database) This function returns A(lambda)/A(V). To get A(lambda)/E(B-V), multiply the return value with Rv (A(V)=Rv*E(B-V)) Extra kwags are to catch unwanted keyword arguments.
|
From Fitzpatrick 2004 (downloaded from FTP) This function returns A(lambda)/A(V). To get A(lambda)/E(B-V), multiply the return value with Rv (A(V)=Rv*E(B-V)) Extra kwags are to catch unwanted keyword arguments.
|
Small improvement on Cardelli 1989 by James E. O'Donnell (1994). Extra kwags are to catch unwanted keyword arguments.
|
Construct extinction laws from Cardelli (1989). Improvement in optical by James E. O'Donnell (1994) wavelengths in Angstrom! This function returns A(lambda)/A(V). To get A(lambda)/E(B-V), multiply the return value with Rv (A(V)=Rv*E(B-V)) Extra kwags are to catch unwanted keyword arguments.
|
Extinction curve from Seaton, 1979. This function returns A(lambda)/A(V). To get A(lambda)/E(B-V), multiply the return value with Rv (A(V)=Rv*E(B-V)) Extra kwags are to catch unwanted keyword arguments.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Mar 30 10:45:19 2018 | http://epydoc.sourceforge.net |