ReddeningLaw¶
- class synphot.reddening.ReddeningLaw(modelclass, clean_meta=False, **kwargs)[source]¶
Bases:
BaseUnitlessSpectrumClass to handle reddening law.
- Parameters:
- modelclass, kwargs
See
BaseSpectrum.
Methods Summary
extinction_curve(ebv[, wavelengths])Generate extinction curve.
from_extinction_model(modelname, **kwargs)from_file(filename, **kwargs)Create a reddening law from file.
to_fits(filename[, wavelengths])Write the reddening law to a FITS file.
Methods Documentation
- extinction_curve(ebv, wavelengths=None)[source]¶
Generate extinction curve.
\[ \begin{align}\begin{aligned}A(V) = R(V) \; \times \; E(B-V)\\THRU = 10^{-0.4 \; A(V)}\end{aligned}\end{align} \]- Parameters:
- Returns:
- extcurve
ExtinctionCurve Empirical extinction curve.
- extcurve
- Raises:
- synphot.exceptions.SynphotError
Invalid input.
- classmethod from_extinction_model(modelname, **kwargs)[source]¶
Load pre-defined extinction model.
- Parameters:
- modelnamestr
Extinction model name. Choose from ‘lmc30dor’, ‘lmcavg’, ‘mwavg’, ‘mwdense’, ‘mwrv21’, ‘mwrv40’, ‘smcbar’, or ‘xgalsb’.
- kwargsdict
Keywords acceptable by
read_remote_spec().
- Returns:
- redlaw
ReddeningLaw Empirical reddening law.
- redlaw
- Raises:
- synphot.exceptions.SynphotError
Invalid extinction model name.
- classmethod from_file(filename, **kwargs)[source]¶
Create a reddening law from file.
If filename is recognized by
astropy.io.fitsas FITS, it is read as such. Otherwise, it is read as ASCII.- Parameters:
- filenamestr
Reddening law filename.
- kwargsdict
Keywords acceptable by
read_fits_spec()(if FITS) orread_ascii_spec()(if ASCII).
- Returns:
- redlaw
ReddeningLaw Empirical reddening law.
- redlaw
- to_fits(filename, wavelengths=None, **kwargs)[source]¶
Write the reddening law to a FITS file.
\(R(V)\) column is automatically named ‘Av/E(B-V)’.
- Parameters:
- filenamestr
Output filename.
- wavelengthsarray-like,
Quantity, orNone Wavelength values for sampling. If not a Quantity, assumed to be in Angstrom. If
None,self.wavesetis used.- kwargsdict
Keywords accepted by
write_fits_spec().