neuroglia.event.PeriEventTraceSampler

class neuroglia.event.PeriEventTraceSampler(traces, sample_times)[source]

Take event-aligned samples of traces from a population of neurons.

Traces are sampled relative to the event time. There is no enforced constraint that the times of events or sample_times relative to the events need to align to trace sample times. Rather, samples are interpolated from the values in the traces DataFrame.

Parameters:
  • traces (pandas DataFrame with 'time' as the index and neuron IDs in columns) – The traces that will be sampled from when the transform method is called
  • sample_times (array) – Time relative to events that will be used to sample or bin spikes.

Notes

This estimator is stateless (besides constructor parameters), the fit method does nothing but is useful when used in a pipeline.

__init__(traces, sample_times)[source]

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

Methods

__init__(traces, sample_times) x.__init__(…) initializes x; see help(type(x)) for signature
fit(X[, y]) Do nothing and return the estimator unchanged
fit_transform(X[, y]) Fit to data, then transform it.
get_params([deep]) Get parameters for this estimator.
set_params(**params) Set the parameters of this estimator.
transform(X) Sample traces around each event