boilercv_pipeline.models.subcool#

Subcooling study-specific models.

Submodules#

Package Contents#

Classes#

Constants

Subcool study constants.

SubcoolParams

Stage parameters for the subcooled boiling study.

FilledDeps

Dependencies for subcooled boiling study including filled video dataset.

FilledParams

Stage parameters for subcooled boiling study including filled video dataset.

Functions#

validate_time_suffixed_paths

Validate time-suffixed paths.

Data#

API#

class boilercv_pipeline.models.subcool.Constants(
/,
**data: typing.Any,
)#

Bases: pydantic.BaseModel

Subcool study constants.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

day: str#

‘2024-07-18’

Default sample day.

time: str#

‘17-44-35’

Default sample time.

nb_frame_count: int#

500

Default frame count in notebooks.

nb_frame_step: int#

1

Default step between frames in notebooks.

data_stage: boilercv_pipeline.models.stage.DataStage#

‘DataStage(…)’

Common stages of data processing.

property nb_slicer_patterns: dict[str, boilercv_pipeline.models.deps.types.Slicers]#

Slicer patterns for notebook runs.

property sample: str#

Sample to process.

property nb_include_patterns: list[str]#

Include patterns for a single sample.

property include_patterns: list[str]#

Include patterns.

boilercv_pipeline.models.subcool.const#

‘Constants(…)’

boilercv_pipeline.models.subcool.validate_time_suffixed_paths(
paths: list[pathlib.Path],
info: pydantic.ValidationInfo,
times_field: str,
paths_field: str,
paths_subfield: str,
prefix: str = '',
subfield_prefix: bool = True,
ext: str = 'h5',
) list[pathlib.Path]#

Validate time-suffixed paths.

class boilercv_pipeline.models.subcool.SubcoolParams#

Bases: boilercv_pipeline.models.params.DataParams[boilercv_pipeline.models.params.types.Deps_T, boilercv_pipeline.models.params.types.Outs_T, boilercv_pipeline.models.params.types.Data_T], typing.Generic[boilercv_pipeline.models.params.types.Deps_T, boilercv_pipeline.models.params.types.Outs_T, boilercv_pipeline.models.params.types.Data_T]

Stage parameters for the subcooled boiling study.

sample: str#

None

Sample to process.

only_sample: Annotated[bool, PairedArg('only_sample'), ContextAfterValidator(partial(dvc_set_only_sample, sample_field='sample'))]#

False

Only process the sample.

include_patterns: Annotated[list[str], AfterValidator(lambda include_patterns, info: [f"^.*{info.data['sample']}.*$"] if info.data['only_sample'] else include_patterns)]#

None

Include patterns.

class boilercv_pipeline.models.subcool.FilledDeps(
/,
**data: context_models.types.Data,
)#

Bases: boilercv_pipeline.models.stage.Deps

Dependencies for subcooled boiling study including filled video dataset.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

stage: boilercv_pipeline.models.path.DirectoryPathSerPosix#

None

nb: boilercv_pipeline.models.path.DocsFile#

None

filled: boilercv_pipeline.models.path.DataDir#

None

class boilercv_pipeline.models.subcool.FilledParams#

Bases: boilercv_pipeline.models.subcool.SubcoolParams[boilercv_pipeline.models.subcool.types.FilledDeps_T, boilercv_pipeline.models.stage.types.DfsPlotsOuts_T, boilercv_pipeline.models.params.types.Data_T], typing.Generic[boilercv_pipeline.models.subcool.types.FilledDeps_T, boilercv_pipeline.models.stage.types.DfsPlotsOuts_T, boilercv_pipeline.models.params.types.Data_T]

Stage parameters for subcooled boiling study including filled video dataset.

frame_count: int#

0

Count of frames.

frame_step: int#

1

Step between frames.

slicer_patterns: dict[str, boilercv_pipeline.models.deps.types.Slicers]#

‘Field(…)’

Slicer patterns.

filled: Annotated[list[pathlib.Path], Arg(hidden=True), AfterValidator(lambda paths, info: paths or DirSlicer(path=info.data['deps'].filled, include_patterns=info.data['include_patterns']).paths)]#

‘Field(…)’

Paths to filled video datasets.

filled_slicers: Annotated[list[boilercv_pipeline.models.deps.types.Slicers], Arg(hidden=True), AfterValidator(lambda slicers, info: slicers or [get_slicers(path, slicer_patterns=info.data['slicer_patterns'] or {'.+': {FRAME: first_slicer(n=info.data['frame_count'], step=info.data['frame_step'])}}) for path in info.data['filled']])]#

‘Field(…)’

Slicers for filled video datasets.

times: Annotated[list[str], Arg(hidden=True), AfterValidator(lambda times, info: times or [get_time(path) for path in info.data['filled']]), ContextAfterValidator(dvc_extend_with_timestamp_suffixed_plots)]#

‘Field(…)’

dfs: list[pathlib.Path]#

None

Paths to data frame stage outputs.