EmissionCurve¶
-
class
simcado.spectral.
EmissionCurve
(filename=None, **kwargs)[source]¶ Bases:
simcado.spectral.TransmissionCurve
Class for emission curves
Create an emission curve from a file or from wavelength and flux vectors. In the latter case, the keywords lam and val have to be specified.
- Parameters
- - filename: string with the path to the transmission curve file where
the first column is wavelength in [um] and the second is the transmission coefficient between [0,1]
- - lam: [um] 1D numpy array of length n
- - val: 1D numpy array of length n
- - res: [um] float with the desired spectral resolution
- - pix_res: [arcsec] float of int for the field of view for each pixel
- - area: [m2] float or int for the collecting area of M1
- - units: string or astropy.unit for calculating the number of photons
per voxel
- Return values are in [ph/s/voxel]
Examples
>>> from simcado.spectral import EmissionCurve >>> >>> ec_1 = EmissionCurve("emission_curve.dat") >>> lam = np.arange(0.7, 1.5, 0.05) >>> flux = 1. - 0.2 * wave**2 # power-law spectrum >>> ec_2 = EmissionCurve(lam=lam, val=flux)
Methods Summary
convert_to_photons
(self)Do the conversion to photons/s/voxel by using the val_unit, lam, area and exptime keywords.
photons_in_range
(self[, lam_min, lam_max])Sum up the photons in the wavelength range [lam_min, lam_max]
resample
(self, bins[, action, use_edges, …])Rebin an emission curve
Methods Documentation
-
convert_to_photons
(self)[source]¶ Do the conversion to photons/s/voxel by using the val_unit, lam, area and exptime keywords. If not given, make some assumptions.