Skip to content

Commit

Permalink
Add edge map parameter to track linearization (LorenFrankLab#1091)
Browse files Browse the repository at this point in the history
* Add edge map parameter

* Update CHANGELOG.md

* Fix alter tables

---------

Co-authored-by: Chris Broz <[email protected]>
  • Loading branch information
edeno and CBroz1 authored Sep 10, 2024
1 parent 991fc76 commit d9115f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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

0 comments on commit d9115f6

Please sign in to comment.