-
Notifications
You must be signed in to change notification settings - Fork 2
1.2 Phase: preprocessing
Shun Li edited this page Dec 7, 2023
·
5 revisions
During the preprocessing phase, NeuroDAP uses the loadSessions() function to
- extract relevant signal from all acquisition systems
- perform preprocessing (e.g. demodulation) if necessary
- synchronize between acquisition systems
After running, relevant files will be stored within the same session folder. You can use a script to preprocess & analysis batch of sessions together. See Shun_loadSessionData.m
- As different system wires information differently, it is up to the experimenter to write a custom function on assigning each signal. But in general, such function should achieve the following:
- Assign each relevant behavior event or recording signal to a specific digital/analog channel. For example, sync pulse is stored in channel 1, licking in channel 2, airpuff in channel 3 etc.
- While optional, perform necessary preprocessing for some channels. For example, licking might be stored in an analog channel, so thresholding is required to find the rising/falling edge to turn it into a digital signal.
- While
loadSessions()requires minimal input to run (just the session path), user can tweak different preprocessing parameters based on their needs (e.g. rollingWindowTime) - See the corresponding page of
loadSessions()for detail algorithm, input options, etc.
Analysis preparation
- Copy
concatLabjack_template.min the tutorials folder and edit the name and content to make it suitable for your specific setup. CheckconcatLabjack()for more details. - If you are using NIDAQ data, use create your own mapping of channels to behavior/recording signals by using assignChannels(). Still in the process of development.
- If you are using camera data acquired through Bonsai, create your own version of
assignCameraSignals(). Still in the process of development. - After writing your own version of these functions, do a sample recording in your setup, and try running
loadSessions(). SeeloadSessions()for more details and interpretation of the plots generated.
Batch processing
- Running
loadSessions()manually can be extremely tedious and error-prone. One of the reason that preprocessing steps are packaged inloadSessions()is a method is that it allows fast, repeatable preprocessing by deploying it in a for loop. - Therefore, its highly recommended to create your version of
Shun_loadSessionData.m(in Tutorials folder). In this script, you can create GUIs that allow you to select & input parameters of analysis and behavior. These information will be accordingly stored inparamsstruct and utilized in the following session analysis stage.- For example, after recording sessions everyday, I'll select directories of today's sessions, enter parameters in GUI as indicated, and run
loadSessions()for all sessions. - This process normally only takes several clicks, and it will run the relatively time-consuming process of preprocessing and synchronization, so that later we don't need to do this again.
- For example, after recording sessions everyday, I'll select directories of today's sessions, enter parameters in GUI as indicated, and run