Analysis of neuropixel data SW 2312
**Needed**
1. spikeGLX data (3A or 24 type propbe needs slightly different approach)
2. bin and cfg files with timing of photodiode and/or laser onset
optional:
3. camera data
4. brainreg rendered track data
5. a fast local SSD
SEE also: https://github.com/SainsburyWellcomeCentre/rc2_analysis
to 1. spikeGLX data: example W:\margrie\SimonWeiler\RawData\neuropixels_obis\probe\CAA-1121258\CAA-1121258_g0\CAA-1121258_g0_imec0 with 
to 2. aux_stim: example W:\margrie\SimonWeiler\RawData\neuropixels_obis\aux_stim\CAA_1121258 
to 3: example W:\margrie\SimonWeiler\RawData\neuropixels_obis\cameras

|
currently analysis is run on Lee Cossell lab computer under Simon Weiler login; pw:r~~~~~~~~ following https://github.com/SainsburyWellcomeCentre/rc2_analysis
use MATLAB R2021a and set everything up as described on github link
1. setup_paths
2. ctl = RC2Preprocess();
3. ctl.preprocess_step_1('CAA-1121259');
this should first copy files onto local fast SSD and then open automatically open the cmd window and start running
IMPORTANT: Lee only had probe type '3A' and '24'. SW added '2013' in SpikeGLXMetaData.m: 
and JaneliaEcephysHelper.m: 
4. eventually it will finish and you have to close the cmd window so that the pipeline in matlab continues
5. once run through run the correct trigger function: ctl.correct_trigger_file('CAA-1121308');
6. then run the LFP profile and if available compare with the anatomy track csv file, for four shanks:
hf_power_0 = ctl.hf_power('CAA-1121308', 0);
hf_power_1 = ctl.hf_power('CAA-1121308', 1);
hf_power_2 = ctl.hf_power('CAA-1121308', 2);
hf_power_3 = ctl.hf_power('CAA-1121308', 3);
hf_power_0.run();
hf_power_1.run();
hf_power_2.run();
hf_power_3.run();
ctl.save_hf_power(hf_power_0);
ctl.save_hf_power(hf_power_1);
ctl.save_hf_power(hf_power_2);
ctl.save_hf_power(hf_power_3);
NOTE: Here I had to make some adjustements to the code of LC in XXX
%%%%%% UPDATE JULY 2024 %%%%%%%%%%
Format probe and get depth with multiple shanks
on Lees local machine type :
ctl.format('CAA-1121677_rec1_recX')
this uses RC2format.m script and create a matlab structure with different information that will be used for further anaylis