py21cmfast.cli ============== .. py:module:: py21cmfast.cli .. autoapi-nested-parse:: Module that contains the command line app. .. !! processed by numpydoc !! Attributes ---------- .. autoapisummary:: py21cmfast.cli.AVAILABLE_TEMPLATES py21cmfast.cli.FORMAT py21cmfast.cli.app py21cmfast.cli.cns py21cmfast.cli.logger Classes ------- .. toctree:: :hidden: /autoapi/py21cmfast/cli/ParameterSelection /autoapi/py21cmfast/cli/Parameters /autoapi/py21cmfast/cli/RunParams .. autoapisummary:: py21cmfast.cli.ParameterSelection py21cmfast.cli.Parameters py21cmfast.cli.RunParams Functions --------- .. autoapisummary:: py21cmfast.cli.cfg_avail py21cmfast.cli.cfg_show py21cmfast.cli.coeval py21cmfast.cli.ics py21cmfast.cli.lightcone py21cmfast.cli.params py21cmfast.cli.pr_feature py21cmfast.cli.predict_storage_size py21cmfast.cli.predict_struct_size py21cmfast.cli.pretty_print_inputs py21cmfast.cli.print_banner py21cmfast.cli.template_create Module Contents --------------- .. py:function:: cfg_avail() Print all available builtin templates. .. !! processed by numpydoc !! .. py:function:: cfg_show(names, mode = 'full') Show and describe an in-built template. .. !! processed by numpydoc !! .. py:function:: coeval(redshifts, options = RunParams(), params = Parameters(), out = Path(), save_all_redshifts = False, min_evolved_redshift = 5.5) Generate coeval cubes at given redshifts. To specify simulation parameters, use a base template (either via --param-file or --template) and optionally override any particular simulation parameters. To see the available simulation parameters and how to specify them, use `21cmfast run params --help`. :Parameters: * **redshifts** -- The redshifts at which to generate the coeval boxes. * **out** -- The path at which to save the coeval boxes. The coeval data at each redshift will be saved to the filename "coeval_z{redshift:.2f}.h5". * **save_all_redshifts** -- Whether to save all redshifts in `node_redshifts` (i.e. all those in the evolution of the simulation), or only those in the redshifts given. * **min_evolved_redshift** -- The minimum redshift down to which to evolve the simulation. For some simulation configurations, this is not used at all, while for others it will subtly change the evolution. .. !! processed by numpydoc !! .. py:function:: ics(options = RunParams(), params = Parameters(), min_evolved_redshift = 5.5) Run a single iteration of 21cmFAST init, saving results to file. To specify simulation parameters, use a base template (either via --param-file or --template) and optionally override any particular simulation parameters. To see the available simulation parameters and how to specify them, use `21cmfast run params --help`. :Parameters: **min_evolved_redshift** -- The minimum redshift down to which to evolve the simulation. For some simulation configurations, this is not used at all, while for others it will subtly change the evolution. .. !! processed by numpydoc !! .. py:function:: lightcone(options = RunParams(), params = Parameters(), redshift_range = (6.0, 30.0), out = Path('lightcone.h5'), lightcone_quantities = ('brightness_temp', ), min_evolved_redshift = 5.5) Generate a lightcone between given redshifts. To specify simulation parameters, use a base template (either via --param-file or --template) and optionally override any particular simulation parameters. To see the available simulation parameters and how to specify them, use `21cmfast run params --help`. :Parameters: * **redshift_range** -- The redshifts between which to generate the lightcone. * **out** -- The filename to which to save the lightcone data. * **lightcone_quantities** -- Computed fields to generate lightcones for. * **min_evolved_redshift** -- The minimum redshift down to which to evolve the simulation. For some simulation configurations, this is not used at all, while for others it will subtly change the evolution. .. !! processed by numpydoc !! .. py:function:: params(params = Parameters()) Show the current simulation parameters. .. !! processed by numpydoc !! .. py:function:: pr_feature(options = RunParams(), params = Parameters(), redshift_range = (6.0, 30.0), outdir = Path()) Create standard plots comparing a default simulation against a simulation with a new feature. The base of the comparison is set by either --param-file or --template. The "new feature" which is to be compared is set by overriding specific parameters at the command line (e.g --use-ts-fluct). Plots are saved in the current directory, with the prefix "pr_feature". :Parameters: **redshift_range** -- The redshifts between which to compute the lightcones for comparison. .. !! processed by numpydoc !! .. py:function:: predict_storage_size(param_selection = ParameterSelection(), user_params = Parameters(), min_evolved_redshift = 5.5, unit = None, cache_config = 'on') Compute the required storage for an entire run. .. !! processed by numpydoc !! .. py:function:: predict_struct_size(param_selection = ParameterSelection(), user_params = Parameters(), unit = None, cache_config = 'on') Compute the required storage per output kind for given inputs. .. !! processed by numpydoc !! .. py:function:: pretty_print_inputs(inputs, name, description, mode = 'full') .. py:function:: print_banner() Print a cool banner for 21cmFAST using rich. .. !! processed by numpydoc !! .. py:function:: template_create(out, param_selection = ParameterSelection(), user_params = Parameters(), mode = 'full') Create a new full simulation parameter template. The created template file (TOML file) contains *all* of the available parameters. To create it, use a base template (either via --param-file or --template) and optionally override any particular simulation parameters. To see the available simulation parameters and how to specify them, use `21cmfast run params --help`. .. !! processed by numpydoc !! .. py:data:: AVAILABLE_TEMPLATES :type: list[str] .. py:data:: FORMAT :value: '%(message)s' .. py:data:: app .. py:data:: cns .. py:data:: logger