-
Notifications
You must be signed in to change notification settings - Fork 51
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
[ENH] Add Grinten / Stevenick / Lozano model (Dynaphos) #547
Conversation
Looks great! Looks likes its really fast too, was not expecting that with the raw python, but must be a good implementation |
…q/pdur check in init
…nexpected saved percepts) (pulse2percept#556) * fix fps keyword error in percept.save * update imagestimulus save * fix percepts saving like bacteria * remove extension keyword & update image stim save * update percept video save/load precision test * throw error when trying to save multi-frame as static image * wheels build error test * test ubuntu wheel build fix * Set default vmin to 0 * catch specifically TypeError for percept save --------- Co-authored-by: Jacob Granley <jgranley@ucsb.edu>
…se2percept#557) * update macos version to use next available runner * Update wheels.yml (test) --------- Co-authored-by: jgranley <jgranley@ucsb.edu>
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## cortex #547 +/- ##
=========================================
Coverage ? 93.19%
=========================================
Files ? 121
Lines ? 10356
Branches ? 0
=========================================
Hits ? 9651
Misses ? 705
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. |
* Revert "[FIX] Update GitHub wheels actions to use available MacOS runner (pulse2percept#557)" This reverts commit 405d54e. * test update wheel * macos 12 * drop test for wheels on mac for py3.7 * test wheels * manual exclude * manual exclude wheels * manual exclude wheels * reinclude wheels
Description
Adds the Dynaphos model outlined in Grinten, Steveninck, Lozano (2022).
This is a model which cannot separate its temporal and spatial components. It extends
BaseModel
.This is because each phosphene's brightness is not determined by instantaneous current, but by the effective current, which is affected by the memory trace (which builds up over time). This means that in order to determine the brightness at a given time step, we need to have calculated all prior time steps-- and time steps with identical instantaneous stimulus do not necessarily have identical percepts.
All model constants can be set in its constructor, but the default values are those specified in the paper.
It has a default frame rate of 50fps (dt = 20ms), but this can be set. If
t_percept
is not passed topredict_percept
, a percept will be returned at a frame rate determined bydt
.The amplitude for each electrode at each time-step is determined by the maximum amplitude of the stimulus on that electrode over the duration of time step.
It takes any stimulus (with a time component), and assumes a default frequency & pulse duration of 300Hz and 0.17ms respectively. However, if the stimulus is a
BiphasicPulseTrain
, it will use the frequency and pulse duration specified in the stimulus metadata.Activation and brightness trends are very similar to those seen in the referenced paper:
Pulse2percept implementation of the Dynaphos model
Original implementation of the Dynaphos model
Timing information (time to run
predict_percept
on a 1sec stimulus).Model is built with default parameters.
Grid side length was set using
xystep
, and FPS was set usingdt
.Closes #526
Type of Change
Checklist