onepower.add.UpsampledSpectra#
- class onepower.add.UpsampledSpectra(*args, **kwargs)[source]#
This class generates one or two
Spectra
, extrapolates them to the desired output grid and adds them if requested.- Parameters:
z (array_like) – Output redshifts to which to interpolate and optionally extrapolate power spectra.
k (array_like) – Output k-vector to which to interpolate and optionally extrapolate power spectra.
fraction_z (array_like) – Redshifts of the red/blue fraction of galaxies in sample.
fraciton (array_like) – Red/blue fraction of galaxies in sample as a function of redshift.
model_1_params (dict) – Parameters for the first halo model.
model_2_params (dict) – Parameters for the second halo model.
extrapolate_option (str or float) – Extrapolation option to pass to interp1d.
model (object) – Instance of Spectra(), pre-initialised for saving computing resources.
Methods
__init__
([z, k, fraction_z, fraction, ...])add_spectra
(pk_1, pk_2, mode)Add the power spectra of the two models.
clone
(**kwargs)Create and return an updated clone of the current object.
extrapolate_spectra
(z_ext, k_ext, z_in, ...)Extrapolate the power spectra to the desired output grid.
get_all_parameter_defaults
([recursive])Dictionary of all parameters and defaults.
Yield all parameter names in the class.
get_dependencies
(*q)Determine all parameter dependencies of the quantities in q.
parameter_info
([names])Prints information about each parameter in the class.
Obtain a list of all available output quantities.
results
(requested_spectra, requested_components)Calculate and store the results for the requested spectra and components.
update
(**kwargs)Update parameters of the framework with kwargs.
validate
()Perform validation of the input parameters as they relate to each other.
Attributes
Extrapolation option to pass to interp1d.
Calculate the fraction for the first model.
Calculate the fraction for the second model.
Red/blue fraction of galaxies in sample as a function of redshift.
Redshifts of the red/blue fraction of galaxies in sample.
Output k-vector to which to interpolate and optionally extrapolate power spectra.
Instance of Spectra(), pre-initialised for saving computing resources.
Dictionary of all parameters and their current values
First Halo Model.
Second Halo Model.
Output redshifts to which to interpolate and optionally extrapolate power spectra.