int-brain-lab / iblrig

Main repository for IBL rig code
https://int-brain-lab.github.io/iblrig/
MIT License
22 stars 21 forks source link

race condition messes with live plots #670

Closed bimac closed 3 months ago

bimac commented 4 months ago

A strange thing happened starting Samuel's cuedBiasChoiceWorld on Monday. The psychometric curve and reaction time were plotting in a very odd way. I restarted the task and it ran fine. I haven't had a repeat of this since, but I have no idea what caused it to happen. I don't know if it's related, but since updating to the latest version the task often starts before the live plot window appears (so these experienced mice have done a couple of trials before it pops up)

during experiment:

IMG_20240603_102510

it looks fine when plotting later:

Figure_1

oliche commented 3 months ago

For some reason the plots take a long time to instantiate and the first trial finishes before the instantiation, which lead OnlinePlots to instantiate on an existing jsonable file, which fails to create the full set of contrasts and probability.

This is fixed in commit bca7de6ed13983f4240278f191b71e18eca6e12d, where the settings are used to create the set of contrasts / probability regardless of the existence of a json file.

Please re-open if still having issues.