py21cmfast.AstroParams ====================== .. py:class:: py21cmfast.AstroParams Bases: :py:obj:`InputStruct` Astrophysical parameters. NB: All Mean scaling relations are defined in log-space, such that the lines they produce give exp(), this means that increasing the lognormal scatter in these relations will increase the but not :Parameters: * **INHOMO_RECO** (*bool, optional*) -- Whether inhomogeneous recombinations are being calculated. This is not a part of the astro parameters structure, but is required by this class to set some default behaviour. * **HII_EFF_FACTOR** (*float, optional*) -- The ionizing efficiency of high-z galaxies (zeta, from Eq. 2 of Greig+2015). Higher values tend to speed up reionization. * **F_STAR10** (*float, optional*) -- The fraction of galactic gas in stars for 10^10 solar mass haloes. Only used in the "new" parameterization, This is used along with `F_ESC10` to determine `HII_EFF_FACTOR` (which is then unused). See Eq. 11 of Greig+2018 and Sec 2.1 of Park+2018. Given in log10 units. * **F_STAR7_MINI** (*float, optional*) -- The fraction of galactic gas in stars for 10^7 solar mass minihaloes. Only used in the "minihalo" parameterization, i.e. when `USE_MINI_HALOS` is set to True (in :class:`AstroOptions`). If so, this is used along with `F_ESC7_MINI` to determine `HII_EFF_FACTOR_MINI` (which is then unused). See Eq. 8 of Qin+2020. If the MCG scaling relations are not provided explicitly, we extend the ACG ones by default. Given in log10 units. * **ALPHA_STAR** (*float, optional*) -- Power-law index of fraction of galactic gas in stars as a function of halo mass. See Sec 2.1 of Park+2018. * **ALPHA_STAR_MINI** (*float, optional*) -- Power-law index of fraction of galactic gas in stars as a function of halo mass, for MCGs. See Sec 2 of Muñoz+21 (2110.13919). If the MCG scaling relations are not provided explicitly, we extend the ACG ones by default. * **SIGMA_STAR** (*float, optional*) -- Lognormal scatter (dex) of the halo mass to stellar mass relation. Uniform across all masses and redshifts. * **SIGMA_SFR_LIM** (*float, optional*) -- Lognormal scatter (dex) of the stellar mass to SFR relation above a stellar mass of 1e10 solar. * **SIGMA_SFR_INDEX** (*float, optional*) -- index of the power-law between SFMS scatter and stellar mass below 1e10 solar. * **F_ESC10** (*float, optional*) -- The "escape fraction", i.e. the fraction of ionizing photons escaping into the IGM, for 10^10 solar mass haloes. Only used in the "new" parameterization. This is used along with `F_STAR10` to determine `HII_EFF_FACTOR` (which is then unused). See Eq. 11 of Greig+2018 and Sec 2.1 of Park+2018. * **F_ESC7_MINI** (*float, optional*) -- The "escape fraction for minihalos", i.e. the fraction of ionizing photons escaping into the IGM, for 10^7 solar mass minihaloes. Only used in the "minihalo" parameterization, i.e. when `USE_MINI_HALOS` is set to True (in :class:`AstroOptions`). If so, this is used along with `F_ESC7_MINI` to determine `HII_EFF_FACTOR_MINI` (which is then unused). See Eq. 17 of Qin+2020. If the MCG scaling relations are not provided explicitly, we extend the ACG ones by default. Given in log10 units. * **ALPHA_ESC** (*float, optional*) -- Power-law index of escape fraction as a function of halo mass. See Sec 2.1 of Park+2018. * **M_TURN** (*float, optional*) -- Turnover mass (in log10 solar mass units) for quenching of star formation in halos, due to SNe or photo-heating feedback, or inefficient gas accretion. See Sec 2.1 of Park+2018. * **R_BUBBLE_MAX** (*float, optional*) -- Mean free path in Mpc of ionizing photons within ionizing regions (Sec. 2.1.2 of Greig+2015). Default is 50 if `INHOMO_RECO` is True, or 15.0 if not. * **ION_Tvir_MIN** (*float, optional*) -- Minimum virial temperature of star-forming haloes (Sec 2.1.3 of Greig+2015). Given in log10 units. * **L_X** (*float, optional*) -- The specific X-ray luminosity per unit star formation escaping host galaxies. Cf. Eq. 6 of Greig+2018. Given in log10 units. For the double power-law used in the Halo Model This gives the low-z limite. * **L_X_MINI** (*float, optional*) -- The specific X-ray luminosity per unit star formation escaping host galaxies for minihalos. Cf. Eq. 23 of Qin+2020. Given in log10 units. For the double power-law used in the Halo Model. This gives the low-z limite. If the MCG scaling relations are not provided explicitly, we extend the ACG ones by default. * **NU_X_THRESH** (*float, optional*) -- X-ray energy threshold for self-absorption by host galaxies (in eV). Also called E_0 (cf. Sec 4.1 of Greig+2018). Typical range is (100, 1500). * **X_RAY_SPEC_INDEX** (*float, optional*) -- X-ray spectral energy index (cf. Sec 4.1 of Greig+2018). Typical range is (-1, 3). * **X_RAY_Tvir_MIN** (*float, optional*) -- Minimum halo virial temperature in which X-rays are produced. Given in log10 units. Default is `ION_Tvir_MIN`. * **F_H2_SHIELD** (*float, optional*) -- Self-shielding factor of molecular hydrogen when experiencing LW suppression. Cf. Eq. 12 of Qin+2020. Consistently included in A_LW fit from sims. If used we recommend going back to Macachek+01 A_LW=22.86. * **t_STAR** (*float, optional*) -- Fractional characteristic time-scale (fraction of hubble time) defining the star-formation rate of galaxies. See Sec 2.1, Eq. 3 of Park+2018. * **A_LW, BETA_LW** (*float, optional*) -- Impact of the LW feedback on Mturn for minihaloes. Default is 22.8685 and 0.47 following Machacek+01, respectively. Latest simulations suggest 2.0 and 0.6. See Sec 2 of Muñoz+21 (2110.13919). * **A_VCB, BETA_VCB** (*float, optional*) -- Impact of the DM-baryon relative velocities on Mturn for minihaloes. Default is 1.0 and 1.8, and agrees between different sims. See Sec 2 of Muñoz+21 (2110.13919). * **UPPER_STELLAR_TURNOVER_MASS** -- The pivot mass associated with the optional upper mass power-law of the stellar-halo mass relation (see AstroOptions.USE_UPPER_STELLAR_TURNOVER) * **UPPER_STELLAR_TURNOVER_INDEX** -- The power-law index associated with the optional upper mass power-law of the stellar-halo mass relation (see AstroOptions.USE_UPPER_STELLAR_TURNOVER) * **SIGMA_LX** (*float, optional*) -- Lognormal scatter (dex) of the Xray luminosity relation (a function of stellar mass, star formation rate and redshift). This scatter is uniform across all halo properties and redshifts. * **FIXED_VAVG** (*float, optional*) -- The fixed value of the average velocity used when AstroOptions.FIX_VCB_AVG is set to True. * **POP2_ION** (*float, optional*) -- Number of ionizing photons per baryon produced by Pop II stars. * **POP3_ION** (*float, optional*) -- Number of ionizing photons per baryon produced by Pop III stars. * **CLUMPING_FACTOR** (*float, optional*) -- Clumping factor of the IGM used ONLY in the x-ray partial ionisations (not the reionsiation model). Default is 2.0. * **ALPHA_UVB** (*float, optional*) -- The power-law index of the UVB spectrum. Used for Gamma12 in the recombination model * **DELTA_R_HII_FACTOR** (*float, optional*) -- The factor by which to decrease the size of the HII filter when calculating the HII regions. * **R_BUBBLE_MIN** (*float, optional*) -- Minimum size of ionized regions in Mpc. Default is 0.620350491. * **MAX_DVDR** (*float, optional*) -- Maximum value of the gradient of the velocity field used in the RSD algorithm. * **NU_X_BAND_MAX** (*float, optional*) -- The maximum frequency of the X-ray band used to calculate the X-ray Luminosity. * **NU_X_MAX** (*float, optional*) -- The maximum frequency of the integrals over nu for the x-ray heating/ionisation rates. .. !! processed by numpydoc !! .. py:method:: __init_subclass__() :classmethod: Store each subclass for easy access. .. !! processed by numpydoc !! .. py:method:: __str__() Human-readable string representation of the object. .. !! processed by numpydoc !! .. py:method:: asdict() Return a dict representation of the instance. .. rubric:: Examples This dict should be such that doing the following should work, i.e. it can be used exactly to construct a new instance of the same object:: >>> inp = InputStruct(**params) >>> newinp =InputStruct(**inp.asdict()) >>> inp == newinp .. !! processed by numpydoc !! .. py:method:: clone(**kwargs) Make a fresh copy of the instance with arbitrary parameters updated. .. !! processed by numpydoc !! .. py:method:: from_subdict(dct, safe=True) :classmethod: Construct an instance of a parameter structure from a dictionary. .. !! processed by numpydoc !! .. py:method:: new(x = None, **kwargs) :classmethod: Create a new instance of the struct. :Parameters: **x** (*dict | InputStruct | None*) -- Initial values for the struct. If `x` is a dictionary, it should map field names to their corresponding values. If `x` is an instance of this class, its attributes will be used as initial values. If `x` is None, the struct will be initialised with default values. :Other Parameters: * **All other parameters should be passed as if directly to the class constructor** * **(i.e. as parameter names).** .. rubric:: Examples >>> up = SimulationOptions({'HII_DIM': 250}) >>> up.HII_DIM 250 >>> up = SimulationOptions(up) >>> up.HII_DIM 250 >>> up = SimulationOptions() >>> up.HII_DIM 200 >>> up = SimulationOptions(HII_DIM=256) >>> up.HII_DIM 256 .. !! processed by numpydoc !! .. py:attribute:: ALPHA_ESC :type: float .. py:attribute:: ALPHA_STAR :type: float .. py:attribute:: ALPHA_STAR_MINI :type: float .. py:attribute:: ALPHA_UVB :type: float .. py:attribute:: A_LW :type: float .. py:attribute:: A_VCB :type: float .. py:attribute:: BETA_LW :type: float .. py:attribute:: BETA_VCB :type: float .. py:attribute:: CLUMPING_FACTOR :type: float .. py:attribute:: DELTA_R_HII_FACTOR :type: float .. py:attribute:: FIXED_VAVG :type: float .. py:attribute:: F_ESC10 :type: float .. py:attribute:: F_ESC7_MINI :type: float .. py:attribute:: F_H2_SHIELD :type: float .. py:attribute:: F_STAR10 :type: float .. py:attribute:: F_STAR7_MINI :type: float .. py:attribute:: HII_EFF_FACTOR :type: float .. py:attribute:: ION_Tvir_MIN :type: float .. py:attribute:: L_X :type: float .. py:attribute:: L_X_MINI :type: float .. py:attribute:: MAX_DVDR :type: float .. py:attribute:: M_TURN :type: float .. py:attribute:: NU_X_BAND_MAX :type: float .. py:attribute:: NU_X_MAX :type: float .. py:attribute:: NU_X_THRESH :type: float .. py:attribute:: N_STEP_TS :type: float .. py:attribute:: PHOTONCONS_CALIBRATION_END :type: float .. py:attribute:: POP2_ION :type: float .. py:attribute:: POP3_ION :type: float .. py:attribute:: R_BUBBLE_MAX :type: float .. py:attribute:: R_BUBBLE_MIN :type: float .. py:attribute:: R_MAX_TS :type: float .. py:attribute:: SIGMA_LX :type: float .. py:attribute:: SIGMA_SFR_INDEX :type: float .. py:attribute:: SIGMA_SFR_LIM :type: float .. py:attribute:: SIGMA_STAR :type: float .. py:attribute:: T_RE :type: float .. py:attribute:: UPPER_STELLAR_TURNOVER_INDEX :type: float .. py:attribute:: UPPER_STELLAR_TURNOVER_MASS :type: float .. py:attribute:: X_RAY_SPEC_INDEX :type: float .. py:attribute:: X_RAY_Tvir_MIN :type: float .. py:property:: cdict :type: dict A python dictionary containing the properties of the wrapped C-struct. The memory pointed to by this dictionary is *not* owned by the wrapped C-struct, but is rather just a python dict. However, in contrast to :meth:`asdict`, this method transforms the properties to what they should be in C (e.g. linear space vs. log-space) before putting them into the dict. This dict also contains *only* the properties of the wrapped C-struct, rather than all properties of the :class:`InputStruct` instance (some attributes of the python instance are there only to guide setting of defaults, and don't appear in the C-struct at all). .. !! processed by numpydoc !! .. py:property:: cstruct :type: py21cmfast.wrapper.structs.StructWrapper The object pointing to the memory accessed by C-code for this struct. .. !! processed by numpydoc !! .. py:property:: struct :type: py21cmfast.wrapper.structs.StructWrapper The python-wrapped struct associated with this input object. .. !! processed by numpydoc !! .. py:attribute:: t_STAR :type: float