scale_spectrum_sb¶
-
simcado.source.
scale_spectrum_sb
(lam, spec, mag_per_arcsec, pix_res=0.004, filter_name='Ks', return_ec=False)[source]¶ Scale a spectrum to be a certain magnitude per arcsec2
- Parameters
- lamnp.ndarray
[um] The wavelength bins for spectrum
- specnp.ndarray
The spectrum to be scaled into [ph/s/m2] for the given broadband filter
- mag_per_arcsecfloat
[mag/arcsec2] surface brightness of the source
- pix_resfloat
[arcsec] the pixel resolution
- filter_namestr, TransmissionCurve
Any filter name from SimCADO or a
TransmissionCurve
object (seeget_filter_set()
)- return_ecbool, optional
If True, a
simcado.spectral.EmissionCurve
object is returned. Default is False
- Returns
- lamnp.ndarray
[um] The centres of the wavelength bins for the new spectrum
- specnp.array
[ph/s/m2/pixel] The spectrum scaled to the specified magnitude