qubx :: dataGTK :: DataSource :: Class DataSource
[hide private]
[frames] | no frames]

Class DataSource

source code

object --+
         |
        DataSource

Provides sampled and idealized data to the user's specification.

Instance Methods [hide private]
 
__init__(self, qubx)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__onChangeData(self, *args) source code
 
__onChangeHilite(self, *args) source code
 
__onChangeIdealization(self, *args) source code
 
__onChangeList(self, *args) source code
 
__onChangeSamples(self, *args) source code
 
__onChangeSel(self, *args) source code
 
__onChangeSignals(self, *args) source code
 
__onSetSignals(self, i, field_name, val, prev, undoing) source code
 
__onSwitchData(self, datas, data) source code
 
gen_samples(self, chunks, main_hold=None, signal=None, maxlen=1048576, get_excluded=False)
Yields a SourceChunk with fields .samples and .sampling for each in chunks.
source code
 
get_idealization(self, chunk, signal=None, mark_excluded=False, get_fragments=False, get_durations=False)
Returns the dwells in chunk as numpy arrays
source code
 
get_segmentation(self, dataview=None, first_seg=None, last_seg=None, left=None, right=None, signal=None, latency=None, baseline_nodes=True)
Returns a list of SourceSeg corresponding to source, modified by args.
source code
 
get_segmentation_file(self, dataview=None, signal=None, latency=None, baseline_nodes=True)
Returns a list of SourceSeg corresponding to the whole file.
source code
 
get_segmentation_files(self, views=None, group=None)
Returns a list of (QubDataView, segm) for each QubDataView in views (or all open files), where segm = view.get_segmentation_file().
source code
 
get_segmentation_list(self, dataview=None, signal=None, group=None) source code
 
get_segmentation_screen(self, dataview=None, signal=None, latency=None, baseline_nodes=True)
Returns a list of SourceSeg corresponding to what's onscreen.
source code
 
set_data(self, data) source code
 
set_signal(self, signal) source code
 
set_source(self, source) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
  OnChangeIdealization
WeakEvent()
  OnChangeSamples
WeakEvent()
  OnChangeSel
WeakEvent() # when mouse selection changes
  OnChangeSignal
WeakEvent(signal)
  OnChangeSource
WeakEvent(source)
  signal
zero-based index of active signal
  source
DATASOURCE_FILE, DATASOURCE_SCREEN, DATASOURCE_LIST
Properties [hide private]
  data

Inherited from object: __class__

Method Details [hide private]

__init__(self, qubx)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

gen_samples(self, chunks, main_hold=None, signal=None, maxlen=1048576, get_excluded=False)

source code 

Yields a SourceChunk with fields .samples and .sampling for each in chunks.

Parameters:
  • chunks - list of SourceChunk
  • main_hold - qubx.task.GTK_Main_Hold if in a worker thread, or None in the main thread
  • signal - signal index, or None to use the chunk.signal
  • maxlen - chunks longer than this will be yielded in pieces
  • get_excluded - if True, yields sampled chunks even when included==False (if False, yields orig chunk when excluded).

get_idealization(self, chunk, signal=None, mark_excluded=False, get_fragments=False, get_durations=False)

source code 

Returns the dwells in chunk as numpy arrays

Parameters:
  • chunk - SourceChunk
  • signal - signal index, or None to use the chunk.signal
  • mark_excluded - if True, replaces excluded dwells with class -1 (or -2?)
  • get_fragments - if False, omits first/last dwells if incomplete
  • get_durations - if True, returns durations
Returns:
firsts, lasts, classes[, durations]

get_segmentation(self, dataview=None, first_seg=None, last_seg=None, left=None, right=None, signal=None, latency=None, baseline_nodes=True)

source code 

Returns a list of SourceSeg corresponding to source, modified by args.

Parameters:
  • dataview - QubDataView, or None for the file onscreen
  • first_seg
  • last_seg
  • left - time offset from start-of-each-seg
  • right - time offset from start-of-each-seg
  • signal - index of data signal
  • latency - shift the data to the right by this many samples
  • baseline_nodes - True to subtract baseline nodes

Instance Variable Details [hide private]

signal

zero-based index of active signal
Get Method:
unreachable(self)
Set Method:
unreachable(self, x)

source

DATASOURCE_FILE, DATASOURCE_SCREEN, DATASOURCE_LIST
Get Method:
unreachable(self)
Set Method:
unreachable(self, x)

Property Details [hide private]

data

Get Method:
unreachable(self)
Set Method:
unreachable(self, x)