diff --git a/src/dolphin/unwrap/_unwrap_3d.py b/src/dolphin/unwrap/_unwrap_3d.py index 26b626d4..235dbdf8 100644 --- a/src/dolphin/unwrap/_unwrap_3d.py +++ b/src/dolphin/unwrap/_unwrap_3d.py @@ -40,7 +40,7 @@ def unwrap_spurt( # Mark the "bad" pixels (good=1, bad=0, following the unwrapper mask convention) temp_coh_mask = temp_coh > options.temporal_coherence_threshold combined_mask = temp_coh_mask - if similarity_filename: + if similarity_filename and options.similarity_threshold: sim = io.load_gdal(similarity_filename, masked=True).filled(0) sim_mask = sim > options.similarity_threshold # A good pixel can have good similarity, or good temp. coherence @@ -87,6 +87,8 @@ def unwrap_spurt( [ "--pts-per-tile", str(options.tiler_settings.target_points_per_tile), + "--max-tiles", + str(options.tiler_settings.max_tiles), ] ) diff --git a/src/dolphin/workflows/config/_unwrap_options.py b/src/dolphin/workflows/config/_unwrap_options.py index 677d7755..20aee94d 100644 --- a/src/dolphin/workflows/config/_unwrap_options.py +++ b/src/dolphin/workflows/config/_unwrap_options.py @@ -115,9 +115,11 @@ class SnaphuOptions(BaseModel, extra="forbid"): ) single_tile_reoptimize: bool = Field( False, - description="If True, after unwrapping with multiple tiles, an additional" - " post-processing unwrapping step is performed to re-optimize the unwrapped" - " phase using a single tile", + description=( + "If True, after unwrapping with multiple tiles, an additional" + " post-processing unwrapping step is performed to re-optimize the unwrapped" + " phase using a single tile" + ), ) _to_tuple = field_validator("ntiles", "tile_overlap", mode="before")(to_tuple) @@ -249,14 +251,18 @@ class SpurtOptions(BaseModel, extra="forbid"): """ temporal_coherence_threshold: float = Field( - 0.6, - description="Temporal coherence to pick pixels used on an irregular grid", + 0.7, + description="Temporal coherence to pick pixels used on an irregular grid.", ge=0.0, lt=1.0, ) similarity_threshold: float = Field( 0.5, - description="Similarity to pick pixels used on an irregular grid", + description=( + "Similarity to pick pixels used on an irregular grid. Any pixel with" + " similarity above `similarity_threshold` *or* above the temporal coherence" + " threshold is chosen." + ), ge=0.0, lt=1.0, )