mth5.clients.base
Created on Fri Oct 11 11:36:26 2024
@author: jpeacock
Classes
Module Contents
- class mth5.clients.base.ClientBase(data_path: str | pathlib.Path, sample_rates: Sequence[float] = [1], save_path: str | pathlib.Path | None = None, mth5_filename: str = 'from_client.h5', **kwargs: Any)[source]
-
- property data_path: pathlib.Path[source]
Path to data directory.
- Returns:
Path to the data directory.
- Return type:
Path
Examples
>>> client = ClientBase(data_path="./data") >>> client.data_path PosixPath('data')
- property sample_rates: list[float][source]
List of sample rates to look for.
- Returns:
Sample rates.
- Return type:
list of float
Examples
>>> client = ClientBase(data_path="./data", sample_rates=[1, 8, 256]) >>> client.sample_rates [1.0, 8.0, 256.0]
- property save_path: pathlib.Path[source]
Path to save the mth5 file.
- Returns:
Full path to the mth5 file.
- Return type:
Path
Examples
>>> client = ClientBase(data_path="./data", save_path="./output", mth5_filename="test.h5") >>> client.save_path PosixPath('output/test.h5')
- property h5_kwargs: dict[str, Any][source]
Dictionary of HDF5 keyword arguments for file creation.
- Returns:
Dictionary of HDF5 file creation parameters.
- Return type:
dict
Examples
>>> client = ClientBase(data_path="./data") >>> client.h5_kwargs["compression"] 'gzip'
- get_run_dict() Any[source]
Get run information from the collection.
- Returns:
Run information as returned by the collection’s get_runs method.
- Return type:
Any
Examples
>>> client = ClientBase(data_path="./data") >>> client.collection = ... # assign a collection with get_runs method >>> client.get_run_dict() ...