Theories

primordial cosmology

class desilike.theories.primordial_cosmology.BasePrimordialCosmology(*args, **kwargs)[source]

Bases: BaseCalculator

Base primordial cosmology computation.

class desilike.theories.primordial_cosmology.Cosmoprimo(*args, **kwargs)[source]

Bases: BasePrimordialCosmology

Primordial cosmology calculation, based on cosmoprimo.

Parameters:
  • fiducial (str, tuple, dict, cosmoprimo.Cosmology) – Specifications for fiducial cosmology, which is used to fill in parameter values Parameter.value if provided. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

  • **kwargs (dict) – Optionally, dictionary of parameters to update fiducial with.

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

galaxy clustering

Warning: not tested!

class desilike.theories.galaxy_clustering.bao.BaseBAOWigglesCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTheoryCorrelationFunctionFromPowerSpectrumMultipoles

Base class that implements theory BAO correlation function multipoles, without broadband terms, as Hankel transforms of the theory power spectrum multipoles.

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.bao.BaseBAOWigglesPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTheoryPowerSpectrumMultipoles

Base class for theory BAO power spectrum multipoles, without broadband terms.

class desilike.theories.galaxy_clustering.bao.BaseBAOWigglesTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTheoryCorrelationFunctionFromPowerSpectrumMultipoles

Base class that implements theory BAO correlation function multipoles, with broadband terms.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • broadband (str, default=’power’) – Broadband parameterization: ‘power’ for powers of \(s\), ‘even-power’ for powers of \(s^{2}\) (motivated theoretically by Stephen Chen), ‘ngp’, ‘cic’, ‘tsc’ or ‘pcs’ for the sum of corresponding kernels in Fourier space.

  • sp (float, default=None) – The pivot \(s\). Defaults to \(2 \pi / 0.02\).

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

plot(fig=None)[source]

Plot correlation function multipoles.

Parameters:
  • fig (matplotlib.figure.Figure, default=None) – Optionally, a figure with at least 1 axis.

  • fn (str, Path, default=None) – Optionally, path where to save figure. If not provided, figure is not saved.

  • kw_save (dict, default=None) – Optionally, arguments for matplotlib.figure.Figure.savefig().

  • show (bool, default=False) – If True, show figure.

class desilike.theories.galaxy_clustering.bao.BaseBAOWigglesTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTheoryPowerSpectrumMultipoles

Base class for theory BAO power spectrum multipoles, with broadband terms.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • broadband (str, default=’power’) – Broadband parameterization: ‘power’ for powers of \(k\), ‘ngp’, ‘cic’, ‘tsc’ or ‘pcs’ for the sum of corresponding kernels.

  • kp (float, default=None) – For ‘power’ kernel, the pivot \(k\). For other kernels, their \(k\)-period. Defaults to \(2 \pi / r_{d}\).

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

plot(fig=None)[source]

Plot power spectrum multipoles.

Parameters:
  • fig (matplotlib.figure.Figure, default=None) – Optionally, a figure with at least 1 axis.

  • fn (str, Path, default=None) – Optionally, path where to save figure. If not provided, figure is not saved.

  • kw_save (dict, default=None) – Optionally, arguments for matplotlib.figure.Figure.savefig().

  • show (bool, default=False) – If True, show figure.

Returns:

fig

Return type:

matplotlib.figure.Figure

class desilike.theories.galaxy_clustering.bao.DampedBAOWigglesCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesCorrelationFunctionMultipoles

class desilike.theories.galaxy_clustering.bao.DampedBAOWigglesPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesPowerSpectrumMultipoles, BaseTheoryPowerSpectrumMultipolesFromWedges

Theory BAO power spectrum multipoles, without broadband terms, used in the BOSS DR12 BAO analysis by Beutler et al. 2017. Supports pre-, reciso, recsym, real (f = 0) and redshift-space reconstruction.

Reference

https://arxiv.org/abs/1607.03149

class desilike.theories.galaxy_clustering.bao.DampedBAOWigglesTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesTracerCorrelationFunctionMultipoles

Theory BAO correlation function multipoles, with broadband terms. Supports pre-, reciso, recsym, real (f = 0) and redshift-space reconstruction.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • model (str, default=’standard’) – ‘fog-damping’ to apply Finger-of-God to the wiggle part (in addition to the no-wiggle part). ‘move-all’ to move the no-wiggle part (in addition to the wiggle part) with scaling parameters. ‘fog-damping_move-all’ to use the model of https://arxiv.org/abs/1607.03149.

  • broadband (str, default=’power’) – Broadband parameterization: ‘power’ for powers of \(s\), ‘ngp’, ‘cic’, ‘tsc’ or ‘pcs’ for the sum of corresponding kernels in Fourier space.

  • sp (float, default=None) – The pivot \(s\). Defaults to \(2 \pi / 0.02\).

Reference

https://arxiv.org/abs/1607.03149

class desilike.theories.galaxy_clustering.bao.DampedBAOWigglesTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesTracerPowerSpectrumMultipoles

Theory BAO power spectrum multipoles, with broadband terms, used in the BOSS DR12 BAO analysis by Beutler et al. 2017. Supports pre-, reciso, recsym, real (f = 0) and redshift-space reconstruction.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • model (str, default=’standard’) – ‘fog-damping’ to apply Finger-of-God to the wiggle part (in addition to the no-wiggle part). ‘move-all’ to move the no-wiggle part (in addition to the wiggle part) with scaling parameters. ‘fog-damping_move-all’ to use the model of https://arxiv.org/abs/1607.03149.

  • broadband (str, default=’power’) – Broadband parameterization: ‘power’ for powers of \(k\), ‘ngp’, ‘cic’, ‘tsc’ or ‘pcs’ for the sum of corresponding kernels.

  • kp (float, default=None) – For ‘power’ kernel, the pivot \(k\). For other kernels, their \(k\)-period. Defaults to \(2 \pi / r_{d}\).

  • Reference

  • ———

  • https (//arxiv.org/abs/1607.03149)

class desilike.theories.galaxy_clustering.bao.FlexibleBAOWigglesPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesPowerSpectrumMultipoles, BaseTheoryPowerSpectrumMultipolesFromWedges

Theory BAO power spectrum multipoles with terms multiplying the wiggles; no damping parameter (BAO damping or Finger-of-God). Supports pre-, reciso, recsym, real (f = 0) and redshift-space reconstruction.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • wiggles (str, default=’pcs’) – Multiplicative wiggles kernels, one of [‘cic’, ‘tsc’, ‘pcs’, ‘power’]. ‘power’ corresponds to \(k^{n}\) wiggles terms.

  • kp (float, default=None) – For ‘power’ kernel, the pivot \(k\). For other kernels, their \(k\)-period. Defaults to \(2 \pi / r_{d}\).

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

plot(fig=None)[source]

Plot power spectrum multipoles.

Parameters:
  • fig (matplotlib.figure.Figure, default=None) – Optionally, a figure with at least 1 axis.

  • fn (str, Path, default=None) – Optionally, path where to save figure. If not provided, figure is not saved.

  • kw_save (dict, default=None) – Optionally, arguments for matplotlib.figure.Figure.savefig().

  • show (bool, default=False) – If True, show figure.

Returns:

fig

Return type:

matplotlib.figure.Figure

class desilike.theories.galaxy_clustering.bao.FlexibleBAOWigglesTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesTracerCorrelationFunctionMultipoles

Theory BAO correlation function multipoles, with broadband terms, with flexible BAO wiggles. Supports pre-, reciso, recsym, real (f = 0) and redshift-space reconstruction.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • model (str, default=’standard’) – ‘move-all’ to move the no-wiggle part (in addition to the wiggle part) with scaling parameters.

  • wiggles (str, default=’pcs’) – Multiplicative wiggles kernels, one of [‘cic’, ‘tsc’, ‘pcs’, ‘power’]. ‘power’ corresponds to \(k^{n}\) wiggles terms.

  • kp (float, default=None) – For ‘power’ kernel, the pivot \(k\). For other kernels, their \(k\)-period. Defaults to \(2 \pi / r_{d}\).

  • broadband (str, default=’power’) – Broadband parameterization: ‘power’ for powers of \(s\), ‘ngp’, ‘cic’, ‘tsc’ or ‘pcs’ for the sum of corresponding kernels in Fourier space.

  • sp (float, default=None) – The pivot \(s\). Defaults to \(2 \pi / 0.02\).

class desilike.theories.galaxy_clustering.bao.FlexibleBAOWigglesTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesTracerPowerSpectrumMultipoles

Theory BAO power spectrum multipoles, with broadband terms, with flexible BAO wiggles. Supports pre-, reciso, recsym, real (f = 0) and redshift-space reconstruction.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • model (str, default=’standard’) – ‘move-all’ to move the no-wiggle part (in addition to the wiggle part) with scaling parameters.

  • wiggles (str, default=’pcs’) – Multiplicative wiggles kernels, one of [‘cic’, ‘tsc’, ‘pcs’, ‘power’]. ‘power’ corresponds to \(k^{n}\) wiggles terms.

  • broadband (str, default=’power’) – Broadband parameterization: ‘power’ for powers of \(k\), ‘ngp’, ‘cic’, ‘tsc’ or ‘pcs’ for the sum of corresponding kernels.

  • kp (float, default=None) – For ‘power’ kernel, the pivot \(k\). For other kernels, their \(k\)-period. Defaults to \(2 \pi / r_{d}\).

class desilike.theories.galaxy_clustering.bao.ResummedBAOWigglesCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesCorrelationFunctionMultipoles

class desilike.theories.galaxy_clustering.bao.ResummedBAOWigglesPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesPowerSpectrumMultipoles, BaseTheoryPowerSpectrumMultipolesFromWedges

Theory BAO power spectrum multipoles, without broadband terms, with resummation of BAO wiggles. Supports pre-, reciso, recsym, real (f = 0) and redshift-space reconstruction.

Reference

https://arxiv.org/abs/1907.00043

class desilike.theories.galaxy_clustering.bao.ResummedBAOWigglesTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesTracerCorrelationFunctionMultipoles

Theory BAO correlation function multipoles, with broadband terms, with resummation of BAO wiggles. Supports pre-, reciso, recsym, real (f = 0) and redshift-space reconstruction.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • model (str, default=’standard’) – ‘fog-damping’ to apply Finger-of-God to the wiggle part (in addition to the no-wiggle part). ‘move-all’ to move the no-wiggle part (in addition to the wiggle part) with scaling parameters.

  • broadband (str, default=’power’) – Broadband parameterization: ‘power’ for powers of \(s\), ‘ngp’, ‘cic’, ‘tsc’ or ‘pcs’ for the sum of corresponding kernels in Fourier space.

  • sp (float, default=None) – The pivot \(s\). Defaults to \(2 \pi / 0.02\).

Reference

https://arxiv.org/abs/1907.00043

class desilike.theories.galaxy_clustering.bao.ResummedBAOWigglesTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesTracerPowerSpectrumMultipoles

Theory BAO power spectrum multipoles, with broadband terms, with resummation of BAO wiggles. Supports pre-, reciso, recsym, real (f = 0) and redshift-space reconstruction.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • model (str, default=’standard’) – ‘fog-damping’ to apply Finger-of-God to the wiggle part (in addition to the no-wiggle part). ‘move-all’ to move the no-wiggle part (in addition to the wiggle part) with scaling parameters.

  • broadband (str, default=’power’) – Broadband parameterization: ‘power’ for powers of \(k\), ‘ngp’, ‘cic’, ‘tsc’ or ‘pcs’ for the sum of corresponding kernels.

  • kp (float, default=None) – For ‘power’ kernel, the pivot \(k\). For other kernels, their \(k\)-period. Defaults to \(2 \pi / r_{d}\).

  • Reference

  • ———

  • https (//arxiv.org/abs/1907.00043)

class desilike.theories.galaxy_clustering.bao.ResummedPowerSpectrumWiggles(*args, **kwargs)[source]

Bases: BaseCalculator

Resummed BAO wiggles. Supports pre-, reciso, recsym, real (f = 0) and redshift-space reconstruction.

Reference

https://arxiv.org/abs/1907.00043

class desilike.theories.galaxy_clustering.bao.SimpleBAOWigglesCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesCorrelationFunctionMultipoles

class desilike.theories.galaxy_clustering.bao.SimpleBAOWigglesPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: DampedBAOWigglesPowerSpectrumMultipoles

As DampedBAOWigglesPowerSpectrumMultipoles, but moving only BAO wiggles (and not damping, fog, or RSD terms) with scaling parameters.

class desilike.theories.galaxy_clustering.bao.SimpleBAOWigglesTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesTracerCorrelationFunctionMultipoles

As DampedBAOWigglesTracerCorrelationFunctionMultipoles, but moving only BAO wiggles (and not damping or RSD terms) with scaling parameters; essentially used for Fisher forecasts.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • broadband (str, default=’power’) – Broadband parameterization: ‘power’ for powers of \(s\), ‘ngp’, ‘cic’, ‘tsc’ or ‘pcs’ for the sum of corresponding kernels in Fourier space.

  • sp (float, default=None) – The pivot \(s\). Defaults to \(2 \pi / 0.02\).

Reference

https://arxiv.org/abs/1607.03149

class desilike.theories.galaxy_clustering.bao.SimpleBAOWigglesTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseBAOWigglesTracerPowerSpectrumMultipoles

As DampedBAOWigglesTracerPowerSpectrumMultipoles, but moving only BAO wiggles (and not damping or RSD terms) with scaling parameters; essentially used for Fisher forecasts.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=20) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • mode (str, default=’’) – Reconstruction mode:

    • ‘’: no reconstruction

    • ‘recsym’: recsym reconstruction (both data and randoms are shifted with RSD displacements)

    • ‘reciso’: reciso reconstruction (data only is shifted with RSD displacements)

  • smoothing_radius (float, default=15) – Smoothing radius used in reconstruction.

  • template (BasePowerSpectrumTemplate, default=None) – Power spectrum template. If None, defaults to BAOPowerSpectrumTemplate.

  • broadband (str, default=’power’) – Broadband parameterization: ‘power’ for powers of \(k\), ‘ngp’, ‘cic’, ‘tsc’ or ‘pcs’ for the sum of corresponding kernels.

  • kp (float, default=None) – For ‘power’ kernel, the pivot \(k\). For other kernels, their \(k\)-period. Defaults to \(2 \pi / r_{d}\).

class desilike.theories.galaxy_clustering.full_shape.BaseEFTLikeTracerPowerSpectrumMultipoles[source]

Bases: object

Base class for tracer power spectrum multipoles with EFT-like counter and stochastic terms. Can be exactly marginalized over counter terms and stochastic parameters ct*, sn*.

class desilike.theories.galaxy_clustering.full_shape.BasePTCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTheoryCorrelationFunctionMultipoles

class desilike.theories.galaxy_clustering.full_shape.BasePTPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTheoryPowerSpectrumMultipoles

Base class for perturbation theory matter power spectrum multipoles.

class desilike.theories.galaxy_clustering.full_shape.BaseTracerCorrelationFunctionFromPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTheoryCorrelationFunctionFromPowerSpectrumMultipoles, BaseTracerTwoPointTheory

Base class for perturbation theory tracer correlation function multipoles as Hankel transforms of the power spectrum multipoles.

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.full_shape.BaseTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerTwoPointTheory

Base class for perturbation theory tracer correlation function multipoles.

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

plot(fig=None)[source]

Plot correlation function multipoles.

Parameters:
  • fig (matplotlib.figure.Figure, default=None) – Optionally, a figure with at least 1 axis.

  • fn (str, Path, default=None) – Optionally, path where to save figure. If not provided, figure is not saved.

  • kw_save (dict, default=None) – Optionally, arguments for matplotlib.figure.Figure.savefig().

  • show (bool, default=False) – If True, show figure.

class desilike.theories.galaxy_clustering.full_shape.BaseTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTracerTwoPointTheory

Base class for perturbation theory tracer power spectrum multipoles.

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

plot(fig=None)[source]

Plot power spectrum multipoles.

Parameters:
  • fig (matplotlib.figure.Figure, default=None) – Optionally, a figure with at least 1 axis.

  • fn (str, Path, default=None) – Optionally, path where to save figure. If not provided, figure is not saved.

  • kw_save (dict, default=None) – Optionally, arguments for matplotlib.figure.Figure.savefig().

  • show (bool, default=False) – If True, show figure.

Returns:

fig

Return type:

matplotlib.figure.Figure

class desilike.theories.galaxy_clustering.full_shape.BaseTracerTheory(*args, **kwargs)[source]

Bases: BaseCalculator

class desilike.theories.galaxy_clustering.full_shape.BaseTracerThreePointTheory(*args, **kwargs)[source]

Bases: BaseTracerTheory

class desilike.theories.galaxy_clustering.full_shape.BaseTracerTwoPointTheory(*args, **kwargs)[source]

Bases: BaseTracerTheory

class desilike.theories.galaxy_clustering.full_shape.BaseVelocileptorsCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BasePTCorrelationFunctionMultipoles

Base class for velocileptors-based matter correlation function multipoles.

class desilike.theories.galaxy_clustering.full_shape.BaseVelocileptorsPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BasePTPowerSpectrumMultipoles, BaseTheoryPowerSpectrumMultipolesFromWedges

Base class for velocileptors-based matter power spectrum multipoles.

class desilike.theories.galaxy_clustering.full_shape.BaseVelocileptorsTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerCorrelationFunctionMultipoles

Base class for velocileptors-based tracer correlation function multipoles.

class desilike.theories.galaxy_clustering.full_shape.BaseVelocileptorsTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTracerPowerSpectrumMultipoles

Base class for velocileptors-based tracer power spectrum multipoles.

class desilike.theories.galaxy_clustering.full_shape.EFTLikeKaiserTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerCorrelationFunctionFromPowerSpectrumMultipoles

EFT-like Kaiser tracer correlation function multipoles. Can be exactly marginalized over counter terms and stochastic parameters ct*, sn*.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • **kwargs (dict) – Options, defaults to: mu=8.

class desilike.theories.galaxy_clustering.full_shape.EFTLikeKaiserTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseEFTLikeTracerPowerSpectrumMultipoles, KaiserTracerPowerSpectrumMultipoles

Kaiser tracer power spectrum multipoles with EFT-like counter and stochastic terms. Can be exactly marginalized over counter terms and stochastic parameters ct*, sn*.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • mu (int, default=8) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • shotnoise (float, default=1e4) – Shot noise (which is usually marginalized over).

class desilike.theories.galaxy_clustering.full_shape.EFTLikeTNSTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerCorrelationFunctionFromPowerSpectrumMultipoles

TNS tracer correlation function multipoles with EFT-like counter and stochastic terms. Can be exactly marginalized over counter terms and stochastic parameters ct*, sn*. For the matter (unbiased) correlation function, set b1=1 and all other bias parameters to 0.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • **kwargs (dict) – Options, defaults to: mu=8.

class desilike.theories.galaxy_clustering.full_shape.EFTLikeTNSTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseEFTLikeTracerPowerSpectrumMultipoles, TNSTracerPowerSpectrumMultipoles

TNS tracer power spectrum multipoles with EFT-like counter and stochastic terms. Can be exactly marginalized over counter terms and stochastic parameters ct*, sn*. For the matter (unbiased) power spectrum, set b1=1 and all other bias parameters to 0.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • mu (int, default=8) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • shotnoise (float, default=1e4) – Shot noise (which is usually marginalized over).

class desilike.theories.galaxy_clustering.full_shape.FOLPSAXPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BasePTPowerSpectrumMultipoles, BaseTheoryPowerSpectrumMultipolesFromWedges

class desilike.theories.galaxy_clustering.full_shape.FOLPSAXTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerCorrelationFunctionFromPowerSpectrumMultipoles

FOLPS tracer correlation function multipoles. Can be exactly marginalized over counter terms and stochastic parameters alpha*, sn* and bias term b3*. By default, bs and b3 are fixed to 0, following co-evolution. For the matter (unbiased) correlation function, set b1=1 and all other bias parameters to 0.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • prior_basis (str, default=’physical’) – If ‘physical’, use physically-motivated prior basis for bias parameters, counterterms and stochastic terms: \(b_{1}^\prime = (1 + b_{1}^{L}) \sigma_{8}(z), b_{2}^\prime = b_{2}^{L} \sigma_{8}(z)^2, b_{s}^\prime = b_{s}^{L} \sigma_{8}(z)^2, b_{3}^\prime = 0\) with: \(b_{1} = 1 + b_{1}^{L}, b_{2} = 8/21 b_{1}^{L} + b_{2}^{L}, b_{s} = -4/7 b_{1}^{L} + b_{s}^{L}\). \(\alpha_{0} = (1 + b_{1}^{L})^{2} \alpha_{0}^\prime, \alpha_{2} = f (1 + b_{1}^{L}) (\alpha_{0}^\prime + \alpha_{2}^\prime), \alpha_{4} = f (f \alpha_{2}^\prime + (1 + b_{1}^{L}) \alpha_{4}^\prime)\).

Reference

class desilike.theories.galaxy_clustering.full_shape.FOLPSAXTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: FOLPSTracerPowerSpectrumMultipoles

FOLPS tracer power spectrum multipoles. Can be exactly marginalized over counter terms and stochastic parameters alpha*, sn* and bias term b3*. By default, bs and b3 are fixed to 0, following co-evolution. For the matter (unbiased) power spectrum, set b1=1 and all other bias parameters to 0.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • shotnoise (float, default=1e4) – Shot noise (which is usually marginalized over).

  • prior_basis (str, default=’physical’) – If ‘physical’, use physically-motivated prior basis for bias parameters, counterterms and stochastic terms: \(b_{1}^\prime = (1 + b_{1}^{L}) \sigma_{8}(z), b_{2}^\prime = b_{2}^{L} \sigma_{8}(z)^2, b_{s}^\prime = b_{s}^{L} \sigma_{8}(z)^2, b_{3}^\prime = 0\) with: \(b_{1} = 1 + b_{1}^{L}, b_{2} = 8/21 b_{1}^{L} + b_{2}^{L}, b_{s} = -4/7 b_{1}^{L} + b_{s}^{L}\). \(\alpha_{0} = (1 + b_{1}^{L})^{2} \alpha_{0}^\prime, \alpha_{2} = f (1 + b_{1}^{L}) (\alpha_{0}^\prime + \alpha_{2}^\prime), \alpha_{4} = f (f \alpha_{2}^\prime + (1 + b_{1}^{L}) \alpha_{4}^\prime)\). \(s_{n, 0} = f_{\mathrm{sat}}/\bar{n} s_{n, 0}^\prime, s_{n, 2} = f_{\mathrm{sat}}/\bar{n} \sigma_{v}^{2} s_{n, 2}^\prime, s_{n, 4} = f_{\mathrm{sat}}/\bar{n} \sigma_{v}^{4} s_{n, 4}^\prime\).

  • tracer (str, default=None) – If prior_basis = 'physical', tracer to load preset fsat and sigv. One of [‘LRG’, ‘ELG’, ‘QSO’].

  • fsat (float, default=None) – If prior_basis = 'physical', satellite fraction to assume.

  • sigv (float, default=None) – If prior_basis = 'physical', velocity dispersion to assume.

Reference

class desilike.theories.galaxy_clustering.full_shape.FOLPSPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BasePTPowerSpectrumMultipoles, BaseTheoryPowerSpectrumMultipolesFromWedges

class desilike.theories.galaxy_clustering.full_shape.FOLPSTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerCorrelationFunctionFromPowerSpectrumMultipoles

FOLPS tracer correlation function multipoles. Can be exactly marginalized over counter terms and stochastic parameters alpha*, sn* and bias term b3*. By default, bs and b3 are fixed to 0, following co-evolution. For the matter (unbiased) correlation function, set b1=1 and all other bias parameters to 0.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • prior_basis (str, default=’physical’) – \(b_{1}^\prime = (1 + b_{1}^{L}) \sigma_{8}(z), b_{2}^\prime = b_{2}^{L} \sigma_{8}(z)^2, b_{s}^\prime = b_{s}^{L} \sigma_{8}(z)^2, b_{3}^\prime = 0\) with: \(b_{1} = 1 + b_{1}^{L}, b_{2} = 8/21 b_{1}^{L} + b_{2}^{L}, b_{s} = -4/7 b_{1}^{L} + b_{s}^{L}\). \(\alpha_{0} = (1 + b_{1}^{L})^{2} \alpha_{0}^\prime, \alpha_{2} = f (1 + b_{1}^{L}) (\alpha_{0}^\prime + \alpha_{2}^\prime), \alpha_{4} = f (f \alpha_{2}^\prime + (1 + b_{1}^{L}) \alpha_{4}^\prime)\).

  • Reference

  • ———

  • - https (//arxiv.org/abs/2208.02791)

  • - https (//github.com/cosmodesi/folpsax)

class desilike.theories.galaxy_clustering.full_shape.FOLPSTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTracerPowerSpectrumMultipoles

FOLPS tracer power spectrum multipoles. Can be exactly marginalized over counter terms and stochastic parameters alpha*, sn* and bias term b3*. By default, bs and b3 are fixed to 0, following co-evolution. For the matter (unbiased) power spectrum, set b1=1 and all other bias parameters to 0.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • shotnoise (float, default=1e4) – Shot noise (which is usually marginalized over).

  • prior_basis (str, default=’physical’) – If ‘physical’, use physically-motivated prior basis for bias parameters, counterterms and stochastic terms: \(b_{1}^\prime = (1 + b_{1}^{L}) \sigma_{8}(z), b_{2}^\prime = b_{2}^{L} \sigma_{8}(z)^2, b_{s}^\prime = b_{s}^{L} \sigma_{8}(z)^2, b_{3}^\prime = 0\) with: \(b_{1} = 1 + b_{1}^{L}, b_{2} = 8/21 b_{1}^{L} + b_{2}^{L}, b_{s} = -4/7 b_{1}^{L} + b_{s}^{L}\). \(\alpha_{0} = (1 + b_{1}^{L})^{2} \alpha_{0}^\prime, \alpha_{2} = f (1 + b_{1}^{L}) (\alpha_{0}^\prime + \alpha_{2}^\prime), \alpha_{4} = f (f \alpha_{2}^\prime + (1 + b_{1}^{L}) \alpha_{4}^\prime)\). \(s_{n, 0} = f_{\mathrm{sat}}/\bar{n} s_{n, 0}^\prime, s_{n, 2} = f_{\mathrm{sat}}/\bar{n} \sigma_{v}^{2} s_{n, 2}^\prime, s_{n, 4} = f_{\mathrm{sat}}/\bar{n} \sigma_{v}^{4} s_{n, 4}^\prime\).

  • tracer (str, default=None) – If prior_basis = 'physical', tracer to load preset fsat and sigv. One of [‘LRG’, ‘ELG’, ‘QSO’].

  • fsat (float, default=None) – If prior_basis = 'physical', satellite fraction to assume.

  • sigv (float, default=None) – If prior_basis = 'physical', velocity dispersion to assume.

  • Reference

  • ———

  • - https (//arxiv.org/abs/2208.02791)

  • - https (//github.com/henoriega/FOLPS-nu)

class desilike.theories.galaxy_clustering.full_shape.GeoFPTAXTracerBispectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTracerThreePointTheory

GeoFPTAX bispectrum multipoles. Can be exactly marginalized over stochastic parameters sn*. For the matter (unbiased) power spectrum, set b1=1 and all other bias parameters to 0.

Parameters:
  • k (tuple of arrays, default=None) – Triangles of wavenumbers of shape (nk, 3) where to evaluate multipoles.

  • ells (tuple, default=((0, 0, 0), (2, 0, 0), (0, 2, 0), (0, 0, 2))) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • pt (str, default=None) – Order of \(P(k)\) fed into the bispectrum calculation. If None, linear \(P(k)\). If ‘1loop’, use 1-loop standard PT.

  • shotnoise (array, default=1e4) – Shot noise for each of the multipoles. Same length as k.

  • prior_basis (str, default=’physical’) – If ‘physical’, use physically-motivated prior basis for bias parameters: :math:`b_{1}^prime = (b_{1}^{E}) sigma_{8}(z), b_{2}^prime = b_{2}^{E} sigma_{8}(z)^2

  • Reference

  • ———

  • - https (//arxiv.org/pdf/2303.15510v1)

  • - https (//github.com/dforero0896/geofptax)

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.full_shape.JAXEffortTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTheoryPowerSpectrumMultipoles

Wrapper to JAXEffort emulator. Can be exactly marginalized over counter terms and stochastic parameters alpha*, sn* and bias term b3*. By default, bs and b3 are fixed to 0, following co-evolution. For the matter (unbiased) power spectrum, set b1=1 and all other bias parameters to 0.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • shotnoise (float, default=1e4) – Shot noise (which is usually marginalized over).

  • prior_basis (str, default=’physical’) – If ‘physical’, use physically-motivated prior basis for bias parameters, counterterms and stochastic terms: \(b_{1}^\prime = (1 + b_{1}^{L}) \sigma_{8}(z), b_{2}^\prime = b_{2}^{L} \sigma_{8}(z)^2, b_{s}^\prime = b_{s}^{L} \sigma_{8}(z)^2, b_{3}^\prime = 0\) with: \(b_{1} = 1 + b_{1}^{L}, b_{2} = 8/21 b_{1}^{L} + b_{2}^{L}, b_{s} = -4/7 b_{1}^{L} + b_{s}^{L}\). \(\alpha_{0} = (1 + b_{1}^{L})^{2} \alpha_{0}^\prime, \alpha_{2} = f (1 + b_{1}^{L}) (\alpha_{0}^\prime + \alpha_{2}^\prime), \alpha_{4} = f (f \alpha_{2}^\prime + (1 + b_{1}^{L}) \alpha_{4}^\prime)\). \(s_{n, 0} = f_{\mathrm{sat}}/\bar{n} s_{n, 0}^\prime, s_{n, 2} = f_{\mathrm{sat}}/\bar{n} \sigma_{v}^{2} s_{n, 2}^\prime, s_{n, 4} = f_{\mathrm{sat}}/\bar{n} \sigma_{v}^{4} s_{n, 4}^\prime\).

  • tracer (str, default=None) – If prior_basis = 'physical', tracer to load preset fsat and sigv. One of [‘LRG’, ‘ELG’, ‘QSO’].

  • fsat (float, default=None) – If prior_basis = 'physical', satellite fraction to assume.

  • sigv (float, default=None) – If prior_basis = 'physical', velocity dispersion to assume.

Reference

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.full_shape.KaiserPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BasePTPowerSpectrumMultipoles, BaseTheoryPowerSpectrumMultipolesFromWedges

Kaiser power spectrum multipoles.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • mu (int, default=8) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

class desilike.theories.galaxy_clustering.full_shape.KaiserTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerCorrelationFunctionFromPowerSpectrumMultipoles

Kaiser tracer correlation function multipoles. For the matter (unbiased) correlation function, set b1=1 and sn0=0.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • **kwargs (dict) – Options, defaults to: mu=8.

class desilike.theories.galaxy_clustering.full_shape.KaiserTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTracerPowerSpectrumMultipoles

Kaiser tracer power spectrum multipoles. For the matter (unbiased) power spectrum, set b1=1 and sn0=0.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • mu (int, default=8) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

class desilike.theories.galaxy_clustering.full_shape.LPTVelocileptorsPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseVelocileptorsPowerSpectrumMultipoles

class desilike.theories.galaxy_clustering.full_shape.LPTVelocileptorsTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerCorrelationFunctionFromPowerSpectrumMultipoles

Velocileptors LPT tracer correlation function multipoles. Can be exactly marginalized over counter terms and stochastic parameters alpha*, sn*. For the matter (unbiased) correlation function, set all bias parameters to 0.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • prior_basis (str, default=’physical’) – If ‘physical’, use physically-motivated prior basis for bias parameters, counterterms and stochastic terms: \(b_{1}^\prime = (1 + b_{1}) \sigma_{8}(z), b_{2}^\prime = b_{2} \sigma_{8}(z)^2, b_{s}^\prime = b_{s} \sigma_{8}(z)^2, b_{3}^\prime = b_{3} \sigma_{8}(z)^3\) \(\alpha_{0} = (1 + b_{1})^{2} \alpha_{0}^\prime, \alpha_{2} = f (1 + b_{1}) (\alpha_{0}^\prime + \alpha_{2}^\prime), \alpha_{4} = f (f \alpha_{2}^\prime + (1 + b_{1}) \alpha_{4}^\prime), \alpha_{6} = f^{2} \alpha_{4}^\prime\).

  • **kwargs (dict) – Velocileptors options, defaults to: use_Pzel=False, kIR=0.2, cutoff=10, extrap_min=-5, extrap_max=3, N=4000, nthreads=1, jn=5.

Reference

class desilike.theories.galaxy_clustering.full_shape.LPTVelocileptorsTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseVelocileptorsTracerPowerSpectrumMultipoles

Velocileptors Lagrangian perturbation theory (LPT) tracer power spectrum multipoles. Can be exactly marginalized over counter terms and stochastic parameters alpha*, sn*. For the matter (unbiased) power spectrum, set all bias parameters to 0.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • prior_basis (str, default=’physical’) – If ‘physical’, use physically-motivated prior basis for bias parameters, counterterms and stochastic terms: \(b_{1}^\prime = (1 + b_{1}) \sigma_{8}(z), b_{2}^\prime = b_{2} \sigma_{8}(z)^2, b_{s}^\prime = b_{s} \sigma_{8}(z)^2, b_{3}^\prime = b_{3} \sigma_{8}(z)^3\) \(\alpha_{0} = (1 + b_{1})^{2} \alpha_{0}^\prime, \alpha_{2} = f (1 + b_{1}) (\alpha_{0}^\prime + \alpha_{2}^\prime), \alpha_{4} = f (f \alpha_{2}^\prime + (1 + b_{1}) \alpha_{4}^\prime), \alpha_{6} = f^{2} \alpha_{4}^\prime\). \(s_{n, 0} = f_{\mathrm{sat}}/\bar{n} s_{n, 0}^\prime, s_{n, 2} = f_{\mathrm{sat}}/\bar{n} \sigma_{v}^{2} s_{n, 2}^\prime, s_{n, 4} = f_{\mathrm{sat}}/\bar{n} \sigma_{v}^{4} s_{n, 4}^\prime\). In this case, use_Pzel = False.

  • tracer (str, default=None) – If prior_basis = 'physical', tracer to load preset fsat and sigv. One of [‘LRG’, ‘ELG’, ‘QSO’].

  • fsat (float, default=None) – If prior_basis = 'physical', satellite fraction to assume.

  • sigv (float, default=None) – If prior_basis = 'physical', velocity dispersion to assume.

  • shotnoise (float, default=1e4) – Shot noise, to scale stochastic terms.

  • **kwargs (dict) – Velocileptors options, defaults to: use_Pzel=False, kIR=0.2, cutoff=10, extrap_min=-5, extrap_max=3, N=4000, nthreads=1, jn=5.

Reference

class desilike.theories.galaxy_clustering.full_shape.PyBirdCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BasePTCorrelationFunctionMultipoles

class desilike.theories.galaxy_clustering.full_shape.PyBirdPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BasePTPowerSpectrumMultipoles

class desilike.theories.galaxy_clustering.full_shape.PyBirdTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerCorrelationFunctionMultipoles

Pybird tracer correlation function multipoles. Can be exactly marginalized over counter terms and stochastic parameters c* and bias term b3*. For the matter (unbiased) correlation function, set b1=1, b2=1, b3=1 (eft_basis=’eftoflss’) and all other bias parameters to 0.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • **kwargs (dict) – Pybird options, defaults to: with_nnlo_higher_derivative=False, with_nnlo_counterterm=False, with_stoch=False, with_resum='full'.

class desilike.theories.galaxy_clustering.full_shape.PyBirdTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTracerPowerSpectrumMultipoles

Pybird tracer power spectrum multipoles. Can be exactly marginalized over counter terms and stochastic parameters c* and bias term b3*. For the matter (unbiased) power spectrum, set b1=1, b2=1, b3=1 (eft_basis=’eftoflss’) and all other bias parameters to 0.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • shotnoise (float, default=1e4) – Shot noise (which is usually marginalized over).

  • **kwargs (dict) – Pybird options, defaults to: with_nnlo_higher_derivative=False, with_nnlo_counterterm=False, with_stoch=True, with_resum='full'.

Reference

class desilike.theories.galaxy_clustering.full_shape.REPTVelocileptorsPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseVelocileptorsPowerSpectrumMultipoles

class desilike.theories.galaxy_clustering.full_shape.REPTVelocileptorsTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerCorrelationFunctionFromPowerSpectrumMultipoles

Velocileptors REPT tracer correlation function multipoles. Can be exactly marginalized over counter terms and stochastic parameters alpha*, sn*. For the matter (unbiased) correlation function, set all bias parameters to 0.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • prior_basis (str, default=’physical’) – If ‘physical’, use physically-motivated prior basis for bias parameters, counterterms and stochastic terms: \(b_{1}^\prime = (1 + b_{1}^{L}) \sigma_{8}(z), b_{2}^\prime = b_{2}^{L} \sigma_{8}(z)^2, b_{s}^\prime = b_{s}^{L} \sigma_{8}(z)^2, b_{3}^\prime = 0\) with: \(b_{1} = 1 + b_{1}^{L}, b_{2} = 8/21 b_{1}^{L} + b_{2}^{L}, b_{s} = b_{s}^{L}, b_{3} = b_{3}^{L}\). \(\alpha_{0} = (1 + b_{1}^{L})^{2} \alpha_{0}^\prime, \alpha_{2} = f (1 + b_{1}^{L}) (\alpha_{0}^\prime + \alpha_{2}^\prime), \alpha_{4} = f (f \alpha_{2}^\prime + (1 + b_{1}^{L}) \alpha_{4}^\prime)\).

  • **kwargs (dict) – Velocileptors options, defaults to: rbao=110, sbao=None, beyond_gauss=True, one_loop=True, shear=True, cutoff=20, jn=5, N=4000, nthreads=None, extrap_min=-4, extrap_max=3.

Reference

class desilike.theories.galaxy_clustering.full_shape.REPTVelocileptorsTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseVelocileptorsTracerPowerSpectrumMultipoles

Velocileptors resummmed Eulerian perturbation theory (REPT) tracer power spectrum multipoles. Can be exactly marginalized over counter terms and stochastic parameters alpha*, sn*. For the matter (unbiased) power spectrum, set all bias parameters to 0.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • prior_basis (str, default=’physical’) – If ‘physical’, use physically-motivated prior basis for bias parameters, counterterms and stochastic terms: \(b_{1}^\prime = (1 + b_{1}^{L}) \sigma_{8}(z), b_{2}^\prime = b_{2}^{L} \sigma_{8}(z)^2, b_{s}^\prime = b_{s}^{L} \sigma_{8}(z)^2, b_{3}^\prime = 0\) with: \(b_{1} = 1 + b_{1}^{L}, b_{2} = 8/21 b_{1}^{L} + b_{2}^{L}, b_{s} = b_{s}^{L}, b_{3} = b_{3}^{L}\). \(\alpha_{0} = (1 + b_{1}^{L})^{2} \alpha_{0}^\prime, \alpha_{2} = f (1 + b_{1}^{L}) (\alpha_{0}^\prime + \alpha_{2}^\prime), \alpha_{4} = f (f \alpha_{2}^\prime + (1 + b_{1}^{L}) \alpha_{4}^\prime)\). \(s_{n, 0} = f_{\mathrm{sat}}/\bar{n} s_{n, 0}^\prime, s_{n, 2} = f_{\mathrm{sat}}/\bar{n} \sigma_{v}^{2} s_{n, 2}^\prime, s_{n, 4} = f_{\mathrm{sat}}/\bar{n} \sigma_{v}^{4} s_{n, 4}^\prime\).

  • tracer (str, default=None) – If prior_basis = 'physical', tracer to load preset fsat and sigv. One of [‘LRG’, ‘ELG’, ‘QSO’].

  • fsat (float, default=None) – If prior_basis = 'physical', satellite fraction to assume.

  • sigv (float, default=None) – If prior_basis = 'physical', velocity dispersion to assume.

  • shotnoise (float, default=1e4) – Shot noise, to scale stochastic terms.

  • **kwargs (dict) – Velocileptors options, defaults to: rbao=110, sbao=None, beyond_gauss=True, one_loop=True, shear=True, cutoff=20, jn=5, N=4000, nthreads=None, extrap_min=-4, extrap_max=3.

Reference

class desilike.theories.galaxy_clustering.full_shape.SimpleTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BasePTPowerSpectrumMultipoles, BaseTheoryPowerSpectrumMultipolesFromWedges, BaseTracerTwoPointTheory

Kaiser tracer power spectrum multipoles, with fixed damping, essentially used for Fisher forecasts. For the matter (unbiased) power spectrum, set b1=1 and sn0=0.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • mu (int, default=8) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to StandardPowerSpectrumTemplate.

  • shotnoise (float, default=1e4) – Shot noise (which is usually marginalized over).

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

plot(fig=None)[source]

Plot power spectrum multipoles.

Parameters:
  • fig (matplotlib.figure.Figure, default=None) – Optionally, a figure with at least 1 axis.

  • fn (str, Path, default=None) – Optionally, path where to save figure. If not provided, figure is not saved.

  • kw_save (dict, default=None) – Optionally, arguments for matplotlib.figure.Figure.savefig().

  • show (bool, default=False) – If True, show figure.

Returns:

fig

Return type:

matplotlib.figure.Figure

class desilike.theories.galaxy_clustering.full_shape.TNSPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BasePTPowerSpectrumMultipoles, BaseTheoryPowerSpectrumMultipolesFromWedges

TNS power spectrum multipoles.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • mu (int, default=8) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

class desilike.theories.galaxy_clustering.full_shape.TNSTracerCorrelationFunctionMultipoles(*args, **kwargs)[source]

Bases: BaseTracerCorrelationFunctionFromPowerSpectrumMultipoles

TNS tracer correlation function multipoles. For the matter (unbiased) correlation function, set b1=1 and all other bias parameters to 0.

Parameters:
  • s (array, default=None) – Theory separations where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • **kwargs (dict) – Options, defaults to: mu=8.

class desilike.theories.galaxy_clustering.full_shape.TNSTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTracerPowerSpectrumMultipoles

TNS tracer power spectrum multipoles. For the matter (unbiased) power spectrum, set b1=1 and all other bias parameters to 0.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2, 4)) – Multipoles to compute.

  • mu (int, default=8) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to DirectPowerSpectrumTemplate.

  • shotnoise (float, default=1e4) – Shot noise (which is usually marginalized over).

desilike.theories.galaxy_clustering.full_shape.f_over_f0_EH(z, k, Omega0_m, h, fnu, Nnu=3, Neff=3.044)[source]

Computes f(k)/f0, adapted from https://github.com/henoriega/FOLPS-nu, following H&E (1998).

Reference

https://arxiv.org/pdf/astro-ph/9710216

Parameters:
  • z (float) – Redshift.

  • k (array) – Wavenumber.

  • Omega0_m (float) – \(\Omega_\mathrm{b} + \Omega_\mathrm{c} + \Omega_\nu\) (dimensionless matter density parameter).

  • h (float) – \(H_0 / 100\).

  • fnu (float) – \(\Omega_\nu / \Omega_\mathrm{m}\).

  • Nnu (int, default=3) – Number of massive neutrinos.

  • Neff (int, default=3.044) – Effective number of relativistic species.

returns:

fk\(f(k) / f0\)

rtype:

array

class desilike.theories.galaxy_clustering.primordial_non_gaussianity.PNGTracerPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTheoryPowerSpectrumMultipolesFromWedges, BaseTracerTwoPointTheory

Kaiser tracer power spectrum multipoles, with scale dependent bias sourced by local primordial non-Gaussianities.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(0, 2)) – Multipoles to compute.

  • mu (int, default=200) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • method (str, default=’prim’) – Method to compute \(\alpha\), which relates primordial potential to current density contrast.

    • “prim”: \(\alpha\) is the square root of the primordial power spectrum to the current density power spectrum

    • else: \(\alpha\) is the transfer function, rescaled by the factor in the Poisson equation, and the growth rate, normalized to \(1 / (1 + z)\) at \(z = 10\) (in the matter dominated era).

  • mode (str, default=’b-p’) – fnl_loc is degenerate with PNG bias bphi.

    • “b-p”: bphi = 2 * 1.686 * (b1 - p), p as a parameter

    • “bphi”: bphi as a parameter

    • “bfnl_loc”: bfnl_loc = bphi * fnl_loc as a parameter

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to FixedPowerSpectrumTemplate.

  • shotnoise (float, default=1e4) – Shot noise (which is usually marginalized over).

  • Reference

  • ———

  • https (//arxiv.org/pdf/1904.08859.pdf)

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

plot(fig=None, scaling='loglog')[source]

Plot power spectrum multipoles.

Parameters:
  • fig (matplotlib.figure.Figure, default=None) – Optionally, a figure with at least 1 axis.

  • scaling (str, default=’loglog’) – Either ‘kpk’ or ‘loglog’.

  • fn (str, Path, default=None) – Optionally, path where to save figure. If not provided, figure is not saved.

  • kw_save (dict, default=None) – Optionally, arguments for matplotlib.figure.Figure.savefig().

  • show (bool, default=False) – If True, show figure.

Returns:

fig

Return type:

matplotlib.figure.Figure

class desilike.theories.galaxy_clustering.primordial_non_gaussianity.PNGTracerVelocityPowerSpectrumMultipoles(*args, **kwargs)[source]

Bases: BaseTheoryPowerSpectrumMultipolesFromWedges

Kaiser tracer-velocity power spectrum multipoles, with scale dependent bias sourced by local primordial non-Gaussianities.

Warning: We model infact -iP(k) in order to avoid any trouble if complex. Need to take the abs value of the power spectrum estimator.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate multipoles.

  • ells (tuple, default=(1, 3)) – Multipoles to compute.

  • mu (int, default=200) – Number of \(\mu\)-bins to use (in \([0, 1]\)).

  • method (str, default=’prim’) – Method to compute \(\alpha\), which relates primordial potential to current density contrast.

    • “prim”: \(\alpha\) is the square root of the primordial power spectrum to the current density power spectrum

    • else: \(\alpha\) is the transfer function, rescaled by the factor in the Poisson equation, and the growth rate, normalized to \(1 / (1 + z)\) at \(z = 10\) (in the matter dominated era).

  • mode (str, default=’b-p’) – fnl_loc is degenerate with PNG bias bphi.

    • “b-p”: bphi = 2 * 1.686 * (b1 - p), p as a parameter

    • “bphi”: bphi as a parameter

    • “bfnl_loc”: bfnl_loc = bphi * fnl_loc as a parameter

  • template (BasePowerSpectrumTemplate) – Power spectrum template. Defaults to FixedPowerSpectrumTemplate.

  • Reference

  • ———

  • To be added…

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

plot(fig=None, scaling='loglog', figsize=None)[source]

Plot power spectrum multipoles.

Parameters:
  • fig (matplotlib.figure.Figure, default=None) – Optionally, a figure with at least 1 axis.

  • scaling (str, default=’loglog’) – Either ‘kpk’ or ‘loglog’.

  • figsize ((width, height), default=None) – If not figure is passed, fix the size of the created figure.

  • fn (str, Path, default=None) – Optionally, path where to save figure. If not provided, figure is not saved.

  • kw_save (dict, default=None) – Optionally, arguments for matplotlib.figure.Figure.savefig().

  • show (bool, default=False) – If True, show figure.

Returns:

fig

Return type:

matplotlib.figure.Figure

class desilike.theories.galaxy_clustering.power_template.BAOExtractor(*args, **kwargs)[source]

Bases: BasePowerSpectrumExtractor

Extract BAO parameters from base cosmological parameters.

Parameters:
  • z (float, default=1.) – Effective redshift.

  • eta (float, default=1./3.) – Relation between ‘qpar’, ‘qper’ and ‘qiso’, ‘qap’ parameters: qiso = qpar ** eta * qper ** (1 - eta).

  • cosmo (BasePrimordialCosmology, default=None) – Cosmology calculator. Defaults to Cosmoprimo(fiducial=fiducial).

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.BAOPhaseShiftExtractor(*args, **kwargs)[source]

Bases: BAOExtractor

Extract BAO + phase shift parameters from base cosmological parameters.

Reference

https://arxiv.org/pdf/1803.10741

Parameters:
  • z (float, default=1.) – Effective redshift.

  • eta (float, default=1./3.) – Relation between ‘qpar’, ‘qper’ and ‘qiso’, ‘qap’ parameters: qiso = qpar ** eta * qper ** (1 - eta).

  • cosmo (BasePrimordialCosmology, default=None) – Cosmology calculator. Defaults to Cosmoprimo(fiducial=fiducial).

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.BAOPhaseShiftPowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BAOPowerSpectrumTemplate

BAO power spectrum template, including \(N_\mathrm{eff}\)-induced phase shift, following Baumann et al 2018.

parameterization of the BAO phase shift due to the effective number of neutrino species. From the Baumann et al 2018, best fit values for parameters in this function for a range of cosmologies are:

phi_inf = 0.227 kstar = 0.0324 h/Mpc epsilon = 0.872

Reference

https://arxiv.org/pdf/1803.10741

Parameters:
  • z (float, default=1.) – Effective redshift.

  • with_now (str, default=’peakaverage’) – Compute smoothed, BAO-filtered, linear power spectrum with this engine (e.g. ‘wallish2018’, ‘peakaverage’).

  • apmode (str, default=’qparqper’) – Alcock-Paczynski parameterization:

    • ‘qiso’: single istropic parameter ‘qiso’

    • ‘qap’: single, Alcock-Paczynski parameter ‘qap’

    • ‘qisoqap’: two parameters ‘qiso’, ‘qap’

    • ‘qparqper’: two parameters ‘qpar’ (scaling along the line-of-sight), ‘qper’ (scaling perpendicular to the line-of-sight)

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

class desilike.theories.galaxy_clustering.power_template.BAOPowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BasePowerSpectrumTemplate

BAO power spectrum template.

Parameters:
  • z (float, default=1.) – Effective redshift.

  • with_now (str, default=’peakaverage’) – Compute smoothed, BAO-filtered, linear power spectrum with this engine (e.g. ‘wallish2018’, ‘peakaverage’).

  • apmode (str, default=’qparqper’) – Alcock-Paczynski parameterization:

    • ‘qiso’: single istropic parameter ‘qiso’

    • ‘qap’: single, Alcock-Paczynski parameter ‘qap’

    • ‘qisoqap’: two parameters ‘qiso’, ‘qap’

    • ‘qparqper’: two parameters ‘qpar’ (scaling along the line-of-sight), ‘qper’ (scaling perpendicular to the line-of-sight)

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.BandVelocityPowerSpectrumExtractor(*args, **kwargs)[source]

Bases: BasePowerSpectrumExtractor

Extract band power parameters.

Parameters:
  • z (float, default=1.) – Effective redshift.

  • kp (array) – Pivot \(k\) where to evaluate the velocity divergence power spectrum \(P_{\theta \theta}\).

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

  • cosmo (BasePrimordialCosmology, default=None) – Cosmology calculator. Defaults to Cosmoprimo(fiducial=fiducial).

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.BandVelocityPowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BasePowerSpectrumTemplate

Band velocity power spectrum template.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate the linear power spectrum.

  • z (float, default=1.) – Effective redshift.

  • kp (array) – Pivot \(k\) where to change the value of the velocity divergence power spectrum \(P_{\theta \theta}\).

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

  • with_now (str, default=None) – If not None, compute smoothed, BAO-filtered, linear power spectrum with this engine (e.g. ‘wallish2018’, ‘peakaverage’).

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.BasePowerSpectrumExtractor(*args, **kwargs)[source]

Bases: BaseCalculator

Base class to extract shape parameters from linear power spectrum.

class desilike.theories.galaxy_clustering.power_template.BasePowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BasePowerSpectrumExtractor

Base class for linear power spectrum template.

class desilike.theories.galaxy_clustering.power_template.DirectPowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BasePowerSpectrumTemplate

Direct power spectrum template, i.e. parameterized in terms of base cosmological parameters.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate the linear power spectrum.

  • z (float, default=1.) – Effective redshift.

  • with_now (str, default=False) – If provided, also compute smoothed, BAO-filtered, linear power spectrum with this engine (e.g. ‘wallish2018’, ‘peakaverage’).

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

class desilike.theories.galaxy_clustering.power_template.DirectWiggleSplitPowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BasePowerSpectrumTemplate

Same as DirectPowerSpectrumTemplate, i.e. parameterized in terms of base cosmological parameters, but rescale the wiggly part of the power spectrum by qbao in order to marginalize over the sound horizon scale. The wiggle amplitude can also be modulated with the Gaussian damping sigmabao.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate the linear power spectrum.

  • z (float, default=1.) – Effective redshift.

  • with_now (str, default=False) – If provided, also compute smoothed, BAO-filtered, linear power spectrum with this engine (e.g. ‘wallish2018’, ‘peakaverage’).

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

  • Reference

  • ———-

  • https (//arxiv.org/abs/2112.10749)

class desilike.theories.galaxy_clustering.power_template.FixedPowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BasePowerSpectrumTemplate

Fixed power spectrum template.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate the linear power spectrum.

  • z (float, default=1.) – Effective redshift.

  • with_now (str, default=False) – If provided, also compute smoothed, BAO-filtered, linear power spectrum with this engine (e.g. ‘wallish2018’, ‘peakaverage’).

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

class desilike.theories.galaxy_clustering.power_template.ShapeFitPowerSpectrumExtractor(*args, **kwargs)[source]

Bases: BasePowerSpectrumExtractor

Extract ShapeFit parameters from linear power spectrum.

Parameters:
  • z (float, default=1.) – Effective redshift.

  • kp (float, default=0.03) – Pivot point in ShapeFit parameterization.

  • a (float, default=0.6) – \(a\) parameter in ShapeFit parameterization.

  • n_varied (bool, default=False) – Use second order ShapeFit parameter n. This choice changes the definition of parameter m.

  • with_now (str, default=’peakaverage’) – Compute smoothed, BAO-filtered, linear power spectrum with this engine (e.g. ‘wallish2018’, ‘peakaverage’).

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

  • cosmo (BasePrimordialCosmology, default=None) – Cosmology calculator. Defaults to Cosmoprimo(fiducial=fiducial).

Reference

https://arxiv.org/abs/2106.07641 https://arxiv.org/pdf/2212.04522.pdf

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.ShapeFitPowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BasePowerSpectrumTemplate

ShapeFit power spectrum template.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate the linear power spectrum.

  • z (float, default=1.) – Effective redshift.

  • kp (float, default=0.03) – Pivot point in ShapeFit parameterization.

  • a (float, default=0.6) – \(a\) parameter in ShapeFit parameterization.

  • apmode (str, default=’qparqper’) – Alcock-Paczynski parameterization:

    • ‘qiso’: single istropic parameter ‘qiso’

    • ‘qap’: single, Alcock-Paczynski parameter ‘qap’

    • ‘qisoqap’: two parameters ‘qiso’, ‘qap’

    • ‘qparqper’: two parameters ‘qpar’ (scaling along the line-of-sight), ‘qper’ (scaling perpendicular to the line-of-sight)

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

  • with_now (str, default=’peakaverage’) – Compute smoothed, BAO-filtered, linear power spectrum with this engine (e.g. ‘wallish2018’, ‘peakaverage’).

  • Reference

  • ———

  • https (//arxiv.org/abs/2106.07641)

  • https (//arxiv.org/pdf/2212.04522.pdf)

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.StandardPowerSpectrumExtractor(*args, **kwargs)[source]

Bases: BasePowerSpectrumExtractor

Extract standard RSD parameters \((q_{\parallel}, q_{\perp}, df)\).

Parameters:
  • z (float, default=1.) – Effective redshift.

  • r (float, default=8.) – Sphere radius to estimate the normalization of the linear power spectrum.

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

  • cosmo (BasePrimordialCosmology, default=None) – Cosmology calculator. Defaults to Cosmoprimo(fiducial=fiducial).

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.StandardPowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BasePowerSpectrumTemplate

Standard power spectrum template, in terms of \(f\) and Alcock-Paczynski parameters.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate the linear power spectrum.

  • z (float, default=1.) – Effective redshift.

  • r (float, default=8.) – Sphere radius to estimate the normalization of the linear power spectrum.

  • apmode (str, default=’qparqper’) – Alcock-Paczynski parameterization:

    • ‘qiso’: single istropic parameter ‘qiso’

    • ‘qap’: single, Alcock-Paczynski parameter ‘qap’

    • ‘qisoqap’: two parameters ‘qiso’, ‘qap’

    • ‘qparqper’: two parameters ‘qpar’ (scaling along the line-of-sight), ‘qper’ (scaling perpendicular to the line-of-sight)

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

  • with_now (str, default=None) – If not None, compute smoothed, BAO-filtered, linear power spectrum with this engine (e.g. ‘wallish2018’, ‘peakaverage’).

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.TurnOverPowerSpectrumExtractor(*args, **kwargs)[source]

Bases: BasePowerSpectrumExtractor

Extract turn over parameters from base cosmological parameters.

Parameters:
  • z (float, default=1.) – Effective redshift.

  • eta (float, default=1./3.) – Relation between ‘qpar’, ‘qper’ and ‘qiso’, ‘qap’ parameters: qiso = qpar ** eta * qper ** (1 - eta).

  • cosmo (BasePrimordialCosmology, default=None) – Cosmology calculator. Defaults to Cosmoprimo(fiducial=fiducial).

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

Reference

https://arxiv.org/pdf/2302.07484.pdf

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.TurnOverPowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BasePowerSpectrumTemplate

TurnOver power spectrum template.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate the linear power spectrum.

  • z (float, default=1.) – Effective redshift.

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the growth rate. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

Reference

https://arxiv.org/pdf/2302.07484.pdf

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.WiggleSplitPowerSpectrumExtractor(*args, **kwargs)[source]

Bases: BasePowerSpectrumExtractor

Extract wiggle-split parameters \((q_{\mathrm{ap}}, q_{\mathrm{BAO}}, df, dm)\).

Parameters:
  • r (float, default=8.) – Smoothing radius to estimate the normalization of the linear power spectrum.

  • kernel (str, default=’gauss’) – Kernel for normalization of the linear power spectrum: ‘gauss’ or ‘tophat’.

  • eta (float, default=1./3.) – Relation between ‘qpar’, ‘qper’ and ‘qiso’, ‘qap’ parameters: qiso = qpar ** eta * qper ** (1 - eta).

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

  • cosmo (BasePrimordialCosmology, default=None) – Cosmology calculator. Defaults to Cosmoprimo(fiducial=fiducial).

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

class desilike.theories.galaxy_clustering.power_template.WiggleSplitPowerSpectrumTemplate(*args, **kwargs)[source]

Bases: BasePowerSpectrumTemplate

ShapeFit power spectrum template.

Parameters:
  • k (array, default=None) – Theory wavenumbers where to evaluate the linear power spectrum.

  • z (float, default=1.) – Effective redshift.

  • r (float, default=8.) – Smoothing radius to estimate the normalization of the linear power spectrum.

  • kernel (str, default=’gauss’) – Kernel for normalization of the linear power spectrum: ‘gauss’ or ‘tophat’.

  • fiducial (str, tuple, dict, cosmoprimo.Cosmology, default=’DESI’) – Specifications for fiducial cosmology, used to compute the linear power spectrum. Either:

    • str: name of fiducial cosmology in cosmoprimo.fiucial

    • tuple: (name of fiducial cosmology, dictionary of parameters to update)

    • dict: dictionary of parameters

    • cosmoprimo.Cosmology: Cosmology instance

  • with_now (str, default=’peakaverage’) – Compute smoothed, BAO-filtered, linear power spectrum with this engine (e.g. ‘wallish2018’, ‘peakaverage’).

get()[source]

Return quantity of main interest, e.g. loglikelihood + logprior if self is a likelihood.

desilike.theories.galaxy_clustering.power_template.integrate_sigma_r2(r, pk, kmin=1e-06, kmax=100.0, nk=2048, kernel=<function kernel_tophat2>, **kwargs)[source]

Return the variance of perturbations smoothed by a kernel \(W\) of radius \(r\), i.e.:

\[\sigma_{r}^{2} = \frac{1}{2 \pi^{2}} \int dk k^{2} P(k) W^{2}(kr)\]
Parameters:
  • r (float) – Smoothing radius.

  • pk (callable) – Power spectrum.

  • kmin (float, default=1e-6) – Minimum wavenumber.

  • kmax (float, default=1e2) – Maximum wavenumber.

  • nk (int, default=2048) – nk points between kmin and kmax.

  • kernel (callable, default=kernel_tophat2) – Kernel \(W^{2}\); defaults to (square of) top-hat kernel.

Returns:

sigmar2 – Variance of perturbations.

Return type:

float

desilike.theories.galaxy_clustering.power_template.kernel_gauss2(x)[source]

Gaussian kernel.

desilike.theories.galaxy_clustering.power_template.kernel_gauss2_deriv(x)[source]

Derivative of Gaussian kernel.

desilike.theories.galaxy_clustering.power_template.kernel_tophat2(x)[source]

Non-vectorized tophat function.

desilike.theories.galaxy_clustering.power_template.kernel_tophat2_deriv(x)[source]

Derivative of tophat function.

lya

class desilike.theories.lya.power_template.P1DPowerSpectrumExtractor(*args, **kwargs)[source]

Bases: BaseCalculator

Extract P1D shape parameters \(\Delta_{\star}^{2}\) and \(n_{\star}\) from the linear power spectrum (in velocity units).

Parameters:
  • z (float, default=3.) – Pivot redshift \(z_{\star}\).

  • qstar (float, default=0.009) – Pivot wavenumber \(q_{\star}\) in velocity units (km/s).

  • cosmo (BasePrimordialCosmology, default=None) – Cosmology calculator. Defaults to Cosmoprimo().

Reference

https://arxiv.org/pdf/2209.09895.pdf