Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PBC capability to merge_split_MEST #372

Merged
merged 23 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
41a6ed0
Change distance search in merge_split_MEST to use BallTree query, and…
w-k-jones Nov 29, 2023
098e4d8
Fix dimension order for coordinates in merge_split
w-k-jones Nov 29, 2023
6b5cb68
Add tests for merge_split with PBCs
w-k-jones Nov 29, 2023
3deffa9
Speed up adding edges to graph using add_weighted_edges_from
w-k-jones Nov 29, 2023
2d5d366
Remove unused imports
w-k-jones Nov 29, 2023
1c7ed6f
Apply frame_len filter before assigning edges to the graph, and add n…
w-k-jones Nov 29, 2023
a51f027
Use connected_components from scipy.sparse.csgraph to link cells into…
w-k-jones Nov 29, 2023
5b4aa05
Fix handling of unassigned features in merge_split_MEST and add test …
w-k-jones Nov 29, 2023
ce36b3b
Remove unused import
w-k-jones Nov 29, 2023
eff22f6
Fix distance calculation for 2D case
w-k-jones Nov 29, 2023
de01424
Add flag for cells starting with split/ending with merge
w-k-jones Nov 29, 2023
0b75bae
Rename cell_starts_with_merge flag
w-k-jones Nov 29, 2023
c888bf9
Add test for 3D merge/split and fix coordinate stack axis
w-k-jones Nov 29, 2023
81bdcce
Fix application of dxy and dz to 3D feature locations in filter_min_d…
w-k-jones Nov 29, 2023
71c4b39
Switch to using scipy.sparse.csgraph implementation of minimum spanni…
w-k-jones Nov 29, 2023
c63632a
Cast start_node_cells and end_node_cells to np.int32 to avoid type mi…
w-k-jones Nov 29, 2023
fa4659c
Use groupby instead of bincount to count number of child cells/features
w-k-jones Nov 30, 2023
e9ec119
Recalculate start and end node cells after applying minimum spanning …
w-k-jones Nov 30, 2023
6b3473a
Add optional use of dz or vertical_coord for specifying vertical loca…
w-k-jones Sep 24, 2024
8302b16
Remove erroneus import
w-k-jones Sep 24, 2024
b6a48ac
Merge branch 'RC_v1.5.x' of https://github.com/climate-processes/toba…
w-k-jones Sep 24, 2024
4c96374
Fix changed import location of build_distance_function
w-k-jones Sep 24, 2024
412ab97
Merge branch 'RC_v1.5.x' of https://github.com/climate-processes/toba…
w-k-jones Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tobac/feature_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ def filter_min_distance(
target: {'maximum', 'minimum'}, optional
Flag to determine if tracking is targetting minima or maxima in
the data. Default is 'maximum'.
PBC_flag : str('none', 'hdim_1', 'hdim_2', 'both')
PBC_flag : str('none', 'hdim_1', 'hdim_2', 'both'), optional
freemansw1 marked this conversation as resolved.
Show resolved Hide resolved
Sets whether to use periodic boundaries, and if so in which directions.
'none' means that we do not have periodic boundaries
'hdim_1' means that we are periodic along hdim1
Expand Down Expand Up @@ -1534,8 +1534,8 @@ def filter_min_distance(
feature_locations = features[
[z_coordinate_name, y_coordinate_name, x_coordinate_name]
].to_numpy()
feature_locations[0] *= dz
feature_locations[1:] *= dxy
feature_locations[:, 0] *= dz
feature_locations[:, 1:] *= dxy
else:
feature_locations = (
features[[y_coordinate_name, x_coordinate_name]].to_numpy() * dxy
Expand Down
Loading
Loading