chongxi / playground

Low-latency interactive multi-stream Behavior Platform: a control console that integrate Jovian (Virtual Reality Platform) and FPGA&Spiketag (Real-time Ephys) and other sensor streams
Other
3 stars 0 forks source link

A tricky bug prevent exact reconstruction #33

Open chongxi opened 4 years ago

chongxi commented 4 years ago

94887387-30ec1e80-0444-11eb-8bbf-e170d1361ade

chongxi commented 4 years ago

This must have something to do with changing the threshold using the sliding bar during the experiment.

chongxi commented 4 years ago

There are two sources of the problem can cause this bug and they have different nature: 1) The asynchronous operation to the same shared variable from different CPUs 2) The log.info use .2f print precision, which can be different from the precision when the comparison happens.

chongxi commented 4 years ago

The first array represents the speed, the first column is smoothed speed (using 0.5 s window) in cm/s, the second column is the speed threshold. The second array represents the reconstruction error between the online and offline BMI navigation trajectory.

Example Example

The asynchronous operation to the same shared variable from different CPUs explains why the reconstruction error follows the changing of speed threshold in the GUI.

chongxi commented 4 years ago

ExampleExample

reconstruction error happens when the animal speed become first lower than the speed threshold (after the speed threshold adjusting)

chongxi commented 4 years ago

To test whether we can bypass this problem, the speed threshold should be set to 5cm/s by default.