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

Module scope

source code

2d data display with oscilloscope-inspired controls.

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]
  Scope
View for sampled data with transparent overlay controls, modeled after an oscilloscope.
  ScopeSignal
Floating layer controlling the display of one signal (or time).
Functions [hide private]
 
allowed_divs()
Yields an increasing sequence of allowed pixels per div: 2, 4, 6, 10, 12, 14, 16, 20, 22, ...
source code
 
MEAN_COLOR(alpha) source code
 
COLOR_SIGNAL(name) source code
 
SCOPE_FORMAT(num) source code
 
SCOPE_SCROLL_PIXISH(val, u_per_d, pixels, offset, fine, coarse, lo=None, hi=None)
Returns val scrolled by about a pixel's worth.
source code
 
divs_for_pix(pix, target_ppd=50.0)
Returns the optimal number of divs to fill so many pixels.
source code
 
accept_tuple(n)
Returns a function which accepts only n-tuples, in string form, and returns them as tuples.
source code
Variables [hide private]
  SIGNAL_CENTER_HIDDEN = -1000000000.0
  TARGET_PIX_PER_DIV = 50.0
  COLOR_BG = ('scope.bg', (0, 0, 0, 1))
  GRID_ALPHA = 0.3
  COLOR_MEAN_LINE = ('scope.mean.line', (1, 0.4, 0.8, 0.3))
  COLOR_MEAN_VALUE = ('scope.mean.value', (1, 0.4, 0.8, 0.8))
  COLOR_MEAN_HOVER = ('scope.mean.hover', (1, 0.4, 0.8, 1))
  COLOR_GRID = ('scope.grid', (0, 1, 0, 0.3))
  COLOR_UPERD_VALUE = ('scope.uperd.value', (0, 1, 0, 0.8))
  COLOR_UPERD_HOVER = ('scope.uperd.hover', (0, 1, 0, 1))
  COLOR_UNITS_VALUE = ('scope.units.value', (1, 1, 1, 0.8))
  COLOR_UNITS_HOVER = ('scope.units.hover', (1, 1, 1, 1))
  COLOR_GRAB = ('scope.grab', (0.5, 0.9, 1, 0.8))
  COLOR_GRAB_HOVER = ('scope.grab.hover', (1, 0.7, 0.7, 1))
  COLOR_IDEALIZATION = ('scope.idealization', (0.8, 0, 0, 0.8))
  COLOR_EXCLUDED = ('scope.excluded', (0.5, 0.5, 0.5, 0.4))
  COLOR_SIGNAL_POPUP = ('scope.signal.popup', (0, 1, 0, 0.8))
  COLOR_SIGNAL_BORDER = ('scope.signal.border', (1, 1, 1, 1))
  COLOR_SIGNAL_BG = ('scope.signal.bg', (0.12, 0.12, 0.12, 0.85))
  COLOR_SIGNAL_HOVER = ('scope.signal.hover', (0.1, 1, 0.1, 0.9))
  SIGNAL_BORDER = 2
  COLORS_SIGNAL = {'Current': ('dataGTK.signals.Current', (1, 1,...
  SIGNAL_WIDTH = 15
  SIGNAL_HEIGHT = 3.5
  __package__ = 'qubx'
  e = 2.71828182846
  pi = 3.14159265359
  rdbk = 'Expired.'
  rdbreak = 'supporting'
  rdname = 'qubfast.txt'
Function Details [hide private]

SCOPE_SCROLL_PIXISH(val, u_per_d, pixels, offset, fine, coarse, lo=None, hi=None)

source code 

Returns val scrolled by about a pixel's worth. lo and hi in args for compatibility with qubx.util_types.scrolled_* but ignored.


Variables Details [hide private]

COLORS_SIGNAL

Value:
{'Current': ('dataGTK.signals.Current', (1, 1, 1, 1))}