sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
a61c255cdb4c223026b3af5a51964d22ad7cd57f133090898fa2117e680f1c71
MATLAB
10,677
236
function MovWindow20210107(RorL) global RpegTouchallWon LpegTouchallWon SpikeArrayWon RtouchSpikeOnUnit LtouchSpikeOnUnit RtouchSpikeOffUnit LtouchSpikeOffUnit... Windowinterval Spikeposition pegpatternum pegpatternname %%%%%%%window‚Ìstart‚Æend‚ðÝ’è WindowNum=5; width=Windowinterval/2; slide=50; %%%%...
c132c448123b56c7f9633d9755e4ce41c6ed23924b0f6d45c011619fe3e1e51e
MATLAB
10,687
202
clear close all; clc; R1 = importdata('E:\Sameni\Projects\Seizure\SourceCodes\Probabilistic\SourcesWithResultsBackup\testFreqDomainEnergyIncreaseRate01.txt'); R2 = importdata('E:\Sameni\Projects\Seizure\SourceCodes\Probabilistic\SourcesWithResultsBackup\testICASubspaceAngles01.txt'); R3 = importdata('E:\Sameni\Project...
8fd0b63abff212465433958c3cbf8574d0e21af468ef83e8a8b5b8a703fb5c36
MATLAB
10,688
294
function [Cells]=mnl_ReadXML_Somas(fname) %Function to quickly read all the somas only, based on the functio mnl_ReadXML_DendritesAndSomas4 filename=sprintf('%s%s',fname,'.xml'); [s]=xml2struct(filename); %% Step 1 - Store the somas if isfield(s.mbf,'contour')==1 %if somas exist nContours=size(s.mbf.contour,2); %Al...
e32a6dcd088af356dfaf7db9615063b4234734d6affa73b62be04ae7273a839d
MATLAB
10,695
253
%Shinjini Kundu (c) 2016 %Note: when using covariates, check to make sure that scaling of each %column is in the same order of magnitude as the other columns. If not, %must whiten the covariates matrix (column mean 0 and standard deviation 1) function [ results ] = Run_Regression( matrix, y, frac, I0, A_mean, mod...
9303c8a167e40647135b866caf3d4203bb683f657c6b2ac9c8f1dc9ddcb4bdfc
MATLAB
10,697
301
%% Date: 03-03-2022 Programmed by: Deirdre BOLGER % Function to plot ERPs of the selected data. % %***************************************************************** %% LOAD IN EEG DATA study_session = 'VBP'; conds = {'Filler', 'Test'}; numsuj = 2; % The number of datasets or subjects....
000f72b598835427efaa325b57037c7e1a51b5c7822ae97661ce762c415ce673
MATLAB
10,705
232
function update_spike_axis(app, static) %UPDATE_SPIKE_AXIS Summary of this function goes here % Detailed explanation goes here sel_cluster = find(strcmp(app.popup_cluster.Value,app.popup_cluster.Items)); int_idx = find(strcmp(app.popup_int_spike.Value,app.popup_int_spike.Items)); %data = app.data(app.settings.chan...
4fdcc952976732e92de583818dee67c440071c16a44a33b43c39393ed9e3251f
MATLAB
10,707
232
function update_spike_axis(app, static) %UPDATE_SPIKE_AXIS Summary of this function goes here % Detailed explanation goes here sel_cluster = find(strcmp(app.popup_cluster.Value,app.popup_cluster.Items)); int_idx = find(strcmp(app.popup_int_spike.Value,app.popup_int_spike.Items)); %data = app.data(app.settings.chan...
f1ffe7f61ec23766f14ec14cceaec9b691b24dea4b100bc3a7972f94f7386900
MATLAB
10,722
271
function [x_smoothed1, x_smoothed2, optim_lambdas1, optim_lambdas2, cc1, ee1, cc2, ee2, L_curveC1, L_curveE1, L_curveC2, L_curveE2, knots0, knots] = ECGSmoothnessPriorsDenoiserBW(x, SmoothnessFactor, varargin) % Block-wise ECG denoising based on smoothness priors % % [x_smoothed1, x_smoothed2] = ECGSmoothnessPriorsDeno...
536f88c727fabc8b44926b96c51c9dd385bf8ad887fbdfdb123235d81e1e388a
MATLAB
10,725
257
% This program is intended to check statistics of motion artefacts on % behaviorss % % Procedure % %% 1. datapath to the 6 motions data % %% 2. make list of the datasets % %% 3. extract time series of motion artefact % %% 4. make contract between two groups % %% 5. preparation for visualization % %% 6. Visualize the re...
698c64573f85761eb920c06c633f057ff15b28ce9077e3b3986ee7e3babf5e13
MATLAB
10,740
230
%This script examines each event and pulls out a specified amount of time %pre and post event for the beginning and end of the event. The data is %stored in a large structure array for %easier sorting and analyis. The script is written to handle mouseData %arrays from the masterDataProcessor. Any pre/post period...
61727d950f071589c443ce7cd34dc9f939c6a2b13f4f91e1278d68181e53c192
MATLAB
10,766
281
% Features of Neurons @ Ensembles % It gets the Neurons that participate in each ensemble % R(F)un after Clustering only % INPUT: % R_Condition: Cell of Rasters from Selected Raster % Ensemble_Threshold Cell of vectors % Ensembled_Labels Cell of vectors % fs sampling frequency % OUTPU...
9c7cee2c2e49474725e935704089c992b173e756715b669348115fa8f87738cd
MATLAB
10,781
313
function [BadChannels,SampleBkg,PxTrace,BkgSigCumulativeDistribution]=mnl_FilterChannels_FragmentBased(Trace,Scale,Data) % Function to automatically or manually filter out the bad channels. It % will also save a MATLAB figure and png of the signal to noise % distributions of each channel % % Created by Marcus Leiwe, Ky...
2d724d10468ad60a135508f4d59f1e052bcda20afba7a21e449a2bd40c905ff1
MATLAB
10,793
223
%This script examines each event and pulls out a specified amount of time %pre and post event for the beginning and end of the event. The data is %stored in a large structure array for %easier sorting and analyis. The script is written to handle mouseData %arrays from the masterDataProcessor. Any pre/post period...
4e61f478f84c3644f7207ca79662d7b247fe1869fd8f49577b1a0d382c1bad36
MATLAB
10,806
221
function [power, phase, times, wavelets] = time_frequency(data, srate, freqs, minCycles, maxCycles, bufferZone, startTime, phaseInDegrees, resampleTo, plotFlag, numWorkers) arguments data double srate double freqs (1,:) double = single(linspace(1, 20, 39)) minCycles (1,1) double = 3 ...
8e94fde3e5a807f6f9872f8fd15c666e9d9053bc1a0b797d47160749762f11eb
MATLAB
10,818
341
function [spikepos, out_] = SWTTEO(in,params) %SWTTEO Detects Spikes Location using a modified WTEO approach % Usage: spikepos = swtteo(in); % spikepos = swtteo(in,params); % % Input parameters: % in_struc: Input structure which contains % M: Matrix with data, stored co...
2821a5be4052f08797f4ab976a98a8eb7962da13493660416efe0aff40d87495
MATLAB
10,827
279
function pretouch20191024 %‰¼à‚RFƒXƒpƒCƒN‚ª‚ ‚Á‚½’¼‘O‚̃^ƒbƒ`‚©‚çƒXƒpƒCƒN‚܂ł̎žŠÔ‚ð—p‚¢‚½—\‘ª %pretouch20190608‚©‚ç‚̕ύX“_F1000ƒrƒ“‚É’¼‚·‚Æ‚±‚ëjMax‚Ì’l‚ð¬”‘æˆêˆÊ‚܂łɕύXAƒqƒ‹ƒxƒ‹ƒg•ÏŠ·‚ðŽg‚í‚È‚¢‚悤‚É‚µ‚½ global ACresult ACresultW CCresultDrinkOn SpikeArray TurnMarkerTime RpegTouchallWon LpegTouchallWon....
d653e1901dccf7122891c2c960beef2dfcf4d7bbc4494ff8c65cf4ed08e4acb4
MATLAB
10,849
376
function fractional_sampling(varargin) % sys_argv = str2double(varargin{1}); %% % rng(sys_argv) savefigpath = './fig/'; % folder for figures savedatapath = './data/'; % folder for data if not(isfolder(savefigpath)) mkdir(savefigpath) end if not(isfolder(savedatapath)) mkdir(savedatapath); end %% p.lo...
e12caf2c1d2128c68042efeaf929db42b7469ee8d8abc1ed59372386a75c263c
MATLAB
10,855
283
function [h, A, S_mean, S_median, S_max, S_min, S_max_min_avg] = spatio_temp_innovs_flt_designer(template_records, varargin) % spatio_temp_innovs_flt_designer - Designs an innovations filter from ensembles of multichannel random processes. % % Syntax: [h, A, S_mean, S_median, S_max, S_min, S_max_min_avg] = spatio_temp_...
099ad30b009a790fb0c8046a73a3626de5ae0c6c21271c60d05bc2c5fa832f23
MATLAB
10,862
308
%% PCA %load zScore data save_path = 'E:\CM_NeuralActivity_Analysis\PCA\PCA_figures_20Cosyne'; % Select trial types and time window for pca correctTrials = ['TTT', 'VTN', 'VVV', 'TVN']; tt_numb = [4, 12, 14, 9]; tt_colors = ['b','c', 'r', 'm']; tw = [-0.1 0.5]; % zScore data window: -1 ~ 2.5 sec, bin = 25 ...
0b5f553849caa111c295e250ff4509f814763d11240a128ef511625f4dcfe506
MATLAB
10,866
226
function hemi = idHemi(f, ln, rn, varargin) % Identifies the Hemisphere Associated with a File Based on Its Name % % hemi = idHemi(f, ln, rn) % hemi = idHemi(f, ln, rn, app) % % **Description** % ------------ % The `idHemi` function is designed to determine the hemisphere ('left', 'right', or []) % associated w...
b0ecfc13b5a4b1dd3b4ee4e219e028541b8fc5528bfd1a7f22683cec0aa39a88
MATLAB
10,886
280
%% analysis of PSTH responses from allen's 'Functional Connectivity' dataset dataDirectory = 'E:\AllenInstituteAnalyses\AllenDataAnalysis\Data\rawMatFiles'; dataFiles = dir(fullfile(dataDirectory, 'session*')); tic for isession = 1:numel(dataFiles) isession clear units trials runInfo pupilInfo sessionInfo ...
cb94b2c65f3e8c82daad31815ee8ea0ed73245ed82c7fd087078585d4289dbff
MATLAB
10,892
273
function [hdr, record] = edfread(fname, varargin) % Read European Data Format file into MATLAB %[hdr, record] = edfread('F:\2019.7.3»»µçÄÔʵÑéÊÒ\ÀîÑÞ\AA¿ÆÑÐ\xian\dataset\sleep-EDF\SC4001E0-PSG.edf') % [hdr, record] = edfread(fname) % Reads data from ALL RECORDS of file fname ('*.edf'). Header % inf...
e44aa43a521756ebcafcb8845b26c0b9c543821bc3d6c3d606e73b1f4584b269
MATLAB
10,912
253
%% EEGVR_L2_Preprocessing_Main Programmed: D. Bolger % Specific pre-processing script for L2LearnEEGVR project. % Script to carry out the different steps in the pre-processing of EEG % data. % It applies functions from EEGLAB, the PREP pipeline. % Functions from the ADJUST toolbox are called in the "CREx_ICA_ca...
cb585603e29aaf52f1443beb4ab04f361cb1cab078be02f6dcd1051a57ebe41a
MATLAB
10,913
279
%% Widefield_DoubleStaining % This script loads the anatomical double staining data to visualize it. % % Version: % 05-Jan-2024 (R2023a) % Prepare clc; clear all; close all warning('off') % Add toolboxes % A MATLAB toolbox for exporting publication quality figures % (https://github.com/altmany/export_fig) addpath(gen...
de5b2a6cf6251cd49ab4cc488dd0ccf93de6af11c1e19dfa5db5af02d7953828
MATLAB
10,924
304
function [PreprocessedData_SAVE,TrialParam_SAVE,DataVersions_SAVE,varnames_SAVE,Fs_SAVE] = entiresessionStackTrialsV4(nameGen,allTrials,setupParam,DecayReference) %% Establish paths to data path_to_data = '/Users/castine/Dropbox (Bruchas Lab)/TEMPORARY PHOTOMETRY/Carrie_analysis_repository/MatFilesSimple'; addpath(pa...
eb69dc7797e07478f89bf60e9ce821620daa435e382c2debba98fe110ef87e0f
MATLAB
10,924
222
% Test script for an ECG denoiser based on a data driven MAP estimator in % the phase and time domains close all clear clc % Load data % datafilepath = '../../../../DataFiles/Physionet.org/files/ptbdb/1.0.0/'; % Change this path to where you have the .mat data files % fs = 1000.0; % Sampling frequency of the data (pu...
f7ff28d232948c6df6a7d5d84ac2f91bca91f3411ae50c048069a4954723e7f2
MATLAB
10,936
201
function Set_Objects_UI(P) P.GUI_Handles.Main_Figure = uifigure('Name',[P.GUI_Handles.Software_Name,' ',P.GUI_Handles.Software_Version],'AutoResizeChildren','off'); clf(P.GUI_Handles.Main_Figure); set(P.GUI_Handles.Main_Figure, 'WindowState', 'maximized', 'Color', P.GUI_Handles.BG_Color_1); drawnow; P.GUI_Han...
8d7aa445f8abdcf0e724685d608c5aae4ab257d148c9fe682e0cc2527a6e1aa3
MATLAB
10,956
211
function update_burst_axis(app, keep_xl) %UNTITLED Summary of this function goes here % Detailed explanation goes here cla(app.ax_msna_int), cla(app.ax_burst_res) cla(app.ax_burst_interval_his), cla(app.ax_burst_duration_his) cla(app.ax_burst_amplitude_his), cla(app.ax_burst_integral_his) cla(app.ax_burst_res), cla...
3cc49fc2afadfb9860a6478881de026a85f2bcf0b7e9e12a7c1de22efcbb07d7
MATLAB
10,969
325
function plot_params = genPlotParams(task,plottype) %% INPUTS: % task: task name % plottype: 'timecourse'(e.g. for HFB),'ERSP' (for spectrogram), % or 'ITC' (for inter-trial phase coherence) %% OUTPUTS: % plot_params .single_trial: true (plot indiv. trials) or false (plot avg. across trials) % ...
fe9be21808743969a18f2edc2d2c5d6f6e409a1ad9f82eb62e5215c68da4cd85
MATLAB
10,971
312
function RLphase20190517 %‰¼à‚UFLt‚ÌŠÔ‚ÌRt‚ÌˆÊ‘Š‚ð—p‚¢‚½—\‘ª global ... ACresult ACresultW CCresultDrinkOn SpikeArray TurnMarkerTime RpegTouchallWon LpegTouchallWon... RpNum LpNum CCresultSpike locsP1time locsP2time locsP1time2 locsP2time2 pksA1 pksA2 CCresultRtouchWon CCresultLtouchWon dpath3... ...
0506f13944c91aa2658ec4ab3cdcc4eb1c82f6a7d7c8c0b4d1c2b50526199053
MATLAB
10,988
286
function calc_combine_stats(app) intervals = {[]}; signals = {[]}; for i = 1: length(app.comb_stat) if i == 1 intervals = app.comb_stat(i).intervals; signals = app.comb_stat(i).signals; else intervals = unique(horzcat(intervals, app.comb_stat(i).intervals),'stable'); signals =...
8b9bbdd1f04121aa924fc5afa5d7304b3a89d6e934469c8e76371394bc9f97ba
MATLAB
11,042
220
% Train Classifier for Each Outcome on Multiple Time-points % and Apply to Epoched Heldout Localizer Data % Enter path of MEG_Decision_Study folder study_folder = 'D:\MEG_Decision_Study'; % add path to util folder util_folder = fullfile(study_folder, 'MEG_analysis_scripts', 'utils'); addpath(genpath(util_folder)); ...
82910503601cede48e9961eda5bfb8d67abaaf410f2e6386a91edc8d536fcbb5
MATLAB
11,049
212
function results = correlation_analysis(app) if ~isempty(app.burst_ints) tmp =find(vertcat(app.burst_ints.type) == 1); borders = nan(length(tmp)+1,2); int_names = {'full interval'}; for i = 1: length(tmp) borders(i+1,:) = app.burst_ints(tmp(i)).borders; int_names{i+1...
90d1090f8eb94a748a74ae745373e7e2b51b9eb6effe72b270c0d3c10395e5d4
MATLAB
11,061
226
% Automatic Denoise Detrend & Deconvolution % Accepted Signals: % SNR>0 and Highly +Skewed Signals function [ESTSIGNALS,SNRwavelet,SNRindx,TAUSall,isSIGNALS,... notSIGNALS]=AutoThreeD(NumberofVideos,L,p,taus_0,dyename,FolderNameRT) %% Call for global variables global SIGNALS; global DETSIGNALS; global preDRIVE; gl...
8f5f4261c8eca6b3760d203ae277144ec21e10bf165c7a8e79abd79853910ae7
MATLAB
11,074
279
function Lt_Rt_Pattern1_and_CV__5Touches20200306 path=['C:\Users\C238\Desktop\touchcellLtRt_terashita']; cd(path); LS=ls; PositiveTouchesPointArray=zeros(1,6); FRCVLPWTouches=[]; FRCVRPWTouches=[]; for i=1:length(LS(:,1)) TrimFolder=strtrim(LS(i,:)); if ~strcmp(TrimFolder,'.') && ~strcmp(TrimFolder...
e2e69dd1aa65b3daeefa063373bb3621f8cacbacdb5d2eae49fcae95435445b1
MATLAB
11,074
299
function loadFiles(obj) %LOADFILES Load results struct if obj.isError error(obj.errMsg); end if ~exist(obj.hCfg.resFile, 'file') error('%s does not exist', obj.hCfg.resFile); return; end try obj.hCfg.updateLog('loadRes', sprintf('Loading %s', obj.hCfg.resFile), ...
b2e4225ee525dcff33fc773dfb96f4cfb00d086b0f5fafc12dc53ff4a01a6564
MATLAB
11,077
369
clear all clc load('/media/jdscasta/Jason_drive/Alex_fingerprint/QPN_epoch_DKAtlassourcePSDfullspectrum_export_07162021.mat') %% full spectra count2=1; count=1; for i=1:length(HC_dirs) count2=1; temp=squeeze(HC_data(:,:,:,i)); temp=reshape(rmmissing(temp(:)), [68,901, length(rmmissing(temp(:)))/61...
41db3cba05f6c5e581d794ab9a714bd1631060e5cfdb25906464fe0d487a8431
MATLAB
11,097
336
clear close all clc load ECG2 s = data(4, 1:end); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% warning('off', 'MATLAB:nearlySingularMatrix'); % THIS IS JUST FOR AVOIDING THE MATRIX SINGULARITY WARNINGS. A MORE NUMERICALLY STABLE VERSION OF THE CODE MIGHT BE NEEDED %%%%%%%%%%%%%%%%%%%%%%...
90cd53ae956538d935886b2d85224f49a0ee7ef4c88506aa79ea5c9dc5976a48
MATLAB
11,111
308
%{ ---------------------------------------------------------------------------- %Stimulus bias changes by block %Just model analysis %Based on Rao 2010 Front Comp Neurosci %Value updating + Prior updating ---------------------------------------------------------------------------- %} function [prior,posterior...
16cc969d9a5288bec2e33075cb71464ba415dde52e363fbe4e6d36fe50a62e2d
MATLAB
11,122
301
function Window_FRanalysis path='C:\Users\C238\CheetahWRLV20220213\touchcellLtRt_Hirokane'; cd(path) LS=ls; Rt4step1 = []; Rt4step2 = []; Rt4step3 = []; Rt4step4 = []; Rt4step5 = []; Lt4step1 = []; Lt4step2 = []; Lt4step3 = []; Lt4step4 = []; Lt4step5 = []; Rt3step1 = []; Rt3step2 = []; Rt3step3 = []; Rt3step...
a3836cc6b1a826c5bd54865fef99143f1fd921e1a3d252f2a8cb8219288f57cd
MATLAB
11,132
268
function Negative_Close_Window_or_All_pattern_1_20201208 path=['C:\Users\C238\Desktop\touchcellLtRt_Hirokane']; cd(path); LS=ls; NegativeLtouchUnit=[]; NegativeRtouchUnit=[]; LtNWPointArray=zeros(1,4); LtNWFireArray=zeros(1,4); RtNWPointArray=zeros(1,4); RtNWFireArray=zeros(1,4); W23NegativeLtouchUnit=[...
ac22860448576f138e2407bb3fbe85f75ba48a311097de948d58e74c16218a74
MATLAB
11,133
268
function Negative_Close_Window_or_All_pattern_1_20200309 path=['C:\Users\C238\Desktop\touchcellLtRt_terashita']; cd(path); LS=ls; NegativeLtouchUnit=[]; NegativeRtouchUnit=[]; LtNWPointArray=zeros(1,4); LtNWFireArray=zeros(1,4); RtNWPointArray=zeros(1,4); RtNWFireArray=zeros(1,4); W23NegativeLtouchUnit=...
14cf9e7bf1212ab4bd18a194896590c1730118e9d3fef886739a755befcc4ad9
MATLAB
11,143
303
function peak_VE_hmm_func(sub,ses,project_dir) overwrite = true restoredefaultpath % close all clc % project_dir = 'R:\DRS-KidsOPM\Paediatric_OPM_Notts_AdultData\'; % % sub = '001'; % ses = '001'; run = 'run-001'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% addpath(genpath('....
69de2ce69b5741496d07d75e18202fbf51aeb057fd8dffce97eb17413a02a52b
MATLAB
11,144
213
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This script plots individual fits using empirical Bayes estimates of the K-PD % model calibrated to different groups of treated and untreated animals, % It generates the plots of Figures 2B and S3 of the manuscript %%%%%%%%%%%%%%%%%%%%%%%%%%...
ee3b5d214b3c25224c6a0666c4a86ab6735805d807c61c27c9d38817d87eb6d9
MATLAB
11,174
375
%% % make all DMD functions available to this code % includere il servo shutter. cosi' da evitare bleached % make a "nice" interface? % where all the procedures are in a separate button, parameters in separate % boxes, and the acquisition and others data displayed while acquiring... % tmp_folder = 'D:\tmp\'...
9d12b66c4d13f60f42ac5999fc0c26f8e1b4bcde3e5b19290aeb81274000d53d
MATLAB
11,179
275
function Lt_Rt_Pattern1_and_CV__W3_Touch20201208 path=['C:\Users\C238\Desktop\touchcellLtRt_Hirokane']; cd(path); LS=ls; PositiveTouchesPointArray=zeros(1,6); FRCVLPWTouches=[]; FRCVRPWTouches=[]; for i=1:length(LS(:,1)) TrimFolder=strtrim(LS(i,:)); if ~strcmp(TrimFolder,'.') && ~strcmp(TrimFolder,...
15056733a69a6d97fba262587689fa0f084744acc52ea73c2ecb9c217a99bd3b
MATLAB
11,180
275
function Lt_Rt_Pattern1_and_CV__W3_Touch20200306 path=['C:\Users\C238\Desktop\touchcellLtRt_terashita']; cd(path); LS=ls; PositiveTouchesPointArray=zeros(1,6); FRCVLPWTouches=[]; FRCVRPWTouches=[]; for i=1:length(LS(:,1)) TrimFolder=strtrim(LS(i,:)); if ~strcmp(TrimFolder,'.') && ~strcmp(TrimFolder...
f3141349901130a4bf372c3f1a731de1060a2acfad01269a89d321540e2ce09f
MATLAB
11,188
276
function spike_res = spike_analysis(app) %SPIKE_ANALYSIS Summary of this function goes here % Detailed explanation goes here MIN_CLUSTER=10; calc_flag = true; if ~isempty(app.spike_res) spike_res = app.spike_res; if (spike_res.analysis.sorting == app.chkbx_spike_sorting.Value) ... && isequal...
fe530ff85e793d2a56a6f859c4e6980640fa905f77c8b768d02d27c14e5864d8
MATLAB
11,197
267
function [grappaRecon_1DFFT, mOutGRAPPA] = performHostGRAPPArecon2D_RAMonly(twix_obj, counterStruct, nSliceNeighbours, combinePars) % % function [grappaRecon_1DFFT, mOutGRAPPA] = performHostGRAPPArecon2D_RAMonly(twix_obj, counterStruct, nSliceNeighbours, combinePars)) % % Applies GRAPPA to the host data, which here is ...
90a9fd2621e34247def737d8fa2a4582f349536ddbd1a1346c6a8cfe6fcbae0a
MATLAB
11,202
285
%Shinjini Kundu (c) 2018 %Complete leave-three-out cross-validation function [accuracy, kappa, sensitivity, specificity, PLDAprojected, w] = PLDA_knn(X, labels, alpha, k, mode) %This function performs classification in the discriminant subspace of the %PLDA classifier %inputs: % ...
f0c03dd8685c2be8c4372fd0c8639f27348dad9880251bf51a4fa3b12b6f7689
MATLAB
11,202
206
function cifti_write(cifti, filename, varargin) %function cifti_write(cifti, filename, option pairs...) % Write a cifti file. % % Specifying "..., 'keepmetadata', true" leaves the file-level metadata as-is: % if false or not specified, the 'Provenance' metadata value is moved to % 'Paren...
14e242c81829473e4725144b6bf096f0f72558e56a8b870bddc1b0d3ecbca522
MATLAB
11,203
335
function FigureS6_neuronProp_afterChoice parent='G:/Ishizu_data'; outPath='/Revise_ishizu/output/neuronProp_afterChoice2'; % hulistic parameter % p_threshold = 1.0e-10; figsaveTYPE='-dsvg'; %--------------------% %% plot figure %% % save folder setting % % region = {'auditory','fof','mpfc'}; folder...
91318198f23a92af6e33a96c68dc7eba51c15f4c22574547787804f85d85c141
MATLAB
11,249
223
%% Save DATA: Neural Ensembles Features % .mat file: % Features_Ensemble % Features_Condition % .CSV file % N-Ensembles,Dunns Index,RateOfTransitions,RateOfCycles,DominantEnsemble % N SimpleCycles, N-ClosedCycles , N-OpenedCycles % Ensemble i Rate,... % Ensemble i Dominance=%NeuronsOccupance * Rate,... func...
8bf3165f053f386d8229c111f3444fec73ac2c1ba86bf3484594a424ac63d952
MATLAB
11,269
370
function [y,t,optw,gs,C,confb95,yb] = ssvkernel(x,tin) % [y,t,optw,gs,C,confb95,yb] = ssvkernel(x,t,W) % % Function `ssvkernel' returns an optimized kernel density estimate % using a Gauss kernel function with bandwidths locally adapted to data. % % Examples: % >> x = 0.5-0.5*log(rand(1,1e3)); t = linspace(0,3,500); %...
1d6935cf80210e01b7c50f2c6809b85b332ab83004e4843893d6ccc7bfea20d1
MATLAB
11,300
235
function update_spike_axis(app, static) %UPDATE_SPIKE_AXIS Summary of this function goes here % Detailed explanation goes here sel_cluster = find(strcmp(app.popup_cluster.Value,app.popup_cluster.Items)); int_idx = find(strcmp(app.popup_int_spike.Value,app.popup_int_spike.Items)); %data = app.data(app.settings.chan...
03cf7444e72eebcab050e6f139873e8e80edf7aac0c0f0147a09fa472168bd36
MATLAB
11,305
236
function update_spike_axis(app, static) %UPDATE_SPIKE_AXIS Summary of this function goes here % Detailed explanation goes here sel_cluster = find(strcmp(app.popup_cluster.Value,app.popup_cluster.Items)); int_idx = find(strcmp(app.popup_int_spike.Value,app.popup_int_spike.Items)); %data = app.data(app.settings.chan...
1aa7d7523f681a614ce199e27dc9628329dea73f8cc6e0770db3af722d129cbd
MATLAB
11,326
205
%Authors: Tatjana Schmitt & Simon Wadle, 2019-2023 % based on concepts published in Romero et al. (2019): Cellular and Widefield Imaging of Sound Frequency Organization in Primary and Higher Order Fields of the Mouse Auditory Cortex. Cerebral Cortex 30: 1603-1622 %requieres Matlab packages chronux_2_12 (info : ht...
aaef1def971fb6bd37f98e5c0874b9d94e726bdc14276c8e6e5b26a1bd6aa3cb
MATLAB
11,326
343
ridx = nan(size(app.hb_res.t_events)); fs = 10000; tmp_data = [x,zeros(1,3*fs)]; dur = 3*fs-1; summ = zeros(fs*3,1); for i = 1:length(app.hb_res.t_events) ridx(i) = find(t_msna>=app.hb_res.t_events(i),1); summ= summ+tmp_data(ridx(i):ridx(i)+dur)'; end [b,a] = butter(4,5/5000,"low"); sumf = filtfilt(b,a,summ); ...
d51c0b0692b54ba3930d9dddeb8d332c3b9a94df52f8312cf7bfcb56e444dac7
MATLAB
11,346
322
function [mshs] = computePMDFs(pathnamePhis,pathnameMSHS,SDrange,pmdfThresh) % This function computes the PMDFs on the GM surface for all possible 10-2.5 combinations % within the SDrange and save them as PMDFs.data and PMDFs.idx in the PMDFs folder % within the specified head model folder. They are correctly scaled....
4580535e142e202393d01d77b1eb686c45da6ed7f7f1b333f386455b78031122
MATLAB
11,361
340
clear; %Load directly the subjects load('fMRI_Liege_2023.mat'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 1 - Compute the Leading Eigenvectors from the BOLD datasets disp('Processing the eigenvectors from BOLD data') % Load here the BOLD data (which may be in different formats) % Here the BOLD time...
fc43e317b60cdce2e93bb868aa0be00fb901a1ec921a655505b87ee92f07e294
MATLAB
11,364
323
classdef (Hidden) file_writer < handle % % Class: % adi.file_writer % % See Also: % --------- % adi.channel_writer % % % SDK Calls: % ---------- % adi.sdk.commitFile % adi.sdk.closeWriter % adi.sdk.addComment % adi.sdk.deleteComment %...
1f14d45dd9a79b81fc6ad34b5b9cad03f6285a0123abc986f86e833b079677fb
MATLAB
11,374
238
function reconPars = getDefaultReconPars(computeRAMlevel,B0_fieldStrength_Tesla, sequenceType) % function reconPars = getDefaultReconPars(computeRAMlevel,B0_fieldStrength_Tesla, sequenceType) % % Gets the default set of reconstruction parameters reconPars.rawDataFile = ''; % 'rawDataFile' - this is the filename for ...
82b7c89ab5f94c754d6b2c70942f1ca54575622b4e120a1c1ba4419d190928b6
MATLAB
11,374
276
function spike_res = spike_analysis(app) %SPIKE_ANALYSIS Summary of this function goes here % Detailed explanation goes here MIN_CLUSTER=10; calc_flag = true; if ~isempty(app.spike_res) spike_res = app.spike_res; if (spike_res.analysis.sorting == app.chkbx_spike_sorting.Value) ... && isequal...
7d350dc5b38e5a24eaa2aa9ddc184596367d40d0f1d5cbab9cc574721c93f978
MATLAB
11,409
368
function processSession_decoding_multPopSizes(inputFileName,outputFileName,dataDir) %% Decoding - training and testing in the same window %% load data wheel=struct; % to prevent matlab func issue load(fullfile(dataDir,inputFileName)) %% pre-process data - classify trials by behavioural state % remove any trials ...
c61697e0ea6a57ea7a08aefc60649cd6eba65bc85a8c765f3259b193474f6efb
MATLAB
11,428
219
% Raster plot of sensory-evoked activity % Corrrect trial % Chang et al., Figure 1f % Load data load('E:\seFilePaths_SiProbe'); % File paths for MSessionExplorers load('E:\CM_NeuralActivity_Analysis\Unit_quality_metrics\filter'); % Unit quality filter load('E:\CM_NeuralActivity_Analysis\ROC\tHit_tCR_selectivit...
9da2edc907b1197c57c206e86849dc6512a676f322b322e69bac77c466b424b0
MATLAB
11,439
273
% Response analysis of intracellular PN data recorded by Liza Bessonova % Two conditions: Before serotonin application % and After serotonin application clear close all clc load Liza_all_data_psth.mat % Image the raw data figure; f = [50 70]; k= [71 90]; l = [0 49] h =[91 200] d=[-3 -3]; color = customcolormap([0 1],...
4311947b7b010b1d83bac41379e9111238db8a0f96a4991debba7f7c84f7dc90
MATLAB
11,467
348
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %p = 0.001 %Each epoch, predict the prior, sensory and choice...
82462127e3b6dddb9273195eced2672cd337e300869f6a2022de1fd03f9dbd97
MATLAB
11,476
299
% gets the data showing the probability of eyesclosed over time for each % trial outcome type. clear clc close all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Parameters OnlyClosestStimuli = false; % only use closest trials (legacy) OnlyEyesOpen = true; % only used eyes-open trial...
b23a8a38229ad8af2d29cad4b8b595dc88832e93b38c24d4d45f8871763d63b9
MATLAB
11,508
310
function CTparameters = get_celltype_parameters_function(path, file, exp_id) cd(path) mkdir cell_type_parameters selected_dir = 'cell_type_parameters'; spike_clusters = readNPY('spike_clusters.npy'); spike_times = readNPY('spike_times.npy'); w = tdfread('cluster_info.tsv'); if ~exist("file", "var") if isfile('tem...
5d0b1e520595ad19c01595c6fe754c7e7c9bd7c2455cda65f49cfb28fa9ea036
MATLAB
11,515
357
%{ ---------------------------------------------------------------------------- %Stimulus bias changes by block %Just model analysis %Based on Rao 2010 Front Comp Neurosci %Value updating + Prior updating ---------------------------------------------------------------------------- %} function [ave_likeli,BIC_...
ef514a1f21c15ff490acdd184c1f693ef4405f4bd1c5d6784aa105bf36557807
MATLAB
11,521
357
%{ ---------------------------------------------------------------------------- %Stimulus bias changes by block %Just model analysis %Based on Rao 2010 Front Comp Neurosci %Value updating + Prior updating ---------------------------------------------------------------------------- %} function [ave_likeli,BIC_...
06eaa824f10e1fa9db8f1fde0bca78f982679ed89d62a0a62fea35a34d302ab7
MATLAB
11,525
294
function [Dimension]=mnl_EvaluateNoisePerNDimensions(maxDim) %Function to estimate the noise generated per cell. %Fixed Variables NumPoints=50; Spreads=[0.1 0.2 0.5 1 2 4 6 8]; NoiseValues=0:0.01:1; %I'm goingto add the noise up to 25% szSp=size(Spreads); szN=size(NoiseValues,2); %% Generate Poission Distributions Fo...
274d83fa01fe0ef8c22d656f75077370b3a9b901bb773a927e767c226345ff09
MATLAB
11,528
371
clear,clc % close all load('89_PNs_array_data.mat') fnames = {'hex10','hex','iaa','two_oct','hxa','two_hep','ani','hex01',... 'msal','lcar','euc','gua','chex','bza','ger','etha',... 'apin','one_oc3','neem','gar','cit','lin'}; odors = fnames ; all_on = []; all_off = []; all_onoff = []; close all for...
5f1cfe5746710698ec0912dc2639019bd04cda2fff41e1c25c700883c512cdd2
MATLAB
11,529
395
function processSession_popAnalysis(inputFileName,outputFileName,dataDir) load(fullfile(dataDir,inputFileName)) %% process trials % filter trials to the ones we want to analyse and sort according to % behavioural state % exclude any trials that did not run for appropriate time (sometime 1st % trial) trialDur = 1; t...
8171c677b37c744359da950a6d2b2aadc090d185256fc4effd1244963b1d0a1a
MATLAB
11,532
366
cd ~/Dropbox/Projet_Gaetan/Sequence/'NatureCom 2'/AlphaSynapses/Alpha_Synapses/ tau_list=[0.01,0.1,0.5,1,5,10,15,20,25,0]; pattern_list=[5, 10,15,20]; linescolor=['r','g','b','c','m','y','k']; linestyle={'-','--','-o','-.','-*'} kt=0; figure(1); hold on; Final=zeros(length(tau_list),length(pattern_list)); S...
71d84beb63db47c121e49e8d0520d471ef2826bf92703a6b62e3874622bca1d1
MATLAB
11,545
228
clear all close all clc constants; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Load data and build models %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% import_data; build_models_met_PT; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
b3c50cd6157c7a8547605131141535d90b7d7e979c9f8d418749d0330fb5b51c
MATLAB
11,552
269
function recData = detectOneRecording(obj, hRec, fids, impTimes, impSites, siteThresh) %DETECTONERECORDING Detect spikes in a single Recording if nargin < 4 impTimes = []; end if nargin < 5 impSites = []; end if nargin < 6 siteThresh = []; end rawFid = fids(1); ...
f2a84d9e6568f8854d832cddf3393f46e755e363d7aebc355791c054a407e9c1
MATLAB
11,577
334
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Before start of task %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %p = 0.001 -------------------------...
fc1fa1d011b36b2273c20ee7f8b0d3ffdcc7b146639c03421b50d1d70c23a5a4
MATLAB
11,592
271
% Script that gets the Network from Whole Raster % Run after loading MAT file % Input: % R_Condition: Cell of Rasters % MetaDataColocaliation: List of [+] & [-] Cells % Outputs: % Colored Raster % CS files to get the Gephi Network % Update .mat File %%*************************************************************** ...
28f98164e06dae839b908d12c99a0e054059f6c510c1ec39f544f470e4f88a3d
MATLAB
11,621
330
classdef (Hidden) file < handle % % Class: % adi.file % % ***** This object should be instantiated via adi.readFile ***** % % This is the root class for a Labchart file. It holds meta % data and classes with more meta data. The channel classes can % be used to actually g...
66efb53810c1222d6f0f583169a39233ca252161076220014a631c1bca72bca1
MATLAB
11,627
315
function RLphase20191024 %‰¼à‚UFLt‚ÌŠÔ‚ÌRt‚ÌˆÊ‘Š‚ð—p‚¢‚½—\‘ª %RLphase20190517‚©‚ç‚̕ύX“_F1000ƒrƒ“‚É’¼‚·‚Æ‚±‚ëjMax‚Ì’l‚ð¬”‘æˆêˆÊ‚܂łɕύXAƒqƒ‹ƒxƒ‹ƒg•ÏŠ·‚ðŽg‚í‚È‚¢‚悤‚É‚µ‚½ global ... ACresult ACresultW CCresultDrinkOn SpikeArray TurnMarkerTime RpegTouchallWon LpegTouchallWon... RpNum LpNum CCre...
bc33cb4a95f477a4a9e1094b5681f24e54577199a4eaebf73c2fecafa0157ca1
MATLAB
11,658
342
function [fTrace]=mnl_DoubleCheckLongTraceConsistency_v3(Trace,lim,LengthThresh,Data,BkgMean,MaxValues,Scale,EuThresh) %Function to assess the colour consistency of a trace and if it is too %different find the point where to cut it %Inputs % Trace - the structure of the traces extracted from Neurolucida % lim - the min...
768a320695d25c6faa0dd2f152f8426af18307d880d1b2b68f4aad93194e6305
MATLAB
11,665
393
%% %%%%%%%%%%%%%%%%%% % assuming having the map "TT" from "calibrate_beads_sample.m" % the fancy game of sreaching beads if ~exist('TT') load('D:\Users\Comedia\moro\06052019\TT.mat') end %% % check if the cameras has been loaded yet % delete(PCOcam); % delete(BASLERcam); % if ~exist('PCOcam'); end % if ~...
57a867e80ffdf5c41d7c8878c341d7b87922b8d7692693f9bb8b0b446e1150f2
MATLAB
11,679
327
function [StdRLRTouch,StdRLRTouchDiff,StdLRLTouch,StdLRLTouchDiff,StdRLTouchInterval,StdLRLphase,StdRLRphase,StdLRLdiff,StdRLRdiff]=TouchVariance global RpegTouchCell LpegTouchCell TurnMarkerTime OneTurnTime LRLphase RLRphase LRLbefore RLRbefore IntervalR IntervalL... RatioAlikeLRL RatioAlikeRLR RatioBlike...
b73a15118fdae01e47d6b4aa9d8edcfc335064aff62b34ca479a771f6c4279ac
MATLAB
11,690
320
function [S,Q] = genlouvain(B,limit,verbose,randord,randmove) %GENLOUVAIN Louvain-like community detection, specified quality function. % Version 2.0 (July 2014) % % [S,Q] = GENLOUVAIN(B) with matrix B implements a Louvain-like greedy % community detection method using the modularity/quality matrix B that ...
bfc8192d1e7820ed3a607de1c45d3e4d157142141cd74728d32be08eb4c4220a
MATLAB
11,691
264
function ecg_strip_viewer_standard_grid(data, fs, ch_names, ref_ch, t1_small, t2_small, Title) t1_long = 0; % beginning of the long segment in seconds t2_long = size(data, 2)/fs; % end of long segment in seconds num_channels = size(data, 1); % number of channels % select multichannel grid layout switch num_channels ...
c7b0617544c9fe37a54a6da039ad105c56df4acfe15046a34fcf7e3c680d746a
MATLAB
11,693
275
function [subjects,opt] = run_spmup_bids(BIDS, subjects, varargin) % SPMUP can be run using SPM batch mode but you can also analyze an entire % fMRI BIDS dataset automatically using this function - it will unpack zip % files, preprocess (despike, slice time, realign, smooth), QA (anat, fMRI), % save the augmented regr...
fd85c173a6e7cbfaf4892da0a4758e0b42a1a0b50496ad2865dd3646c82a78d8
MATLAB
11,710
378
function [efPxTrace]=mnl_MeasureTheColourVariableOfCells_MagnitudeWeighted(efPxTrace,CellFigs) %Functions to measure the accuracy of traces, the true grouping of the %traces/fragments is mentioned in the SetId of the structure. And the %colour distance is calculated from the weighted colour mean of the Set (NB weighted...
45a25055535ac34fe263fac3b6f5d32d3fc2cb76539adcfcae8481324fb7f2a2
MATLAB
11,728
472
function [c,imap,xm,ym] = dspCMap(map,ChanPos,varargin) % dspCMap - Display topographic scalp maps % ---------------------------------------- % Copyright 2009-2011 Thomas Koenig % distributed under the terms of the GNU AFFERO General Public License % % Usage: dspCMap(map,ChanPos,CStep) % % map is the 1xN voltage map to...
a36f7eed6b675f30706ba322b5492b688ac815d0f920df38521ac7fa360e45ae
MATLAB
11,732
257
% This program is intended to check statistics of motion artefacts on % behaviorss % % Procedure % %% 1. datapath to the 6 motions data % %% 2. make list of the datasets % %% 3. extract time series of motion artefact % %% 4. make contract between two groups % %% 5. preparation for visualization % %% 6. Visualize the re...
703b10fe936c91eb0cd7f7d6d9622d3824424a5a198e8bbe2e02fe9b35c12e2a
MATLAB
11,748
345
function [E, D] = pcamat(vectors, firstEig, lastEig, s_interactive, ... s_verbose); %PCAMAT - Calculates the pca for data % % [E, D] = pcamat(vectors, firstEig, lastEig, ... % interactive, verbose); % % Calculates the PCA matrices for given data (row) vectors. Returns % the eigenvector (E) ...
e30943909446b74250fa5e8a157ff88f4e3d31b860a1c1c78005f8375feb462a
MATLAB
11,758
259
%% mean-field stuff. We use parameters andto estimate firing rates %% NOTE! mean Vs are now autonomus from single cell simulations % Input: C_EE,C_EI,C_IE,C_II connectivity matrices % S_EE,S_EI,S_IE,S_II synaptic strength % p_EEFail Synaptic failure prob % lambda_E lambda_I LGN input %...
bb86990ae9fa142f587dc6e2f47be775035ebcaed71ddc515b46112edef9bbf2
MATLAB
11,760
338
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Before start of task %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %p = 0.001 -------------------------...
d7a2142a2483c3c4ede79b24b28a6e8c1fbdfdf45ca7de98fa461eda0bf59022
MATLAB
11,760
258
% This program is intended to check statistics of motion artefacts on % behaviorss % % Procedure % %% 1. datapath to the 6 motions data % %% 2. make list of the datasets % %% 3. extract time series of motion artefact % %% 4. make contract between two groups % %% 5. preparation for visualization % %% 6. Visualize the re...
66dbac4508367b69ca99dcaba0f9153e214bb55c3c54ced77635dc0d82829f0d
MATLAB
11,761
266
%% Neural distance % For each session, trail-averaged tactile hit and tactile correct rejection were used to obtain the top three principal components % via PCA. % Activity for each tactile hit and correct rejection trial was projected onto the top-3 PC space. % Distance was calculated for each pair of tactile hit...
6cfcc89c8e4953367147063e4a6e1fd7a72df20913196d827c7b77e9c632d5a4
MATLAB
11,798
262
%% MF+V for Pixels. E is divided into S and C cells %% Input: % N_PreSynPix within Pixel->Pixel connectivity matrix % 3*3 Post(R)/Pre(C): S, C, I % S % C % ...
fb73efeacaafaf5c8354e61a7e8f4f9d9f13832d441f6d3d48d1711b1ac0195c
MATLAB
11,803
306
% this script calculates FWF in WM ROIs extracted using the atlas % normalized to the subject's space clearvars close all addpath(genpath('/storage/stella/MATLAB_toolboxes/')); addpath('/storage/stella/Analysis/matlab_scripts/'); addpath('/storage/stella/Analysis/DTI_FreeWaterFraction_May2022/SCRIPTS_MATLAB/'); load(...
75bf647a817226058ea29d267c934b62f6fe4511d6473424e8b52538d3492029
MATLAB
11,824
226
% Automatic Denoise-Detrend&Deconvolution function function [Features,SNRindx]=AutoThreeD() [NV,NC]=size(SIGNALS); ColumnNames={'Fluo_Dye','f_s','DetectedCells','Frames',... 'minSNR','minSkewness','TimeProcessing'}; disp('**************** +++[Processing]+++ *************************') for i=1:NC auxj=0; ...
9e59408abdcf53a1fc1f934a33a93f84af231fb74a6c0a5420a47a7337dda9fe
MATLAB
11,828
411
%% male and female analysis clear clc cd("I:\My Drive\ELYASHIV\PFC_paper_results_after_revision\MALES_vs_FEMALES") load("all_cells_PSTH.mat") %% all_psthT.mean_ramp = cellfun(@(x) x.mean, all_psthT.ramp, UniformOutput=false); all_psthT.mean_ramp = cell2mat(all_psthT.mean_ramp); all_psthT.sex = cellfun(@(x) x{1}...
dc7a3042db0b69c9a1faab51e12b5df631d89def71a69512b7231a440cea133b
MATLAB
11,848
333
%{ ---------------------------------------------------------------------------- Analyzing behavioral data At least for the correct rate ---------------------------------------------------------------------------- %} function FigureS1a_Dual_Full_psycho_analysis_230630_all_session close all analysis_folder = ...