py21cmfast.io.caching.CacheConfig¶
- class py21cmfast.io.caching.CacheConfig¶
A configuration object that specifies whether a certain field should be cached.
- classmethod last_step_only(**kwargs: Unpack[CacheConfigUpdate]) Self¶
Generate a CacheConfig where only boxes needed from more than one step away are cached.
This represents the minimum caching setup which will never store every redshift in memory. PerturbedField and PerturbedHaloCatalogs are all calculated at the start of the run, and HaloBox is required at multiple redshifts for the XraySourceBox. So this caching setup allows free purging of these objects without losing data.
- Parameters:
kwargs (Unpack[CacheConfigUpdate])
- Return type:
Self
- classmethod noloop(**kwargs: Unpack[CacheConfigUpdate]) Self¶
Generate a CacheConfig where only boxes not requiring evolution are cached.
- Parameters:
kwargs (Unpack[CacheConfigUpdate])
- Return type:
Self
- classmethod off(**kwargs: Unpack[CacheConfigUpdate]) Self¶
Generate a CacheConfig where no boxes are cached.
- Parameters:
kwargs (Unpack[CacheConfigUpdate])
- Return type:
Self
- classmethod on(**kwargs: Unpack[CacheConfigUpdate]) Self¶
Generate a CacheConfig where all boxes are cached.
- Parameters:
kwargs (Unpack[CacheConfigUpdate])
- Return type:
Self
- update(**kwargs: Unpack[CacheConfigUpdate]) Self¶
Return a new CacheConfig with the given fields updated.
- Parameters:
kwargs (Unpack[CacheConfigUpdate])
- Return type:
Self
- brightness_temp: bool¶
- halo_catalog: bool¶
- halobox: bool¶
- initial_conditions: bool¶
- ionized_box: bool¶
- perturbed_field: bool¶
- spin_temp: bool¶
- xray_source_box: bool¶