We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58d46e1 commit cf51de1Copy full SHA for cf51de1
src/spyglass/common/common_position.py
@@ -444,6 +444,13 @@ def calculate_position_info(
444
# convert back to between -pi and pi
445
orientation[~is_nan] = np.angle(np.exp(1j * orientation[~is_nan]))
446
447
+ # set orientation to NaN in single LED data
448
+ if np.all(front_LED == 0) or np.all(back_LED == 0):
449
+ logger.warning(
450
+ "Single LED data detected. Setting orientation to NaN."
451
+ )
452
+ orientation = np.nans_like(orientation)
453
+
454
velocity = get_velocity(
455
position,
456
time=time,
0 commit comments