neuralib.locomotion.spatial.place_field
- neuralib.locomotion.spatial.place_field(signal, baseline, threshold, window=100, track_length=150)[source]
Detect place fields from position-binned calcium activity.
Bins where the trial-averaged activity exceeds
thresholdfraction of the (peak − baseline) range are labelled as place field regions. Four boundary cases (NN / NP / PN / PP) handle fields that start or end at the track edges.See also
Mao et al., 2017. Nature Communications
Dimension parameters:
L = number of laps (trials)
B = number of spatial bins
- Parameters:
signal (ndarray) – Position-binned transient activity. Array[float, [L, B]]
baseline (ndarray) – Position-binned baseline activity. Array[float, [L, B]]
threshold (float) – Fraction of (peak − baseline) used as the detection threshold
window (int) – Number of spatial bins
track_length (int) – Track length in cm
- Returns:
PlaceFieldResult- Return type: