sncosmo.read_bandpass¶
- sncosmo.read_bandpass(fname, fmt='ascii', wave_unit=Unit('Angstrom'), trans_unit=Unit(dimensionless), normalize=False, trim_level=None, name=None)[source]¶
Read bandpass from two-column ASCII file containing wavelength and transmission in each line.
- Parameters:
- fnamestr
File name.
- fmt{‘ascii’}
File format of file. Currently only ASCII file supported.
- wave_unit
Unit
or str, optional Wavelength unit. Default is Angstroms.
- trans_unit
Unit
, optional Transmission unit. Can be
dimensionless_unscaled
, indicating a ratio of transmitted to incident photons, or units proportional to inverse energy, indicating a ratio of transmitted photons to incident energy. Default is ratio of transmitted to incident photons.- normalizebool, optional
If True, normalize fractional transmission to be 1.0 at peak. It is recommended to set to True if transmission is in units of inverse energy. (When transmission is given in these units, the absolute value is usually not significant; normalizing gives more reasonable transmission values.) Default is False.
- namestr, optional
Identifier. Default is
None
.
- Returns:
- band
Bandpass
- band