Localizers
Context
The localizers are short cognitive tasks aimed at localizing some well known activities. The localizers and the anlyzing tools ahve been developed by Jean-Philippe Lachaux's team who nicely shared the code with us.
Start
The first localizers where done the 20/06/2018 with patient pat_02614_1073
tests
The stimuli are sent via "presentation" software.
Preprocessing
Fore each loca of each pat (pat_ccccc_mmmm)
- create a folder in Donnees/Brutes:
pat_ccccc_mmmm_LocaName
- Copy correspondingMicromed files and rename .TRC file as
pat_ccccc_mmmm_locaName.TRC
Create TTL file
Depending on the acquisition settings, the analysis requiers different preprocessing steps to create the TTL file.
In any case, the script Localizer_getTriggers.m needs to be run, if possible step by step.
This script is calling the script Localizer_getPatInfos that needs to be updated with the patient that will be run.
% if Nlx TTLs evts, read event and define idx start and end of each loca in Localizer_getPatInfos
% [TTL_Timestamps, EventIDs, TTL_ID, Extras, EventStrings, Header] = Nlx2MatEV(fullfile(NlxPath, 'Events.nev'), [1 1 1 1 1], 1, 1, [] );
% NlxEvt = [TTL_Timestamps' TTL_ID']; %µsec
% NlxEvt = NlxEvt(TTL_ID>0, :); %µsec
% NlxEvt = [NlxEvt (NlxEvt(:,1)-NlxEvt(1,1))*1e-6];
The outputs of the script are sanity checks figure and a .csv table that has to be used to create the .pos file.
With the .csv file you can compare the log file and the TTLs recorded. It is usefull to delete fake TTLs
Nlx2MM
This configuration is to be avoided if the triggers are not sent to Nlx and MM through a bipolar channel
TTLs are sent to Neuralynx that send them to Micromed:
- TTL numbers are all presents and with correct number
- Timings of TTL on Neuralynx are good
- Timings of TTL on Micromed have up to 200 ms delay
Solution: take timing from Neuralynx and find the time delay between Neuralynx and Micromed to transpose the correct TTL timings to Micromed.
Find delay between Neuralynx and Micromed with the bipolar channels.
Neuralynx and Micromed in parallel
Trigger only via TTL
Find delay between Neuralynx and Micromed with a iEEG channel.
Trigger via TTL and bipolar voltage input
Find delay between Neuralynx and Micromed with the bipolar channels. For Micromed, there should be a bipolar trigger channel for each box in order to check the delay between the 2 boxes.
Micromed direct
Convert .TRC to ELAN
Launch.exe : F:\IR-IHU-ICM\Bureautique\EpiDBS\Epimicro\ExperimentProtocol\Localizer\DataLyon\Localizer - 21-02-2018\Localizer.exe
Load .TRC file: Fichier → Charger un fichier individuel
Select File and click on 'Convert to ELAN File
Remove the .TRC file from the loca folder
Create .pos,
This is the ELAN TTL file, that has to be created from the .csv file
3 columns separated with tabs, and save it as
pat_ccccc_mmmm_locaname_raw.pos
column 1 : sample
column 2 : TTL value
column 3 : 0
Electrodes names .eeg.ent
If some electrode have a number in the name, change the name frome the .eeg.ent to remove the number. Example: change Am2g1 to Amg1
Analyses
Run analysis
Select patient folder Fichier → Ouvrir dossier patient
Load the patient folder pat_ccccc_mmmm
Check:
- Loca to analyze
- "Execute the same Analysis for each Frequency Band"
- "Generate Time Frequency Envelloppe"
- Generate Maps (trialmat)
- Generate Envellope Plots
Click on "Process Analysis"
Select chanels to analyze in the popup window
Wait until it's finished
Issues
- If electrode has a number in the name, name cut at the first number: ex Ha2g1 will be Ha2
- 2 "l" in Envelloppe"
- 2 "l" ans 1 "p" in Envellope"