DuguidLab / visiomode

A rodent touchscreen-based visuomotor behaviour platform
https://www.visiomode.org
MIT License
3 stars 0 forks source link

Delay import of `pynwb` #206

Closed olivierdelree closed 4 months ago

olivierdelree commented 4 months ago

Closes #205.

As mentioned in the issue, the import time of visiomode (and its startup time) can be cut in 4 if the pywnb import is delayed until the to_nwb() function is called for the first time. Although it's not too elegant to have imports declared after the top of the file, the function is visible from the top and comments explain the reasoning behind the structure.