Skip to content

Commit

Permalink
Set pos id default for migration. Rename Trodes params
Browse files Browse the repository at this point in the history
  • Loading branch information
CBroz1 committed Oct 4, 2023
1 parent 4e6b29f commit 5d5e3d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/spyglass/common/common_behav.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PositionSource(dj.Manual):
class SpatialSeries(dj.Part):
definition = """
-> master
id : int unsigned # index of spatial series
id = 0 : int unsigned # index of spatial series
---
name=null: varchar(32) # name of spatial series
"""
Expand Down
10 changes: 10 additions & 0 deletions src/spyglass/position/v1/position_trodes_position.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ def make(self, key):
)

position_info_parameters = (TrodesPosParams() & key).fetch1("params")

# Rename params to match specificity discussed in #628
position_info_parameters[
"max_LED_separation"
] = position_info_parameters["max_separation"]
position_info_parameters[
"max_plausible_speed"
] = position_info_parameters["max_speed"]

spatial_series = (RawPosition.PosObject & key).fetch_nwb()[0][
"raw_position"
]
Expand Down Expand Up @@ -304,6 +313,7 @@ def calculate_position_info_from_spatial_series(
is_upsampled,
upsampling_sampling_rate,
upsampling_interpolation_method,
**kwargs,
):
"""Calculate position info from 2D spatial series."""
CM_TO_METERS = 100
Expand Down

0 comments on commit 5d5e3d6

Please sign in to comment.