AllenNeuropixels._phaselockingindex — Method
Calculate the phase-locking index using the wavelet transform masks stored in each bursts. Drops any bursts that do not have wavelet information at the specified frequency, f. If centre is true, the phase of spikes in each burst is centred to the mean phase in each burst. Only consider bursts with at least n_spikes spikes, and only count channel-neuron pairs that have n_bursts bursts.
AllenNeuropixels._phaselockingindex — Method
The phase-locking index for bursts and an LFP signal
AllenNeuropixels.aggregatefit — Method
Returns a function that evaluates the Gaussian fits of a collection of bursts at any time and log-frequency value
AllenNeuropixels.burstcurvature! — Function
thresh is a proportion of the average gradient of the wavelet spectrum below which a gradie
AllenNeuropixels.burstthreshold! — Method
Threshold a wavelet spectrum using either a percentile cutoff (method=:percentile) or a standard deviation cutoff (method=:std) of either each frequency band (eachfreq=true) or the entire spectrum. You probably want to FOOOF the spectrum before this
AllenNeuropixels.detectbursts — Method
Detect bursts from a supplied wavelet spectrum, using thresholding boundingstretch increases the bounding box slightly so for a more accurate fit. Give as a proportion of the threshold bounding box detection can be _detectbursts or mmap_detectbursts
AllenNeuropixels.phaselockingindex — Method
Buzsaki's phase-locking index ("Gamma rhythm communication between entorhinal cortex and dentate gyrus neuronal assemblies")
AllenNeuropixels.predictionerror — Method
Calculate the prediction error of variables 1 to variables 2 and vice versa. The output contains prediction errors. If used with spike matrices probably want to transpose those
AllenNeuropixels.randomisebursts — Method
Shuffle times of a burst vector
AllenNeuropixels.rbfdistance — Method
x and y are vectors containing spike times
AllenNeuropixels.surrogatefilter! — Method
Filter a vector of bursts based of a vector of surrogate bursts
AllenNeuropixels.thetafeature — Function
Detect time series with strong theta events using the automutual information
AllenNeuropixels.thetafeature — Method
Calculate the thetafeature for each stimulus presentation
AllenNeuropixels.Plots.plotbrain! — Method
plotbrain!(ax, S::AN.AbstractSession; dotext = :cortex, dostructures = true,
ids = :targets, probestyle = :lines, dark = false, meshparams = ())Plot a 3D representation of the brain with probes and structures.
Arguments
ax::AbstractPlotting.Axis: The axis to plot on.S::AN.AbstractSession: The session object containing the data.dotext::Symbol=:cortex: Whether to display text labels for the probes or the cortical structures.dostructures::Bool=true: Whether to plot the brain structures.ids::Symbol=:targets: Which structures to plot. Can be:all,:corticaltargets,:targets, or a vector of structure IDs.probestyle::Symbol=:lines: Whether to plot the probes as lines or meshscatter.dark::Bool=false: Whether to use a dark theme.meshparams::NamedTuple=(): Additional parameters to pass to themesh!function.
Returns
- A tuple containing the color observables and the probe plots.
Example
S = ANB.VisualBehavior.Session(1067588044)
f = Figure(; size = (1920, 1080))
ax = Axis3(f[1, 1]; aspect = :data)
c, p = AN.Plots.plotbrain!(ax, S; dark = false)AllenNeuropixels.Plots.plotbrainstructure! — Method
plotbrainstructure!(ax, id; hemisphere)Plot a brain structure with the given ID on the given axis.
Arguments
ax::AbstractPlotting.Axis: The axis to plot on.id::Int: The ID of the brain structure to plot.hemisphere::Symbol: The hemisphere to plot the structure on. Default is:both.
Example
D = AllenNeuropixels.getstructureidmap()
id = D["root"] # The whole brain
f = Figure(; size = (1920, 1080))
ax = Axis3(f[1, 1]; aspect = :data)
p = AN.Plots.plotbrainstructure!(ax, id; hemisphere=:both)AllenNeuropixels.Plots.traces — Method
We'll plot the columns of this array as traces of their mean values. x is the lag index of each row, tracez is the value with which to color each trace (column) and X is an array of trace data.