.. _physics-transferFunction: Transfer Function ================= Class providing transfer functions :math:`T(k)` for the matter power spectrum. The transfer function encodes the modification of the primordial power spectrum by physical processes between inflation and matter-radiation equality, including baryon acoustic oscillations, Silk damping, and free-streaming of dark matter particles. It is defined such that the linear power spectrum at late times is :math:`P(k) \propto k^{n_s} T^2(k)`. Implementations may also return the wavenumber at which :math:`T(k)` is suppressed by a given factor, characterizing the small-scale cutoff scale. **Default implementation:** ``transferFunctionEisensteinHu1999`` Methods ------- ``value`` → ``double precision`` Return the transfer function for :math:`k=`\ ``wavenumber`` [Mpc\ :math:`^{-1}`]. * ``double precision, intent(in ) :: wavenumber`` ``logarithmicDerivative`` → ``double precision`` Return the logarithmic derivative of the transfer function for :math:`k=`\ ``wavenumber`` [Mpc\ :math:`^{-1}`]. * ``double precision, intent(in ) :: wavenumber`` ``wavenumbersLocalMinima`` → ``void`` Return an array of wavenumbers at which the transfer function reaches a local minimum. (Or a zero-length array if no such local minima exist.) * ``double precision, intent( out), allocatable, dimension(:) :: wavenumbers`` ``epochTime`` → ``double precision`` Return the cosmic time corresponding to the epoch for which this transfer function is defined. ``halfModeMass`` → ``double precision`` Return the mass (in :math:`\mathrm{M}_\odot`) corresponding to the wavenumber at which the transfer function is suppressed by a factor of two due to small-scale dark matter particle physics. * ``integer, intent( out), optional :: status`` ``quarterModeMass`` → ``double precision`` Return the mass (in :math:`\mathrm{M}_\odot`) corresponding to the wavenumber at which the transfer function is suppressed by a factor of four due to small-scale dark matter particle physics. * ``integer, intent( out), optional :: status`` ``fractionModeMass`` → ``double precision`` Return the mass (in :math:`\mathrm{M}_\odot`) corresponding to the wavenumber at which the transfer function is suppressed is reduced by ``fraction`` due to small-scale dark matter particle physics. * ``double precision, intent(in ) :: fraction`` * ``integer , intent( out), optional :: status`` ``wavenumberFromMass`` → ``double precision`` Return the wavenumber (in Mpc\ :math:`^{-1}`) corresponding to a given mass. (For a spherical region at mean density.) * ``double precision, intent(in ) :: mass`` .. _physics-transferFunctionAccelerator: ``transferFunctionAccelerator`` ------------------------------- A transfer function class which accelerates calculations of another transfer function class by pre-tabulating the transfer function over a grid of wavenumbers and then using rapid interpolation for subsequent evaluations. The density of the tabulation grid in wavenumber is set by ``[wavenumberPerDecade]``. **Methods** * ``tabulate`` — Tabulate the mass function. **Parameters** * ``[tablePointsPerDecade]`` (integer; default ``10``) — The number of points per decade of wavenumber at which to tabulate the transfer function. .. _physics-transferFunctionAxionCAMB: ``transferFunctionAxionCAMB`` ----------------------------- A transfer function class in which the :term:`FDM` transfer function is generated by `AxionCAMB `_ using the specified cosmological parameters. The transfer function is written out to a file in the ``data/dynamic/largeScaleStructure`` directory and will be re-read later if needed. AxionCAMB will be downloaded and run if the transfer function needs to be computed. **Methods** * ``checkRange`` — Check that the provided wavenumber is within the tabulated range of the transfer function. **Parameters** * ``[redshift]`` (real; default ``0.0d0``) — The redshift at which the transfer function should be evaluated. * ``[countPerDecade]`` (integer; default ``0``) — The number of points per decade of wavenumber to compute in the AxionCAMB transfer function. A value of 0 allows AxionCAMB to choose what it considers to be optimal spacing of wavenumbers. * ``[transferFunctionType]`` (string; one of ``darkMatter``, ``total``; default ``darkMatter``) — Specifies whether to use the ``darkMatter`` or ``total`` transfer function. *(inherited from* ``transferFunctionFileFuzzyDarkMatter``\ *)* * ``[fileName]`` (string) — The name of the file from which to read a tabulated transfer function. *(inherited from* ``transferFunctionFileFuzzyDarkMatter``\ *)* * ``[factorWavenumberSmoothExtrapolation]`` (real; default ``2.0d0``) — If positive, and extrapolation is used at high wavenumbers, the slope for extrapolation will be set by averaging over wavenumbers from :math:`k_\mathrm{max}/f` to :math:`k_\mathrm{max}`, where :math:`f=`\ ``[factorWavenumberSmoothExtrapolation]`` and :math:`k_\mathrm{max}` is the highest wavenumber tabulated. This avoids spurious extrapolation for highly oscillatory transfer functions. *(inherited from* ``transferFunctionFileFuzzyDarkMatter``\ *)* * ``[acceptNegativeValues]`` (boolean; default ``.false.``) — If true, negative values in the transfer function are allowed (and the absolute value is taken prior to interpolation). Otherwise, negative values result in an error. *(inherited from* ``transferFunctionFileFuzzyDarkMatter``\ *)* .. _physics-transferFunctionBBKS: ``transferFunctionBBKS`` ------------------------ A transfer function class implementing the :cite:t:`bardeen_statistics_1986` fitting function to compute the :term:`CDM` transfer function. **Methods** * ``tabulate`` — Tabulate the virial density contrast as a function of mass and time. * ``restoreTable`` — Restore a tabulated solution from file. * ``storeTable`` — Store a tabulated solution to file. .. _physics-transferFunctionBBKSWDM: ``transferFunctionBBKSWDM`` --------------------------- A transfer function class providing the :term:`WDM` transfer function fitting function of :cite:t:`bardeen_statistics_1986`. The free-streaming length is computed from the dark matter particle (which must be of the ``darkMatterParticleWDMThermal`` class) properties, and the resulting modifier of :cite:t:`bardeen_statistics_1986` is applied to the provided :term:`CDM` transfer function. .. _physics-transferFunctionBode2001: ``transferFunctionBode2001`` ---------------------------- A transfer function class which applies the thermal :term:`WDM` modifier of :cite:t:`bode_halo_2001` to the provided :term:`CDM` transfer function. The modifier is given by: .. math:: T(k) \rightarrow T(k) (1+[\epsilon k R_\mathrm{c}^0]^{2\nu})^{-\eta/\nu}, where :math:`\epsilon=`\ ``[epsilon]``, :math:`\eta=`\ ``[eta]``, :math:`\nu=`\ ``[nu]``. The cut-off scale is computed from the dark matter particle (which must be of the ``darkMatterParticleWDMThermal`` class) properties. **Methods** * ``wavenumberAtSuppression`` — Compute the wavenumber at which the transfer function is suppressed by the given factor relative to the large-scale value. **Parameters** * ``[scaleCutOffModel]`` (string; one of ``bode2001``, ``barkana2001``, ``viel05``, ``vogel23SpinHalf``, ``vogel23SpinThreeHalves``; default ``barkana2001``) — The model to use to compute the cut-off scale, either "``bode2001``" to use the fitting function given by equation A9 of :cite:t:`bode_halo_2001`, "``barkana2001``" to use the fitting function given by equation (4) of :cite:t:`barkana_constraints_2001`, "``viel05``" to use the fitting function given by equation (7) of :cite:t:`viel_constraining_2005`, or "``vogel23spinHalf``" or "``vogel23spinThreeHalves``" to use the fitting function given by equation (9) of :cite:t:`vogel_entering_2023` for spin-1/2 or spin-3/2 particles respectively. * ``[epsilon]`` (real; default ``0.359d0``) — The parameter :math:`\epsilon` appearing in the warm dark matter transfer function :cite:p:`barkana_constraints_2001`. * ``[eta]`` (real; default ``3.81d0``) — The parameter :math:`\epsilon` appearing in the warm dark matter transfer function :cite:p:`barkana_constraints_2001`. * ``[nu]`` (real; default ``1.1d0``) — The parameter :math:`\epsilon` appearing in the warm dark matter transfer function :cite:p:`barkana_constraints_2001`. * ``[redshift]`` (real; default ``cosmologyFunctions_%redshiftFromExpansionFactor(cosmologyFunctions_%equalityEpochMatterRadiation(requestTypeExpansionFactor))``) — The redshift of the epoch at which the transfer function is defined. .. _physics-transferFunctionCAMB: ``transferFunctionCAMB`` ------------------------ A transfer function class in which the :term:`CDM` transfer function is generated by `CAMB `_ using the specified cosmological parameters. The transfer function is written out to a file in the ``data/dynamic/largeScaleStructure`` directory and will be re-read later if needed. CAMB will be downloaded and run if the transfer function needs to be computed. **Methods** * ``checkRange`` — Check that the provided wavenumber is within the tabulated range of the transfer function. **Parameters** * ``[transferFunctionType]`` (string; one of ``darkMatter``, ``total``; default ``darkMatter``) — Specifies whether to use the ``darkMatter`` or ``total`` transfer function. * ``[redshift]`` (real; default ``0.0d0``) — The redshift at which the transfer function should be evaluated. * ``[cambCountPerDecade]`` (integer; default ``0``) — The number of points per decade of wavenumber to compute in the CAMB transfer function. A value of 0 allows CAMB to choose what it considers to be optimal spacing of wavenumbers. * ``[fileName]`` (string) — The name of the file from which to read a tabulated transfer function. *(inherited from* ``transferFunctionFile``\ *)* * ``[factorWavenumberSmoothExtrapolation]`` (real; default ``0.0d0``) — If positive, and extrapolation is used at high wavenumbers, the slope for extrapolation will be set by averaging over wavenumbers from :math:`k_\mathrm{max}/f` to :math:`k_\mathrm{max}`, where :math:`f=`\ ``[factorWavenumberSmoothExtrapolation]`` and :math:`k_\mathrm{max}` is the highest wavenumber tabulated. This avoids spurious extrapolation for highly oscillatory transfer functions. *(inherited from* ``transferFunctionFile``\ *)* * ``[acceptNegativeValues]`` (boolean; default ``.false.``) — If true, negative values in the transfer function are allowed (and the absolute value is taken prior to interpolation). Otherwise, negative values result in an error. *(inherited from* ``transferFunctionFile``\ *)* .. _physics-transferFunctionCLASSCDM: ``transferFunctionCLASSCDM`` ---------------------------- A transfer function class in which the :term:`CDM` transfer function is generated by `CLASS `_ using the specified cosmological parameters. The transfer function is written out to a file in the ``data/dynamic/largeScaleStructure`` directory and will be re-read later if needed. CLASS will be downloaded and run if the transfer function needs to be computed. **Methods** * ``checkRange`` — Check that the provided wavenumber is within the tabulated range of the transfer function. **Parameters** * ``[transferFunctionType]`` (string; one of ``darkMatter``, ``total``; default ``darkMatter``) — Specifies whether to use the ``darkMatter`` or ``total`` transfer function. * ``[redshift]`` (real; default ``0.0d0``) — The redshift at which the transfer function should be evaluated. * ``[countPerDecade]`` (integer; default ``0``) — The number of points per decade of wavenumber to compute in the CLASS transfer function. A value of 0 allows CLASS to choose what it considers to be optimal spacing of wavenumbers. * ``[fileName]`` (string) — The name of the file from which to read a tabulated transfer function. *(inherited from* ``transferFunctionFile``\ *)* * ``[factorWavenumberSmoothExtrapolation]`` (real; default ``0.0d0``) — If positive, and extrapolation is used at high wavenumbers, the slope for extrapolation will be set by averaging over wavenumbers from :math:`k_\mathrm{max}/f` to :math:`k_\mathrm{max}`, where :math:`f=`\ ``[factorWavenumberSmoothExtrapolation]`` and :math:`k_\mathrm{max}` is the highest wavenumber tabulated. This avoids spurious extrapolation for highly oscillatory transfer functions. *(inherited from* ``transferFunctionFile``\ *)* * ``[acceptNegativeValues]`` (boolean; default ``.false.``) — If true, negative values in the transfer function are allowed (and the absolute value is taken prior to interpolation). Otherwise, negative values result in an error. *(inherited from* ``transferFunctionFile``\ *)* .. _physics-transferFunctionEisensteinHu1998: ``transferFunctionEisensteinHu1998`` ------------------------------------ Provides the :cite:t:`eisenstein_baryonic_1998` fitting function to the transfer function. The effective number of neutrino species and the summed mass (in electron volts) of all neutrino species are specified via the ``neutrinoNumberEffective`` and ``neutrinoMassSummed`` parameters respectively. **Methods** * ``computeFactors`` — Compute common factors needed by :cite:t:`eisenstein_baryonic_1998` transfer function calculations. .. _physics-transferFunctionEisensteinHu1999: ``transferFunctionEisensteinHu1999`` ------------------------------------ Provides the :cite:t:`eisenstein_power_1999` fitting function to the transfer function. The effective number of neutrino species and the summed mass (in electron volts) of all neutrino species are specified via the ``neutrinoNumberEffective`` and ``neutrinoMassSummed`` parameters respectively. **(Default implementation)** **Methods** * ``computeFactors`` — Compute common factors needed by :cite:t:`eisenstein_power_1999` transfer function calculations. **Parameters** * ``[neutrinoNumberEffective]`` (real; default ``3.046d0``) — The effective number of neutrino species. * ``[neutrinoMassSummed]`` (real; default ``0.0d0``) — The summed mass (in electron volts) of all neutrino species. .. _physics-transferFunctionEnvelope: ``transferFunctionEnvelope`` ---------------------------- A transfer function envelope class which computes a transfer function that is a monotonically-decreasing (as a function of wavenumber) envelope to another transfer function. There is no unique monotonic envelope to an arbitrary function. The approach taken here largely follows the algorithm described by :cite:t:`mcclain_algorithm_1991`. Briefly, inflection points in the transfer function are identified, and the midpoints of the corresponding concave upward intervals are used as initial guesses for the tangent points of the envelope and original transfer function. These guesses for the tangent points are iteratively updated to remove regions when the envelope function fails (i.e. is below the original function). If ``[transferFunctionReference]`` is supplied then half-, quarter-, and fraction-mode masses relative to that reference transfer function can be computed using the envelope function. If ``[envelopeModeMassesOnly]`` is set to true, then the envelope transfer function is used *only* for calculation of these mode masses---the original (non-envelope) transfer function is returned in all other cases. If ``[envelopeModeMassesOnly]`` is set to false then the enveloped transfer function is used for *all* calculations. **Parameters** * ``[envelopeRatio]`` (boolean; default ``parameters%isPresent('transferFunctionReference')``) — If true, the envelope is computed on the ratio of the transfer function to the reference transfer function, otherwise it is computed directly on the transfer function. * ``[envelopeModeMassesOnly]`` (boolean; default ``.false.``) — If true, the envelope is used *only* when computing fractional mode masses, and does not affect the transfer function itself. * ``[tablePointsPerDecade]`` (integer; default ``100``) — The number of points per decade of wavenumber at which to tabulate the transfer function. * ``[wavenumberMinimum]`` (real; default ``1.0d-6``) — The minimum wavenumber to which the envelope should be computed initially (the envelope range will be extended to small wavenumbers as needed). * ``[wavenumberMaximum]`` (real; default ``1.0d+6``) — The maximum wavenumber to which the envelope should be computed. .. _physics-transferFunctionETHOSDM: ``transferFunctionETHOSDM`` --------------------------- Implements the ETHOS effective theory of structure formation :cite:p:`cyr-racine_ethoseffective_2016` transfer function for dark acoustic oscillations, using the specific parametric form given by :cite:t:`bohr_halo_2021`. The shape and amplitude of the dark acoustic oscillation feature are controlled by the parameters :math:`\alpha`, :math:`\beta`, :math:`\gamma`, :math:`\sigma`, :math:`\tau`, :math:`k_\mathrm{peak}`, and :math:`h_\mathrm{peak}`. **Parameters** * ``[alpha]`` (real; default ``40.0d0``) — The parameter :math:`\alpha` appearing in the ETHOS transfer function :cite:p:`cyr-racine_ethoseffective_2016`. * ``[beta]`` (real; default ``1.5d0``) — The parameter :math:`\beta` appearing in the ETHOS transfer function :cite:p:`cyr-racine_ethoseffective_2016`. * ``[gamma]`` (real; default ``-10.0d0``) — The parameter :math:`\gamma` appearing in the ETHOS transfer function :cite:p:`cyr-racine_ethoseffective_2016`. * ``[sigma]`` (real; default ``-10.0d0``) — The parameter :math:`\sigma` appearing in the ETHOS transfer function :cite:p:`cyr-racine_ethoseffective_2016`, determines width of first peak in transfer function. * ``[tau]`` (real; default ``-10.0d0``) — The parameter :math:`\tau` appearing in the ETHOS transfer function :cite:p:`cyr-racine_ethoseffective_2016`, determines damping of DAO. * ``[kPeak]`` (real; default ``-10.0d0``) — The parameter :math:`k_\mathrm{peak}`, the wavenumber of first peak in ETHOS transfer function, appearing in the ETHOS transfer function :cite:p:`cyr-racine_ethoseffective_2016`. * ``[hPeak]`` (real; default ``-10.0d0``) — The parameter :math:`h_\mathrm{peak}`, the amplitude of the first peak, appearing in the ETHOS transfer function :cite:p:`cyr-racine_ethoseffective_2016`. * ``[h2]`` (real; default ``-10.0d0``) — The parameter :math:`h_2`, the amplitude of the second peak, appearing in the ETHOS transfer function :cite:p:`cyr-racine_ethoseffective_2016`. * ``[redshift]`` (real; default ``cosmologyFunctions_%redshiftFromExpansionFactor(cosmologyFunctions_%equalityEpochMatterRadiation(requestTypeExpansionFactor))``) — The redshift of the epoch at which the transfer function is defined. .. _physics-transferFunctionFile: ``transferFunctionFile`` ------------------------ Provides a transfer function from a tabulation given in an HDF5 file with the following structure: .. code-block:: none HDF5 "transferFunction.hdf5" { GROUP "/" { ATTRIBUTE "description" { DATATYPE H5T_STRING { STRSIZE 71; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "fileFormat" { DATATYPE H5T_STD_I32LE DATASPACE SCALAR } GROUP "extrapolation" { GROUP "wavenumber" { ATTRIBUTE "high" { DATATYPE H5T_STRING { STRSIZE 11; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "low" { DATATYPE H5T_STRING { STRSIZE 3; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } } } GROUP "parameters" { ATTRIBUTE "HubbleConstant" { DATATYPE H5T_STRING { STRSIZE 4; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "OmegaBaryon" { DATATYPE H5T_STRING { STRSIZE 6; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "OmegaDarkEnergy" { DATATYPE H5T_STRING { STRSIZE 5; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "OmegaMatter" { DATATYPE H5T_STRING { STRSIZE 5; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } } GROUP "darkMatter" { DATASET "transferFunctionZ0.0000" { DATATYPE H5T_IEEE_F64LE DATASPACE SIMPLE { ( 1000 ) / ( 1000 ) } } } DATASET "wavenumber" { DATATYPE H5T_IEEE_F64LE DATASPACE SIMPLE { ( 1000 ) / ( 1000 ) } } } } If an optional :galacticus-class:`transferFunctionClass` object named ``transferFunctionReference`` is supplied then that transfer function is multiplied by the tabulated transfer function. In this case half and quarter-mode masses relative to ``transferFunctionReference`` are also computed. **Methods** * ``tabulate`` — Tabulate the virial density contrast as a function of mass and time. * ``restoreTable`` — Restore a tabulated solution from file. * ``storeTable`` — Store a tabulated solution to file. **Parameters** * ``[transferFunctionType]`` (string; one of ``darkMatter``, ``total``; default ``darkMatter``) — Specifies whether to use the ``darkMatter`` or ``total`` transfer function. * ``[fileName]`` (string) — The name of the file to/from which tabulations of barrier first crossing probabilities should be written/read. If set to "``none``" tables will not be stored. * ``[redshift]`` (real; default ``0.0d0``) — The redshift of the transfer function to read. * ``[factorWavenumberSmoothExtrapolation]`` (real; default ``0.0d0``) — If positive, and extrapolation is used at high wavenumbers, the slope for extrapolation will be set by averaging over wavenumbers from :math:`k_\mathrm{max}/f` to :math:`k_\mathrm{max}`, where :math:`f=`\ ``[factorWavenumberSmoothExtrapolation]`` and :math:`k_\mathrm{max}` is the highest wavenumber tabulated. This avoids spurious extrapolation for highly oscillatory transfer functions. * ``[acceptNegativeValues]`` (boolean; default ``.false.``) — If true, negative values in the transfer function are allowed (and the absolute value is taken prior to interpolation). Otherwise, negative values result in an error. .. _physics-transferFunctionFileFuzzyDarkMatter: ``transferFunctionFileFuzzyDarkMatter`` --------------------------------------- Provides a fuzzy dark matter transfer function from a tabulation given in an HDF5 file with the following structure: .. code-block:: none HDF5 "transferFunction.hdf5" { GROUP "/" { ATTRIBUTE "description" { DATATYPE H5T_STRING { STRSIZE 71; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "fileFormat" { DATATYPE H5T_STD_I32LE DATASPACE SCALAR } ATTRIBUTE "redshift" { DATATYPE H5T_STD_I32LE DATASPACE SCALAR } GROUP "extrapolation" { GROUP "wavenumber" { ATTRIBUTE "high" { DATATYPE H5T_STRING { STRSIZE 11; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "low" { DATATYPE H5T_STRING { STRSIZE 3; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } } } GROUP "parameters" { ATTRIBUTE "HubbleConstant" { DATATYPE H5T_STRING { STRSIZE 4; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "OmegaBaryon" { DATATYPE H5T_STRING { STRSIZE 6; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "OmegaDarkEnergy" { DATATYPE H5T_STRING { STRSIZE 5; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "OmegaMatter" { DATATYPE H5T_STRING { STRSIZE 5; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "fuzzyDMMass" { DATATYPE H5T_STRING { STRSIZE 6; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "fuzzyDMDensityFraction" { DATATYPE H5T_STRING { STRSIZE 6; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } } DATASET "transferFunction" { DATATYPE H5T_IEEE_F64LE DATASPACE SIMPLE { ( 1000 ) / ( 1000 ) } } DATASET "wavenumber" { DATATYPE H5T_IEEE_F64LE DATASPACE SIMPLE { ( 1000 ) / ( 1000 ) } } } } **Methods** * ``densityFraction`` — Return the density fraction of the fuzzy dark matter with respect to the total dark matter density. **Parameters** * ``[transferFunctionType]`` (string; one of ``darkMatter``, ``total``; default ``darkMatter``) — Specifies whether to use the ``darkMatter`` or ``total`` transfer function. * ``[fileName]`` (string) — The name of the file from which to read a tabulated transfer function. * ``[redshift]`` (real; default ``0.0d0``) — The redshift of the transfer function to read. * ``[factorWavenumberSmoothExtrapolation]`` (real; default ``2.0d0``) — If positive, and extrapolation is used at high wavenumbers, the slope for extrapolation will be set by averaging over wavenumbers from :math:`k_\mathrm{max}/f` to :math:`k_\mathrm{max}`, where :math:`f=`\ ``[factorWavenumberSmoothExtrapolation]`` and :math:`k_\mathrm{max}` is the highest wavenumber tabulated. This avoids spurious extrapolation for highly oscillatory transfer functions. * ``[acceptNegativeValues]`` (boolean; default ``.false.``) — If true, negative values in the transfer function are allowed (and the absolute value is taken prior to interpolation). Otherwise, negative values result in an error. .. _physics-transferFunctionFuzzyDMMurgia2017: ``transferFunctionFuzzyDMMurgia2017`` ------------------------------------- A transfer function class for fuzzy dark matter using the fitting function of :cite:t:`murgia_non-cold_2017`. **Parameters** * ``[beta]`` (real; default ``5.475d0``) — The parameter :math:`\beta`, which controls the shape of the cut-off, appearing in the transfer function :cite:p:`murgia_non-cold_2017`. * ``[gamma]`` (real; default ``-2.0d0``) — The parameter :math:`\gamma`, which controls the shape of the cut-off, appearing in the transfer function :cite:p:`murgia_non-cold_2017`. * ``[redshift]`` (real; default ``cosmologyFunctions_%redshiftFromExpansionFactor(cosmologyFunctions_%equalityEpochMatterRadiation(requestTypeExpansionFactor))``) — The redshift of the epoch at which the transfer function is defined. * ``[alpha]`` (real; default ``0.0075d0``) — The parameter :math:`\alpha`, which sets the cut-off scale length, appearing in the warm dark matter transfer function :cite:p:`murgia_non-cold_2017`. *(inherited from* ``transferFunctionMurgia2017``\ *)* .. _physics-transferFunctionFuzzyDMPassaglia2022: ``transferFunctionFuzzyDMPassaglia2022`` ---------------------------------------- A transfer function class for fuzzy dark matter using the fitting function of :cite:t:`passaglia_accurate_2022`. .. _physics-transferFunctionHalfModeSlope: ``transferFunctionHalfModeSlope`` --------------------------------- A transfer function class based on the non-cold dark matter fitting function of :cite:t:`murgia_non-cold_2017`, restricted to :math:`\gamma=-5` and with properties specified via the half-mode mass, :math:`M_{1/2}` and the slope of the transfer function at the corresponding half-mode wavenumber, :math:`\mathrm{d}\log T / \mathrm{d} \log k`. Specifically, .. math:: k_{1/2} = \left(\frac{3 M_{1/2}}{4 \pi \bar{\rho}}\right)^{1/3}, where :math:`\bar{\rho}` is the mean density of the universe. In terms of the :cite:t:`murgia_non-cold_2017` parameters we have: .. math:: \beta = \frac{1}{\gamma} \frac{2^{-1/\gamma}}{2^{-1/\gamma}-1} \frac{\mathrm{d}\log T}{\mathrm{d} \log k}, and .. math:: \alpha = \frac{(2^{-1/\gamma}-1)^{1/\beta}}{k_\mathrm{1/2}}. **Parameters** * ``[massHalfMode]`` (real) — The half-mode mass of the transfer function. * ``[slopeHalfMode]`` (real) — The logarithmic slope of the transfer function at the half-mode mass. * ``[redshift]`` (real; default ``cosmologyFunctions_%redshiftFromExpansionFactor(cosmologyFunctions_%equalityEpochMatterRadiation(requestTypeExpansionFactor))``) — The redshift of the epoch at which the transfer function is defined. * ``[alpha]`` (real; default ``0.0075d0``) — The parameter :math:`\alpha`, which sets the cut-off scale length, appearing in the warm dark matter transfer function :cite:p:`murgia_non-cold_2017`. *(inherited from* ``transferFunctionMurgia2017``\ *)* * ``[beta]`` (real; default ``1.5d0``) — The parameter :math:`\beta`, which controls the shape of the cut-off, appearing in the warm dark matter transfer function :cite:p:`murgia_non-cold_2017`. *(inherited from* ``transferFunctionMurgia2017``\ *)* * ``[gamma]`` (real; default ``-10.0d0``) — The parameter :math:`\gamma`, which controls the shape of the cut-off, appearing in the warm dark matter transfer function :cite:p:`murgia_non-cold_2017`. *(inherited from* ``transferFunctionMurgia2017``\ *)* .. _physics-transferFunctionHu2000FDM: ``transferFunctionHu2000FDM`` ----------------------------- Provides a matter transfer function for fuzzy dark matter (ultra-light axions), applying the quantum pressure suppression modifier of :cite:t:`hu_fuzzy_2000` to an underlying cold dark matter transfer function. The suppression creates a characteristic small-scale cutoff determined by the axion mass, with the redshift of evaluation specified by ``[redshift]``. **Parameters** * ``[redshift]`` (real; default ``cosmologyFunctions_%redshiftFromExpansionFactor(cosmologyFunctions_%equalityEpochMatterRadiation(requestTypeExpansionFactor))``) — The redshift of the epoch at which the transfer function is defined. .. _physics-transferFunctionIdentity: ``transferFunctionIdentity`` ---------------------------- Provides an identity transfer function, i.e. :math:`T(k)=1` for all :math:`k`. **Parameters** * ``[redshift]`` (real; default ``0.0d0``) — The redshift at which the transfer function is defined. .. _physics-transferFunctionMurgia2017: ``transferFunctionMurgia2017`` ------------------------------ Provides a matter transfer function for non-cold dark matter models using the flexible fitting function of :cite:t:`murgia_non-cold_2017`, which parametrizes the small-scale power suppression relative to cold dark matter. The cut-off scale length :math:`\alpha` and shape parameters :math:`\beta` and :math:`\gamma` control the form of the suppression, with the redshift of evaluation set by ``[redshift]``. **Parameters** * ``[alpha]`` (real; default ``0.0075d0``) — The parameter :math:`\alpha`, which sets the cut-off scale length, appearing in the warm dark matter transfer function :cite:p:`murgia_non-cold_2017`. * ``[beta]`` (real; default ``1.5d0``) — The parameter :math:`\beta`, which controls the shape of the cut-off, appearing in the transfer function :cite:p:`murgia_non-cold_2017`. * ``[gamma]`` (real; default ``-10.0d0``) — The parameter :math:`\gamma`, which controls the shape of the cut-off, appearing in the transfer function :cite:p:`murgia_non-cold_2017`. * ``[redshift]`` (real; default ``cosmologyFunctions_%redshiftFromExpansionFactor(cosmologyFunctions_%equalityEpochMatterRadiation(requestTypeExpansionFactor))``) — The redshift of the epoch at which the transfer function is defined.