Re: [NeuralEnsemble] Unable to get metadata from file (neo)

29 views
Skip to first unread message

Samuel Garcia

unread,
Apr 3, 2015, 10:31:42 AM4/3/15
to neurale...@googlegroups.com
Hi,
epochs is a list of 'scalar' epoch. this is an old thing that is not use anymore.

All IOs play with epocharrays which have times in numpy (quantities exactly).

So you should do
for epa in seg.epocharrays:
  print epa.name

In lazy=True, epa.times and epa.labels is empty.

Samuel




Le 01/04/2015 21:29, Graham Warner a écrit :
I'm trying to extract some metadata (duration, sample resolution, number of samples, number of channels) from a few different files and am unable to do so. For example:

import neo
dir
= '/PHShome/gcw8/Ephys_Test/MG79_d4_Sat.ns3'
reader
= BlackrockIO(filename=dir)
blks
= reader.read(lazy=True, cascade=True)
for blk in blks:
       
for seg in blk.segments:
               
for epc in seg.epochs:
                       
print epc.duration

Returns nothing. Not an empty list, not an empty string, not 'None', not an error. It just prompts me to enter the next command. Can anyone see what I'm doing wrong? Is this not the proper way to go about getting the sample data duration from a blackrock file?

Thanks
--
You received this message because you are subscribed to the Google Groups "Neural Ensemble" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neuralensembl...@googlegroups.com.
To post to this group, send email to neurale...@googlegroups.com.
Visit this group at http://groups.google.com/group/neuralensemble.
For more options, visit https://groups.google.com/d/optout.

-- 
Samuel Garcia
Centre de Recherche en Neurosciences de Lyon
Université Lyon 1 - CNRS UMR5292 - INSERM U1028
50, Avenue Tony Garnier
69007 LYON
http://crnl.univ-lyon1.fr

Samuel Garcia

unread,
Apr 3, 2015, 10:43:44 AM4/3/15
to neurale...@googlegroups.com
With lazy=True, you should be able to have everything taht is not numpy(or quantities).
AnalogSignal.name, AnalogSignal.t_start, AnalogSignal.sampling_rate
SpikeTrain.name, SpikeTrain.t_start
EpochArray.name

With lazy = true all these are empty
AnalogSignal intrinsic array
SpikeTrain intrinsic array
EvenArray.times
EpochArray.times
EpochArray.durations

Samuel



Le 01/04/2015 22:14, Graham Warner a écrit :
I'm trying to extract some metadata (duration, sample resolution, number of samples, number of channels) from a few different files and am unable to do so. For example:

import neo
dir
= '/PHShome/gcw8/Ephys_Test/MG79_d4_Sat.ns3'
reader
= BlackrockIO(filename=dir)
blks
= reader.read(lazy=True, cascade=True)
for blk in blks:
       
for seg in blk.segments:
               
for epc in seg.epochs:
                       
print epc.duration

Returns nothing. When I add:

print blk.segments[0].epochs

I get

[]

I get similar results for a variety of things (i.e. sampling rate). Can anyone tell me why I cant see any of my metadata? Am I going about this the wrong way?

Thanks
--
You received this message because you are subscribed to the Google Groups "Neural Ensemble" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neuralensembl...@googlegroups.com.
To post to this group, send email to neurale...@googlegroups.com.
Visit this group at http://groups.google.com/group/neuralensemble.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages