Class spike_envelope
source code
object --+
|
spike_envelope
Find an amplitude envelope over a smooth 1D signal that features
roughly periodic spikes. Input is a 1D parameterized pointset and the
approximate period. An optional input is the tolerance (fraction) for
finding spikes around the period (measuring uncertainty in the period) --
default 0.2 (20% of the period).
Optional start_t sets where to orient the search in the independent
variable -- default None (start at the highest point of the signal). It
*must* be a value that is present in the independent variable array of
the given points argument.
Optional noise_floor sets minimum signal amplitude considered to be a
peak (default 0 means non-noisy data assumed).
Outside of spike times +/- tol, envelope curve will be defined as
amplitude zero.
adjust_rate is a fraction < 1 specifying the %age change of spike
search interval (a.k.a. 'period'). default 0.1.
make_traj option can be used to avoid costly creation of a Trajectory
object representing the envelope curve, if unneeded (default True).
When less is known in advance about the regularity or other properties
of the spikes, pre-process using estimate_spiking() and pass the result
as the optional argument spest.
|
__init__(self,
pts,
per,
tol=0.2,
start_t=None,
noise_floor=0,
depvar=None,
adjust_rate=0.1,
make_traj=True,
spest=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
find_spike_ixs_dir(self,
dir=1,
per=None,
start_t=None,
tol=None)
Use dir=-1 for backwards direction |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|
Inherited from object :
__class__
|
__init__(self,
pts,
per,
tol=0.2,
start_t=None,
noise_floor=0,
depvar=None,
adjust_rate=0.1,
make_traj=True,
spest=None)
(Constructor)
| source code
|
x.__init__(...) initializes x; see x.__class__.__doc__ for
signature
- Overrides:
object.__init__
- (inherited documentation)
|