Skip to content

Commit

Permalink
inclusive max multiplier & update vdatum with adjusted nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA committed Aug 25, 2023
1 parent 3dcf924 commit d26e8d0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ocsmesh/cli/iter_filter_interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def interpolate_data():
break

filter_multiplier = filter_multiplier * 2
if filter_multiplier >= max_multiplier:
if filter_multiplier > max_multiplier:
break

iteration_raster_paths = np.unique(gdf_0pts['source'].array).tolist()
Expand All @@ -161,8 +161,10 @@ def interpolate_data():
# Write interpolated mesh to the disk
mesh.write(out_dir / 'interpolated.2dm', format='2dm', overwrite=True)

# Read metadata file
df_vdatum = pd.read_csv(out_dir/'interp_info.csv', header=None)
# Read metadata file and update nodes that are above threshold
df_vdatum = pd.read_csv(out_dir/'vdatum.txt', header=None, index_col=0)
df_vdatum.loc[df_vdatum[5] > threshold, 5] = threshold
df_vdatum.to_csv(out_dir/'vdatum.txt', header=False)
idxs = df_vdatum.iloc[:, 0].array

# Clip the interpolated mesh based on the index of nodes in the metadatafile
Expand Down

0 comments on commit d26e8d0

Please sign in to comment.