INM-6 / python-neo

Neo is a package for representing electrophysiology data in Python, together with support for reading a wide range of neurophysiology file formats
http://packages.python.org/neo/
BSD 3-Clause "New" or "Revised" License
3 stars 10 forks source link

Cannot use Block.filter() with targdict and object options at the same time #15

Open mdenker opened 9 years ago

lphan commented 9 years ago

@mdenker : can you give an example what does not work what expected and what is the expected result ?

lphan commented 9 years ago

The following code worked:

# return all objects AnalogSignal with parameters annotation a=5, b=6, c=7 
print "targdict={'a':5, 'b':6, 'c':7 } and objects='AnalogSignal' ", blk.filter(targdict={'a': 5, 'b':6, 'c': 7}, objects='AnalogSignal')  
# return all objects SpikeTrain with parameter annotation st=8
print "targdict={'st':8} and objects='SpikeTrain' ", blk.filter(targdict={'st': 8}, objects='SpikeTrain')  
# return all objects AnalogSignal and SpikeTrain with parameters annotation st=8, c=7
print "targdict={'st':8, 'c':7 } and objects=['AnalogSignal', 'SpikeTrain'] ", blk.filter(targdict={'st': 8, 'c': 7}, objects=['AnalogSignal', 'SpikeTrain'])