Skip to content

dataset

tergite_autocalibration.utils.io.dataset

Functions:

Name Description
create_node_data_path

Create the folder where measurement results, plots and logs specific to the node are stored.

open_dataset

Open the dataset for the analysis.

save_dataset

Save the measurement dataset to a file.

save_qoi

Save the node QOI for each element to a file.

scrape_and_copy_hdf5_files

Find all measurement result files and copy them to the target directory.

create_node_data_path

create_node_data_path(node_name: str) -> Path

Create the folder where measurement results, plots and logs specific to the node are stored.

Parameters:

Name Type Description Default
node_name str

to create a data path for.

required

Returns:

Type Description
Path

Path to the measurement log folder as Path.

open_dataset

open_dataset(name: str, containing_folder_path: Path) -> Dataset

Open the dataset for the analysis.

Returns:

Type Description
Dataset

the complex xarray.Dataset with measurement results

save_dataset

save_dataset(result_dataset: Dataset, node_name: str, data_path: Path) -> None

Save the measurement dataset to a file.

Parameters:

Name Type Description Default
result_dataset Dataset

The dataset to save.

required
node_name str

Name of the node being measured.

required
data_path Path

Path where the dataset will be saved.

required

save_qoi

save_qoi(QOI_dict: dict[str, QOI], node_name: str, data_path: Path) -> None

Save the node QOI for each element to a file.

Parameters:

Name Type Description Default
QOI_dict dict

The QOI dictionary to save.

required
node_name str

Name of the node being measured.

required
data_path Path

Path where the dataset will be saved.

required

scrape_and_copy_hdf5_files

scrape_and_copy_hdf5_files(scrape_directory: Union[Path, str], target_directory: Union[Path, str])

Find all measurement result files and copy them to the target directory.

Parameters:

Name Type Description Default
scrape_directory Union[Path, str]

Folder with measurement result files.

required
target_directory Union[Path, str]

Target directory to copy files to.

required