py21cmfast.InputParameters ========================== .. py:class:: py21cmfast.InputParameters A class defining a collection of InputStruct instances. This class simplifies combining different InputStruct instances together, performing validation checks between them, and being able to cross-check compatibility between different sets of instances. :Parameters: * **random_seed** -- The seed that determines the realization produced by a 21cmFAST run. * **node_redshifts** -- The redshifts at which coeval boxes will be computed. By default, empty if no evolution is required, and logarithmically spaced in (1+z) between z=5.5 and SimulationOptions.Z_HEAT_MAX if evolution is required. * **cosmo_params** -- Cosmological parameters of a 21cmFAST run. * **simulation_options** -- Parameters controlling the simulation as a whole, e.g. the box size and dimensionality. * **matter_options** -- Parameters controlling the matter field generated by 21cmFAST. * **astro_options** -- Options for which physical processes to include in the simulation. * **astro_params** -- Astrophysical parameter values. .. !! processed by numpydoc !! .. py:method:: __attrs_post_init__() Run a check after initialization. Currently just checks that the halo mass ranges are sensible. .. !! processed by numpydoc !! .. py:method:: __getitem__(key) Get an item from the instance in a dict-like manner. .. !! processed by numpydoc !! .. py:method:: __repr__() Return a string representation of the structure. Created by combining repr methods from the InputStructs which make up this object .. !! processed by numpydoc !! .. py:method:: asdict(only_structs = False, camel = False, remove_base_cosmo = True, only_cstruct_params = True, use_aliases = True) Convert the instance to a recursive dictionary. .. !! processed by numpydoc !! .. py:method:: clone(**kwargs) Generate a copy of the InputParameter structure with specified changes. .. !! processed by numpydoc !! .. py:method:: evolve_input_structs(**kwargs) Return an altered clone of the `InputParameters` structs. Unlike clone(), this function takes fields from the constituent `InputStruct` classes and only overwrites those sub-fields instead of the entire field .. !! processed by numpydoc !! .. py:method:: from_template(name, random_seed, node_redshifts = None, **kwargs) :classmethod: Construct full InputParameters instance from native or TOML file template. :Parameters: * **name** -- Either a name of a built-in template, or a path to a parameter TOML, or a list of such names/paths. If a list, the final parameters will be built from left-to-right so that the parameters at the end of the list will have precedence. * **random_seed** -- A random seed to use for the run. Must be specified manually. * **node_redshifts** -- The redshifts at which to evolve the simulation (if applicable). Default detects whether evolution is required and sets the node redshifts according to the simulation parameters. :Other Parameters: * **All other parameters are interpreted as elements of :class:`InputStruct`** * **subclasses (e.g. :class:`SimulationOptions`) and will over-ride what is in** * **the template.** .. !! processed by numpydoc !! .. py:method:: is_compatible_with(other) Check if this object is compatible with another parameter struct. Compatibility is slightly different from strict equality. Compatibility requires that if a parameter struct *exists* on the other object, then it must be equal to this one. That is, if astro_params is None on the other InputParameter object, then this one can have astro_params as NOT None, and it will still be compatible. However the inverse is not true -- if this one has astro_params as None, then all others must have it as None as well. .. !! processed by numpydoc !! .. py:method:: with_logspaced_redshifts(zmin = 5.5, zmax = None, zstep_factor = None) Create a new InputParameters instance with logspaced redshifts. .. !! processed by numpydoc !! .. py:attribute:: astro_options :type: AstroOptions .. py:attribute:: astro_params :type: AstroParams .. py:attribute:: cosmo_params :type: CosmoParams .. py:attribute:: cosmo_tables :type: CosmoTables .. py:property:: evolution_required :type: bool Whether evolution is required for these parameters. .. !! processed by numpydoc !! .. py:attribute:: matter_options :type: MatterOptions .. py:attribute:: node_redshifts .. py:attribute:: random_seed .. py:attribute:: simulation_options :type: SimulationOptions