resample_bagpipes_model¶
- msaexp.spectrum.resample_bagpipes_model(model_galaxy, model_comp=None, spec_wavs=None, R_curve=None, nsig=5, scale_disp=1.3, wave_scale=1)[source]¶
- Parameters
- model_galaxy
bagpipes.models.model_galaxy.model_galaxy - model_compdict
Model components dictionary. If specified, run
model_galaxy.update(model_comp), otherwise get frommodel_galaxy.model_comp- spec_wavsarray-like, None
Spectrum wavelengths, Angstroms. If not specified, try to use
model_galaxy.spec_wavs- R_curvearray-like, None
Spectral resolution FWHM curve. If not specified, try to use
model_comp["R_curve"][:,1].- nsigint
Number of sigmas for resample.
- wave_scalefloat
Scalar multipled to model wavelengths, i.e., for additional spectral orders
- model_galaxy
- Returns
- spectrumarray-like
Resampled. If
model_galaxy.spec_wavsis found and has same length asspec_wavs, also setmodel_galaxy.spectrum = spectrumalong with the wavelength array.The units of
spectrumreturned by the function are always microJansky, but the units ofmodel_galaxy.spectrumare set as appropriate givenmodel_galaxy.spec_units.