Skip to content

Startup_Init

Nabarb edited this page May 23, 2022 · 4 revisions

Initializing Data

Step 1: Initialize a nigeLab.Tank object

If you want to use your own data, you need to understand the Tank, Animal, and Block organization. It may be helpful to look at the demo recordings and script first. Otherwise, simply make sure htat nigeLab and the +nigeLab package are on your current Matlab path (this is done by either navigating your current folder to the folder containing the +nigeLab folder, or by adding that folder to the path using the addpath() Matlab function). Once you have nigeLab on the path, the next step is to initialize your Tank:

tankRecPath = fullfile('recdrive/tankname/'); % Folder with animals
tankSavePath = fullfile('processeddrive/'); % Folder to contain tankname
tankObj = nigeLab.Tank(tankRecPath,tankSavePath);

Or you can use the selection UI a point the system to the recordings folder and the save folder tankObj = nigeLab.Tank();

You can also initialize single animals or single blocks:

rawAnimalPath = fullfile('recdrive/tankname/ANIMAL-ID/');
tankProcessedPath = fullfile('processeddrive/tankname/');
aniamlObj= nigeLab.Animal(rawAnimalPath, tankProcessedPath);

rawBlockPath = fullfile('recdrive/tankname/ANIMAL-ID/recording.rhd');
animalProcessedPath = fullfile('processeddrive/tankname/ANIMAL-ID/');
blockObj = nigeLab.Block(rawBlockPath ,animalProcessedPath);

Note: depending upon how large your Tank is, this could take some time; however, in general it should only take a few minutes.

Clone this wiki locally