-
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
REVIEW mb/fixElectrodeArray #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change randomly
so that it's specific to enumeration and rename it enumerate_randomly
or enumerate_random_access
to clarify what it does
# Traverse file list and look for `pattern` | ||
filenames = [] | ||
pattern = re.compile(pattern) | ||
for file in listdir(datapath): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change file
to be something that isn't a reserved name in Python (fname
would work)
…hickness arithmetic
A few improvements for the ElectrodeArray class and some helper functions. Most of these are already being used in my experiment branches in one form or the other, but are now also tested and integrated. So the purpose of their existence is mostly to make my life easier. 😸
Argus I arrays now support legacy naming (L1, L2, ..., L8, M1, M2, ..., M8).
The electrode-to-retina distance depends on electrode type and electrode location. This computation has been moved to
Electrode.set_height
so that heights can be overridden.Keeping track of electrode names in
ElectrodeArray.names
is redundant, because everyElectrode
has aname
itself. Setting custom (or new) names would have to be done in both places, otherwise indexing might break. Therefore, I removedElectrodeArray.names
. In order to do the indexing, the loop has to be overname
of everyElectrode
in anElectrodeArray
. In order to speed up the average lookup time, the array is traversed in random order.The parameter
tol
ofpulse2percept
now specifies a fraction instead of an absolute value: For example,tol=0.1
will discard all pixels whose effective current is <10% of the max effective current value.I also added a helper function that can find files in a directory whose names match a regular expression pattern.