SpectroDerivs#

class cosmicjellyfish.LSSsurvey.spectro_cov.SpectroDerivs(z_array, pk_kmesh, pk_mumesh, fiducial_spectro_obj, bias_samples=['g', 'g'], configuration=None)[source]#

Bases: object

get_obs(allpars)[source]#

function to obtain the power spectrum of the observable

Parameters:

allpars (dict) – A dictionary containing all relevant parameters to compute the observed power spectrum

Returns:

A dictionary containing the observed power spectrum on the k and mu grid for all redshift bins

Return type:

dict

exact_derivs(par)[source]#

Compute the exact log derivative of the Power spectrum with respect to the shotnoise using chain rule

Parameters:

par (str) – String name of the Shotnoise parameter for which the exact derivative should be computed from

Returns:

A dictionary containing the exact log derivative with respect to the shotnoise parameter

Return type:

dict

kronecker_bins(par, zmids, zi)[source]#

function to figure out what bin a parameter corresponds and compares to the redshift passed

Parameters:
  • par (str) – String name of a parameter. The name should end with ‘_i’ where i marks the bin it corresponds to

  • zmid (numpy.ndarray) – List of the centers for the redshift bin

  • zi (float) – redshift for which we want to find the bin

Returns:

returns 1 if passed redshift is in the bin corresponding to the parameter. Returns 0 else wise

Return type:

int

compute_derivs(freeparams=None, *, derivative_provider=None)[source]#

Calls the common derivative engine to compute the derivatives of the observed power spectrum

Parameters:

freeparams (dict, optional) – A dictionary containing the names and step sizes for all parameters you want to vary. Will default to the global free params if not passed.

Returns:

A dictionary containing lists of derivatives of the observed power spectrum for each redshift bin and parameter

Return type:

dict

dlnpobs_dp(zi, k, mu, par)[source]#

This is a deprecated function! It was used to compute the compute the derivatives of the power spectrum internally in the cosmicjellyfish.LSSsurvey.spectro_cov.SpectroDerivs . Use now the common derivative engine at cosmicjellyfish.fishermatrix.derivatives.derivatives

Parameters:
  • zi (float, numpy.ndarray) – The redshifts values of interest.

  • k (float) – The wavenumber for which the power spectrum should be computed

  • mu (float, numpy.ndarray) – The cosine of angle between the wavevector and the line-of-sight direction.

  • par (str) – Name of the parameter with regards to which the derivative should be computed for

Returns:

Derivative of the observed power spectrum with regard to the passed parameter

Return type:

float, numpy.ndarray

dlnpobs_dcosmop(zi, k, mu, par)[source]#

This is a deprecated function! It was used to compute the compute the derivatives of the power spectrum with respect to the cosmological parameters internally in the cosmicjellyfish.LSSsurvey.spectro_cov.SpectroDerivs . Use now the common derivative engine at cosmicjellyfish.fishermatrix.derivatives.derivatives

Parameters:
  • zi (float, numpy.ndarray) – The redshifts values of interest.

  • k (float) – The wavenumber for which the power spectrum should be computed

  • mu (float, numpy.ndarray) – The cosine of angle between the wavevector and the line-of-sight direction.

  • par (str) – Name of the parameter with regards to which the derivative should be computed for

Returns:

Derivative of the observed power spectrum with regard to the passed parameter

Return type:

float, numpy.ndarray

dlnpobs_dnuisp(zi, k, mu, par)[source]#

This is a deprecated function! It was used to compute the compute the derivatives of the power spectrum with respect to nuisance parameters in the cosmicjellyfish.LSSsurvey.spectro_cov.SpectroDerivs . Use now the common derivative engine at cosmicjellyfish.fishermatrix.derivatives.derivatives

Parameters:
  • zi (float, numpy.ndarray) – The redshifts values of interest.

  • k (float) – The wavenumber for which the power spectrum should be computed

  • mu (float, numpy.ndarray) – The cosine of angle between the wavevector and the line-of-sight direction.

  • par (str) – Name of the parameter with regards to which the derivative should be computed for

Returns:

Derivative of the observed power spectrum with regard to the passed parameter

Return type:

float, numpy.ndarray