-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I realized while running newman15_validation.ipynb that adding the control loop (beyond just spike detection) is super slow. It's not even the opsin dynamics, but appears to be due to the fact that by using preprocess_ctrl_signals(), Light.update() gets called on every single timestep (by default 0.1 ms).
Solutions?
- Some low-hanging fruit would be to compare the output of
preprocess_ctrl_signal()and the previous stim values and only keep changes. This would only be useful for scenarios like square waves or long-enough pulses, though. - The more robust, more general, but harder way would be to map from the control signal to modifications of the simulation variables via
run_regularly.- Though at present,
Lightassumes its values are all powers/irradiance. So, either take a step backward and don't enforce those units in the saved values or provide those via a StateMonitor instead
- Though at present,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
