-
Notifications
You must be signed in to change notification settings - Fork 3
Startup_Install_Demo
An example script illustrating a typical use-case for nigeLab on a small subset of data recorded from experiments at KUMC is available in ePhys_packages/+nigeLab/setup/demo. The script demo_nigeLab.m shows how you might call nigeLab methods from the Command Window or your own script to facilitate handling your data.
If you are new to Matlab, in order to run demo_nigeLab.m, navigate your Matlab Editor so that the Current Folder path is set to wherever ePhys_packages/+nigeLab/setup/demo is located on your computer. Double-click demo_nigeLab.m, then click the Editor tab at the top of the window. Clicking the green Run play-button will start the script, executing the following tasks:
- unzip myTank.zip. This file contains .rhs data (recorded with an Intan 128ch Stimulation/Recording Controller) from two animals during different experimental phases.
- create a new folder called myTank_analysis that will be used as destination folder for all the analysis performed by nigeLab.
- create a tank object.
- extract raw data and save it in the corresponding folder.
- Perform multi-unit bandpass filter for spike detection for all Animals and Blocks within Tank.
- Perform common-average re-reference (CAR) for all Animals and Blocks within Tank.
- Perform spike detection and feature extraction (wavelet decomposition)
- downsample raw data to perform local field potential (LFP) analysis
The script unzips a small directory with 2 Animals and 9 experimental recordings in total, so there should now be some more folders in the demo path. It also ran some pre-processing on the extracted binary files to organize them in a format that nigelab understands. If you go into the extracted folders, you can see what the hierarchical format of nigeLab looks like. In addition, nigeLab saves .mat files corresponding to Tank, Animal, and Block objects so that they are easy to restore if you accidentally clear your workspace memory. nigeLab also puts small .nigelTank, .nigelAnimal, and .nigelBlock text files at each level to denote that the contents of a given folder correspond to a Tank, Animal, or Block.
- The
_Tank.matfile will be located one level above the.nigelTankfile, due to the saving convention we implemented. nigeLabrequires a consistent file naming convention, otherwise it would be impossible to organize your data effectively. Depending on how you choose to name your files, it is easier fornigeLabto parse metadata from the filenames and incorporate that metadata into downstream methods. For more information about choosing a good naming convention, see our guide to naming your experiments.- For more-specific information about setting up your own naming conventions in
nigeLab, see how nigeLab parses metadata from file names.
The variable myTank is a nigeLab.Tank object. It "contains" 2 Animals (referenced in myTank.Animals property). These animals are reflected in the folders located inside the myTank folder. you will find 2 Animals:
-
Animal 1 ID = R19-94
- 4 experimental recordings
-
Animal 2 ID = R19-101
- 5 experimental recordings
In this case, each recording corresponds to a 2-second epoch that is temporally "centered" on a synchronized cutaneous stimulus at a fixed location on the rat's distal forelimb.
