Configuration and status codes¶
The run configuration and the per-point status codes. The fields are described in full in Run configuration and Status codes.
zvdvc.config¶
Run configuration.
A frozen dataclass tree describes one run. Where a CCPi DVC input key exists,
it is given in the comment, so a CCPi dvc_in file maps onto this one to
one (zvdvc.io.ccpi.read_dvc_input()). Axis conventions: points and
vectors are (x, y, z) in voxels; shapes and boxes of arrays are (z, y, x).
- class zvdvc.config.VolumeSpec(reference: 'str', deformed: 'str', array_path: 'str' = '0', raw_shape_xyz: 'tuple[int, int, int] | None' = None, raw_dtype: 'str | None' = None, raw_header_bytes: 'int' = 0, prefilter_sigma: 'float' = 0.0, gpu_io: 'GpuIo' = 'auto')[source]¶
Bases:
object- Parameters:
- class zvdvc.config.SubvolumeSpec(geometry: 'Geometry' = 'sphere', size: 'float' = 80.0, n_samples: 'int' = 8000, aspect: 'Vec3' = (1.0, 1.0, 1.0), seed: 'int' = 0)[source]¶
Bases:
object- Parameters:
- class zvdvc.config.ThresholdSpec(gray_min: 'float', gray_max: 'float', min_fraction: 'float' = 0.2)[source]¶
Bases:
object
- class zvdvc.config.SearchSpec(dof: 'Literal[3, 6, 12]' = 6, objective: 'Objective' = 'znssd', interpolation: 'Interpolation' = 'tricubic', disp_max: 'float' = 38.0, rigid_trans: 'Vec3' = (0.0, 0.0, 0.0), basin_radius: 'float' = 0.0, threshold: 'ThresholdSpec | None' = None, method: 'Method' = 'fagn', max_iterations: 'int' = 20, obj_tol: 'float' = 1e-06, disp_tol: 'float' = 0.01, report_convg_fail: 'bool' = True)[source]¶
Bases:
object- Parameters:
dof (Literal[3, 6, 12])
objective (Literal['sad', 'ssd', 'zssd', 'nssd', 'znssd'])
interpolation (Literal['nearest', 'trilinear', 'tricubic'])
disp_max (float)
basin_radius (float)
threshold (ThresholdSpec | None)
method (Literal['fagn', 'icgn'])
max_iterations (int)
obj_tol (float)
disp_tol (float)
report_convg_fail (bool)
- threshold: ThresholdSpec | None = None¶
- class zvdvc.config.SeedingSpec(strategy: 'SeedStrategy' = 'wavefront', start_point: 'Vec3 | None' = None, n_neighbours: 'int' = 75, shell_width: 'float | None' = None, coarse_stride: 'int' = 4, coarse_level: 'int' = 1, repair_passes: 'int' = 1)[source]¶
Bases:
object- Parameters:
- class zvdvc.config.ClusterSpec(tile_shape: 'tuple[int, int, int]' = (1024, 1024, 1024), devices: 'tuple[int, ...] | None' = None, gpu_memory_fraction: 'float' = 0.8, batch_points: 'int | None' = None, prefetch_depth: 'int' = 2, brick_dtype: "Literal['native', 'float32']" = 'native', scheduler: "Literal['dynamic', 'static']" = 'dynamic')[source]¶
Bases:
object- Parameters:
- class zvdvc.config.RunConfig(volumes: 'VolumeSpec', points: 'str', output: 'str', subvolume: 'SubvolumeSpec' = <factory>, search: 'SearchSpec' = <factory>, seeding: 'SeedingSpec' = <factory>, cluster: 'ClusterSpec' = <factory>, num_points_to_process: 'int | None' = None, uncertainty_seeds: 'int' = 0, workdir: 'str' = 'runs/default')[source]¶
Bases:
object- Parameters:
volumes (VolumeSpec)
points (str)
output (str)
subvolume (SubvolumeSpec)
search (SearchSpec)
seeding (SeedingSpec)
cluster (ClusterSpec)
num_points_to_process (int | None)
uncertainty_seeds (int)
workdir (str)
- volumes: VolumeSpec¶
- subvolume: SubvolumeSpec¶
- search: SearchSpec¶
- seeding: SeedingSpec¶
- cluster: ClusterSpec¶
- classmethod from_dict(data)[source]¶
Build from nested plain data and
validate()it.Unknown or missing keys, invalid choices and out-of-range values raise
ValueError.
- classmethod from_ccpi(path)[source]¶
Build from a CCPi
dvc_infile (seezvdvc.io.ccpi); relative paths resolve against its folder.
zvdvc.status¶
Per-point search status.
Codes 0 to -3 are CCPi DVC’s (Core/Utility.h) and keep their meaning, so
exported .disp files read correctly in iDVC. Codes below -3 are zvDVC
additions; the CCPi exporter maps them to NOT_SEARCHED.