Package qubx :: Package fast :: Module data :: Class Idl_AdaptiveResample
[hide private]
[frames] | no frames]

Class Idl_AdaptiveResample

source code

object --+
         |
        Idl_AdaptiveResample

Idealizes a stimulus signal.

Instance Methods [hide private]
 
__init__(self, delta, min_dur_ms, sampling_ms)
x.__init__(...) initializes x; see help(type(x)) 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_dist(self)
After you've called done_add(), returns the (amps, stds).
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, delta, min_dur_ms, sampling_ms)
(Constructor)

source code 

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

Parameters:
  • 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])