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- exact_derivs(par)[source]#
Compute the exact log derivative of the Power spectrum with respect to the shotnoise using chain rule
- 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 tozmid (
numpy.ndarray) – List of the centers for the redshift binzi (
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:
- 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:
- 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 computedmu (
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:
- 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 computedmu (
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:
- 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 computedmu (
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: