2.4.2 getAnimalStruct() - shunnnli/NeuroDAP GitHub Wiki

Overview

Combine sessions of the same animal, from the same task, of the same event, recorded from the same signal (eg NAc, LHb, cam, Lick) together and saved them into animals struct. This function is implemented by combineTraces().

Inputs and options

  • summary: struct, which is formed by concatenating analysis_sessionName.mat from every selected sessions

Outputs

  • animals: struct, each rows stores combined data of a specific animal (e.g. SL103), task type (e.g. reward pairing), same event (e.g. water delivery or opto stimulation), and signal (e.g. NAc dLight or camera pupil area) across all sessions. image

Examples

  1. To create animals when it is not previously saved or explicitly required to recreate it
if isempty(dir(fullfile(resultspath,'animals*.mat'))) || groupSessions
    animals = getAnimalsStruct(summary);
end