py21cmfast.wrapper.inputs ========================= .. py:module:: py21cmfast.wrapper.inputs .. autoapi-nested-parse:: Input parameter classes. There are four input parameter/option classes, not all of which are required for any given function. They are :class:`SimulationOptions`, :class:`CosmoParams`, :class:`AstroParams` and :class:`AstroOptions`. Each of them defines a number of variables, and all of these have default values, to minimize the burden on the user. These defaults are accessed via the ``_defaults_`` class attribute of each class. The available parameters for each are listed in the documentation for each class below. .. !! processed by numpydoc !! Attributes ---------- .. autoapisummary:: py21cmfast.wrapper.inputs.FilterOptions py21cmfast.wrapper.inputs.IntegralMethods py21cmfast.wrapper.inputs.Planck18 py21cmfast.wrapper.inputs.logger Exceptions ---------- .. toctree:: :hidden: /autoapi/py21cmfast/wrapper/inputs/InputCrossValidationError .. autoapisummary:: py21cmfast.wrapper.inputs.InputCrossValidationError Classes ------- .. toctree:: :hidden: /autoapi/py21cmfast/wrapper/inputs/AstroOptions /autoapi/py21cmfast/wrapper/inputs/AstroParams /autoapi/py21cmfast/wrapper/inputs/CosmoParams /autoapi/py21cmfast/wrapper/inputs/CosmoTables /autoapi/py21cmfast/wrapper/inputs/InputParameters /autoapi/py21cmfast/wrapper/inputs/InputStruct /autoapi/py21cmfast/wrapper/inputs/MatterOptions /autoapi/py21cmfast/wrapper/inputs/SimulationOptions /autoapi/py21cmfast/wrapper/inputs/Table1D .. autoapisummary:: py21cmfast.wrapper.inputs.AstroOptions py21cmfast.wrapper.inputs.AstroParams py21cmfast.wrapper.inputs.CosmoParams py21cmfast.wrapper.inputs.CosmoTables py21cmfast.wrapper.inputs.InputParameters py21cmfast.wrapper.inputs.InputStruct py21cmfast.wrapper.inputs.MatterOptions py21cmfast.wrapper.inputs.SimulationOptions py21cmfast.wrapper.inputs.Table1D Functions --------- .. autoapisummary:: py21cmfast.wrapper.inputs.between py21cmfast.wrapper.inputs.check_halomass_range py21cmfast.wrapper.inputs.choice_field py21cmfast.wrapper.inputs.choice_transformer py21cmfast.wrapper.inputs.choice_validator py21cmfast.wrapper.inputs.dex2exp_transformer py21cmfast.wrapper.inputs.field py21cmfast.wrapper.inputs.get_logspaced_redshifts py21cmfast.wrapper.inputs.input_param_field py21cmfast.wrapper.inputs.logtransformer Module Contents --------------- .. py:function:: between(mn, mx) Validate that a value is between two values. .. !! processed by numpydoc !! .. py:function:: check_halomass_range(inputs) Check that the halo mass range is sensible given the parameters. This function checks that the minimum halo mass set by the various resolutions and flags does not have any gaps. We raise an error if there is a gap, and a warning if it is above the turnover mass. .. !! processed by numpydoc !! .. py:function:: choice_field(*, validator=None, **kwargs) Create an attrs.field that is a choice. .. !! processed by numpydoc !! .. py:function:: choice_transformer(choice, att) Produce a transformer that converts a string to int. The function must be passed a list of string choices. The resulting int is the index of the choice made. .. !! processed by numpydoc !! .. py:function:: choice_validator(inst, att, val) Validate that a value is one of the choices. .. !! processed by numpydoc !! .. py:function:: dex2exp_transformer(x, att) Convert from dex to exponential space. .. !! processed by numpydoc !! .. py:function:: field(*, transformer=None, **kw) Define an attrs field with a 'transformer' property. The transformer, if given, should be a function of a single variable, which will be the attribute's value. It will be used to transform the value before usage in C-code (e.g. by transformin from log to linear space). .. !! processed by numpydoc !! .. py:function:: get_logspaced_redshifts(min_redshift, z_step_factor, max_redshift) Compute a sequence of redshifts to evolve over that are log-spaced. .. !! processed by numpydoc !! .. py:function:: input_param_field(kls) Create an attrs field that must be an InputStruct. :Parameters: **kls** (*InputStruct subclass*) -- The parameter structure which should be returned as an attrs field .. !! processed by numpydoc !! .. py:function:: logtransformer(x, att) Convert from log to linear space. .. !! processed by numpydoc !! .. py:data:: FilterOptions .. py:data:: IntegralMethods .. py:data:: Planck18 .. py:data:: logger