Package qubx :: Module data_pulse
[hide private]
[frames] | no frames]

Module data_pulse

source code

Reads Pulse and Patchmaster files.

Copyright 2008-2013 Research Foundation State University of New York This file is part of QUB Express.

QUB Express is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QUB Express is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License, named LICENSE.txt, in the QUB Express program directory. If not, see <http://www.gnu.org/licenses/>.

Classes [hide private]
  BundleHeader
  BundleItem
  GroupRecord
A GroupRecord describes a group of series, such as patch and whole cell currents obtained simultanuously, or groups of series obtained in sequence under different sets of conditions
  Header
  LevelFooter
  QubData_PUL
One open Patchmaster file.
  QubData_PUL_Analog
  QubData_PUL_Signal
  RootRecord
  S
  SeriesRecord
  StimChannelRecord
  StimRootRecord
  StimSegmentRecord
  StimulationRecord
  SweepRecord
  TraceRecord
  TreeLevel
  UserParamDescrType
Functions [hide private]
 
ActualHeaderSize(levels) source code
 
LoadOneLevel(pulmap, header, LevelRecords, LevelFooter, offset, level) source code
 
LoadPUL(path) source code
 
LoadStim(path) source code
 
LoadTree(path, GetLevels=<__builtin__.function object>) source code
 
QubData_PUL_Open(path, progressf) source code
 
ReadStruct(rectype, pulmap, offset) source code
 
adjust_units(units, scale) source code
 
print_levels(root, indent='') source code
Variables [hide private]
  AdcOff = 0
  AdcVirtual = 4
  Analog = 1
  AnyAmplMode = 0
  AutoRangingMean = 2
  AutoRangingOff = 0
  AutoRangingPeak = 1
  AutoRangingRelSeg = 3
  BothEndian = [{'LevelFooter': <class 'qubx.data_pulse.LevelFoo...
  CCAmplMode = 2
  CClamp = 4
  COLOR = defaultdict(<function <lambda> at 0x7fd137b1e1b8>, {0:...
  COPY_ROWS_ALL = 0
  COPY_ROWS_CHECKED = 3
  COPY_ROWS_CRITERIA = 2
  COPY_ROWS_GROUP = 1
  Clip = 5
  DAT2_MAGIC = 1145132082
  DATASOURCE_FILE = 0
  DATASOURCE_LIST = 2
  DATASOURCE_SCREEN = 1
  DEFAULT_MODE = 0
  DOWNSAMPLE_ALL_LOGCOUNT = 2.0
  DOWNSAMPLE_LOGSLOPE = 3.0
  Digital = 3
  Digitals = 2
  GrStimParams = 10
  GroupLevel = 1
  IDensityMode = 3
  InOut = 0
  IsImon = 3
  IsLeak = 1
  IsVirtual = 2
  IsVmon = 4
  LNoStore = 3
  LNone = 0
  LStoreAvg = 1
  LStoreEach = 2
  Labs = 0
  LabsLH = 2
  LittleEndianBit = 0
  Lrel = 1
  LrelLH = 3
  MAX_BOOLS = 16
  MAX_FIELDS = 256
  MAX_SAFENAME_LEN = 32
  ModeAlternate = 4
  ModeDec = 1
  ModeDecInterleaved = 3
  ModeInc = 0
  ModeIncInterleaved = 2
  ModeLogAlternate = 9
  ModeLogDec = 6
  ModeLogDecInterleaved = 8
  ModeLogInc = 5
  ModeLogIncInterleaved = 7
  NoMode = 6
  OnCell = 1
  OutOut = 2
  ParamDescrSize = 24
  RTLD_GLOBAL = 256
  RTLD_LOCAL = 0
  Readers = {'.acquire': {'pattern': '*.acquire', 'create': <cla...
  RootLevel = 0
  SAVEBUFLEN = 262144
  STIM_LABELS = ('Constant', 'Signal', 'Expression')
  STIM_TYPES = (0, 1, 2)
  STIM_TYPE_CONST = 0
  STIM_TYPE_EXPR = 2
  STIM_TYPE_SIGNAL = 1
  SeUserParamNo = 4
  SegmentChirpwave = 5
  SegmentConstSine = 3
  SegmentConstant = 0
  SegmentContinuous = 2
  SegmentRamp = 1
  SegmentSquarewave = 4
  SeriesLevel = 2
  ShowDropped = False
  SizeBoolean = 1
  SizeByte = 1
  SizeCalibDate = 16
  SizeCard16 = 2
  SizeCard32 = 4
  SizeChar = 1
  SizeEnum = 1
  SizeInt16 = 2
  SizeInt32 = 4
  SizeLongReal = 8
  SizeReal = 4
  SizeSerialNumber = 8
  SizeSet16 = 2
  SizeStateVersion = 8
  String32Size = 32
  String400Size = 400
  String80Size = 80
  String8Size = 8
  SwUserParamNo = 4
  SweepLevel = 3
  TREE_MAGIC = 1416783205
  TraceLevel = 4
  TrigNone = 0
  TrigSeries = 1
  TrigSweep = 2
  TrigSweepNoLeak = 3
  UNSET_VALUE = 86738.82583
  VCAmplMode = 1
  VClamp = 5
  WholeCell = 3
  Writers = {'.csv': {'pattern': '*.csv', 'ext': '.csv', 'save':...
  __package__ = 'qubx'
  cdll = <ctypes.LibraryLoader object>
  e = 2.71828182846
  fallback_reader = None
hash(x)
  false = False
  iAdapt = 0
  iLAmplitude = 1
  iLCycle = 0
  iLSkip = 0
  iLVReversal = 2
  iMaxCycles = 1
  iS = 1
  iSegmentNo = 2
  int16 = 0
  int32 = 1
  memmove = <CFunctionType object at 0x7fd13875ea10>
  memset = <CFunctionType object at 0x7fd13875eae0>
  name_float = 'a number'
  name_int = 'an integer'
  pi = 3.14159265359
  pybuf = ctypes.pythonapi.PyBuffer_FromReadWriteMemory
  pydll = <ctypes.LibraryLoader object>
  pyobj_asreadbuf = ctypes.pythonapi.PyObject_AsReadBuffer
  pythonapi = <PyDLL 'None', handle 7fd13abe6168 at 7fd137f8a210>
  qubfast = <CDLL 'libqubfast.so', handle 2c23810 at 7fd12ac5d110>
  rdbk = 'Expired.'
  rdbreak = 'supporting'
  rdname = 'qubfast.txt'
  real32 = 2
  real64 = 3
  true = True
  valid_identifier = re.compile(r'^[A-Za-z_][A-Za-z_0-9]*$')
Variables Details [hide private]

BothEndian

Value:
[{'LevelFooter': <class 'qubx.data_pulse.LevelFooter'>, 'BundleHeader'\
: <class 'qubx.data_pulse.BundleHeader'>, 'LevelRecords9': [<class 'qu\
bx.data_pulse.RootRecord'>, <class 'qubx.data_pulse.GroupRecord'>, <cl\
ass 'qubx.data_pulse.SeriesRecord'>, <class 'qubx.data_pulse.SweepReco\
rd'>, <class 'qubx.data_pulse.TraceRecord'>], 'LevelRecords7': [<class\
 'qubx.data_pulse.RootRecord'>, <class 'qubx.data_pulse.GroupRecord'>,\
 <class 'qubx.data_pulse.SeriesRecord'>, <class 'qubx.data_pulse.Sweep\
Record'>, <class 'qubx.data_pulse.TraceRecord'>], 'Header': <class 'qu\
...

COLOR

Value:
defaultdict(<function <lambda> at 0x7fd137b1e1b8>, {0: (0, 0, 0), 1: (\
1, 0, 0), 2: (0, 0, 1), 3: (0, 1, 0), 4: (0, 1, 1), 5: (1, 1, 0), 6: (\
1, 0, 1), 7: (0.5, 0.0, 0.0), 8: (0.525, 0.32025, 0.013125000000000012\
), 9: (0.44550000000000006, 0.55, 0.027500000000000028), 10: (0.149499\
99999999994, 0.575, 0.04312499999999997), 11: (0.059999999999999984, 0\
.6, 0.2759999999999999), 12: (0.078125, 0.625, 0.625), 13: (0.09750000\
000000002, 0.3185, 0.65), 14: (0.22949999999999962, 0.1181250000000000\
4, 0.675), 15: (0.5879999999999999, 0.13999999999999996, 0.7), 16: (0.\
...

Readers

Value:
{'.acquire': {'pattern': '*.acquire', 'create': <class 'qubx.data_acqu\
ire.QubData_ACQ'>, 'ext': '.acquire', 'description': 'Acquire files'},
 '.csv': {'pattern': '*.csv', 'create': <function OpenTXT at 0x7fd1298\
320c8>, 'ext': '.csv', 'description': 'Comma-separated files'},
 '.dat': {'pattern': '*.dat', 'create': <function QubData_PUL_Open at \
0x7fd121749b18>, 'ext': '.dat', 'description': 'DAT files'},
 '.dwt': {'pattern': '*.dwt', 'create': <function OpenDWT at 0x7fd1298\
32140>, 'ext': '.dwt', 'description': 'QuB idealized data'},
...

Writers

Value:
{'.csv': {'pattern': '*.csv', 'ext': '.csv', 'save': <function Save at\
 0x7fd12982e8c0>, 'description': 'Comma-separated ext files'},
 '.float32': {'pattern': '*.float32', 'ext': '.float32', 'save': <func\
tion Save_Float32 at 0x7fd12982e6e0>, 'description': 'Raw binary (floa\
t32)'},
 '.int16': {'pattern': '*.int16', 'ext': '.int16', 'save': <function S\
ave_Int16 at 0x7fd12982e758>, 'description': 'Raw binary (int16)'},
 '.qdf': {'pattern': '*.qdf', 'ext': '.qdf', 'save': <function Save_QD\
...