py21cmfast.inputs.FlagOptions

class py21cmfast.inputs.FlagOptions(*args, USE_VELS_AUX=False, **kwargs)[source]

Flag-style options for the ionization routines.

To see default values for each parameter, use FlagOptions._defaults_. All parameters passed in the constructor are also saved as instance attributes which should be considered read-only. This is true of all input-parameter classes.

Note that all flags are set to False by default, giving the simplest “vanilla” version of 21cmFAST.

Parameters
  • USE_HALO_FIELD (bool, optional) – Set to True if intending to find and use the halo field. If False, uses the mean collapse fraction (which is considerably faster).

  • USE_MINI_HALOS (bool, optional) – Set to True if using mini-halos parameterization. If True, USE_MASS_DEPENDENT_ZETA and INHOMO_RECO must be True.

  • USE_MASS_DEPENDENT_ZETA (bool, optional) – Set to True if using new parameterization. Setting to True will automatically set M_MIN_in_Mass to True.

  • SUBCELL_RSDS (bool, optional) – Add sub-cell redshift-space-distortions (cf Sec 2.2 of Greig+2018). Will only be effective if USE_TS_FLUCT is True.

  • INHOMO_RECO (bool, optional) – Whether to perform inhomogeneous recombinations. Increases the computation time.

  • USE_TS_FLUCT (bool, optional) – Whether to perform IGM spin temperature fluctuations (i.e. X-ray heating). Dramatically increases the computation time.

  • M_MIN_in_Mass (bool, optional) – Whether the minimum halo mass (for ionization) is defined by mass or virial temperature. Automatically True if USE_MASS_DEPENDENT_ZETA is True.

  • PHOTON_CONS (bool, optional) – Whether to perform a small correction to account for the inherent photon non-conservation.

  • FIX_VCB_AVG (bool, optional) – Determines whether to use a fixed vcb=VAVG (regardless of USE_RELATIVE_VELOCITIES). It includes the average effect of velocities but not its fluctuations. See Muñoz+21 (2110.13919).

  • USE_VELS_AUX (bool, optional) – Auxiliary variable (not input) to check if minihaloes are being used without relative velocities and complain

Methods

__init__(*args[, USE_VELS_AUX])

clone(**kwargs)

Make a fresh copy of the instance with arbitrary parameters updated.

convert(key, val)

Make any conversions of values before saving to the instance.

get_fieldnames([cstruct])

Obtain the C-side field names of this struct.

get_fields([cstruct])

Obtain the C-side fields of this struct.

get_pointer_fields([cstruct])

Obtain all pointer fields of the struct (typically simulation boxes).

refresh_cstruct()

Delete the underlying C object, forcing it to be rebuilt.

update(**kwargs)

Update the parameters of an existing class structure.

Attributes

INHOMO_RECO

Automatically setting INHOMO_RECO to True if USE_MINI_HALOS.

M_MIN_in_Mass

Whether minimum halo mass is defined in mass or virial temperature.

PHOTON_CONS

Automatically setting PHOTON_CONS to False if USE_MINI_HALOS.

USE_HALO_FIELD

Automatically setting USE_MASS_DEPENDENT_ZETA to False if USE_MINI_HALOS.

USE_MASS_DEPENDENT_ZETA

Automatically setting USE_MASS_DEPENDENT_ZETA to True if USE_MINI_HALOS.

USE_TS_FLUCT

Automatically setting USE_TS_FLUCT to True if USE_MINI_HALOS.

defining_dict

Pure python dictionary representation of this class, as it would appear in C.

fieldnames

List names of fields of the underlying C struct.

fields

List of fields of the underlying C struct (a list of tuples of "name, type").

pointer_fields

List of names of fields which have pointer type in the C struct.

primitive_fields

List of names of fields which have primitive type in the C struct.

pystruct

A pure-python dictionary representation of the corresponding C structure.

self

Dictionary which if passed to its own constructor will yield an identical copy.