scopesim_templates.calibration.calibration.lamp#
- scopesim_templates.calibration.calibration.lamp(waves, fwhm, fluxes) Source#
Create a homogenous source with a spectrum of emission lines.
Emission line spectrum is superposed to a very faint continuum.
- Parameters:
waves (np.array, u.Quantity) – a list or array of wavelengths
fwhm (np.array, u.Quantity) – a list or array with the fwhm of the lines
fluxes (np.array, u.Quantity) – a list or array with the fluxes of the lines
- Returns:
src
- Return type:
Source
Examples
Create a
Sourcelamp:>>> import numpy as np >>> import astropy.units as u >>> from scopesim_templates.calibration import lamp >>> >>> R = 20000 # Resolution of the instrument >>> waves = np.arange(1e4, 2.7e4, 100) >>> fwhm = 2.6*(waves/R)*np.ones(shape=waves.shape) # Nyquist sampled >>> flux = 1e-10*np.ones(waves.shape) >>> >>> src = lamp(waves=waves, fwhm=fwhm, fluxes=flux)