Read Clear Control#

class iohub.clearcontrol.ClearControlFOV(data_path: StrOrBytesPath, missing_value: int | None = None, cache: bool = False)[source]#

Reader class for Clear Control dataset royerlab/opensimview.

It provides an array-like API for the Clear Control dataset thats loads the volumes lazily.

It assumes the channels and volumes have the same shape, when that is not the case the minimum value from each dimension is used.

Parameters:
data_pathStrOrBytesPath

Clear Control dataset path.

missing_valueOptional[int], optional

If provided this class won’t raise an error when missing a volume and it will return an array with the provided value.

cachebool

When true caches the last array using the first two indices as key.

__getitem__(key: int | slice | list[int] | ndarray | tuple[int | slice | list[int] | ndarray, ...]) ndarray[source]#

Lazily load array as indexed.

Parameters:
keyArrayIndex | tuple[ArrayIndex, …]

An indexing key as in numpy, but a bit more limited.

Returns:
np.ndarray

Output array.

Raises:
NotImplementedError

Not all numpy array of indexing are implemented.

channel_index(key: str) int#

Return index of given channel.

property channel_names: list[str]#

Return sorted channels name.

metadata() dict[str, Any][source]#

Summarizes Clear Control metadata into a dictionary.

property scale: list[float]#

Dataset temporal, channel and spacial scales.

property shape: tuple[int, int, int, int, int]#

Reads Clear Control index data of every data and returns the element-wise minimum shape.

property t_scale: float#

Helper function for FOV time scale (seconds).

property zyx_scale: tuple[float, float, float]#

Helper function for FOV spatial scale (micrometer).