position.py
convert_to_pixels(data, frame_size=None, cm_to_pixels=1.0)
¶
Converts from cm to pixels and flips the y-axis.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
(ndarray, shape(n_time, 2))
|
|
required |
frame_size |
(array_like, shape(2))
|
|
None
|
cm_to_pixels |
float
|
|
1.0
|
Returns:
Name | Type | Description |
---|---|---|
converted_data |
(ndarray, shape(n_time, 2))
|
|
Source code in src/spyglass/utils/position.py
fill_nan(variable, video_time, variable_time)
¶
Fill in missing values in variable with nans at video_time points.