qubx :: fast :: IdlStim :: Class IdlStim
[hide private]
[frames] | no frames]

Class IdlStim

source code

object --+
         |
        IdlStim

Idealizes a stimulus signal.

Instance Methods [hide private]
 
__init__(self, known_amps, add_deltas, delta, min_dur_ms, sampling_ms)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__del__(self) source code
 
add(self, samples)
Feeds in a numpy.array(dtype=float32) of samples; you add all samples, then call done_add, then for each array of samples added, you call get_next_dwells.
source code
 
done_add(self)
Indicates you're done calling add(), so it can prepare the final amps and dwells.
source code
 
get_amps(self)
After you've called done_add(), returns the amp of each class in the output.
source code
 
get_next_dwells(self, offset_in_data, sample_count, get_durations=False)
After you've called done_add(), call this once for each array of samples you added.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, known_amps, add_deltas, delta, min_dur_ms, sampling_ms)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • known_amps - list of known stimulus levels
  • add_deltas - True if the idealizer can find new levels
  • delta - minimum difference between found levels
  • min_dur_ms - dwells shorter than this will be joined to a neighbor
  • sampling_ms - sampling interval in milliseconds
Overrides: object.__init__

get_next_dwells(self, offset_in_data, sample_count, get_durations=False)

source code 

After you've called done_add(), call this once for each array of samples you added.

Parameters:
  • offset_in_data - the "first" sample index for the source sample array
  • sample_count - length of the source array
  • get_durations - whether to return an array of durations
Returns:
(firsts, lasts, classes[, durations])