Miroslav Simko <ms@iolabs.ch> 2026-09-01T14:53:04+02:00
Commit #16 ยท 2 snippets
src/iolabs_point_cloud_mask_clustering/pipeline.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
| 132 | channel_dtypes: dict[str, np.dtype] | None = None | 132 | channel_dtypes: dict[str, np.dtype] | None = None |
| 133 | for path in step3_paths: | 133 | for path in step3_paths: |
| 134 | chunk = load_step3_file(path) | 134 | chunk = load_step3_file(path) |
| 135 | source_count += len(chunk.points) | 135 | source_count += len(chunk.points) |
| 136 | chunk_dtypes = { | 136 | chunk_dtypes = channel_dtypes_of(chunk.data) |
| 137 | "intensity": chunk.data.intensity.dtype, | ||
| 138 | "red": chunk.data.red.dtype, | ||
| 139 | "green": chunk.data.green.dtype, | ||
| 140 | "blue": chunk.data.blue.dtype, | ||
| 141 | "scan_angle": chunk.data.scan_angle_rank.dtype, | ||
| 142 | } | ||
| 143 | if channel_dtypes is None: | 137 | if channel_dtypes is None: |
| 144 | channel_dtypes = chunk_dtypes | 138 | channel_dtypes = chunk_dtypes |
| 145 | else: | 139 | else: |
| 146 | channel_dtypes = { | 140 | channel_dtypes = { |
| 17 | from ._config import MaskClusteringConfig | 17 | from ._config import MaskClusteringConfig |
| 18 | from ._log_props import LOG_PROPS | 18 | from ._log_props import LOG_PROPS |
| 19 | from .cluster_io import write_cluster_npz | 19 | from .cluster_io import write_cluster_npz |
| 20 | from .geometry import component_geojson_geometry, mask_polygons_xy, write_prism_ply | 20 | from .geometry import component_geojson_geometry, mask_polygons_xy, write_prism_ply |
| 21 | from .input_io import load_separation_arrays, load_step3_file | 21 | from .input_io import channel_dtypes_of, load_separation_arrays, load_step3_file |
| 22 | from .intensity_separation import ( | 22 | from .intensity_separation import ( |
| 23 | ClusterSeparation, | 23 | ClusterSeparation, |
| 24 | dilate_mask, | 24 | dilate_mask, |
| 25 | separate_cluster, | 25 | separate_cluster, |
Small: separation-channel dtypes in the maskclustering pipeline come from the record schema instead of a local table. Removes 6 lines of duplication.