arbor-sim / arbor

The Arbor multi-compartment neural network simulation library.
https://arbor-sim.org
BSD 3-Clause "New" or "Revised" License
107 stars 60 forks source link

Proposal: remove time parameter from mechanisms. #1252

Closed halfflat closed 2 years ago

halfflat commented 3 years ago

Time was added as a visible value to NMODL mechanisms in order to incorporate time-dependent current sources. But apart from the impact of #1251, there are a couple of reasons to seek an alternative approach:

  1. The integration can't see any discontinuities in the input current source, which prevents us from adjusting integration steps to match any such discontinuities.
  2. It's insufficient for representing arbitrary time-dependent input currents, without also providing facilities for loading into the mechanism arbitrarily large representations of these current values.

I'd prefer that we extend the existing stimulus interface to encompass this use case:

espenhgn commented 3 years ago

Please add a feature for voltage clamps which allows for arbitrary long sequences of piece-wise constant holding potentials as well.

halfflat commented 3 years ago

I think I'll make voltage clamps a new, separate issue!

halfflat commented 3 years ago

As part of #1262 work, current stimuli are being moved out of mechanisms. The current WIP implementation supports piece-wise linear stimulus currents defined by an envelope, or a fixed frequency stimulus with an amplitude governed by a piece-wise linear envelope.

halfflat commented 3 years ago

Stimuli as mentioned above have been moved library-side in PR #1407 — if the functionality there is insufficient to cover the cases currently implemented in NMODL, we'll have to look at this further.