Module Expr Str ImportFrom alias alias alias ImportFrom alias Import alias identifier Import alias identifier ImportFrom alias alias alias alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad NameLoad Assign NameStore ListLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Dict NameLoad ListLoad Assign NameStore NameLoad Assign NameStore Str Assign NameStore ListLoad Str Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str Return Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str If NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad With Call NameLoad AttributeLoad NameLoad attr Str AttributeStore NameLoad attr body Assign NameStore NameLoad While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num Index Num handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Return NameLoad If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr orelse If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num Index Num Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num Index Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad attr Assign NameStore ListComp BinOpMod Str NameLoad comprehension NameStore Call NameLoad Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Return If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr ListLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword BinOpMult Num AttributeLoad NameLoad attr keyword BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad keyword BinOpMult Num AttributeLoad NameLoad attr keyword BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
Class for reading from Brainware F32 files

F32 files are simplified binary files for holding spike data.  Unlike SRC
files, F32 files carry little metadata.  This also means, however, that the
file format does not change, unlike SRC files whose format changes periodically
(although ideally SRC files are backwards-compatible).

Each F32 file only holds a single Block.

The only metadata stored in the file is the length of a single repetition
of the stimulus and the values of the stimulus parameters (but not the names
of the parameters).

Brainware was developed by Dr. Jan Schnupp and is availabe from
Tucker Davis Technologies, Inc.
http://www.tdt.com/downloads.htm

Neither Dr. Jan Schnupp nor Tucker Davis Technologies, Inc. had any part in the
development of this code

The code is implemented with the permission of Dr. Jan Schnupp

Author: Todd Jennings
 __future__ absolute_import division print_function os path N/A numpy np N/A quantities pq neo.core Block RecordingChannelGroup Segment SpikeTrain Unit neo.io.baseio BaseIO BrainwareF32IO N/A BaseIO N/A N/A 
    Class for reading Brainware Spike ReCord files with the extension '.f32'

    The read_block method returns the first Block of the file.  It will
    automatically close the file after reading.
    The read method is the same as read_block.

    The read_all_blocks method automatically reads all Blocks.  It will
    automatically close the file after reading.

    The read_next_block method will return one Block each time it is called.
    It will automatically close the file and reset to the first Block
    after reading the last block.
    Call the close method to close the file and reset this method
    back to the first Block.

    The isopen property tells whether the file is currently open and
    reading or closed.

    Note 1:
        There is always only one RecordingChannelGroup.  BrainWare stores the
        equivalent of RecordingChannelGroups in separate files.

    Usage:
        >>> from neo.io.brainwaref32io import BrainwareF32IO
        >>> f32file = BrainwareF32IO(filename='multi_500ms_mulitrep_ch1.f32')
        >>> blk1 = f32file.read()
        >>> blk2 = f32file.read_block()
        >>> print blk1.segments
        >>> print blk1.segments[0].spiketrains
        >>> print blk1.units
        >>> print blk1.units[0].name
        >>> print blk2
        >>> print blk2[0].segments
     N/A is_readable True N/A is_writable False N/A supported_objects N/A Block RecordingChannelGroup Segment SpikeTrain Unit N/A readable_objects N/A Block N/A writeable_objects N/A N/A has_header False N/A is_streameable False N/A read_params N/A Block N/A N/A write_params None N/A name Brainware F32 File N/A extensions N/A f32 N/A mode file __init__ N/A N/A self filename N/A None N/A N/A 
        Arguments:
            filename: the filename
         N/A N/A N/A BaseIO __init__ self N/A N/A self _path filename N/A N/A self _filename N/A N/A path basename filename N/A N/A self _fsrc None N/A N/A self __lazy False N/A N/A self _blk None N/A N/A self __unit None N/A N/A self __t_stop None N/A N/A self __params None N/A N/A self __seg None N/A N/A self __spiketimes None N/A read N/A N/A self lazy cascade N/A False True kargs N/A N/A 
        Reads simple spike data file "fname" generated with BrainWare
         N/A N/A N/A self read_block lazy lazy cascade cascade N/A read_block N/A N/A self lazy cascade N/A False True kargs N/A N/A 
        Reads a block from the simple spike data file "fname" generated
        with BrainWare
         N/A kargs N/A N/A N/A NotImplementedError This method does not have any argument implemented yet N/A N/A self _fsrc None N/A N/A self __lazy lazy N/A N/A self _blk N/A Block file_origin N/A self _filename N/A block N/A self _blk N/A N/A cascade N/A N/A block N/A rcg N/A RecordingChannelGroup file_origin N/A self _filename N/A N/A self __unit N/A Unit file_origin N/A self _filename N/A N/A N/A N/A block recordingchannelgroups append rcg N/A N/A N/A N/A rcg units append N/A self __unit N/A N/A self __t_stop None N/A N/A self __params None N/A N/A self __seg None N/A N/A self __spiketimes None N/A N/A open N/A self _path rb N/A self _fsrc N/A N/A res True N/A res N/A N/A res N/A N/A self __read_id N/A N/A N/A block create_many_to_one_relationship N/A N/A self _fsrc None N/A N/A self __lazy False N/A N/A self _blk None N/A N/A self __t_stop None N/A N/A self __params None N/A N/A self __seg None N/A N/A self __spiketimes None N/A block N/A __read_id N/A N/A self N/A N/A N/A 
        Read the next ID number and do the appropriate task with it.

        Returns nothing.
         N/A N/A N/A objid N/A N/A N/A np fromfile N/A self _fsrc dtype N/A np float32 count 1 N/A 0 N/A N/A N/A IndexError N/A N/A N/A N/A self __save_segment N/A False N/A N/A objid -2 N/A N/A N/A N/A self __read_condition N/A N/A N/A objid -1 N/A N/A N/A N/A self __read_segment N/A N/A N/A N/A N/A self __spiketimes append objid N/A True N/A __read_condition N/A N/A self N/A N/A N/A 
        Read the parameter values for a single stimulus condition.

        Returns nothing.
         N/A N/A self __t_stop N/A N/A N/A np fromfile N/A self _fsrc dtype N/A np float32 count 1 N/A 0 N/A numelements N/A int N/A N/A N/A np fromfile N/A self _fsrc dtype N/A np float32 count 1 N/A 0 N/A paramvals N/A N/A N/A N/A np fromfile N/A self _fsrc dtype N/A np float32 count numelements tolist N/A paramnames N/A N/A Param%s i N/A i N/A range N/A len paramvals N/A N/A self __params N/A dict N/A zip paramnames paramvals N/A __read_segment N/A N/A self N/A N/A N/A 
        Setup the next Segment.

        Returns nothing.
         N/A N/A N/A self __save_segment N/A N/A self __seg N/A Segment file_origin N/A self _filename N/A self __params N/A N/A self __spiketimes N/A N/A __save_segment N/A N/A self N/A N/A N/A 
        Write the segment to the Block if it exists
         N/A N/A N/A self __seg None N/A N/A N/A self __seg False N/A N/A N/A N/A self __seg N/A N/A N/A self __seg N/A Segment file_origin N/A self _filename N/A self __params N/A N/A self __spiketimes N/A N/A N/A self __lazy N/A N/A train N/A SpikeTrain N/A N/A pq Quantity N/A dtype N/A np float32 units N/A pq ms t_start N/A 0 N/A pq ms t_stop N/A N/A self __t_stop N/A pq ms file_origin N/A self _filename N/A N/A train lazy_shape N/A len N/A self __spiketimes N/A N/A times N/A N/A pq Quantity N/A self __spiketimes dtype N/A np float32 units N/A pq ms N/A train N/A SpikeTrain times t_start N/A 0 N/A pq ms t_stop N/A N/A self __t_stop N/A pq ms file_origin N/A self _filename N/A N/A N/A self __seg spiketrains N/A train N/A N/A N/A N/A N/A self __unit spiketrains append train N/A N/A N/A N/A N/A self _blk segments append N/A self __seg N/A N/A self __seg False N/A N/A