API Documentation¶
API reference for the module.
Table of Contents¶
File I/O¶
Functions for file I/O.
NWB & Custom file I/O¶
|
Save out an NWB file. |
|
Load an NWB file. |
|
Save out a config file. |
|
Load an individual config file. |
|
Load all configs together. |
|
Save a custom object. |
|
Load a custom object. |
General file I/O¶
|
Save out text to a txt file. |
|
Load text from a txt file. |
|
Save out a dictionary of data to a JSON file. |
|
Load from a JSON file. |
|
Save out data to a JSONlines file. |
|
Load from a JSON lines file. |
|
Load a .mat file. |
|
Load a collection of JSON files into a dataframe. |
|
Context manager to open a HDF5 file. |
|
Save data to a HDF5 file. |
|
Load one or more specified field(s) from a HDF5 file. |
Utilities¶
|
Get a list of files from a specified folder. |
|
Get a list of sub-folders from a given folder. |
|
Create a standardized session name. |
|
Make a list of subject files. |
Validate Functions¶
|
Validate a NWB file. |
NSP¶
Functionality related to NSP (Neural Signal Processors).
I/O¶
|
Load a set of Blackrock files. |
Checks¶
|
Check some basic information and metadata from a set of Blackrock files. |
Objects¶
Custom objects.
Electrodes¶
|
Object for collecting / managing electrode information. |
TaskBase¶
|
Base object for collecting task information. |
Paths¶
Path management.
Paths Object¶
|
Paths object for a session of single-unit data. |
Directory Creators¶
|
Make a folder, if it does not already exist. |
|
Create the folder structure for a project. |
|
Create the folder structure for a subject. |
|
Create the folder structure for a session of data. |
Plots¶
Plotting functions and utilities.
Timestamps¶
|
Plot the alignment between synchronization pulses. |
|
Plot detected peaks on a time series. |
Timestamps¶
Functions and helpers for managing timestamps and temporal alignment.
Alignment¶
|
Fit a model to align synchronization pulses from different recording systems. |
|
Predict times alignment from model coefficients. |
|
Predict times alignment from a model object. |
|
Match pulses to each other based on ISIs. |
Peaks¶
|
Process peaks from a time series. |
Update¶
|
Apply an offset to timestamps. |
|
Change the units of timestamps. |
|
Change the effective sampling rate for a set of times values. |
Utils¶
|
Convert a number of samples to corresponding time length. |
|
Create a set of timestamps for a set of samples. |
Sorting¶
Spike sorting related functionality.
I/O¶
|
Load a spike detection output file from Combinato - files with the form data_chan_XX.h5. |
|
Load a combinato sorting output file - files with the file name sort_cat.h5. |
|
Save out units information. |
|
Load a set of units files from a folder. |
Processing¶
|
Collect together all the organized spike sorting information for a channel of data. |
|
Helper function to run the process of going from combinato -> extracted units files. |
Utilities¶
|
Get the group label for each spike (based on spike class + group mapping). |
|
Get the valid clas / group information from the combinato organized groups info array. |
|
Extract individual clusters from a channel of data. |
Utils¶
Utilities & helper functions.
Check Functions¶
|
Check if a variable is empty, across possible types. |
|
Check is a variable is of the given type(s). |
|
Check whether a given string has specified contents. |
|
Helper function to clean a list of string values for adding to NWB. |
Convert Functions¶
|
Convert a string to a boolean. |
Convert a list of strings to a list of boolean. |
|
|
Convert type of a given variable. |
|
Convert to an array of specified data type. |
|
Convert a time value to a datetime date. |
Extract Functions¶
|
Select a (single) event based on time range, returning NaN if not found. |
|
Extract a value for a specified trial. |
Log Functions¶
|
Print a status update. |
Run Functions¶
|
Catch a raised error, with the option to save an error log and proceed. |
Tool Functions¶
|
Generator that returns an incrementing index value. |
|
Get the current datetime. |