Skip to content

module myna.core.files.file

Base class for Myna file


class File

Base class for Myna file definitions.

method File.__init__

__init__(file)

Initialize with file path

Args:

  • file: filepath string

method File.columns_are_valid

columns_are_valid(cols, expected_cols, expected_cols_types)

Check if file columns are valid and print informative warning.


method File.file_is_valid

file_is_valid()

Check if file is valid based on class/subclass requirements


method File.get_values_for_sync

get_values_for_sync(
    mode: Literal['spatial_2d', 'spatial_3d', 'temporal']
)  tuple[tuple[numpy.ndarray, numpy.ndarray] | tuple[numpy.ndarray], list[numpy.ndarray], list[str], list[str]]

Get values at XY location in format expected for a layer-wise image sync

Possible Exceptions: - ValueError for incorrect mode - KeyError for no columns found for requested mode - NotImplementedError if not implemented for the filetype


class Variable

Base class for Myna variable definitions.

method Variable.__init__

__init__(name: str, units: str = None, dtype=None, description: str = '')

Initialize with variable name and units

Args:

  • name: variable name string
  • units: variable units string
  • dtype: variable data type (e.g. np.float32, np.int64)

This file was automatically generated via lazydocs.