2
2
3
3
import isce3
4
4
import numpy as np
5
+ import pytest
5
6
from isce3 .unwrap import snaphu
6
7
7
8
@@ -195,7 +196,8 @@ def simulate_phase_noise(corr, nlooks: float, *, seed: Optional[int] = None):
195
196
196
197
197
198
class TestSnaphu :
198
- def test_smooth_cost (self ):
199
+ @pytest .mark .parametrize ("init_method" , ["mcf" , "mst" ])
200
+ def test_smooth_cost (self , init_method ):
199
201
"""Test SNAPHU unwrapping using "smooth" cost mode."""
200
202
# Interferogram dimensions
201
203
l , w = 1100 , 256
@@ -249,6 +251,7 @@ def test_smooth_cost(self):
249
251
corr_raster ,
250
252
nlooks = 20.0 ,
251
253
cost = "smooth" ,
254
+ init_method = init_method ,
252
255
conncomp_params = conncomp_params ,
253
256
)
254
257
@@ -272,7 +275,8 @@ def test_smooth_cost(self):
272
275
cc = ccl_raster .data == label
273
276
assert jaccard_similarity (cc , mask ) > 0.9
274
277
275
- def test_topo_cost (self ):
278
+ @pytest .mark .parametrize ("init_method" , ["mcf" , "mst" ])
279
+ def test_topo_cost (self , init_method ):
276
280
"""Test SNAPHU unwrapping using "topo" cost mode."""
277
281
# Simulate a topographic interferometric phase signal using notionally
278
282
# NISAR-like 20 MHz L-band parameters.
@@ -344,6 +348,7 @@ def test_topo_cost(self):
344
348
nlooks = nlooks ,
345
349
cost = "topo" ,
346
350
cost_params = cost_params ,
351
+ init_method = init_method ,
347
352
)
348
353
349
354
# Check the connected component labels. There should be a single
0 commit comments