Skip to content

Commit 4792edd

Browse files
committed
Fix so that turn and linear_position are interpolated
1 parent 1a841bd commit 4792edd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

loren_frank_data_processing/position.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ def get_interpolated_position_dataframe(epoch_key, animals,
133133
* position_df.linear_distance)
134134

135135
categorical_columns = ['labeled_segments', 'from_well', 'to_well', 'task',
136-
'is_correct']
136+
'is_correct', 'turn']
137137
continuous_columns = ['head_direction', 'speed', 'linear_distance',
138-
'x_position', 'y_position']
138+
'x_position', 'y_position', 'linear_position']
139139
position_categorical = (position_df
140140
.drop(continuous_columns, axis=1)
141141
.reindex(index=time, method='pad'))
@@ -244,5 +244,7 @@ def get_segments_df(epoch_key, animals, max_distance_from_well=5,
244244
max_distance_from_well=max_distance_from_well)
245245
segments_df = score_inbound_outbound(
246246
segments_df, epoch_key, animals, min_distance_traveled)
247+
segments_df = segments_df.loc[
248+
:, ['from_well', 'to_well', 'task', 'is_correct', 'turn']]
247249

248250
return segments_df, labeled_segments

0 commit comments

Comments
 (0)