models¶
Pydantic models used throughout mio.
These models should be kept as generic as possible, and any refinements needed for a specific acquisition class should be defined within that module, inheriting from the relevant parent class. Rule of thumb: keep what is common common, and what is unique unique.
Data models :)
- class mio.models.Container¶
Root model for models intended to be used as runtime data containers, eg. those that actually carry data from a buffer, rather than those that configure positions within a header.
See also:
MiniscopeConfig- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mio.models.DenoiseConfig(*, id: Annotated[str, _PydanticGeneralMetadata(pattern='[\\w\\-\\/#]+')], mio_model: Annotated[str, AfterValidator(func=_is_identifier)] = None, mio_version: str = '0.11.0', interactive_display: InteractiveDisplayConfig | None = None, noise_patch: NoisePatchConfig | None = None, frequency_masking: FrequencyMaskingConfig | None = None, end_frame: int | None = None, minimum_projection: MinimumProjectionConfig | None = None, output_result: bool = True, output_dir: str | None = None)¶
Configuration for denoising a video.
- frequency_masking: FrequencyMaskingConfig | None¶
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mio.models.FrequencyMaskingConfig(*, id: Annotated[str, _PydanticGeneralMetadata(pattern='[\\w\\-\\/#]+')], mio_model: Annotated[str, AfterValidator(func=_is_identifier)] = None, mio_version: str = '0.11.0', enable: bool = True, cast_float32: bool = False, spatial_LPF_cutoff_radius: int, vertical_BEF_cutoff: int = 5, horizontal_BEF_cutoff: int = 0, output_result: bool = False, output_mask: bool = False, output_freq_domain: bool = False)¶
Configuration for frequency filtering. This includes a spatial low-pass filter and vertical and horizontal band elimination filters.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mio.models.MiniscopeConfig¶
Root model for all configuration models, eg. those that are effectively static at runtime.
Note
Not named
ConfigorBaseConfigbecause those are both in use already.See also:
Container- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mio.models.MiniscopeIOModel¶
Root model for all mio models
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mio.models.UpdateBatch(*, id: Annotated[str, _PydanticGeneralMetadata(pattern='[\\w\\-\\/#]+')], mio_model: Annotated[str, AfterValidator(func=_is_identifier)] = None, mio_version: str = '0.11.0', devices: list[DeviceUpdateEntry])¶
Batch update configuration. Only list form is supported:
devices: [DeviceUpdateEntry, …]
- iter_updates(default_port: str | None) list[tuple[str | None, int, Literal['LED', 'GAIN', 'ROI_X', 'ROI_Y', 'SUBSAMPLE'], int]]¶
Yield (port, device_id, key, value) tuples for all updates in this batch.
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- config
- data
- dataset
- mixins
ConfigYAMLMixinConfigYAMLMixin.HEADER_FIELDSConfigYAMLMixin.config_models()ConfigYAMLMixin.config_sources()ConfigYAMLMixin.fill_mio_model()ConfigYAMLMixin.from_any()ConfigYAMLMixin.from_id()ConfigYAMLMixin.from_yaml()ConfigYAMLMixin.idConfigYAMLMixin.iter_configs()ConfigYAMLMixin.mio_modelConfigYAMLMixin.mio_versionConfigYAMLMixin.model_config
ConfigYamlHeaderYAMLMixinYamlDumperyaml_peek()
- models