BagpipesSampler#
- class niriss_tools.grism.BagpipesSampler(fit_instructions, veldisp=500.0)[source]#
Bases:
objectBagpipes model galaxy sampler.
- Parameters:
Methods Summary
sample(param_vector[, cont_only, rm_line, ...])Regenerate a model spectrum from a sampled parameter vector.
update_model_components(param)Generate a model object with the current parameters.
Methods Documentation
- sample(param_vector, cont_only=False, rm_line=None, return_line_flux=False, **model_kwargs)[source]#
Regenerate a model spectrum from a sampled parameter vector.
- Parameters:
- param_vector
ArrayLike The array of parameters to be updated.
- cont_onlybool, optional
If
True, the model spectrum will be generated without any nebular emission. By defaultFalse.- rm_line
list[str] |None, optional The names of one or more lines to exclude from the model spectrum, based on the Cloudy naming convention (see here for more details). By default
None.- return_line_fluxbool, optional
If
True, return the total line flux for all lines named inrm_line. By defaultFalse.- **model_kwargs
dict, optional Any additional keyword arguments to pass to
ExtendedModelGalaxy.
- param_vector
- Returns:
ArrayLikeA 2D array, containing the wavelengths and corresponding fluxes of the modelled galaxy spectrum.
- update_model_components(param)[source]#
Generate a model object with the current parameters.
Originally from
bagpipes.fitting.fitted_model, modified to allow for running in parallel (no attributes overwritten).- Parameters:
- param
ArrayLike The array of parameters to be updated.
- param
- Returns:
dictThe updated components for a model galaxy.