dbbs-lab / bsb-core

The Brain Scaffold Builder
https://bsb.readthedocs.io
GNU General Public License v3.0
22 stars 16 forks source link

LFPy integration #792

Open filimarc opened 11 months ago

filimarc commented 11 months ago

Think how to integrate LFPy module in the BSB pipeline.

Helveg commented 10 months ago

The difference between an LFP device and other devices is that it would be the first device that gathers so much data that it needs to be processed and saved during the simulation. This means that the simulation needs to be stepped, and the device flushed.

Currently devices can indeed be flushed, but there's no logic in place to determine the steps a simulation should take. We could allow devices to implement an additional method such as get_checkpoint_schedule which returns a schedule object that when passed a time, returns the next checkpoint after that time. This way we can ask all device checkpoint schedulers for the next checkpoint they require, and run the simulation in steps from checkpoint to checkpoint.