API Documentation¶
API reference for the BirdSongToolbox module.
Table of Contents¶
Import Data Objects¶
Classes that import data and return objects that manage both neural and behavioral data and its corresponding metadata.
Chunked Data Object¶
The ImportData class imports the Chunked Data format and returns it as a object for analysis.
|
Imports Data Specified by user into a Object Oriented Structure |
Epoched Data Object¶
The Import_PrePd_Data object imports the Epoched Data format.
|
Import Prepared (PrePd) Data and its accompanying meta-data into the workspace for analysis |
Preprocessing: Chunks¶
Preprocessing functions for the Chunked Data Format must be selected based on the structure of the dataset used. Always check the shape information in the function documentation.
Rereference¶
|
Common Average References all Epochs(Chunk) |
Filter¶
|
Bandpass Filter Neural Data |
|
Bandpass Filter Epochs(Chunks) |
|
Run multiple bandpass filters on multiple neural data Epochs(Chunks) |
|
Run multiple bandpass filters on one neural data Epoch(Chunks) |
Hilbert Transform¶
|
Use the Hilbert Transform to get either the Amplitude or Phase of the Input Neural Data |
Preprocessing: Epochs¶
The Epoched data format uses object-oriented interface which primarily uses the Pipeline class. You must first make a Pipeline instance, which is a hard copy of the imported data. You can now pre-process the data in place using the preprocessing methods. Once you have completed the pipeline you can close the pipe which will prevent the data from being preprocessed further by accident.
Pipeline Object¶
|
Class for Pre-Processing Neural Data |
Song Behavior¶
Suite of Functions for working with Song Behavioral Labels. To use these functions on the handlabels you must first convert the labels into a different format using this helper function.
|
Get all of the Hand-labels from all of the ‘labels’ tiers from the handlabels_list |
Basic Label Extraction¶
The most basic operations to operate on the handlabels are as follows.
|
Create a list of every instance of the User defined User Label (Focus on One Label) |
|
Group Selected labels together into One Label e.g. |
|
Extracts all of the Neural Data Examples of User Selected Labels and return them in the designated manner. |
Contextual Labels¶
More advance Contextual functions can be added to the handlabels using a properly initialized instance of this object.
|
Class which adds additional labels on top of the handlables to allow for flexible selection of events using context |
Contextual Label Operations
|
Create a list of every instance of the User defined User Label (Focus on One Label) |
|
|
Long Silence Finder Helpful for finding long periods of silence
|
Checks if the Duration of the Silence Label is longer than the window and sets start equal to the middle of event |
Restructure Data using Behavior¶
Using a selection of behavior event times you can restructure neural or behavioral data to run event related analysis.
|
Take an input ndarray of time series data, vector of event indices, and window sizes, and return a nd matrix of windowed trials around the event indices. |
|
Get all Instances of 1 Label from all Chunks |
|
Get all of the Instances for all Labels given for one set of chunks |
|
Get all of the Instances for all Labels given for all frequency bands for one set of chunks |
|
Run the get_event_related_nd across all chunks |
|
Get all of the Instances for all Labels given for one set of chunks |
|
Reshape the output of get_event_related_nd_chunk to be shape of [Instances]->( Freqs, Channels, Samples) or [Instances]->(Channels, Samples) |