py21cmfast.wrapper.classy_interface =================================== .. py:module:: py21cmfast.wrapper.classy_interface .. autoapi-nested-parse:: Module for computing quantities with CLASS. .. !! processed by numpydoc !! Attributes ---------- .. autoapisummary:: py21cmfast.wrapper.classy_interface.classy_params_default py21cmfast.wrapper.classy_interface.k_pivot py21cmfast.wrapper.classy_interface.k_transfer Classes ------- .. toctree:: :hidden: /autoapi/py21cmfast/wrapper/classy_interface/EHTransferFunction .. autoapisummary:: py21cmfast.wrapper.classy_interface.EHTransferFunction Functions --------- .. autoapisummary:: py21cmfast.wrapper.classy_interface.compute_rms py21cmfast.wrapper.classy_interface.find_redshift_kinematic_decoupling py21cmfast.wrapper.classy_interface.get_transfer_function py21cmfast.wrapper.classy_interface.run_classy Module Contents --------------- .. py:function:: compute_rms(classy_output, kind = 'd_m', redshifts = 0, smoothing_radius = 0) Compute the root-mean-square of a field at given redshifts. :Parameters: * **classy_output** (:class:`classy.Class`) -- An object containing all the information from the CLASS calculation. * **kind** (*str, optioanl*) -- The type of field for which the rms shall be computed. Options are: * "d_b", "d_cdm", "d_m": density field of baryons, cold dark matter, or all matter (including massive neutrinos). * "v_b", "v_cdm": magnitude of the velocity vector field of baryons or CDM (this is gauge dependent). * "v_cb": magnitude of the relative velocity vector field between baryons and CDM (this is gauge independent). Default is "d_m". * **redshifts** (*np.array or a float, optional*) -- The redshifts at which the rms shall be computed. Default is 0. * **smoothing_radius** (*float, optional*) -- If non-zero, the field will be smoothed with a top hat filter (in real space) with comoving radius that is set to R_smooth. Can also be passed as type 'astropy.units.quantity.Quantity' with length unit. Default is 0. :returns: **rms** (*np.array*) -- Array of the rms of the desired field at the given redshifts. .. !! processed by numpydoc !! .. py:function:: find_redshift_kinematic_decoupling(classy_output) Find the redshift of kinematic decoupling. For simplicity, we approximate the redshift of kinematic decoupling to be the same redshift of recombination, which is defined as the moment when x_e = n_e/(n_H + n_He) = 0.1. For LCDM with Planck 2018 parameters, this corresponds to z_dec ~ 1070. :Parameters: **classy_output** (:class:`classy.Class`) -- An object containing all the information from the CLASS calculation. :returns: **z_dec** (*float*) -- Redshift of kinematic decoupling. .. !! processed by numpydoc !! .. py:function:: get_transfer_function(classy_output, kind = 'd_m', z = 0) Get the transfer function of a field at a given redshift. :Parameters: * **classy_output** (:class:`classy.Class`) -- An object containing all the information from the CLASS calculation. * **kind** (*str, optioanl*) -- The type of field for which the rms shall be computed. Options are: * "d_b", "d_cdm", "d_m": density field of baryons, cold dark matter, or all matter (including massive neutrinos). * "v_b", "v_cdm": magnitude of the velocity vector field of baryons or CDM (this is gauge dependent). * "v_cb": magnitude of the relative velocity vector field between baryons and CDM (this is gauge independent). Default is "d_m". * **z** (*float, optional*) -- The redshift at which the transfer function shall be computed. Default is 0. :returns: **transfer** (*np.array*) -- Array of the desired transfer function at the given redshift. .. !! processed by numpydoc !! .. py:function:: run_classy(**kwargs) Run CLASS with specified input parameters. :Parameters: **kwargs** -- Optional keywords to pass to CLASS. :returns: **output** (:class:`classy.Class`) -- An object containing all the information from the CLASS calculation. .. !! processed by numpydoc !! .. py:data:: classy_params_default .. py:data:: k_pivot .. py:data:: k_transfer