sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
ff007179ab8e1767e88908ce3b4419d8bcbab1e091f740af71e138b508087187
MATLAB
15,452
452
%% Figure 3e & f (left panel) % this script rungs additional analysis required for the plots of figure % 3e & 3f. %% clear ft_defaults %% - SUBJECTS - %% % ID 18 missing because of LP at 50Hz subjects = {'OSL13', 'OSL14', 'OSL17', 'OSL21', 'OSL24', 'OSL26', 'OSL27', 'OSL28', ... 'OSL29', 'OSL30', 'OSL31', 'OSL3...
611bb065ed2ac0963e8b866d8f3ef54e9b8dc28c972c0c7ab238d310c6c5b2e1
MATLAB
15,457
410
%% Manually scoring the participants trajectory % In order to the model to fit the data the participant had to demonstrate % a clear intention of completing the triangle. % This did not happen all of the time and therefore we had to exclude some % data. Also we noticed by looking at the tracking data that participants ...
82f9c40a6c3b32b79722d0d6ef7f35eb49c69bd68f3409395a9784773cfaf062
MATLAB
15,473
292
% cfs2mat % ======= % % Script for translating CED CFS files into Matlab files % % Written by William Collins, May 2021 % Derived from a script written by Gilad Jacobson, May 2016 % % Prerequisites: Install the matcfs64c library developed by J.G. Colebatch % from the CED website. Extract the contents of the ZIP file in...
dcace10e4b3928ab1d093f78ace20b4a867c7ebf137ff471e1db931314085050
MATLAB
15,492
494
% timtopo() - plot all channels of a data epoch on the same axis % and map its scalp map(s) at selected latencies. % Usage: % >> timtopo(data, chan_locs); % >> timtopo(data, chan_locs, 'key', 'val', ...); % Inputs: % data = (channels,frames) single-epoch data matrix % chan_locs = channel loc...
6776489c14af1ace08b6ad31057502cba860f35747c005226ed43c7b7431ab31
MATLAB
15,507
432
%% ============================================================ % FINAL COMPLETE CODE - fNIRS LOSO % - Proper baseline correction using Rest periods as reference % - Uniform prior % - Metrics: Accuracy + Precision, Recall, F1-weighted, F1-macro % - Classifiers: LDA | SVM (C=0.5) | KNN (Grid 1-27) | QDA (diagQuadra...
d18a42e4297d9316bef237a5f7193b999c0d578204f11c119a7b2602f7405089
MATLAB
15,520
430
%% Analysis for each cycle of the oscillation separately - Phase clear all close all dpath='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; plot_all=1; [big_table, waves] = get_big_table(); %Params pixel_size_new=1.18185; pixel_size_old=1.78211; N_sh=1000; count_s=0; % data=load('C:\Users\xscogno\MATLAB\Flavio2\...
cf8d437f4df8cbbee20849ad2ad159539a34cf0d0050815b133aa91729507663
MATLAB
15,552
559
function ob = Gwave1( varargin ) %|function ob = Gwave1([args]) %| Construct Gwave object that computes wavelet decomposition of a %| signal with dimensions [(Nd)]. This is useful for compressed sensing %| imaging. (1D or 2D wavelets only) %| %| options: %| 'mask' logical [(Nd)] image-domain mask, usually: true(nx,...
3314feab18e6c42cc4769598ac13a542310c66a4e19ba1f73ecbb0b044393a3d
MATLAB
15,586
328
%BinFirRate.m % This function creates binned firing rate and x, y, v of all cells from one session as BinFirRate.mat. % Parameters are start time, duration, bin size (in seconds) % It also include position of the animal. % Feb14, 2024, It can now combine two segments (e.g. 15 sec around delay start and 10 sec of ...
b3e0dbdfe95b51c5b529a9c6d824ea9672519a7ed8d1c65a734e53e1fa85ec9d
MATLAB
15,606
281
% Plot correlation across laps at a population level % Marta Huelin % Compare 4 last laps of second exposure (actually, lap 13 to 16) to each lap of first exposure % INPUT: % 'parameter' is a string and defines the information you are analysing and that is a field in singleCell_LAPScorr structure. ...
163cc26306abc8cabcb746dcbdc7f172dfacc364b04ce0079c73ddf939696d54
MATLAB
15,621
430
%% ALL OF THE FUNCTIONS CALLED BY THIS SCRIPT FALL UNDER THE SAME COPYRIGHT INTRODUCED BELOW %Copyright (c) % Dr. Mimi Phan, Dr. David Vicario, Basilio Furest Cataldo % Rutgers University % Department of Psychology % 11-1-2023 %tested and used in MatLab v2015b %% %rate is really 6:25 not 5:24 as p...
207fa8dcb0b9914dd00dc3707b9e9242b85f28e25ef9550e38b5f16ae01b9e7b
MATLAB
15,634
296
%% Debug test %% User inputs clc clear %/mnt/irisgpfs/projects/lcsb_hcs/Advanced/IsabelRosety/GBAOrganoids delete(gcp('nocreate')) myCluster = parcluster('local'); AvailableWorkers = myCluster.NumWorkers; if AvailableWorkers >= 7 pool = parpool(7) else pool = parpool(1) end addpath(genpath('/work/projects/lcsb_...
5119b225662c486fd3c71991eeae421c7f5fe5076724a8e5be16c7243a36bbbf
MATLAB
15,634
297
%% Debug test %% User inputs clc clear %/mnt/irisgpfs/projects/lcsb_hcs/Advanced/IsabelRosety/GBAOrganoids delete(gcp('nocreate')) myCluster = parcluster('local'); AvailableWorkers = myCluster.NumWorkers; if AvailableWorkers >= 7 pool = parpool(7) else pool = parpool(1) end addpath(genpath('/work/projects/lcsb_...
3c1dafa248bf75846c73f4b45d80ab86d58408b412baa45dd4d57b1e8ac69863
MATLAB
15,660
296
function Results = PerformGroupFit(GroupData, config) %% PerformGroupFit % Andrea Castegnaro, UCL, uceeaca@ucl.ac.uk % Zilong Ji, UCL, zilong.ji@ucl.ac.uk % Fit parameters for a single group. Calculates behavioural results. % GroupData is the data obtained at the end of the pre-processing stage. % ====================...
836472dbd68f7f7e558e706b95152597e87c0e1e24ea0800f8f8c30e9a9ccd73
MATLAB
15,661
514
function CWTStruct = cwtft(SIG,varargin) % CWTFT Continuous wavelet transform using FFT. % CWTSTRUCT = CWTFT(SIG) computes the continuous wavelet % transform of the signal SIG using a Fourier transform % based algorithm. % SIG can be a vector, a structure or a cell array. % If SIG is a vector, it contains...
1ad0fd95c5604c1a67e8680c72526fadc176afce769143ebd80a78447f4c9e01
MATLAB
15,677
581
function [age, kWT, kB2KO, kWTJK, kB2KOJK] = fitSegregationData(obj,scaleDist,visibleFlag) if(~exist('scaleDist') | isempty(scaleDist)) scaleDist = false; end if(~exist('visibleFlag')) visibleFlag = 'on'; else if(visibleFlag) visibleFlag = 'on'; else visibleFlag = 'off'; end ...
347c0d4e6d77f871ea013569705c6e3ef7517dd9ee39344be64be02648da4343
MATLAB
15,695
333
%% Thomas_Yang_et al, 2023 @Nuo Li lab %% Fig. 4a norm. FR, SC photoinhibition, SC record clear all close all addpath('../func') load Figure_4_a_data sig_selective_p(isnan(sig_selective_p))=1; sig_selective = (sig_selective_p<0.01); %<------------- user defined sig_selective(isnan(sig_selective))=...
69a99ce5d372adabbf40c588e5cba5d6a46a4f6745a0b3c0f344516fc3e291aa
MATLAB
15,708
384
%aim to calculate the latency of the response, find the time and CI, and %the bootstrap % close all; clearvars; addpath ('/data/local/u0114568/ephysio/test'); listname={'sp_color', 'con-vs-att', 'allSP', 'Att-Inte', 'Att-Congruency', ... 'cueRight', 'allCon', 'all', 'allIncon', 'targetLeft',...
f897db650c5dafd7980bf5ac5641866106119888e864f81d22b203cb045d0016
MATLAB
15,735
483
%clear all phase_regions_list = {'CING'} power_regions_list = {'HC'} % cortex w/ MTL if strcmp('OFC', phase_regions_list) | strcmp('FRO', phase_regions_list) | strcmp('TEMP', phase_regions_list) && strcmp('MTL', power_regions_list) group = {'39' '57' '66' '44' '63' '84'} elseif strcmp('CING', phase_reg...
fa2c46de4f25c2baf6be4db420ca340859a4e5f6c9bb7a45dd4824da8f649a76
MATLAB
15,785
515
%% Figure S9 %% clear ft_defaults %% Subjects % ID 18 missing because of LP at 50Hz subjects = {'OSL13', 'OSL14', 'OSL17', 'OSL21', 'OSL24', 'OSL26', 'OSL27', 'OSL28', ... 'OSL29', 'OSL30', 'OSL31', 'OSL32', 'OSL34', 'OSL35', 'OSL36', 'OSL38', 'OSL39', 'OSL40'}; %% Paths path_data = '/Volumes/IMPECOG/iEEG_Dat...
dc4a2c19b2b90ea6057b3aec72ec9abea0b15e95ea5967bb8796869b135bfcdb
MATLAB
15,786
425
%Z-score delay all cells close all; clear; load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_bin\Space_bin_filt30Kalman.mat') load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_bin\Spatial_...
0deac2fdb648cc45bd1d109abf64bac76babca7b3b4ba0b97ac1d34515d472e9
MATLAB
15,788
479
% Fig6g % Extended data Fig 10q % Extended data Fig. 10r % Extended data Fig. 12f %% clear all close all dbeh_path='C:\Users\xscogno\MATLAB\Flavio2\Waves\Tracking data\'; rec_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_spikes='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_sort...
eb01f7419a06702ca5bda1bf176bbdb8a873d2d0380d2dbb3fc06f423e893b1a
MATLAB
15,811
361
function last_lap_POST1_replay_analysis % Code for quntifying replay decoded using place cell template from the % single final lap % Marta Huelin Gorriz and Masahiro Takigawa 2023 sessions = data_folders_excl; % Decoding replay events based on finial lap place cell template from RUN1 % Track 1 and Track 2 for nfold...
393f54bd26deb332925881d6498d39850f4b5bdd0ffbffcd497cd5c15c1d0fc5
MATLAB
15,816
383
function rtInfoServerTest(varargin) %RTINFOSERVERTEST runs connection, setting, and receiving tests for the % RtInfoServer in murfi. % % NOTE: currently you have to start murfi (with the rtInfoServerTest.xml % conf file) as well as the example_data/scripts/servedata.sh image server % before running this test. ...
bda2a3c3638eb9c5395907ead53d9f3a1e96493df3a1d4fe27f9c2a626aef7ca
MATLAB
15,864
422
function [DCM] = spm_dcm_estimate(P) % Estimates parameters of a DCM (bilinear or nonlinear) for fMRI data % FORMAT [DCM] = spm_dcm_estimate(DCM) % DCM - DCM structure or its filename % % Expects %-------------------------------------------------------------------------- % DCM.a % switch ...
b941bcfa991517ae135e2a06019b32cf36158cef2e041b727cd09f61267560ee
MATLAB
15,874
498
%% Figure S5 a & b %% clear ft_defaults %% Subjects % ID 18 missing because of LP at 50Hz subjects = {'OSL13', 'OSL14', 'OSL17', 'OSL21', 'OSL24', 'OSL26', 'OSL27', 'OSL28', ... 'OSL29', 'OSL30', 'OSL31', 'OSL32', 'OSL34', 'OSL35', 'OSL36', 'OSL38', 'OSL39', 'OSL40'}; %% Paths path_data = '/Volumes/IMPECOG/iE...
a5ea16d03bb8b0cc94907edf23f5a0e32393960273df36740e0875c2a26166d2
MATLAB
15,893
572
function ob = Gtomo_nufft_newsample(mask, dim_data, varargin) %function ob = Gtomo_nufft_newsample(mask, dim_data, options) % % Construct Gtomo_nufft object, for Fourier-based forward and backprojection. % Currently handles 2D parallel and fan-beam cases. % % See Gtomo_nufft_test.m for example usage. % % Basically, yo...
b6b9281a2f8ecfb7779da55bd00304f0667ccad199147c63652325d569d9ae3d
MATLAB
15,916
327
function fig2(animal, varargin) ip = inputParser(); ip.addParameter('num_sv', 30) ip.addParameter('time_pre_stim', .3) ip.addParameter('time_per_trial', 3) ip.addParameter('dt', 1/60) ip.addParameter('include_eye', 0) ip.parse(varargin{:}); include_eye = ip.Results.include_eye; num_sv = ip.Results.num_sv; dt = ip.Res...
190432c16cfc9b967301bd62c83cee6a457d0c6e6ac357b9bf0ab529cbd4676b
MATLAB
15,928
458
%% Computes waveness using the probability and asking for it to be larger than 3 ensembles clear all close all rec_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; save_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; clust...
320e09b1a94119d97c7bef63cdccfa347e515f9407fd39baf1b6fa958dbc4060
MATLAB
15,953
329
function mcmc = initMarkovChainMonteCarlo(maxETAPerMCMCRun,maxMCMCIterations,maxMCMCRuns, maxMCMCRunsWithMaxETA, MCMCTheta0Policy, bayesianEstimator,preFilterData, saveChains, adaptiveSCMH,data,environment,model) % function initMarkovChainMonteCarlo(maxETAPerMCMCRun,maxMCMCIterations,maxMCMCRuns, maxMCMCRunsWithMaxET...
fd04c49888dc7a5ac9c031d44f799496d768f826827815cefc09e8d110ad2adb
MATLAB
15,955
524
function ss=FscatJit2(identifiers, data, varargin) % Plots data as both jittered points and an error bar, in the % order the identifiers are passed to it. It preserves whatever order % was in the fbmm structure. Also includes the option to define the circle % size or use a default. Also allows someone to add bars to ...
ef44602a5a6b36c8d3a1f299ba568feab85eb2d56276cce5b28c4a625f6bb5dd
MATLAB
15,962
421
function SBJ08g_HFA_crRT_mLME(SBJs, proc_id, an_id, model_id, stat_id, atlas_id, roi_id, lme_formula) %% function SBJ08a_crRT_mGLM(SBJ,an_id,stat_id) % Run GLM with sliding windows for given time-frequency analysis % Correlation with RT and regression of RT as confound supported % Model based on log fit to behavi...
095b0ffd14e180f67241fe7b8381f623f172f6a81c18da4d225ef8b31cee24a1
MATLAB
16,001
604
function st = ct_geom(type, varargin) %|function st = ct_geom(type, varargin) %| %| Create the "CT geometry" structure that describes the sampling %| characteristics of a cone-beam CT system (axial or helical). %| (Use sino_geom() for 2D fan-beam or parallel-beam systems.) %| %| in %| type 'fan' (multi-slice fan-beam...
fd8bec54c87f01bd3bcc2490cab23808d8400046f323a3f4c3e63751fe5fe1d3
MATLAB
16,048
341
function SBJ11e_HFA_conn_plot_grp_mLME_confusion(proc_id, an_id, model_id, conn_id, swap_Xcorr, stat_id) if exist('/home/knight/hoycw/','dir'); root_dir='/home/knight/hoycw/';ft_dir=[root_dir 'Apps/fieldtrip/']; else root_dir='/Volumes/hoycw_clust/'; ft_dir='/Users/colinhoy/Code/Apps/fieldtrip/';end addpath([root_dir ...
b7adc325407c0f531ec83514ed3dc98d6c54067bbb1a6677bb173bf7a28831ce
MATLAB
16,054
280
function SUMMARY_STRUCT = NewFeaturesPostProcessing_082421( bg_struct, SUMMARY_STRUCT ) %NewFeaturesPostProcessing_080421.m This function takes in an existing %bg_struct and SUMMARY_STRUCT and derives several new features. It also %inserts consensus NaNs to all fields to ensure missing data is the same %across fields. ...
bdc3d99cf4888d7c2770efe1a0aa36f4af5727164aabffd8379380e870d8ed14
MATLAB
16,063
487
function bma = spm_dcm_bma(post,post_indx,subj,Nsamp,oddsr) % Model-independent samples from DCM posterior % FORMAT BMA = spm_dcm_bma(DCM) % FORMAT bma = spm_dcm_bma(post,post_indx,subj,Nsamp,oddsr) % % DCM - {subjects x models} cell array of DCMs over which to average % ----------------------------------------------...
071da3725c38ca5197d05222eaee06c26e54d4e2904ca7dbe50d0d5513a55701
MATLAB
16,073
483
%% Figure 1c % this script rungs additional analysis required for the plots of figure 1c %% clear close all; %% Set path path_main = '/Volumes/IMPECOG/iEEG_Data_JW/SingleSubjects/'; cd(path_main); path_out = '/Users/Janweber 1/Desktop/PhD_HelfrichLab/Project_1_Predictions_ECoG/Results/Figures/submission_natcomm_v...
81364f113c1374397fea08d2fa824baa24985e2d507259d171031d5f467d56cf
MATLAB
16,082
341
function SBJ11e_HFA_conn_plot_grp_mLME_confusion(proc_id, an_id, model_id, conn_id, swap_Xcorr, stat_id) if exist('/home/knight/hoycw/','dir'); root_dir='/home/knight/hoycw/';ft_dir=[root_dir 'Apps/fieldtrip/']; else root_dir='/Volumes/hoycw_clust/'; ft_dir='/Users/colinhoy/Code/Apps/fieldtrip/';end addpath([root_dir ...
e5d0be5590b691ce9e3285233f2407a5dd541865ccbbc7f373faf0991708bb09
MATLAB
16,088
364
function [s,keyNdx] = calcKinematicsCond_new(self,condNdx,key,thresh,ndxOnly,timeInterval) % calcKinematicsCond_new divides each state instances into cell arrays % based on firing rate regime. Key descriptors of each state such as % kinematics, index, prior firing rate info, and turn optimality are % outputed in...
fa355775fe152a7f217a37d7ccf2b2c5c31b042c65a027bdc1c81db6d95f69b2
MATLAB
16,107
349
% function MAP_fig_1_multi(mname,config) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ################################################################# %% DESCRIPTION % Script to analyse data for: % Grieves et al. (2020) % Quantification of firing rate map procedures % % This script % NO...
bbecf270204b57e79215ba73554d2f817dafac0ee36672de294fdd18d9744f80
MATLAB
16,168
594
function [phantom, params] = ellipsoid_im(ig, params, varargin) %function [phantom, params] = ellipsoid_im(ig, params, varargin) %| %| Generate ellipsoids phantom image from parameters: %| in %| ig image_geom() %| params [ne 9] ellipsoid parameters. if empty, use 3d shepp-logan %| [x_center y_center z_center x_ra...
4f34f68008827a9daa11df73ae842f0e197aecada6163d056bbbe90112441d79
MATLAB
16,199
300
function figSI(varargin) ip = inputParser(); ip.addParameter('include_eye', 0) ip.parse(varargin{:}); include_eye = ip.Results.include_eye; % define directories results_dir = '../data/results'; no_eye = load(sprintf('%s/harvested_vars.mat', results_dir)); with_eye = load(sprintf('%s/harvested_vars_withEye.mat', res...
fba7a27c8c1c680b5c3df4b62ca1e6077756f1fd63e39db173d68e8d7897d29c
MATLAB
16,213
252
function cfg = tbx_cfg_longitudinal % MATLABBATCH Configuration file for toolbox 'Longitudinal' %__________________________________________________________________________ % Copyright (C) 2012-2019 Wellcome Trust Centre for Neuroimaging % John Ashburner % $Id: tbx_cfg_longitudinal.m 7563 2019-04-01 10:39:24Z guillaume...
357a55c9a25c7d72879cc66d375d4a7be5ce30a99e479218803e11ddd43efe54
MATLAB
16,221
559
%% Fitting sine to ensemble activity - All sessions clear all close all dbeh_path='C:\Users\xscogno\MATLAB\Flavio2\Waves\Tracking data\'; rec_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_spikes='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_sorting='C:\Users\xscogno\MATLAB\Fla...
2b9417d7da1968ae7d4a17c7e89b6a82642688fa084dec2aa2c6187562a03a78
MATLAB
16,226
353
% function MAP_fig_1_multi(mname,config) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ################################################################# %% DESCRIPTION % Script to analyse data for: % Grieves et al. (2020) % Quantification of firing rate map procedures % % This script % NO...
ddebea16ac99ee5353ba2676bf6c9ac4c0e0390ac17b31c15dae19e9a8f8e026
MATLAB
16,228
392
function [spikes, thresholds, STDthresholds] = autothreshold(signal,smplfreq,varargin) % % Function to detect neuronal action potentials in extracellular neuronal % field potential measurement data. The function analyses the histogram of % the input data, and sets detection amplitude tresholds automatically. % Neg...
d6e6c0ec97673de0f66e13a2bcdcc74b45f1ef3b8c90b79418881523032cd30a
MATLAB
16,247
480
classdef BasicMap < Map % This wrapper around MATLAB internal map is meant for polymorphic % function signature compatability with other classdef and Java class in % CytoGenie AutoGate % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meeha...
53ccb41a615925dd43d7d5b625d05411c58b392004723d7075c1bffc6cd8579c
MATLAB
16,258
454
%clear all; close all; clc subj = '39' % load data cd ( ['/media/SSanDra/Pattern_Separation/subj_' subj ]) % load(['behavior_subj' subj '.mat']) % load(['trial_data_subj_onset_' subj '_select_chan_1.mat']) % load(['baseline_info_wavelet_32num_20logdb_3hz_350hz_notched_artifact_reject_subj_' subj '_select_chan_1.mat'])...
2254559202ce7d271e53eeff14f060010fbf041dc3d78fa4ef9d4d95810458e2
MATLAB
16,272
340
%% Thomas_Yang_et al, 2023 @Nuo Li lab %% Fig. 5a norm. FR, SC photoactivation, SC record clear all close all addpath('../func') load Figure_5_a_data % cell_location = func_get_SC_core_shell(Unit_CCF(:,2), Unit_CCF(:,3), Unit_CCF(:,1)); % %% plot the selectivity in a user defined region % i_location...
fece4d9a545ee73f4b19c998fc298c6eec1af4bee7749a1e6bf40edace86e8d6
MATLAB
16,305
400
function IPEMDemoMECRhythmExtraction % Usage: % IPEMDemoMECRhythmExtraction % % Description: % Starts the demonstration of the MEC algorithm used for the extraction of % rhythmic patterns in sound. % % Authors: % Koen Tanghe - 20020912 % ----------------------------------------------------------------...
bc0e4b714e40f1c7b66989579277218c23cc29bd8daac62bb2c7f7b8519cec53
MATLAB
16,309
323
clc; clear all; close all; addpath(genpath('D:\kate_dropbox\Dropbox\Rutgers\Matlab - Rutgers\Firestein Lab\BCT\')); %parameters totaltime = 300; binsize = 10; maxlag = 20*binsize; %options raster = 1; plotme = 0; extracalcs = 0; disp(' '); theBinSize = binsize; theMaxLag = maxlag; %% params....
075fe97d98064be39181fd600dec1367250d315aaf1df5e1d0d7215936d915e7
MATLAB
16,328
373
%% Preprocessing Pipeline % This script should be run in sections. Functions/scripts with the SBJ## % prefix can be run automatically, and all other sections should be % manually editted for each dataset. % Set Up Directories if exist('/home/knight/hoycw/','dir');root_dir='/home/knight/hoycw/';ft_dir=[root_dir 'Apps/f...
f1b7d0c82e1193019b38e970d6a6e21f10cd7c677b769d8dd9ecfe214335233d
MATLAB
16,339
604
function ob = Gcone(cg, ig, varargin) %function ob = Gcone(cg, ig, [options]) %| %| Construct Gcone object, for 3D axial cone-beam or helical cone-beam %| forward and back-projection. Works with flat detectors or 3rd-gen CT arcs. %| Also supports 3D parallel-beam geometry, but no polar angle. %| %| in %| cg ct_geom o...
bff243dc632f208e5df641fe498befe6edf80314afbb277f2ef6a325795a9099
MATLAB
16,348
385
function [fitFun,pHat,XX,YY,pHatBase,CorrMat1,CorrMat2,qBounds1,qBounds2,... baselineDat,allDat,allSpk,alldSpk,allTimeFe,allTimeAbs,allFly,allFlyBaseline,... turnOpt_during,nLL,AIC,BIC,distTypes,maskedDat] = getKNNKin(f_orco, s, keyNdx, xGrid, yGrid, ... zGrid, ratio, Thresh, K, state, kin, border, genotype...
abdf62feb23f32d34ec361eac5e7a1040417c5b806ae6b9b6813ed481c769d8d
MATLAB
16,363
404
% Script to plot Figure 1, calculate statistics reported, and save data to % Excel spreadsheets that are then imported into the Source Data file. % Kit Longden 2023. addpath ../../src/Shared_functions/ % Figure 1 properties % ------------------------ fig_h1 = figure(1); set(fig_h1, 'color', 'w','Position',[1500 500 80...
be3190760e030f64b3678697ba707bde914d2d00868ab835f5f4759800b18d0a
MATLAB
16,372
400
function [slope,pearson_rho] = findAttractorDynamics(cells,save_figs,sf) % A functioning attractor network should preserve correlations between % pairs of cells. % E.g. So pairs of cells that are well correlated in trial 1 through 25 % should also be well correlated in trials 26 through 50 slope = nan; pearson_rho = ...
bd4b8967f5b38bf17e809855a89fef4a8737745851d4b75ee9ed25b9ce44b8ee
MATLAB
16,380
328
function [TRACKS, POKE_STRUCT] = get_head_pokes_PERMISSIVE( TRACKS, bg_struct, INTS_OUT_BY_TRACK, OUT_INT_TRK_KEY, pixpermm ) %GET_HEAD_POKES3.m This function identifies times that the worm pokes its %head out of the lawn while the rest of the body remains in the lawn. %This method looks specifically at peaks in radial...
74a895c18fadaa6d81ba563d8c490d3725b6cbbb62ce888dfb1e38c1023731e6
MATLAB
16,385
473
clear all close all clc addpath('/gpfs0/tals/projects/Analysis/stavbi_goldfish_2021/Matlab/matlab_functions','-end') %pyenv("ExecutionMode","OutOfProcess"); %run just one time %% loading the data load('all_cells_goldfish_data_6_6_2022.mat'); geneid=geneid(:,3); %% normalization + highly variable genes + scaling and lo...
c0d73e1565add18a049928694e3e30f57ae2cabcef0b39bf09976a29fde5304f
MATLAB
16,392
452
function [duV, duVT]=getraw_uv(D, newseTime, varargin); % getraw_uV - retrieves MC-Rack continuous data as a matrix of uV values % currOutVar=getraw_uV(D, newseTime) % <D> must be the name of a datastream object or a % file of continuous raw data recorded with MCRacks. % <newseTime> is a 2-element vec...
78946411f1d0248478241a91050e9ad90dd28f8ce88dba92d0d7f983a9cc17df
MATLAB
16,398
532
function varargout=notBoxPlot_adapted(y,x, varargin) % notBoxPlot - Doesn't plot box plots! % Adapted from Rob Campbell (2023). notBoxPlot (https://github.com/raacampbell/notBoxPlot), GitHub. Retrieved August 1, 2023. % function notBoxPlot(y,x,'Param1',val1,'Param2',val2,...) % % % Purpose % An alternative to a box plo...
87d99c1267fbd04976ff7cb7c2620b2b6b00e9c42ae2aaaac5f94867d13bf3ed
MATLAB
16,413
454
%% Analysis for each cycle of the oscillation separately - Phase %Computes the MVL in spatial bins clear all close all dpath='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; plot_all=1; [big_table, waves] = get_big_table(); %Params pixel_size_new=1.18185; pixel_size_old=1.78211; N_sh=1000; count_s=0; min_cutoff...
e2a5707d9b091de51d7beaf73b59f62a17d7ee1eb2fa8e5e08e54c9d0d8e28a2
MATLAB
16,417
330
function analysis_05_extract_bursts(study_info, varargin) % Parse optional arguments defaults=struct('min_ntrials',5); params=struct(varargin{:}); for f=fieldnames(defaults)', if ~isfield(params, f{1}) params.(f{1})=defaults.(f{1}); end end addpath('/home/bonaiuto/burst_detection/matlab'); pipeline=...
0824b7ed0e611ea0c82a35ac8d8cd02e392d7cd2f26175073037d8e9c2c4f428
MATLAB
16,478
635
exp_type = 'encoding' lock = 'onset' if strcmp('response', lock) data_length = 1601; cd(['/mnt/yassamri/iEEG/sandra/groupdata_spectrograms_response_' exp_type]) elseif strcmp('onset', lock) data_length = 2101; cd(['/mnt/yassamri/iEEG/sandra/groupdata_spectrograms_onset_' exp_type]) end minfreq = 3; maxfreq = 200;...
e3e3a7b113b20e155117bbccbc3590ac826b10404a1bd2fb784a3765f1036338
MATLAB
16,509
296
%% ----------------------------------------- %% % Note Mar 14 2023: % % Current version of code does FOV correction, grid correction & % MIP/AIP/Retardance/Orientation generation, surface finding & profiling, % volume stitching % % Fitting is in Fitting_after_recon.m % % % Note Jan 28 2020: % % Current version of code...
817a9f988b20b18b913402636c37729fc21f24be8390e39214f4e594bd136716
MATLAB
16,570
593
%% Figure 1d % this script rungs additional analysis required for the plots of figure 1d %% clear ft_defaults %% - SUBJECTS - %% % ID 18 missing because of LP at 50Hz subjects = {'OSL13', 'OSL14', 'OSL17', 'OSL21', 'OSL24', 'OSL26', 'OSL27', 'OSL28', ... 'OSL29', 'OSL30', 'OSL31', 'OSL32', 'OSL34', 'OSL35', 'OS...
b1f5615729601ff31cb9faf90d30e89c8ce45a20a919544b5dfc955c507e2cc0
MATLAB
16,576
377
function [f_orco,time2State,exitTrajectory,timeOfState,kinOfState,biasOfState,dFSmooth,FSmooth] = ... getDistInhibition(f_orco,crossingtype,plotFig) %close all;%clear; if isempty(f_orco) load('DataModel/Orco Retinal_10Dec202060sAvg_32_25_3.mat', 'f_orco'); end spd = f_orco.calcSpd; % calculate smoothed...
53fac1d5ba51c1e1719d0629f0ba41bef4488ada2436154d826085682e922eda
MATLAB
16,586
1
function B=inpaint_nans(A,method) % INPAINT_NANS: in-paints over nans in an array % usage: B=INPAINT_NANS(A) % default method % usage: B=INPAINT_NANS(A,method) % specify method used % % Solves approximation to one of several pdes to % interpolate and extrapolate holes in an array % % arguments (input): % A...
41dec4c117c3b909a6add4432790e5b9a58bf38ba04655c925aa6a2f7d1421c6
MATLAB
16,609
424
%aim to calculate the latency of the response, find the time and CI, and %the bootstrap % close all; clearvars; addpath ('/data/local/u0114568/ephysio/test'); listname={'sp_color', 'con-vs-att', 'allSP', 'Att-Inte', 'Att-Congruency', ... 'cueRight', 'allCon', 'all', 'allIncon', 'targetLeft'...
54e48af6eea703e84eb91474e2c461c0a3bd77dae60cbfe649f5985e0efa22e4
MATLAB
16,625
376
function out = startQuestionnaire(text, ansText, varargin) % Use this function to present a questionnaire on the stimulus presentation % window. Every question is shown in a table with the same set of answer % options on top, and the user answers by clicking into one of the answer % fields. The questions are presented ...
ee0d275d10e3b0e1092be2dac6d7e8a977731c4a7f56778610022e89659c1691
MATLAB
16,629
548
%% Figure S11 %% clear ft_defaults %% SUBJECTS % ID 18 missing because of LP at 50Hz subjects = {'OSL13', 'OSL14', 'OSL17', 'OSL21', 'OSL24', 'OSL26', 'OSL27', 'OSL28', ... 'OSL29', 'OSL30', 'OSL31', 'OSL32', 'OSL34', 'OSL35', 'OSL36', 'OSL38', 'OSL39', 'OSL40'}; path_data = '/Volumes/IMPECOG/iEEG_Data_JW/Key_...
4bc0f394eb38e39fa409b20d2e24496cd50b1e8c25d01e862b462fca73f9cf38
MATLAB
16,636
487
function MS_mod_tSC_main %MS_MOD_TSC_MAIN Main wrapper for the figures presented in the Király et %al. manuscript. % This code is for further analysis after running % TSC_RUN_SESSION_ANALYSES on the sessions of simultaneous septal unit % and hippocampal LFP recordings. % Bálint Király % Institute of...
be23eeb73efb74c812a753aabe41a44eee5ee116762ceddc09735a3bdc3c0fe8
MATLAB
16,654
454
function [] = PlotAllFiguresEmpSynth(genAll,meta,agentModelMeta) % set parameters dur = agentModelMeta.dur; delay = agentModelMeta.delay; %plotFolder = [meta.syntheticPlotFold]; plotFolder = char(meta.syntheticPlotFold); for ii = 1:numel(dur) for jj = 1:numel(delay) currDur = dur(ii); ...
a038da960b245d1a3521ee66e1955d83cdd3eaa0539b3a87c63de289791169c9
MATLAB
16,707
553
clear all close all dbeh_path='C:\Users\xscogno\MATLAB\Flavio2\Waves\Tracking data\'; rec_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_spikes='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_sorting='C:\Users\xscogno\MATLAB\Flavio2\Waves\Sorting\'; dpath='C:\Users\xscogno\MATLAB\F...
564c698255242e113c615bc9c733697d719c4ae69cadcfe0e2a9c3194d620a1f
MATLAB
16,708
1
function B=inpaint_nans(A,method) % John D'Errico (2022). inpaint_nans (https://www.mathworks.com/matlabcentral/fileexchange/4551-inpaint_nans), MATLAB Central File Exchange. Retrieved March 10, 2022. % INPAINT_NANS: in-paints over nans in an array % usage: B=INPAINT_NANS(A) % default method % usage: B=INPAI...
e3f42d2a44c67bbdb1c2524a0cd32d3c0c6fd896d849a671581a2e08e17b1801
MATLAB
16,724
388
%% Script to analyze the molecular identity of the autocrine connections % Jan Watteyne - jan.watteyne@kuleuven.be and/or jwatteyne@gmail.com % 20230607 clear all close all workspace %% Import data %------------------------------------------- % import general variables from network build %----------------...
c166ea7d998c3c2718e52a9af5789c9aef5ffd02c0af8951af243c1ac045cb33
MATLAB
16,735
461
%clear all; close all; clc subj = '39' % load data cd ( ['/media/SSanDra/Pattern_Separation/subj_' subj ]) % load(['behavior_subj' subj '.mat']) % load(['trial_data_subj_onset_' subj '_select_chan_1.mat']) % load(['baseline_info_wavelet_32num_20logdb_3hz_350hz_notched_artifact_reject_subj_' subj '_select_chan_1.mat'])...
b53f82808aec5c67f2a739ebe06ff19efe504d056c7dc10d3d4bb3921dd2c0b9
MATLAB
16,742
350
function gap_linking_str = fun_graph_get_linker_ep2ep_th_rlx(vessel_image, vessel_mask, vessel_skl, p_1_pos, p_2_pos, connectivity) % fun_graph_connect_gap_ep2ep finds the link that connect the two given % endpoitns % Input: % vessel_image: 3D numerical array, image of the vessel % vessel_mask: 3D logical array, ...
01a08d9920cc0d48ca9bd4bbf2e9c55a4aad41dfbfaed1198c8b832cbe9a1f46
MATLAB
16,754
537
clear all; clc; close all rmpath(genpath('/mnt/yassamri/iEEG/sandra/analysis_pipeline_final/')) reset = 1% reset to zero 0=no, 1 = yes exp_type = 'encoding' %encoding, tuning_correct smoothgamma = '' fn_ext = ''%'_cue_responseiveyes'%'_cue_responseiveyes' removeERP = '' if strcmp('' ,removeERP) ba...
72023357c03f155e368afaa4b907fcfa11ba78a59f92f5134f49773042ba039f
MATLAB
16,851
669
function st = image_geom(varargin) %function st = image_geom(varargin) %| %| Create a "image geometry" structure that describes the sampling %| characteristics of a single 2D image (or 3D volume). %| Using this structure facilitates "object oriented" code. %| %| options for 2D %| 'nx' image dimension %| 'ny' image d...
b7253c754fd3a65f94fa589fb7f5d11ed386b164993e2c103dace561db097446
MATLAB
16,902
586
function ob = Gtomo_nufft(mask, dim_data, varargin) %function ob = Gtomo_nufft(mask, dim_data, options) % % Construct Gtomo_nufft object, for Fourier-based forward and backprojection. % Currently handles 2D parallel and fan-beam cases. % % See Gtomo_nufft_test.m for example usage. % % Basically, you create an object c...
4d46be983e38afbf00c9031587be2e8c61f6fca9997c52ad1b3537f172fb5cf3
MATLAB
16,903
329
% PROPORTION OF LOCAL AND REMOTE AWAKE REPLAY EVENTS IN TRACKS PER PROTOCOL % MH 2020 % Plots a figure per protocol. Each subplot is a rat. Within subplot, all tracks plotted with bar plot, each bar indicating proportion of replay events % decoded during that track, for each possible track decoded. Proportion is calcul...
cb368c00c7f780c8041334faa8be7d55bbb192f64046a9ad2bfd11a40b1e5d99
MATLAB
16,950
463
function [stats,t] = mTRFmulticrossval(stim,resp,resp1,resp2,fs,Dir,tmin,tmax,lambda,varargin) %MTRFMULTICROSSVAL Cross-validation for multisensory model optimization. % STATS = MTRFMULTICROSSVAL(STIM,RESP,RESP1,RESP2,FS,DIR,TMIN,TMAX,LAMBDA) % cross validates a forward encoding model (stimulus to neural response)...
2f998332480ee043f9bc8176610a85d0464d9b3470e87bdae1516bbf174b9787
MATLAB
16,958
443
tic clear all close all addpath('/data/matlab_functions/') % % % % % % % % % % % % % % % % % % % % % % % % % % % % load all_neurons_cluster_ave.mat %%% 'meangr_mat_all','clusteruni','geneid_all' geneid gabaclusters = loadCellFile('ClusterOrder_step3_GABA_FC_24-Oct-2021.txt'); glut1clusters = loadCellFile('Clust...
94009ba3a81f8bc6decb383bfd528dbcfa3627a47c65a0b54091f47685bce2fb
MATLAB
16,997
666
function st = mri_objects(varargin) %|function st = mri_objects([options], 'type1', params1, 'type2', params2, ...) %| %| Generate strum that describes image-domain objects and Fourier domain spectra %| of simple structures such as rectangles, disks, superpositions thereof. %| These functions are useful for simple "i...
3db30c740510382492a67849c3cbf4b349800df242cc9eb18bc27fddc6a16b0f
MATLAB
16,998
446
%% run each visium genes clear all close all clc direct='/bigdata/web_pilot/trial'; cd(direct) %% load disp('gf_v') visdirect='/data/Technion_analysis/goldfish/visium/cropped/091922_two'; load([visdirect,'/Sorted.mat'],'data_orig_all_sorted','sample_sorted','bar_ar_sorted','T_cells_tmp') % vdata load([visdirect,'/Ori...
c7f111ee7dc593f9b863c3c069710c1d749741024aca9bccb6205955272cbbbb
MATLAB
17,005
459
function PlotAllFiguresEmp(genAll,genRetinal,meta) plotFold = [char(meta.plotFold) '\']; subFoldName = meta.foldName; % load in all data (both retinal and controls) %-------------------------------------------------------------------------- % (for both control and retinal) f_orcoAll = cell(1,numel(genAll)); ...
d8dd9441315ae2b73e41b2d93c5f28755bd9519b798a9aed645b17320aeb6b8e
MATLAB
17,014
407
function SBJ08e_HFA_plot_grp_GLM_reg_venn_ROI(SBJ_id, proc_id, stat_regs, hemi, roi_id,... plot_out, plt_id, save_fig, varargin) %% Plot venn diagrams of overlap in mass GLM effects per ROI % COMMENTS NOT ADJSUTED SINCE STROOP COPY % INPUTS: % SBJ_id [str] - ID of subject list...
d56b741bc051acfac19e15cf8c2e6680b1855db2180619da9f25335f692685ca
MATLAB
17,042
749
function h = im(varargin) %function h = im([options,] [xx,] [yy,] zz, [scale|clim,] [title]) %| show matrix zz as an image, possibly with (x,y) axes labeled by xx,yy %| %| options: %| subplot an integer for subplot %| 'notick' no axis tick marks %| 'black0' make sure image value of 0 is black (max white) %| 'blue0' ...
4ccedddbe4a0641b67935a5eb3752f645495b519df8f525066a07b70b19bd904
MATLAB
17,053
483
classdef SuhWindow < handle % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland Stanford Junior University; Herzenberg Lab % License: BSD 3 clause properties(Constant) TESTING=false; end properties(SetAccess=priv...
933eaafa3fe6c1de3139b35b35a5d5fe2970c4f3c1c03e9123b5da1426bc41b1
MATLAB
17,065
436
%% Script that fit different types of the generative linear angular model considering differnt types of error - output is in Fig. 2, Fig S2, Fig S4 % Zilong Ji, UCL, 2022 zilong.ji@ucl.ac.uk % We calculated different generative angular-linear models with different % types of source errors to find the candidate for our ...
c83c88722d68b8a6b8c8aa234d6a7bac631c6d22059fc83d7a13690c08fbfef2
MATLAB
17,091
350
function gap_linking_str = fun_graph_get_linker_ep2ep_th_rlx(vessel_image, vessel_mask, vessel_skl, p_1_pos, p_2_pos, connectivity) % fun_graph_connect_gap_ep2ep finds the link that connect the two given % endpoitns % Input: % vessel_image: 3D numerical array, image of the vessel % vessel_mask: 3D logical ar...
5b505b234f631711117b6927d574c8403f034c2456edbb32599babe6c8e83248
MATLAB
17,093
512
clear all close all dbeh_path='C:\Users\xscogno\MATLAB\Flavio2\Waves\Tracking data\'; rec_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_spikes='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_sorting='C:\Users\xscogno\MATLAB\Flavio2\Waves\Sorting\'; dpath='C:\Users\xscogno\MATLAB\F...
ad2c33ccac1d36737c30ed904401f3608dadcc2fcccbf03578512b61f2a0de52
MATLAB
17,141
306
function histogram_difference_replay_events(plot_type,epoch) % Plots the difference of replay events between tracks over time. Tests different types of comparisons, set in the code. % Histogram is calculated as the difference of replay events between tracks for each experiment (always within a protcol), %sum the ...
32659e1e16e1d221c9c0bb857e2e8bcd5c4f158c7f7aa6510d697c843c129be2
MATLAB
17,147
415
function [SPM] = spm_fmri_spm_ui(SPM) % Setting up the general linear model for fMRI time-series % FORMAT [SPM] = spm_fmri_spm_ui(SPM) % % creates SPM with the following fields % % xY: [1x1 struct] - data structure % nscan: [double] - vector of scans per session % xBF: [1x1 struct] - Basis function st...
6001f11df3de25cbf7d3357d067b8430cd5c60380370b4a3fac0e5fa7d0ac407
MATLAB
17,174
312
function [vessel_graph, record] = fun_graph_refine_by_classifier(vessel_graph, vessel_image, vessel_mask_dt, opt) %% Initialize parameters % Record refinement process if ~isfield(opt, 'record') || ~isfield(opt.record, 'num_self_loop') record = struct; [record.num_self_loop, record.num_bilink_loop, record.num_sh...
78a1ced0a7a12e284d2b9b5ca9f4a09cabb0899ddb84e89d08a5e37498991896
MATLAB
17,189
261
function extract_replay_bias(computer,epoch) % Marta Huelin, 2020 % Plots replay bayesian probability bias between tracks % Load name of data folders if strcmp(computer,'GPU') sessions = data_folders_GPU; session_names = fieldnames(sessions); else sessions = data_folders; session_names = field...
bd90b5e78970bda5a7205c0d9255199f4d301ca63c3bb70c1899e704cf643d41
MATLAB
17,224
564
function [idxs, cancelled, mainDlg, raIfRemembered, checkBoxes, allChb, sortGui]=... mnuMultiDlg(args, title, options, defaults, singleOnly, ... radioOrCheckBox, xtraCmp1, xtraWhere1, xtraCmp2, xtraWhere2, ... itemsPerScrollWindow, where, subTitle) % AUTHORSHIP % Primary Developer: Stephen Meehan <swme...
05dc6c6c9356de4d35baf151d930a387bfaa963e06f5e2ae611eafde2f56d47c
MATLAB
17,263
282
%% Run this files to compute the network-human main effect and interactions for all for the VISION experiments %% Must specify the paths to the required network data mat files. function run_anova_stats_matlab_compare_human_responses(EXP_NUM, NUM_BOOTSTRAPS) rng(517) addpath('../matlab_statistics_functions') %% NO A...
c373a813dc2dae739045a22926fc92fdc0ad2d488306631ae122bb7b11f06eb5
MATLAB
17,269
399
% This script loads loads the tracked data from the .mat files generated % with load_excel_file_proboscis_tracks, adds together data from multiple files % (if multiple trials were recorded for the same animal and condition), % and rotates the data to align the pattern's main axis with the cardinal coordinates. ...
3f5172a8e1034d11d535c365dd9e318169a69484bc74cf06d1e121982586be96
MATLAB
17,283
311
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ################################################################# %% DESCRIPTION %FUNCTION short descr. % long descr. % % USAGE: % [out] = template(in,in2) % % INPUT: % in - input 1 % in2 - input 2 % % OUTPUT: % p - o...
21a9bc6aa4e668c075b928da020a454ac6b14340d85f8a4795711ab92b0d4803
MATLAB
17,331
371
function SymphonicBeeSwarm(x, y, Color, PointSize, varargin) warning('This function is now deprecated, use Swarm instead') % Produces a distribution of points akin to a beeswarm, violin, or box and whisker % SymphonicBeeSwarm(x, y, color, point_size, varargin) % Only supports a single group at a time as thi...