neurogears / vestibular-vr

Closed-loop VR setup for Rancz Lab
2 stars 0 forks source link

Array names in device schema for postprocessing #60

Closed RoboDoig closed 4 months ago

RoboDoig commented 5 months ago

Currently, the device schema for H1 does not have names for array columns in e.g. OpticalTrackingRead. This causes an issue with postprocessing analysis as harp-python cannot parse the array data without modifications.

To fix this on the postprocessing branch, the device schema should use named columns for array data.

RoboDoig commented 5 months ago

@EleonoraAmbrad @ikharitonov I've made the changes to the analysis code we talked about in the meeting today. Try out the reader-proto branch for an example

ikharitonov commented 5 months ago

@RoboDoig thanks! OpticalTrackingRead works, along with Cam0Event, Cam1Event and StartAndStop, but the rest are failing with "ValueError: No objects to concatenate". Also we found the YAML file for H2 (https://github.com/harp-tech/device.vestibularH2/blob/main/Firmware/VestibularVrH2/device.yml), but most registers there are also failing to be read

RoboDoig commented 5 months ago

That might be because no events were logged for the other registers, for example if I look in the example harp data folder I have - I see events only for 32, 33, 38, 46 (Cam0Event, Cam1Event, StartAndStop, OpticalTrackingRead).

Could you double check whether reading a register fails even when there is definitely binary data available for it?

ikharitonov commented 5 months ago

You are right sorry, we realised after posting, readable registers match with available binaries

RoboDoig commented 5 months ago

Can you confirm it's working now? If so I will make a PR and close this issue.

ikharitonov commented 5 months ago

Yes, data reading works.

ederancz commented 4 months ago

Working fine, device.yml files need updating (or confirming) for current firmware versions for H1 and H2, created issues at harp repos.