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.

get_all_parameter_names()

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.

quantities_available()

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

extrapolate_option

Extrapolation option to pass to interp1d.

frac_1

Calculate the fraction for the first model.

frac_2

Calculate the fraction for the second model.

fraction

Red/blue fraction of galaxies in sample as a function of redshift.

fraction_z

Redshifts of the red/blue fraction of galaxies in sample.

k

Output k-vector to which to interpolate and optionally extrapolate power spectra.

model

Instance of Spectra(), pre-initialised for saving computing resources.

parameter_values

Dictionary of all parameters and their current values

power_1

First Halo Model.

power_2

Second Halo Model.

z

Output redshifts to which to interpolate and optionally extrapolate power spectra.