main.py
LinearizationParameters
¶
Bases: SpyglassMixin
, Lookup
Choose whether to use an HMM to linearize position.
This can help when the euclidean distances between separate arms are too close and the previous position has some information about which arm the animal is on.
route_euclidean_distance_scaling: How much to prefer route distances between successive time points that are closer to the euclidean distance. Smaller numbers mean the route distance is more likely to be close to the euclidean distance.
Source code in src/spyglass/linearization/v0/main.py
TrackGraph
¶
Bases: SpyglassMixin
, Manual
Graph representation of track representing the spatial environment.
Used for linearizing position.
Source code in src/spyglass/linearization/v0/main.py
plot_track_graph(ax=None, draw_edge_labels=False, **kwds)
¶
Plot the track graph in 2D position space.
Source code in src/spyglass/linearization/v0/main.py
plot_track_graph_as_1D(ax=None, axis='x', other_axis_start=0.0, draw_edge_labels=False, node_size=300, node_color='#1f77b4')
¶
Plot the track graph in 1D to see how the linearization is set up.
Source code in src/spyglass/linearization/v0/main.py
IntervalLinearizedPosition
¶
Bases: SpyglassMixin
, Computed
Linearized position for a given interval
Source code in src/spyglass/linearization/v0/main.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|