# Code for Task Engagement Prediction from CSD profiles The following files contain the code used for CSD estimation from the LFPs from Allen Brain Observatory and the task engagement prediction using Linear Discriminant Analysis. ## Jupyter Notebooks ### Stim_to_LFP.ipynb This notebook contains the first steps for Allen data obtention. It saves the desired sessions and the LFPs, and aligns them to the novel stimuli presentations. ### get_cortical_layers.ipynb This notebook upgrades the channel dataframes from the previous notebook by adding the labels on Cortical Layers using the Common Coordinates Framework from Allen Brain Map. ### get_CSD.ipynb This notebook computes the Current Source Densities for all the LFP data ### CSD_Analysis.ipynb Finally, this notbook performs the data discretization and prepares it for task engagement prediction with LDA ## Python Scripts ### LFP_functions.py This script contains several functions used in the notebooks (LFP data alignment, Energy Normalization, CSD estimation, etc.)