py21cmfast.outputs.BrightnessTemp

class py21cmfast.outputs.BrightnessTemp(*, astro_params: AstroParams | None = None, flag_options: FlagOptions | None = None, **kwargs)[source]

A class containing the brightness temperature box.

Methods

__init__(*[, astro_params, flag_options])

Base type for output structures from C functions.

compute(*, spin_temp, ionized_box, ...)

Compute the function.

ensure_arrays_computed(*arrays[, load])

Check if the given arrays are computed (not just initialized).

ensure_arrays_inited(*arrays[, init])

Check if the given arrays are initialized (or computed).

ensure_input_computed(input_box[, load])

Ensure all the inputs have been computed.

exists([direc])

Return a bool indicating whether a box matching the parameters of this instance is in cache.

find_existing([direc])

Try to find existing boxes which match the parameters of this instance.

from_file(fname[, direc, load_data, ...])

Create an instance from a file on disk.

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).

get_required_input_arrays(input_box)

Return all input arrays required to compute this object.

load_all()

Load all possible arrays into memory.

prepare([flush, keep, force])

Prepare the instance for being passed to another function.

purge([force])

Flush all the boxes out of memory.

read([direc, fname, keys])

Try find and read existing boxes from cache, which match the parameters of this instance.

refresh_cstruct()

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

save([fname, direc, h5_group])

Save the box to disk.

summarize([indent])

Generate a string summary of the struct.

write([direc, fname, write_inputs, mode])

Write the struct in standard HDF5 format.

write_data_to_hdf5_group(group)

Write out this object to a particular HDF5 subgroup.

Attributes

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").

filename

The base filename of this object.

global_Tb

is_computed

Whether this instance has been computed at all.

path

The path to an on-disk version of this object.

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.

random_seed

The random seed for this particular instance.