File I/O

This module contains functions for reading MEC, SCN, SSD, ABF files; choosing and reading a kinetic mechanism from a mec file generated by DCPROGS.

dcio.abf2ssd(abf_h)

Convert ABF file header into SSD file header.

dcio.abf_read_data(filename, h)

Read data from Axon abf file . Works only for version < 2.0.

dcio.abf_read_header(filename)

Read Axon abf file header. Works only for version < 2.0. Read only information required for gap-free data reading.

dcio.mec_choose_from_list(meclist, max_mecnum)

Choose mechanism from a list of mechanisms in file.

Parameters :

meclist : list; each element is another list containing:

jstart : int; start byte for mechanism in mefile. mecnum : int; mechanism sequence number in mecfile. mectitle : string ratetitle : string

max_mecnum : int

Number of different mechanisms in mec file.

Returns :

mecnum : int

Sequence number of a mechanism to read.

ratenum : int

Sequence number of rate set to read.

dcio.mec_get_list(mecfile)

Read list of mechanisms saved in mec file.

Parameters :

mecfile : filename

Returns :

version : int

Version of mec file.

meclist : list; each element is another list containing

jstart : int; start byte for mechanism in mefile. mecnum : int; mechanism sequence number in mecfile. mectitle : string ratetitle : string

max_mecnum : int

Number of different mechanisms in mec file.

dcio.mec_load(mecfile, start)

Load chosen mec.

Parameters :

mecfile : filename

start : int

Start byte in mecfile for mechanism to read.

Returns :

mec.Mechanism(RateList, StateList, ncyc) : instance of Mechanism class.

dcio.scn_read_data(fname, ioffset, nint, calfac2)

Read idealised data- intervals, amplitudes, flags- rom SCN file.

Data= real*4 tint(1...nint) 4nint bytes integer*2 iampl(1..nint) 2nint bytes integer*1 iprops(1..nint) nint bytes Total storage needed = 7 * nint bytes

integer*1 iprops(i) holds properties of ith duration and amplitude (integer*1 has range -128 to +127 (bit 7 set gives -128; can use bits 0-6) 0 = all OK; 1 = amplitude dubious = bit 0; 2 = amplitude fixed = bit 1; 4 = amplitude of opening constrained (see fixamp) = bit 2; 8 = duration unusable = bit 3; etc and keep sum of values of more than one property is true.

dcio.scn_read_header(fname)

Read SCN file header. SCN files are generated by SCAN program (DCprogs) and contain idealised single channel record.

dcio.ssd_read_data(filename, h)

Read data from Consam ssd or dat file.

dcio.ssd_read_header(filename)

Read the header of a Consam file.

dcio.ssd_save(filename, h, data)

Sava data into Consam ssd format file.

Previous topic

HJC root search

Next topic

Description of kinetic reaction schemes

This Page