You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the filter function in neo accepts inputs of the form
targdict=[{cond1,cond2},{cond3,cond4},..]
where cond1 and cond2 are OR, whereas the individual dictionaries {cond1,cond2} and {cond3,cond4} are AND connected.
One drawback is that it is not possible to filter for multiple values. For example, filtering for units 0 and 1 on electrode 7 is not possible via the following statement, which returns only unit 1 (the last filtering condition specified):
For the above example, I suggest the following input:
targdict=[{'unit_id': 0, 'electrode_id': 7}, {'unit_id': 1, 'electrode_id': 7}]
# it means: (unit_id =0 AND electrode_id = 7) OR (unit_id = 1 AND electrode_id = 7)targdict[0] # return {'electrode_id' = 7, 'unit_id' =0}targdict[1] # return {'electrode_id' = 7, 'unit_id' =1}
In this case, it might be controversial with the above statement. But if we understand that targdict in this case is a list and for every element is an filter_combi_condition. It's easier to access to the filter_condition of every element with
Currently, the filter function in neo accepts inputs of the form
targdict=[{cond1,cond2},{cond3,cond4},..]
where cond1 and cond2 are OR, whereas the individual dictionaries {cond1,cond2} and {cond3,cond4} are AND connected.
One drawback is that it is not possible to filter for multiple values. For example, filtering for units 0 and 1 on electrode 7 is not possible via the following statement, which returns only unit 1 (the last filtering condition specified):
Output:
To achive the desired behavior, you need to use complex list comprehensions:
The text was updated successfully, but these errors were encountered: