Package qubx_single :: Module dur_hist
[hide private]
[frames] | no frames]

Module dur_hist

source code

Classes [hide private]
  DurHistFace
  DurHistCopyDialog
  SingleSignals
  SinglePlex
  AllExponentials
This class implements a method to find all significant exponential components of a duration histogram, published in
  AllExponentials_Display
Functions [hide private]
 
events_per_scls(segs, mcls, scls) source code
 
DurHist_Bins(data, td_ms, t_min=None, t_max=None, nbin=50) source code
 
DurHist(c, data, td_ms, sampling, bins) source code
 
DurHist_lib(c, data, td_ms, sampling, bins) source code
 
DurHist_Smooth_lib(c, data, td_ms, sampling, bins) source code
 
PDF(Q, clazz, a, td, bins, wantTcrit=True) source code
 
SolveTCrits(taus, amps) source code
 
intersect(a0, a1, b0, b1) source code
 
tri_rising_y(peak, x) source code
 
tri_falling_y(peak, x) source code
 
tri_rising_area(peak, fro, to) source code
 
tri_falling_area(peak, fro, to) source code
 
tri_area(peak, fro, to) source code
 
spread_events(bins, bars, samples, count, sampling_ms) source code
 
DurHist_Smooth(c, data, td_ms, sampling, bins) source code
 
llr_of_significance(sig) source code
 
ll_of_ssr(ssr, n) source code
 
all_expo_fit_without(args) source code
Variables [hide private]
  NBIN_DUR = 50
  LBL_TDEAD = 'Tdead (ms)'
  MAX_CHANNEL_COUNT = 8
  MAX_DURHIST_CLASSES = 32
  COLOR_TCRIT = ('qubx_single.dur_hist.tcrit', (1, 0.2, 0.2, 0.7))
  WAY_TOO_MANY_SAMPLES = 65536
  TheDurHistCopyDialog = <DurHistCopyDialog object at 0x7fd11c7f...
  ALL_EXPONENTIALS_MAX_N = 20
  ALL_EXPONENTIALS_AREA_CUTOFF = 1e-05
  ALL_EXPONENTIALS_NEAR_THRESHOLD = 0.02
  ALL_EXPONENTIALS_FIT_REPS = 5
  ALL_EXPONENTIALS_FIT_ITERS = 30
  ALL_EXPONENTIALS_SIGNIFICANCE = 0.05
  ALL_EXPONENTIALS_FINAL_CUTOFF = 1e-05
  ALLOW_THREADS = 1
  BUFSIZE = 8192
  CLIP = 0
  COLOR_CLEAR = ('toolspace.clear', (0, 0, 0, 0))
  COLOR_MENU_FILE = ('faces.menu.file', (0, 1, 0, 1))
  COLOR_MENU_TEXT = ('faces.menu.text', (0, 1, 0, 0.75))
  COLOR_POPPED_BTN = ('faces.popped.btn', (0.7, 0, 0.1, 1))
  COLOR_POPPED_TEXT = ('faces.popped.empty.text', (0.1, 0, 0, 1))
  COLOR_TOOLTAB_BG = ('faces.tooltab.bg', (0, 0, 0, 1))
  COLOR_TOOLTAB_CLOSE = ('faces.tooltoggle.close', (0.9, 0, 0, 1))
  COLOR_TOOLTAB_CLOSE_HOVER = ('faces.tooltoggle.close.hover', (...
  COLOR_TOOLTOGGLE_INFO = ('faces.tooltoggle.info', (1, 1, 1, 0....
  COLOR_TOOLTOGGLE_MENU = ('faces.tooltoggle.menu', (0.2, 1, 0.2...
  COPY_ROWS_ALL = 0
  COPY_ROWS_CHECKED = 3
  COPY_ROWS_CRITERIA = 2
  COPY_ROWS_GROUP = 1
  ColorInfo = defaultdict(<function <lambda> at 0x7fd123474500>,...
  DATAFILE = 'msl_test.qsf'
  DATASOURCE_FILE = 0
  DATASOURCE_LIST = 2
  DATASOURCE_SCREEN = 1
  DOWNSAMPLE_ALL_LOGCOUNT = 2.0
  DOWNSAMPLE_LOGSLOPE = 3.0
  ERR_CALL = 3
  ERR_DEFAULT = 521
  ERR_IGNORE = 0
  ERR_LOG = 5
  ERR_PRINT = 4
  ERR_RAISE = 2
  ERR_WARN = 1
  Eigen_Scipy_Ptr = Eigen_Scipy_Ptr
  FACE_POP_INSIDE = 0
  FACE_POP_MAXIMIZED = 3
  FACE_POP_MINIMIZED = 2
  FACE_POP_WINDOW = 1
  FILEMENU_WIDTH = 32
  FLOATING_POINT_SUPPORT = 1
  FPE_DIVIDEBYZERO = 1
  FPE_INVALID = 8
  FPE_OVERFLOW = 2
  FPE_UNDERFLOW = 4
  False_ = False
  HARMLESS_KEYS = [65361, 65363, 65362, 65364, 65360, 65367, 65379]
  HAVE_LIB = True
  Inf = inf
  Infinity = inf
  MAXDIMS = 32
  MAXITER = 300
  MAX_BOOLS = 16
  MAX_EVENTS_PER_WAIT = 20
  MAX_FIELDS = 256
  MAX_ULP_DIFF = 4
  MAY_SHARE_BOUNDS = 0
  MAY_SHARE_EXACT = -1
  MIN_TOTAL_RATE = 1e-09
  MODELFILE = 'msl_test.qmf'
  MSL_ACCEL_NONE = 0
  MSL_ACCEL_OPENCL = 2
  MSL_ACCEL_OPENMP = 1
  NAN = nan
  NINF = -inf
  NZERO = -0.0
  NaN = nan
  OPT_DFP = 1
  OPT_SIMPLEX = 0
  PINF = inf
  POS_DROPDOWN = 'dropdown'
  PZERO = 0.0
  QUBX_SINGLE_RATES_METHODS = ['MIL', 'MSL']
  RAISE = 2
  RECENT_FILES_COUNT = 20
  REQUEST_SHOW_AS_WINDOW = False
  RESPONSE_NO_TO_ALL = 12345
  Readers = {'.acquire': {'pattern': '*.acquire', 'create': <cla...
  SAVEBUFLEN = 262144
  SHIFT_DIVIDEBYZERO = 0
  SHIFT_INVALID = 9
  SHIFT_OVERFLOW = 3
  SHIFT_UNDERFLOW = 6
  STIM_LABELS = ('Constant', 'Signal', 'Expression')
  STIM_TYPES = (0, 1, 2)
  STIM_TYPE_CONST = 0
  STIM_TYPE_EXPR = 2
  STIM_TYPE_SIGNAL = 1
  ScalarType = (<type 'int'>, <type 'float'>, <type 'complex'>, ...
  TDEAD = 0.1
  TOOLTOGGLE_MENUHEIGHT_EM = 3.0
  TOOLTOGGLE_NAME_EM = 16.0
  TOOLTOGGLE_TABHEIGHT_EM = 10.0
  TOOLTOGGLE_TAB_BORDER = 1.5
  TOOLTOGGLE_WIDTH_EM = 2.0
  True_ = True
  UFUNC_BUFSIZE_DEFAULT = 8192
  UFUNC_PYVALS_NAME = 'UFUNC_PYVALS'
  WRAP = 1
  Writers = {'.csv': {'pattern': '*.csv', 'ext': '.csv', 'save':...
  __package__ = 'qubx_single'
  absolute = <ufunc 'absolute'>
  add = <ufunc 'add'>
  arccos = <ufunc 'arccos'>
  arccosh = <ufunc 'arccosh'>
  arcsin = <ufunc 'arcsin'>
  arcsinh = <ufunc 'arcsinh'>
  arctan = <ufunc 'arctan'>
  arctan2 = <ufunc 'arctan2'>
  arctanh = <ufunc 'arctanh'>
  bitwise_and = <ufunc 'bitwise_and'>
  bitwise_not = <ufunc 'invert'>
  bitwise_or = <ufunc 'bitwise_or'>
  bitwise_xor = <ufunc 'bitwise_xor'>
  c_ = <numpy.lib.index_tricks.CClass object>
  cast = {<type 'numpy.bool_'>: <function <lambda> at 0x7fd1396e...
  cbrt = <ufunc 'cbrt'>
  cdll = <ctypes.LibraryLoader object>
  ceil = <ufunc 'ceil'>
  conj = <ufunc 'conjugate'>
  conjugate = <ufunc 'conjugate'>
  copysign = <ufunc 'copysign'>
  cos = <ufunc 'cos'>
  cosh = <ufunc 'cosh'>
  dbl_to_lng = <functools.partial object>
  deg2rad = <ufunc 'deg2rad'>
  degrees = <ufunc 'degrees'>
  divide = <ufunc 'divide'>
  e = 2.71828182846
  equal = <ufunc 'equal'>
  euler_gamma = 0.577215664902
  exp = <ufunc 'exp'>
  exp2 = <ufunc 'exp2'>
  expm1 = <ufunc 'expm1'>
  fabs = <ufunc 'fabs'>
  floor = <ufunc 'floor'>
  floor_divide = <ufunc 'floor_divide'>
  flt_to_int = <functools.partial object>
  fmax = <ufunc 'fmax'>
  fmin = <ufunc 'fmin'>
  fmod = <ufunc 'fmod'>
  frexp = <ufunc 'frexp'>
  greater = <ufunc 'greater'>
  greater_equal = <ufunc 'greater_equal'>
  hypot = <ufunc 'hypot'>
  index_exp = <numpy.lib.index_tricks.IndexExpression object>
  inf = inf
  infty = inf
  int_to_flt = <functools.partial object>
  invert = <ufunc 'invert'>
  isfinite = <ufunc 'isfinite'>
  isinf = <ufunc 'isinf'>
  isnan = <ufunc 'isnan'>
  ldexp = <ufunc 'ldexp'>
  left_shift = <ufunc 'left_shift'>
  less = <ufunc 'less'>
  less_equal = <ufunc 'less_equal'>
  little_endian = True
  lng_to_dbl = <functools.partial object>
  log = <ufunc 'log'>
  log10 = <ufunc 'log10'>
  log1p = <ufunc 'log1p'>
  log2 = <ufunc 'log2'>
  logaddexp = <ufunc 'logaddexp'>
  logaddexp2 = <ufunc 'logaddexp2'>
  logical_and = <ufunc 'logical_and'>
  logical_not = <ufunc 'logical_not'>
  logical_or = <ufunc 'logical_or'>
  logical_xor = <ufunc 'logical_xor'>
  maxill = <CDLL 'libmaxill.so', handle 60ec7c0 at 7fd11c7f7750>
  maximum = <ufunc 'maximum'>
  mgrid = <numpy.lib.index_tricks.nd_grid object>
  minimum = <ufunc 'minimum'>
  mod = <ufunc 'remainder'>
  modf = <ufunc 'modf'>
  multiply = <ufunc 'multiply'>
  nan = nan
  nbytes = {<type 'numpy.bool_'>: 1, <type 'numpy.timedelta64'>:...
  negative = <ufunc 'negative'>
  newaxis = None
hash(x)
  nextafter = <ufunc 'nextafter'>
  not_equal = <ufunc 'not_equal'>
  ogrid = <numpy.lib.index_tricks.nd_grid object>
  pi = 3.14159265359
  power = <ufunc 'power'>
  pybuf = ctypes.pythonapi.PyBuffer_FromReadWriteMemory
  pyobj_asreadbuf = ctypes.pythonapi.PyObject_AsReadBuffer
  qubfast = <CDLL 'libqubfast.so', handle 2c23810 at 7fd12ac5d110>
  r_ = <numpy.lib.index_tricks.RClass object>
  rad2deg = <ufunc 'rad2deg'>
  radians = <ufunc 'radians'>
  rdbk = 'Expired.'
  rdbreak = 'supporting'
  rdname = 'qubfast.txt'
  reciprocal = <ufunc 'reciprocal'>
  remainder = <ufunc 'remainder'>
  right_shift = <ufunc 'right_shift'>
  rint = <ufunc 'rint'>
  s_ = <numpy.lib.index_tricks.IndexExpression object>
  sctypeDict = {0: <type 'numpy.bool_'>, 1: <type 'numpy.int8'>,...
  sctypeNA = {'?': 'Bool', 'B': 'UInt8', 'Bool': <type 'numpy.bo...
  sctypes = {'complex': [<type 'numpy.complex64'>, <type 'numpy....
  sign = <ufunc 'sign'>
  signbit = <ufunc 'signbit'>
  sin = <ufunc 'sin'>
  sinh = <ufunc 'sinh'>
  spacing = <ufunc 'spacing'>
  sqrt = <ufunc 'sqrt'>
  square = <ufunc 'square'>
  subtract = <ufunc 'subtract'>
  tan = <ufunc 'tan'>
  tanh = <ufunc 'tanh'>
  true_divide = <ufunc 'true_divide'>
  trunc = <ufunc 'trunc'>
  typeDict = {0: <type 'numpy.bool_'>, 1: <type 'numpy.int8'>, 2...
  typeNA = {'?': 'Bool', 'B': 'UInt8', 'Bool': <type 'numpy.bool...
  typecodes = {'All': '?bhilqpBHILQPefdgFDGSUVOMm', 'AllFloat': ...
Variables Details [hide private]

TheDurHistCopyDialog

Value:
<DurHistCopyDialog object at 0x7fd11c7f8d20 (GtkDialog at 0x2ff25e0)>

COLOR_TOOLTAB_CLOSE_HOVER

Value:
('faces.tooltoggle.close.hover', (1, 0.2, 0.2, 1))

COLOR_TOOLTOGGLE_INFO

Value:
('faces.tooltoggle.info', (1, 1, 1, 0.76))

COLOR_TOOLTOGGLE_MENU

Value:
('faces.tooltoggle.menu', (0.2, 1, 0.2, 1))

ColorInfo

Value:
defaultdict(<function <lambda> at 0x7fd123474500>, {'qubx.cube.other.m\
enu': {'label': 'Other panel menu'}, 'scope.signal.bg': {'label': 'Dat\
a signal background'}, 'scope.mean.line': {'label': 'Data center line'\
}, 'toolspace.layer.bg': {'label': 'Default layer background'}, 'list_\
figure.fit': {'label': 'ListFigure fit curves'}, 'data_fit.button': {'\
label': 'Data curvefit buttons'}, 'toolspace.focused': {'label': 'Pane\
l border focused'}, 'modelGTK.state.label': {'label': 'Model state lab\
el'}, 'scope.units.hover': {'label': 'Data units mouseover'}, 'dataGTK\
...

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'},
...

ScalarType

Value:
(<type 'int'>,
 <type 'float'>,
 <type 'complex'>,
 <type 'long'>,
 <type 'bool'>,
 <type 'str'>,
 <type 'unicode'>,
 <type 'buffer'>,
...

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\
...

cast

Value:
{<type 'numpy.bool_'>: <function <lambda> at 0x7fd1396ed758>, <type 'n\
umpy.timedelta64'>: <function <lambda> at 0x7fd1396ed7d0>, <type 'nump\
y.float16'>: <function <lambda> at 0x7fd1396ed848>, <type 'numpy.uint8\
'>: <function <lambda> at 0x7fd1396ed8c0>, <type 'numpy.int8'>: <funct\
ion <lambda> at 0x7fd1396ed938>, <type 'numpy.object_'>: <function <la\
mbda> at 0x7fd1396ed9b0>, <type 'numpy.datetime64'>: <function <lambda\
> at 0x7fd1396eda28>, <type 'numpy.uint64'>: <function <lambda> at 0x7\
fd1396edaa0>, <type 'numpy.int64'>: <function <lambda> at 0x7fd1396edb\
...

nbytes

Value:
{<type 'numpy.bool_'>: 1, <type 'numpy.timedelta64'>: 8, <type 'numpy.\
float16'>: 2, <type 'numpy.uint8'>: 1, <type 'numpy.int8'>: 1, <type '\
numpy.object_'>: 8, <type 'numpy.datetime64'>: 8, <type 'numpy.uint64'\
>: 8, <type 'numpy.int64'>: 8, <type 'numpy.void'>: 0, <type 'numpy.co\
mplex256'>: 32, <type 'numpy.float128'>: 16, <type 'numpy.uint64'>: 8,\
 <type 'numpy.int64'>: 8, <type 'numpy.unicode_'>: 0, <type 'numpy.com\
plex128'>: 16, <type 'numpy.float64'>: 8, <type 'numpy.uint32'>: 4, <t\
ype 'numpy.int32'>: 4, <type 'numpy.string_'>: 0, <type 'numpy.complex\
...

sctypeDict

Value:
{0: <type 'numpy.bool_'>,
 1: <type 'numpy.int8'>,
 2: <type 'numpy.uint8'>,
 3: <type 'numpy.int16'>,
 4: <type 'numpy.uint16'>,
 5: <type 'numpy.int32'>,
 6: <type 'numpy.uint32'>,
 7: <type 'numpy.int64'>,
...

sctypeNA

Value:
{'?': 'Bool',
 'B': 'UInt8',
 'Bool': <type 'numpy.bool_'>,
 'Complex128': <type 'numpy.complex256'>,
 'Complex32': <type 'numpy.complex64'>,
 'Complex64': <type 'numpy.complex128'>,
 'D': 'Complex64',
 'Datetime64': <type 'numpy.datetime64'>,
...

sctypes

Value:
{'complex': [<type 'numpy.complex64'>,
             <type 'numpy.complex128'>,
             <type 'numpy.complex256'>],
 'float': [<type 'numpy.float16'>,
           <type 'numpy.float32'>,
           <type 'numpy.float64'>,
           <type 'numpy.float128'>],
 'int': [<type 'numpy.int8'>, <type 'numpy.int16'>, <type 'numpy.int32\
...

typeDict

Value:
{0: <type 'numpy.bool_'>,
 1: <type 'numpy.int8'>,
 2: <type 'numpy.uint8'>,
 3: <type 'numpy.int16'>,
 4: <type 'numpy.uint16'>,
 5: <type 'numpy.int32'>,
 6: <type 'numpy.uint32'>,
 7: <type 'numpy.int64'>,
...

typeNA

Value:
{'?': 'Bool',
 'B': 'UInt8',
 'Bool': <type 'numpy.bool_'>,
 'Complex128': <type 'numpy.complex256'>,
 'Complex32': <type 'numpy.complex64'>,
 'Complex64': <type 'numpy.complex128'>,
 'D': 'Complex64',
 'Datetime64': <type 'numpy.datetime64'>,
...

typecodes

Value:
{'All': '?bhilqpBHILQPefdgFDGSUVOMm',
 'AllFloat': 'efdgFDG',
 'AllInteger': 'bBhHiIlLqQpP',
 'Character': 'c',
 'Complex': 'FDG',
 'Datetime': 'Mm',
 'Float': 'efdg',
 'Integer': 'bhilqp',
...