Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StimulusFactory: enable amplitude based versions of the protocols #180

Closed
anilbey opened this issue May 8, 2024 · 2 comments
Closed

StimulusFactory: enable amplitude based versions of the protocols #180

anilbey opened this issue May 8, 2024 · 2 comments
Assignees

Comments

@anilbey
Copy link
Contributor

anilbey commented May 8, 2024

At the moment the following protocols are only threshold-based.

  • neg_cheops
  • pos_cheops
  • fire_pattern
  • iv
  • idrest
  • ap_waveform

Some of the non-bbp models however are amplitude based.

The StimulusFactory should be extended to support the amplitude based methods as well.
The amplitude based implementation can be reused by the threshold based implementation.

Such as the following:

amplitude = threshold_current * threshold_percentage / 100
res = cls.amplitude_based(
dt,
pre_delay=pre_delay,
duration=duration,
post_delay=post_delay,
amplitude=amplitude,
)
return res

@AurelienJaquier
Copy link
Contributor

We can now use amplitude based (i.e. non threshold based) stimuli in apply_multiple_stimuli by passing raw amplitudes to amplitudes and setting threshold_based to False.
pinging @stefanoantonel because he might need to inject without using threshold current.

@stefanoantonel
Copy link

Cool thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants