Skip to content

Commit

Permalink
Add random seed for point cloud subsampling in test_biascorr (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet authored May 8, 2024
1 parent 82fe07d commit dd4b46b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_coreg/test_biascorr.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,10 @@ def test_deramp__synthetic(self, fit_args, order: int) -> None:
deramp = biascorr.Deramp(poly_order=order)
elev_fit_args = fit_args.copy()
if isinstance(elev_fit_args["to_be_aligned_elev"], gpd.GeoDataFrame):
bias_elev = bias_dem.to_pointcloud(data_column_name="z", subsample=50000).ds
bias_elev = bias_dem.to_pointcloud(data_column_name="z", subsample=30000, random_state=42).ds
else:
bias_elev = bias_dem
deramp.fit(elev_fit_args["reference_elev"], to_be_aligned_elev=bias_elev, subsample=40000, random_state=42)
deramp.fit(elev_fit_args["reference_elev"], to_be_aligned_elev=bias_elev, subsample=20000, random_state=42)

# Check high-order fit parameters are the same within 10%
fit_params = deramp._meta["fit_params"]
Expand Down Expand Up @@ -579,7 +579,7 @@ def test_terrainbias__synthetic(self, fit_args) -> None:
)
elev_fit_args = fit_args.copy()
if isinstance(elev_fit_args["to_be_aligned_elev"], gpd.GeoDataFrame):
bias_elev = bias_dem.to_pointcloud(data_column_name="z", subsample=20000).ds
bias_elev = bias_dem.to_pointcloud(data_column_name="z", subsample=20000, random_state=42).ds
else:
bias_elev = bias_dem
tb.fit(
Expand Down

0 comments on commit dd4b46b

Please sign in to comment.