Dataset
A class representing a scientific database stored in a file |
|
|
Create new LUE dataset |
|
Open existing LUE dataset |
|
Check whether a file contains a valid LUE dataset |
|
Overloaded function. |
- class lue.data_model.Dataset
A class representing a scientific database stored in a file
A LUE dataset contains collections of
universes
andphenomena
.New datasets can be created using
create_dataset()
. Existing datasets can be opened withopen_dataset()
.Note
A LUE dataset is not similar to an HDF5 dataset. An HDF5 dataset represents a multidimensional array in an HDF5 file. A LUE dataset is an HDF5 file containing many HDF5 objects, including HDF5 datasets.
- add_phenomenon(self: lue.lue_py.data_model.Dataset, name: str, description: str = '') lue.lue_py.data_model.Phenomenon
Add new phenomenon to dataset
- Parameters:
- Raises:
RuntimeError – In case the phenomenon cannot be created
- Return type:
- add_universe(self: lue.lue_py.data_model.Dataset, name: str) lue.lue_py.data_model.Universe
Add new universe to dataset
- Parameters:
name (str) – Name of universe to create
- Raises:
RuntimeError – In case the universe cannot be created
- Return type:
- lue.data_model.create_dataset(name: str, description: str = '') lue.lue_py.data_model.Dataset
Create new LUE dataset
- Parameters:
- Return type:
Newly created datasets can be validated using
validate()
.
- lue.data_model.open_dataset(name: str, mode: str = 'r') lue.lue_py.data_model.Dataset
Open existing LUE dataset
- Parameters:
- Return type:
Updated datasets can be validated using
validate()
.
- lue.data_model.validate(name: str) lue.lue_py.data_model.hdf5.Issues
Check whether a file contains a valid LUE dataset
- Parameters:
name (str) – Name of file to check
- Returns:
Collection of issues found
- Return type:
See also:
assert_is_valid()
- lue.data_model.assert_is_valid(*args, **kwargs)
Overloaded function.
assert_is_valid(name: str, fail_on_warning: bool = True) -> None
Check whether a file contains a valid LUE dataset
- param str name:
Name of file to check
- param bool fail_on_warning:
Whether or not to treat warnings as errors
- raises RuntimeError:
If errors are found
See also:
validate()
assert_is_valid(file: lue.lue_py.data_model.hdf5.File, fail_on_warning: bool = True) -> None
Check whether a file contains a valid LUE dataset
- param hdf5.File file:
File to check
- param bool fail_on_warning:
Whether or not to treat warnings as errors
- raises RuntimeError:
If errors are found
See also:
validate()