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 edge map parameter to track linearization #1091

Merged
merged 4 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

<!-- Running draft to be removed immediately prior to release. -->

```python
from spyglass.linearization.v1.main import TrackGraph
TrackGraph.alter() # Comment regarding the change
```

### Infrastructure

- Disable populate transaction protection for long-populating tables #1066
Expand All @@ -17,6 +22,8 @@
- Decoding

- Fix edge case errors in spike time loading #1083
- Linearization
- Add edge_map parameter to LinearizedPositionV1 #1091

- Spike Sorting

Expand Down
2 changes: 2 additions & 0 deletions src/spyglass/linearization/v1/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class TrackGraph(SpyglassMixin, dj.Manual):
edges: blob # shape (n_edges, 2)
linear_edge_order : blob # order of edges in linear space, (n_edges, 2)
linear_edge_spacing : blob # space btwn edges in linear space, (n_edges,)
edge_map = NULL : blob # Maps one edge to another before linearization
"""

def get_networkx_track_graph(self, track_graph_parameters=None):
Expand All @@ -58,6 +59,7 @@ def get_networkx_track_graph(self, track_graph_parameters=None):
return make_track_graph(
node_positions=track_graph_parameters["node_positions"],
edges=track_graph_parameters["edges"],
edge_map=track_graph_parameters["edge_map"],
)

def plot_track_graph(self, ax=None, draw_edge_labels=False, **kwds):
Expand Down
Loading