py21cmfast.drivers.coeval.Coeval ================================ .. py:class:: py21cmfast.drivers.coeval.Coeval A full coeval box with all associated data. .. !! processed by numpydoc !! .. py:method:: apply_rsds(field: str = 'brightness_temp', axis: str = 'z', periodic: bool = True, n_rsd_subcells: int = 4) Apply redshift-space distortions to a particular field of the coeval box. :Parameters: * **field** (*str, optional*) -- The field onto which redshift-space distortions shall be applied. Default is "brightness_temp". * **axis** (*str, optioanl*) -- The assumed axis of the line-of-sight. Options are "x", "y", or "z". Default is "z". * **periodic** (*bool, optioanl*) -- Whether to assume periodic boundary conditions along the line-of-sight. Default is True. * **n_rsd_subcells** (*int, optional*) -- The number of subcells into which each cell is divided when redshift space distortions are applied. Default is 4. :returns: *field_with_rsds* -- A box of the field, with redshift space distortions. .. !! processed by numpydoc !! .. py:method:: apply_velocity_corrections(axis: str = 'z', periodic: bool = True, n_rsd_subcells: int = 4) Apply velocity gradient corrections and redshift-space distortions to the brightness temperature field. :Parameters: * **axis** (*str, optioanl*) -- The assumed axis of the line-of-sight. Options are "x", "y", or "z". Default is "z". * **periodic** (*bool, optioanl*) -- Whether to assume periodic boundary conditions along the line-of-sight. Default is True. * **n_rsd_subcells** (*int, optional*) -- The number of subcells into which each cell is divided when redshift space distortions are applied. Default is 4. :returns: *field_with_rsds* -- A box of the brightness temperature, with velocity gradient corrections and redshift-space distortions. .. !! processed by numpydoc !! .. py:method:: from_file(path: str | pathlib.Path, safe: bool = True) -> Self :classmethod: Read the Coeval object from disk and return it. .. !! processed by numpydoc !! .. py:method:: get_fields(ignore_structs: tuple[str, Ellipsis] = ()) -> list[str] :classmethod: Obtain a list of name of simulation boxes saved in the Coeval object. .. !! processed by numpydoc !! .. py:method:: include_dvdr_in_tau21(axis: str = 'z', periodic: bool = True) Include velocity gradient corrections to the brightness temperature field. :Parameters: * **axis** (*str, optioanl*) -- The assumed axis of the line-of-sight. Options are "x", "y", or "z". Default is "z". * **periodic** (*bool, optioanl*) -- Whether to assume periodic boundary conditions along the line-of-sight. Default is True. :returns: *tb_with_dvdr* -- A box of the brightness temperature, with velocity gradient corrections. .. !! processed by numpydoc !! .. py:method:: prepare_for_next_snapshot(keepset: collections.abc.Sequence[str] | None = None, force: bool = False) Purge intermediate computational fields to save memory. Purges all output structs except those specified in `keep`. :Parameters: * **keep** (*list[str], optional*) -- Names of structs to keep (not purge). * **force** (*bool*) -- Force purge even if not saved to disk. .. !! processed by numpydoc !! .. py:method:: save(path: str | pathlib.Path, clobber=False) Save the Coeval object to disk. .. !! processed by numpydoc !! .. py:property:: astro_options Flag Options shared by all datasets. .. !! processed by numpydoc !! .. py:property:: astro_params Astro params shared by all datasets. .. !! processed by numpydoc !! .. py:attribute:: brightness_temperature :type: py21cmfast.wrapper.outputs.BrightnessTemp .. py:property:: cosmo_params Cosmo params shared by all datasets. .. !! processed by numpydoc !! .. py:attribute:: halobox :type: py21cmfast.wrapper.outputs.HaloBox | None .. py:attribute:: initial_conditions :type: py21cmfast.wrapper.outputs.InitialConditions .. py:property:: inputs :type: py21cmfast.wrapper.inputs.InputParameters An InputParameters object associated with the coeval box. .. !! processed by numpydoc !! .. py:attribute:: ionized_box :type: py21cmfast.wrapper.outputs.IonizedBox .. py:property:: matter_options Matter Flags shared by all datasets. .. !! processed by numpydoc !! .. py:property:: output_structs :type: dict[str, py21cmfast.wrapper.outputs.OutputStruct] Get a dictionary of OutputStruct objects contained in this Coeval instance. This property method returns a dictionary containing all the OutputStruct objects that are attributes of the Coeval instance. It filters out any non-OutputStruct attributes. :returns: *dict[str, OutputStruct]* -- A dictionary where the keys are attribute names and the values are the corresponding OutputStruct objects. .. !! processed by numpydoc !! .. py:attribute:: perturbed_field :type: py21cmfast.wrapper.outputs.PerturbedField .. py:attribute:: photon_nonconservation_data :type: dict .. py:property:: random_seed Random seed shared by all datasets. .. !! processed by numpydoc !! .. py:property:: redshift :type: float The redshift of the coeval box. .. !! processed by numpydoc !! .. py:property:: simulation_options Matter Params shared by all datasets. .. !! processed by numpydoc !! .. py:attribute:: ts_box :type: py21cmfast.wrapper.outputs.TsBox | None