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_galaxybagpipes.models.model_galaxy.model_galaxy
model_compdict

Model components dictionary. If specified, run model_galaxy.update(model_comp), otherwise get from model_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

Returns
spectrumarray-like

Resampled. If model_galaxy.spec_wavs is found and has same length as spec_wavs, also set model_galaxy.spectrum = spectrum along with the wavelength array.

The units of spectrum returned by the function are always microJansky, but the units of model_galaxy.spectrum are set as appropriate given model_galaxy.spec_units.