User Tools

Site Tools


ephys_pipeline:2_phys_gui

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ephys_pipeline:2_phys_gui [2022/01/12 13:58] – [Additional Waveclus settings] lukas.schneiderephys_pipeline:2_phys_gui [2022/03/17 14:08] (current) – removed lukas.schneider
Line 1: Line 1:
-====== Phys gui ====== 
-All preprocessing is done by  
-<code matlab> 
-function phys_gui_execute(handles) 
-</code> 
-Handles are desribed later on in this section 
-Alternatively, you can use a GUI by using the command  
-<code matlab> 
-phys_gui_working 
-</code> 
-\\ A figure will pop up which looks something like this: 
-{{ :ephys_pipeline:phys_gui.png |}} 
-Select your monkey from the dropdown menu 
-\\ Select the session folders you want to process after hitting the "Add date from list" button 
-\\ If you hit "Run", phys_gui will do all the preprocessing that you checked (see below) on the selected folders. The box above will remind you of which steps you selected. 
  
-===== Rename folders ===== 
-In later TDT software versions (synapse - setup 3), the folder naming is different. For converting folders recorded with synapse to the old (our standard) folder naming, check the box "RenameSynapseTankNameToOldTankFormat". 
- 
-===== Waveclus pre-clustering ===== 
-If you want to use the waveclus pipeline, you first need to create waveclus sortcodes. You can do so by checking "WCFromBB". Make sure, the electrode_depths file is update for the selected blocks, as this is a requirement for the current WC preprocessing pipeline (see ...). Folders (WC_Block-N) will be created for each block N, and one additional folder (WC) will contain the clustered data, concatenating for each channel separately all blocks where the electrode was in certain range. 
- 
-==== Waveclus pre-clustering settings ==== 
- 
-  * handles.WC.threshold = get(handles.edit10,'String'); 
-  * handles.WC.StdThrSU = str2double(get(handles.edit11,'String')); 
-  * handles.WC.StdThrMU = str2double(get(handles.edit20,'String')); 
-  * handles.WC.hp =get(handles.edit12,'String'); 
-  * handles.WC.hpcutoff =str2double(get(handles.edit13,'String')); 
-  * handles.WC.lpcutoff =str2double(get(handles.edit14,'String')); 
-  * handles.WC.cell_tracking_distance_limit=str2double(get(handles.edit15,'String')); 
-  * handles.WC.remove_ini=str2double(get(handles.edit16,'String')); 
- 
-==== Additional Waveclus settings ==== 
-For simplicity, some of the potential waveclus settings have been hardcoded inside phys_gui, calling get_WC_settings. 
-\\ However, when you input the handles directly using phys_gui_execute, you can still define them as you like. 
-<code> 
-handles.RAM = 24;   % SYSTEM MEMORY in GB 
-handles.dtyperead = 'single';         % Data TYPE, Default for BR, TD 
-handles.dtypewrite = handles.dtyperead; 
- 
-%FOR? 
-handles.sys = 'TD'; % RECORDING SYSTEM 
-handles.rawname = '*.tdtch';% RAW DATAFILES NAME 
-handles.blockfile=0; % ???? 
- 
-% % ARRAY CONFIGURATION -> relevant for arraynoisecancellation (which is disabled currently) 
-% handles.numArray = 6; 
-% handles.numchan = 64;                                                       % Channels per Array 
-% handles.arraynoisecancelation = 0; 
-% 
-% FILTERING: LINE NOISE 
-handles.WC.linenoisecancelation = 0;                                           % 1 for yes; 0 for no 
-handles.WC.linenoisefrequ = 50; 
-handles.WC.transform_factor = 0.25;                                        % microVolts per bit for higher accuracy when saved as int16 after filtering; Default for BR 
-handles.WC.iniartremovel = 1;               % first 40 samples 
- 
-% DETECTION 
-handles.WC.w_pre = 10; 
-handles.WC.w_post = 22; 
-handles.WC.ref = 0.001; 
-handles.WC.int_factor = 1; 
-handles.WC.interpolation ='n'; 
-handles.WC.stdmax = 100; 
- 
-% FEATURE SELECTION 
-handles.WC.features = 'wavpcarawtime'; %'wavpcarawderiv' 
-handles.WC.wavelet='haar';                 %choice of wavelet family for wavelet features 
-handles.WC.exclusioncrit = 'thr';          % this part is weird to me as well, 
-handles.WC.exclusionthr = 0.9;             % features are excluded, until no feature pairs are correlated more than exclusionthr  %def R^2 = 0.80 
-handles.WC.maxinputs = 9;                 % number of inputs to the clustering def. 11 
-handles.WC.scales = 4;                     % scales for wavelet decomposition 
- 
-% CLUSTERING - first 4 dont make sense, one is not needed 
-handles.WC.num_temp = 18;                   % number of temperatures; def 25 
-handles.WC.mintemp = 0;                     % minimum temperature 
-handles.WC.maxtemp = 0.18;                  % maximum temperature def 0.25 
-handles.WC.tempstep = 0.01;                 % temperature step 
-handles.WC.SWCycles = 100;                  % number of montecarlo iterations 
-handles.WC.KNearNeighb = 11;                % number of nearest neighbors 
-handles.WC.max_spikes2cluster = 40000;  
-</code> 
- 
-===== Create Plexon files from snippets ===== 
-If you want (or have) to use the online detected snippets, check "PLXFromSnippets". If you first want to Realign your snippets to the minima, check "PLXFromRealignedSnippets" instead. PLX Files will be called Date_blocks_N.plx or Date_Realigned_blocks_N respectively. 
- 
-===== Create Plexon files from waveclus sortcodes ===== 
-After you sorted with waveclus, you can create a plexon file from your saved sortcodes. Check "PLXFromWCFromBB". PLX Files will be called Date_from_BB_blocks_N. 
- 
-===== Combine ephys and behavioral data ===== 
-After you are done with sorting, you can synchronize your recorded data with behavioral data, adding LFP and spike information in the trial structure format that monkeypsych uses. Check "CombineTDTandMP". 
-\\ In order to indicate which type of sorting you want to use, select one option in the "Choose spikes" section 
-\\ "Snippets" uses the sortcodes based on the original snippets 
-\\ "Realigned" uses the sortcodes based on realigned snippets 
-\\ "FromBB" uses the sortcodes based on WC clustered PLX files 
-\\ Choose "none" in case you are only interested in LFP. No spikes will be added to your combined data. 
-\\  
-\\ There is also an option for disregarding LFP. If you select this option, LFP data in the combined file will not be updated (in case it has been processed previously) or completely left out (if it hasn't been processed before). Use this option as long as you are resorting. You can also add LFP dat at a later point. 
- 
- 
-===== Create Excel entries ===== 
-Check "CreateExcelEntries" for creating/updating the automatic sorting sheet of the respective Excel sorting table with the selected data (sessions). Only works after you did all the preceding steps. 
ephys_pipeline/2_phys_gui.1641995901.txt.gz · Last modified: 2022/12/29 07:15 (external edit)