exosim.models.utils.cachedData#
Classes#
This class caches data cube into an h5 file. The cube data are chunked toward the first axis. |
Module Contents#
- class CachedData(axis0, axis1, axis2, output=None, output_path=None, dataset_name=None, dtype=np.float64)[source]#
Bases:
exosim.log.LoggerThis class caches data cube into an h5 file. The cube data are chunked toward the first axis. In this class are also defined a set of operation to operate on the dataset using the chinks system.
- Variables:
axis0 (int) – first axis size
axis1 (int) – second axis size
axis2 (int) – third axis size
output (
h5py.FileorHDF5OutputorHDF5OutputGroup) – name of the file used for caching.dataset_name (str) – name used to store the dataset into the h5 file.
output – h5py open file used for caching
dataset_path (str) – path where is stored the dataset inside the output file.
chunked_dataset (
h5py.Dataset) – h5py dataset used to store the data
- Parameters:
Notes
The cached data may be stored in a temporary file. To delete temporary files we included a garbage collector. Please, remember to delete the class when done as in the following example
>>> myClass = CachedData(1,1,1) >>> del myClass