sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
7b42ff689d5c47ddccdc894c7d1ddee754a2c0513050b7d04141ac2ccd10bf05
MATLAB
23,247
671
classdef RoiUtil < handle % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Copyright (c) 2022 The Board of Trustees of the Leland Stanford Junior University; Herzenberg Lab % License: BSD 3 clause pro...
5f1c462ad311d1fe1000dc1fa58db9cea6572652a6925b67678ee326487bcc49
MATLAB
23,380
620
clc; addpath('Visuallization_matlab/Code'); addpath('cbrewer'); % set the root_dir to the directory where the Code and visualization data is located root_dir = 'fig3'; % Choose a iiject {'NY742', 'NY717', 'NY749'} -- we don't have iiject brains other than these but MNI should work for all Ss Sj = 'NY717'; % get paths ...
688f011c8a577e814f5faaa237f3788c7beccd9ba2bd5b068d06f58857ac75d6
MATLAB
23,481
904
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 -...
7512b2eeac072feccfe703462ed95d7b2a1d99244384e47e1c5be3ac69bbb047
MATLAB
23,546
497
clear clc %bayesreg %J Ruffle j.ruffle@ucl.ac.uk %% %configure paths addpath('/home/jruffle/Documents/MATLAB/bayesreg'); addpath('/home/jruffle/Documents/MATLAB/bayesreg/examples'); %% %%for your given survival outcome, 12, 24 36 month etc., nsamples = 1e5; burnin=1e5; model_results = table; df = readtable('p...
4ece0df7655191ccff5d6b861a2faa619cd4924255454eb363d2c9933f7255a4
MATLAB
23,561
532
function total = touchBuffer(duration,varargin) % !!! This function should only be used in experiments that require a % touchscreen as input-device, if the paradigm could also be implemented % with input-keys use keyBuffer instead. !!! % This buffer terminates if a specified number of inputs on "good keys" or "bad % k...
9534c6edb3d03456e6feca35e0dfd801d7a45f15334468f9641e765386763573
MATLAB
23,566
665
% function [gcbf,cbfdat] = perf_resconstruct_3D (Filename, FieldStrength, ASLType, FirstimageType, SubtractionOrder, SubtractionType, ThreshFlag, threshold, CBFFlag, MeanFlag, Delaytime, Labeltime, Slicetime, T1b, PASLMo, optionPCA, ASLscaling, M0scaling, diffs) % % This MATLAB function is to reconstruct the raw perf...
dd8111ee0a740da6a0201811df16566a0a1c72652a713dde8084e41a9cd856ae
MATLAB
23,621
600
function varargout = Coregister(varargin) % COREGISTER MATLAB code for Coregister.fig % COREGISTER, by itself, creates a new COREGISTER or raises the existing % singleton*. % % H = COREGISTER returns the handle to a new COREGISTER or the handle to % the existing singleton*. % % COREGISTER('CALL...
33c30ea32783f6408862283339c68212fc4283b56b9eeca71fa0a35979fabf7b
MATLAB
23,736
565
%cdf plots, sawtooth plots, avg chunks of 5 trials september 4,2011 %chunk1 2 6 %chunk2 7 11 %chunk3 12 16 %chunk4 17 21 %chunk5 21 25 %absolutes_for16_rms05.m mlp 4/22/2009 %rm332_development_rms05.m mlp 3/22/2004 %this is similar to rm332_corrected and RM316_analysis however, will extra...
45b21437b4d64547b8cff3e415cb36df36b371bceb787334e31826ef31cf6a07
MATLAB
23,763
590
function varargout = spm_bms_display(BMS,action) % Display results from BMS Maps % FORMAT spm_bms_display(BMS,action) % % Input: % BMS - BMS containing details of excursion set % action - 'Init' (Initialise) % 'do_plot' (plot voxel results) % 'save' (save results as NIfTI image) % 'overlay...
583de3bc3c6fa858e3825c7e85c30287afa4e1bbf591235346ce7b55c3154c21
MATLAB
23,835
554
function compare_run_sleep_replay(bayesian_control) % MH 2022 % Runs correlations and linear regression comparing awake replay on track with the subsequent sleep session. Compares it usimg both absolute number % of events and rate of events. Comparisons are run within track (e.g. awake replay on T1 vs POST1 T1 sleep r...
0bbfe1d7a588abf1d0d391a7b29bada63ea9ace91a4bc6232b9fd948b5b4f84a
MATLAB
23,860
501
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ################################################################# %% DESCRIPTION % Script to analyse data for: % Grieves et al. (2020) % Quantification of firing rate map procedures % % This script % NOTE: This script is dependent on graphtest...
223ad1a279c5491296d1e41dcfe35378e3d9f68150ab288f63b27633356021f6
MATLAB
23,949
570
function Swarm(x, y, varargin) % Updated SymphonicBeeSwarm % Produces a distribution of points akin to a beeswarm, violin, or box and whisker % Swarm(x, y, varargin) % Only supports a single group at a time as this reduces ambiguity in matrix dimensions. % First check x & y for validity if isnumeric(x) && all(size(x) ...
a66459dfde0058f332ca8c4e740c2be49a4d713174b2d9f927ec775769afbb45
MATLAB
24,003
644
classdef ColorsByName <handle % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland Stanford Jun...
3bef2844ea3f51ec6a81ef0367440289ecfe3544ecbb6b5a5f9190d4ca2d228a
MATLAB
24,007
580
% function [phaseCongruency, or, M, m]=myphasecong3(varargin) % % This function is a revised version of Kovesi's phasecong3.m. % Please "type myphasecong3" for detailed information. % % % Z. Liu @NRCC[ July 31, 2006] % PHASECONG2 - Computes edge and corner phase congruency in an image. % % This function calculates t...
53e7d3cfc009eb1b5310a0aa5cc602428e5243c8f070e520e14e3d1af3f0a07f
MATLAB
24,135
627
function BHV02a_RL_model(SBJ,proc_id,model_id) %% Run reinforcement learning (RL) model on single SBJ behavior % for specific combination of model regressors and conditions % Plots and saves: % design matrix (SBJ_modelID_design.png) % correlation matrix between regressors (SBJ_modelID_design_corr.png) % violin ...
b20705b904aa4148505cb49032389fb5781e2188347f48bffd47a99c4fe4971c
MATLAB
24,158
631
% POP_VIEWPROPS See common properties of many EEG channel or component % Creates a figure containing a scalp topography or channel location for % each selected component or channel. Pressing the button above the scalp % topopgraphies will open pop_prop_extended for that component or % channel. If pop_viewprops...
d93e4b28af97776e01a9f8cef8d968a3835b93d3a0161942650336ae1998fa4c
MATLAB
24,271
710
classdef RetinalMap < handle properties %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Simulation ID and directories used simName = 'default'; dataPath = 'SAVE'; figurePath = 'FIGS'; simID = 0; timeStamp = 0; %%%%%%%%%%%%%%%%%%%%%%%...
9096756818d02a1e06ed01ec675764eea752201ac81b6daa66f526cc83f9770b
MATLAB
24,276
623
function [D, D_eye] = preprocess_dataset(datadir, exname, varargin) % first written by J. Yates, 2021 % modified by Bharath Talluri, Dec 2021 % Modified for sharing by Bharath Talluri, Dec 2022 % Preprocess dataset will take all of the files in an experiment folder, % time-align them for each trial and then bin and ma...
f6e23af975c90e0f8f50dd8f4d87518cb05761cbd13d8ee5644a090a91b595ef
MATLAB
24,463
431
function natsortfiles_test() % Test function for NATSORTFILES. % % (c) 2014-2023 Stephen Cobeldick % % See also NATSORTFILES TESTFUN_NSX ARBSORT_TEST NATSORT_TEST NATSORTROWS_TEST fnh = @natsortfiles; chk = testfun_nsx(fnh); % c2s = @(c)struct('name',cellstr(c)); rmf = @(s)rmfield(s,setdiff(fieldnames(s),'n...
5641c502d7db46dfeb4379a6de91c59824a91d089bf08c635b4eec919c036fc1
MATLAB
24,485
444
function raster_plot_replay_times(state) % Plot replay times as raster plot for all sessions % Loads 'extracted_replay_plotting_info.mat' % INPUT: % track: being 1 - for 16 runs,2 - for short exposures,3 - for re-exposure to track 1, or 4 - for re-exposure to track2 % state: 'sleep' for plotting only SLEEP replay (thus...
a6a93d50d09c6d551420d5dd4126f240c27157a2daa896f797ba1d7657fe940b
MATLAB
24,545
574
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')%no return trajetories from T and goal load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_...
fbd58330cce94d1d54be12430a9df3eefe0536499d8b4292e45ae9efbb70ea73
MATLAB
24,894
391
function plot_diff_proportion_cum_replay_periods(epoch,multievents,bayesian_control) % Plots difference in number of cumulative replay events between trackd over sleep periods for each protocol. % Histogram is calculated as the sum of cumulative replay event times across tracks & each experiment (always within a protc...
2ae073b6f04718ba1b6353a18b7e3c904e64c36481a1884a37566410e36b223a
MATLAB
24,934
646
function [accum, varargout] = CircularHough_Grd(img, radrange, varargin) %Detect circular shapes in a grayscale image. Resolve their center %positions and radii. % % [accum, circen, cirrad, dbg_LMmask] = CircularHough_Grd( % img, radrange, grdthres, fltr4LM_R, multirad, fltr4accum) % Circular Hough transfo...
ab5b922e1e7b943dde2448fc7fc26abc873df03727af6fafe6ce780f3b78ea39
MATLAB
24,968
505
% Created by A. Benitez Andonegui, M. Luehrs % Modified by A. Vorreuther %%%%% include these %%%%% % mainPath: path where all participant data is stored. assumed directory format is: % mainPath > P01 > run 1 % > run 2 % > ... % ...
432eae50f586195f2036e526ff9416e51a14ae7bdd7ece40ac252b56e0277fc9
MATLAB
25,077
666
function varargout = ZSlicer(varargin) % ZSlicer MATLAB code for ZSlicer.fig % ZSlicer, by itself, creates a new ZSlicer or raises the existing % singleton*. % % H = ZSlicer returns the handle to a new ZSlicer or the handle to % the existing singleton*. % % ZSlicer('CALLBACK',hObject,eventData,...
d95136b2d9878fb6ee9cdd021fa9a1b8b1e99faaa1bc8238c79cf2c333775da4
MATLAB
25,093
466
% Marie_FP_PooledData % Marie Labouesse, marie.labouesse@gmail.com - Feb 2021 % 1- POOLED DATA % load matlab spaces generated in: Marie_FP_IndivData_extraction % puts individual trials into one big matrix (all mice together): PooledINDIV % calculates the mean of individual trial trajectories aligned to specific ...
0ada8f14d2eb70eef5f5eadeaa1b5aa632ba5c784463278bd6f73eb5cc8ee9ae
MATLAB
25,110
812
%% - Figure 5c % this script rungs additional analysis required for the plots of figure % 5c. %% clear close all; ft_defaults; %% -SUBJECTS - %% % ID 18 missing because of LP at 50Hz subjects = {'OSL13', 'OSL14', 'OSL17', 'OSL21', 'OSL24', 'OSL26', 'OSL27', 'OSL28', ... 'OSL29', 'OSL30', 'OSL31', 'OSL32', 'OSL3...
a90f20d3363961b3e6d44f2686e1dadbd1ae762440b0c62205d271bfac2d28f3
MATLAB
25,127
611
function [D, D_eye] = preprocess_dataset(datadir, exname, varargin) % first written by J. Yates, 2021 % modified by Bharath Talluri, Dec 2021 % Modified for sharing by Bharath Talluri, Dec 2022 % load and preprocess raw data % Preprocess dataset will take all of the files in an experiment folder, % time-align them fo...
f881d9ab520f41e0e31797fe6fb92edb24db80414cf145d1be93fba11321a577
MATLAB
25,172
840
function [cond_tr_avg_all_cp] = perm_test_for_GLM(betas_sj,time_idx,chanlabels,EEGdir) keyboard; cl = cbrewer('div','RdBu',100); % average frequent and rare trial conditions for r = 3%1:length(time_idx) % frequent averaged freq_avg_sj = mean(betas_sj{r}(:,:,:,1:2),4); % short averaged short_avg_sj ...
b48856ab004e761139db53b752c4f73de54dc8315c6e29b70e5d11987d05b49f
MATLAB
25,196
515
% Created by A. Benitez Andonegui, M. Luehrs % Modified by A. Vorreuther %%%%% include these %%%%% % mainPath: path where all participant data is stored. assumed directory format is: % mainPath > P01 > run 1 % > run 2 % > ... % ...
a3949e0227326c8120b5b2eeec7cec4622267a43e8a3865d2ffe849881fb55fa
MATLAB
25,230
1,004
function Sim=getSim(Sim) % comments here % last change: 2014/04/02 by PS %references: % Henkelman1993 MT agar parameters % R. M. Henkelman, X. Huang, Q. S. Xiang, G. J. Stanisz, S. D. Swanson, and M. J. Bronskill, Magn Reson Med 29, 759–766 (1993). %Singh2011 gagcest and cartilage % A. Singh, M. Haris, K. Cai, V. B....
0af71fc6e1bdff6797062be9c932da65690430d5ba9e9f2187cf3846e396f234
MATLAB
25,292
706
% Script to plot Figure 5, calculate statistics reported, and save data to % Excel spreadsheets that are then imported into the Source Data file. For % saving the data for panels d and f in Source Data, there is separate % code. % Kit Longden 2023. addpath ../../src/Shared_functions/ % Data parameters frate = 6.147; ...
3bf669549a40aa30195f1ebca9d19fbb90caae5355f49e5fd690937f92f3e546
MATLAB
25,335
566
function [outSig,spikeTimings,spikeProbs, outStruct] = SBLIF_model(insig, varargin) %S-BLIF model (version 1.0.0) for electrically stimulated auditory nerve fiber % % Usage: [outSig,tSpk,Prob_blif] = SBLIF_model(insig) % % Input parameters: % insig : signal used to electrically stimulate the AN fib...
8b68e272029c56dc2600566bbdc8fdf315dfb3e25ffce5e2bd47d811366e4e99
MATLAB
25,336
655
classdef Radio % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland Stanford Junior University;...
7b65c543891fda7f2a98c4ba4357257d5d8b24b1b4b2da5d3f84e0d366296e2d
MATLAB
25,394
493
classdef ParamEstimationModel properties % Original graph if for synthetic data, for real data empty matrix graph % training and Validation samples XTrain, XVal % Struct array for the estimated graphs form structural learning % with different p...
7f12efeb5b34c007cde3bafa96d918e74483c2afecb72d437ca649744f7eb064
MATLAB
25,433
583
%% Calculates the COM for data, shuffling and TW using a bin size of time_bin_size clear all close all dpath='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; % Params pixel_size_new=1.18185; pixel_size_old=1.78211; num_clus_discr=10; N_sh=500; sf=7.73; count=0; data=load('C:\Users\xscogno\MATLAB\Flavio2\Waves\Se...
3619f898da7d7ae4cf9791ac99d86386ada5d1fec2450a08e931c282ad19f863
MATLAB
25,449
408
function plot_sleep_replay_temporal_effect(bayesian_control,rest_option,time_chunk_size,time_window) if ~isempty(bayesian_control) load('X:\BendorLab\Drobo\Lab Members\Marta\Analysis\HIPP\Chapter 2\Raw_replay_analysis\extracted_time_periods_replay_excl.mat') path = 'X:\BendorLab\Drobo\Lab Members\Marta\An...
ece9fdeacd9f8a97eeb95acbd9f9d45517927c2f41be5b3800ffbd5c6a98690d
MATLAB
25,457
726
classdef LabelLegendRoi < 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(SetAccess=private) xyData; javaLegend; bt...
8b6cb50565d9eaba14079aa380e8fcd8b731ce0228b304bef810235a84e03b78
MATLAB
25,471
590
classdef RegisterStack < handle properties (SetAccess = private) % View related properties fig % Display axes axesStack stackView axesReference referenceView axesTransform transformView % GUI control...
98b7bc084226780daa4b946a92667ad9cc75d3fca85636fad1458c29419717a9
MATLAB
25,490
704
function [VO,M] = pm_segment(VF,PG,flags) % Segment an MR image into Gray, White & CSF. % % FORMAT VO = pm_segment(PF,PG,flags) % PF - name(s) of image(s) to segment (must have same dimensions). % PG - name(s) of template image(s) for realignment. % - or a 4x4 transformation matrix which maps from the image...
f90cfe77fff288cf89ae6d0c9ed9f6a78842b71494fb1432dc5e0ed31dcbd5c3
MATLAB
25,497
469
%makeData2struct_allVars.m clc; clear all; close all; % recording parameters fs = 20000; totalTime = 300; %sec numIts = totalTime*fs; totalElecs = 64; % *** change each time! *** % % chooseData = 0; %glu only % chooseData = 1; %BDNF dose response chooseData = 2; %glu injury + BDNF recovery % *** change e...
c05b60f6c3c30564fab6686c7abb57e2b2f03be9fb916516e7400017c0485329
MATLAB
25,517
827
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...
25012314a4daabd5ad2c3c41ed6b2c2d8e063fbb2d31406cb093c648059624a0
MATLAB
25,526
630
%% Script to visualize data % Works for both actual and simulated results %% User settings num_replicates = 1000; update_confusion_matrix_for_each_trial = false; pause_length = 0.05; pvalue_threshold = 0.05; rolling_window_size = NaN; % If NaN, then won't use a rolling widnow. %% Define some useful things combin...
4331c5676b0bc2c65f811ce335b58f5c0b32f754ef31985159d2ac517481f810
MATLAB
25,526
573
%% Script to create output for Fig. 4 - parameter comparisons between Young, healthy Elderly, MCI combined % Zilong Ji, UCL, 2022 zilong.ji@ucl.ac.uk % Fits the model on all of the groups and run a two-way Anova % (group*condition) on Young Controls, Elderly Controls and MCI % Output: for each parameter fitted by the m...
eee123681b6d2c9e838da698ae007355e0dfc015838dc0640247b3160d1efe54
MATLAB
25,575
709
classdef Hermaphrodite %HERMAPHRODITE Hermaphrodite related data. methods (Static) %% Utility functions. function is_neuron = isNeuron(name) %ISNEURON Is this a neuron name? is_neuron = ... ~isempty(find(strcmp(name, Neurons.Hermaphrodite.getNeurons()),1)...
9b3554473a818af7e1018692bc75bc898317ad15620d7c426f853d2ac3594553
MATLAB
25,624
453
function normalise = spm_cfg_normalise % SPM Configuration file for toolbox 'Old Normalise' %__________________________________________________________________________ % Copyright (C) 2005-2012 Wellcome Trust Centre for Neuroimaging % $Id: spm_cfg_normalise.m 7155 2017-08-17 10:55:05Z john $ if ~isdeployed, addpath(f...
1033e721bd8303e2036e1155ca2097f9a0b62435148a758e6a9b3ccd5fdf102d
MATLAB
25,626
508
% main script for analyzing micro-electrode array (MEA) data %%%%%%%%%%%%%% % 5/12/2016 combined this main function with GetSpikePoints for feeding %%% % into WaveClus analysis. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 6/16/2021 needed to change the way the raw data was accessed: this %%%%%% % version (_...
3cbeba5644b8db84086092dac243b846505b7b1e74aaf9db4e9c1dec66d2e910
MATLAB
25,737
597
classdef RegisterStack < handle properties (SetAccess = private) % View related properties fig % Display axes axesStack stackView axesReference referenceView axesTransform transformView % GUI control...
614da837590a9e43a99362b99bd2df161d5b941028d329c5d48425e4a212cfcc
MATLAB
25,821
511
% Created by A. Benitez Andonegui, M. Luehrs % Modified by A. Vorreuther %%%%% include these %%%%% % mainPath: path where all participant data is stored. assumed directory format is: % mainPath > P01 > run 1 % > run 2 % > ... % ...
83e5f80c83cdb4a2b1e2a47f2a65df143c04b3614c177f9079c09f16db9ca598
MATLAB
25,861
732
%EXPORT_FIG Exports figures suitable for publication % % Examples: % im = export_fig % [im alpha] = export_fig % export_fig filename % export_fig filename -format1 -format2 % export_fig ... -nocrop % export_fig ... -native % export_fig ... -m<val> % export_fig ... -r<val> % export_fig ... -a<val> % ...
859d690d00e8b3d835f01092ea532c69aedbe8917ec8b421037c938c875e96bc
MATLAB
25,923
511
function population_vector_analysis(computer,bayesian_option,plotting_option,save_option) % Marta Huelin_January 2020 % Computes population vectors for each track exposure (taking raw firing rate from bayesian place fields) and computes correlation between % different tracks. Plots correlations as cumulative frequency...
890e019accc3970b54eeb5bfa8f4aca20a7039c4afd7a4bac7aa8960fa8ef96c
MATLAB
25,977
672
classdef UMAP_extra_results < handle % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland Stanf...
8dd65486cf301f961f487d1f993cbded6ea2ef458658eecb447195a6749d5e7d
MATLAB
26,020
1,228
% Code responsible for generated the behavior data displayed in "Ciliary % localization of a light activated neuronal GPCR shapes behavior", PNAS, % 2023 % Written and annotated by Amy Winans % Notes: % 1) It is recommended to run this script section by section in order. The % first section generates the workspace t...
face57d9d03dc3db8a1e30d37c54020a1a7bf41ec0a4f535609095d688ed88e2
MATLAB
26,060
417
function plot_diff_cum_replay_periods(epoch,bayesian_control) % Plots difference in number of cumulative replay events between trackd over sleep periods for each protocol. % Histogram is calculated as the sum of cumulative replay event times across tracks & each experiment (always within a protcol), % and averaged (div...
d4a9bbe794bf5a8fe5734c8f1cc9c18ae7b76097f84fc50a540ffed04b7c7f38
MATLAB
26,137
638
%% indicate variables tic for iSubj = 1 disp(iSubj) clearvars -except iSubj close all; subj_list = {'39' '44' '57' '63' '66' '84' '85' '87'}; subj = subj_list{iSubj} % adjust theses removeERP = 'yes'; cue_responsive = 'yes'; lock = 'onset'; % 'response' %'...
57bd2cad9e7917e96201c512faf8730d7d2266b841eb6d2a93d6d1f31819c4fc
MATLAB
26,153
505
function firing_rate_population_vector_analysis(computer,bayesian_option,save_option) % Marta Huelin_February 2020 % Computes a variation of population vector analysis between matrices for the same type of comparisons used in the population_vector_analysis.m code (meaning, % between same track exposures and between dif...
9d575b04ea1819ef8d96dd9b1c1c6c73009fb71e9e171fc999be6acfde7b2465
MATLAB
26,159
729
%% Figure 3e & f (right 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', 'OSL...
df5cd15ce95e30461434e7482d56d7944b2988e14b42315b92fe6ab9b059198e
MATLAB
26,201
424
function replayBG(modality, data, BW, scenario, saveName, varargin) % function replayBG(modality, data, BW, scenario, saveName, varargin) % Core function of ReplayBG. Can be used to identify ReplayBG model on the % given data or to "replay" specific scenarios specified by the given data. % % Inputs: % - modality: (r...
5238ca3f4cef7db7a49c2db1b806a4e6c5a8ff1ec5e8e672d47bf30623779d86
MATLAB
26,348
597
function analyze_SI_unimodal_Fig4_Sfig7 rootdir = 'C:\TKlab_agingPFC\'; cd(rootdir) load SI_unimodal figure( ... 'Position', [0 100 1450 550], ... 'PaperOrientation', 'landscape', ... 'PaperUnit', 'inches', ... 'PaperPosition', [0 3 ...
c455e5df9d44769fc91e461066695442288341cb039acb03e450c6076e554ba5
MATLAB
26,352
672
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...
7a20998062f0e79bcb61ecd4751899de20ff5f092a85f449fae892f6a5a314e4
MATLAB
26,387
934
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...
f3f4d99eddda0f435ad0e94ca1079fb806db605d62058f0570ba85f4a8dca360
MATLAB
26,610
891
classdef StringArray < handle % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland Stanford Jun...
d770659b6276df64c5949cff1bd0d49e20df0bafe37f828e1654925966c95335
MATLAB
26,637
612
function initWindow(screenNum, rotation) % Initializes a Window for displaying stimuli using the OTBR Toolbox. % The function initWindow optionally takes the display number as argument % to place the stimulus window on the correct monitor. % % Tip: When testing the toolbox it is helpful to use two monitors % (one for c...
6ca6a222151fb07d8011e119f72226e3e15188da77395d7b0462626cd177defe
MATLAB
26,686
686
clear all; close all; clc tic subj = '87' % 84, 85, 87 lock = 'onset' downsample = 'yes' ref = 'LM'%'WM' 'LM'[]; clinical = 'yes' select_chan = 3 % 1: get specified chans indicated by chan_name 3: gets all chans normalization = 3% 1 = entire task 2 = prestim norm = {'entire_recording' 'prestim' 'cond_spec_prestim'}...
50208e2a78a92ff7df5313b58b1980a6ac6da81924ca07550a9f1d4e2cbcef00
MATLAB
26,701
613
timelockCondition = 'buttonPress'; reference = 'LMRM'; csdFlag = 0; rtFlag = 0; baseline = 0; faFlag = 1; subjectList = [16, 18:21, 24, 26, 27, 28, 29, 31, 33, 34, 35, 42, 43, 47, 50, 51, 52, 54, 55, 57, 58]; %subjectList = [58]; numberSubjects = length(subjectList); options = continuous_RDK_set_options('iMac'); fo...
0c5121aeb4decd9cf13762765aeaedbdbfdce4e681ae3c1cd7b269568282ee40
MATLAB
26,732
621
%% Script to create output for Fig. 4 - parameter comparisons between MCI positive and MCI negative % Zilong Ji, UCL, 2022 zilong.ji@ucl.ac.uk % Fits the model on all of the groups and run a two-way Anova % (group*condition) on MCI positive and MCI negative % Output: for each parameter fitted by the model output one bo...
9ee3b7b9161571f0b395018f092993f698cc0986c407a7852bfb60b5d5afd617
MATLAB
26,760
829
%% Load data 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\xs...
e73a5e8f9d7e54532c1509e1824108db4e1664b0d2e4025e52dabbeabdcc3823
MATLAB
26,763
689
%% Correlation VS distance on tissue and distance on ring clear all 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\Flavio2\Preprocesse...
7cc484558757071e0cb40d5b5b4beb698cc0397d4bbcc23e8474eb4be36e78a2
MATLAB
26,823
484
function DK_NNLS(T2Data, matmask, Resol, TE, TR, T2Range, spwin, nT2, nCores, nThreads, FAE_in_fin_step, RegType, nSpatIter, Size_DSW, Overlap_DSW, SpatRegOpt, SpatRegSetAlpha, SpatReg_Init_FA, SpatReg_Init_T2) % clear DataFolder DataFileName WOR MaskFileName Spatial_ProcessMode RegTag1 MatPriorityTag Capsule1 muS...
8588a1a5cae217382cdac170671269684a437a0971d4df4ce90177ccc495cbab
MATLAB
26,836
643
function [synthFlys,state,nTurn,spdAll,curvAll,phiAll,dSpk,allAng,lambda_CW,... lambda_Stop,dfSmooth,fSmooth,tt_baseline] = RunAndTumbleKNNLinFilter(self,params) % get basic parameters originalFs = self.fs; fs = params.LLFfs; len = ceil(params.len*params.LLFfs/params.fs); totFly = params.totFly; posInit = params.po...
fab67349e171560e4565dcd3f7095e31aeea383884446d992498cbdd347184a9
MATLAB
26,856
560
% % 01-02-2019 % % Elias Scheer % % % % with tracking some code copied from % % \MATLAB2016b\toolbox\vision\visiondemos\multiObjectTracking.m % % and from Ev Yemini's segWorm_stuff\ComputerVision functions for % % segmentation % objective: track worms as they hang out in lawns of bacteria and % occasionally leave. ext...
c771b9e0c504a6dc8df11f651a6ac5fad30be2f4b46aa05a9d87a0a07b67c5cb
MATLAB
26,877
761
classdef Male %MALE Male related data. methods (Static) %% Utility functions. function is_neuron = isNeuron(name) %ISNEURON Is this a neuron name? is_neuron = ... ~isempty(find(strcmp(name, Neurons.Male.getNeurons()),1)); end function is_...
b50f7277f14d725045e5b4046f59836e600ac19d8889ab5c6b292f6327c6cab4
MATLAB
26,914
599
function [D] = spm_eeg_review_uis(D,objects) % GUI of the M/EEG Review facility %__________________________________________________________________________ % Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging % Jean Daunizeau % $Id: spm_eeg_review_uis.m 6070 2014-06-26 20:53:39Z guillaume $ % POS = get(D.PSD.h...
cbf20c09195247e710ac2195facf83a9956dda6645dd59cdeb7cfbe05c73f7e9
MATLAB
26,974
589
function spm_image(action,varargin) % Image and header display % FORMAT spm_image % FORMAT spm_image('Display',fname) %__________________________________________________________________________ % % spm_image is an interactive facility that allows orthogonal sections from % an image volume to be displayed. Clicking the...
a335b33aabc8e9089702e099023cdecb0d05cf0c3d8402e371d3e575e74c02ee
MATLAB
27,000
526
% fixMontage.m % % Purpose: % Fix montage of PSG data based on information from the accessory files (ie xml). % Usually this is needed to build the correct referential montage, or to filter signals. % This step is needed for compumedics edf files, which are stored as unreferenced channels. % % Usage: % [MINFO,MTS]=fi...
b4312ba8b91f6ee45b0fd2461f13ecd98a04d8f3879989e7c1d431f755100cd3
MATLAB
27,035
491
function DK_nii_NNLS(T2Data, matmask, Resol, TE, TR, T2Range, spwin, nT2, nCores, nThreads, FAE_in_fin_step, RegType, nSpatIter, Size_DSW, Overlap_DSW, SpatRegOpt, SpatRegSetAlpha, SpatReg_Init_FA, SpatReg_Init_T2) % clear DataFolder DataFileName WOR MaskFileName Spatial_ProcessMode RegTag1 MatPriorityTag Capsule1...
35852de9371258c20e5e673003b30ec74334ff983d063336f524ca76291536bc
MATLAB
27,128
944
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...
2e114fa45adff06c20a038e461e20f4b165d17acfd4096c4bc94dc66a93b7958
MATLAB
27,233
695
function [idx, C, sumD, D] = kmeans(X, k, varargin) %KMEANS K-means clustering. % IDX = KMEANS(X, K) partitions the points in the N-by-P data matrix % X into K clusters. This partition minimizes the sum, over all % clusters, of the within-cluster sums of point-to-cluster-centroid % distances. Rows of X corres...
938dd935d9e3e654f00b1123587ecb5dae9f5cd67024a0e2e06490b3d6395d79
MATLAB
27,241
695
function [idx, C, sumD, D] = mymatlabkmeans(X, k, varargin) %KMEANS K-means clustering. % IDX = KMEANS(X, K) partitions the points in the N-by-P data matrix % X into K clusters. This partition minimizes the sum, over all % clusters, of the within-cluster sums of point-to-cluster-centroid % distances. Rows of ...
5b395d64331ca88732f719db93ae45911ad136a9e345d42a96a981189fb11bb2
MATLAB
27,243
873
function spm_dcm_peb_review(PEB, DCM) % Review tool for DCM PEB models % FORMAT spm_dcm_peb_review(PEB,DCM) % % PEB - PEB model to review % DCM - (Optional) A single DCM or cell array of DCMs. Data is used to % enhance the GUI. % %__________________________________________________________________________ % Copyr...
7dcbb0483a1937893afea1363a08cf213f1c861b052c11416da2a0602ae86f57
MATLAB
27,250
744
function mondichNRexpt % normalization reweighting experiment with mon and dichoptic presentation % code based on surround suppression experiment from 2014 % this version for ViewPixx, 36 pix/cm dot pitch % four conditions - 5Hz component, 7Hz component, both mon, dichoptic % DHB 1/3/20 clear close all; pID = inputd...
57ec2879ea448e39751f83e18f0ad70096dd4b6445cbdeb1073e876bae52d36a
MATLAB
27,251
579
classdef PhysioData < dynamicprops properties % comments % comments structure inputfile % record_meta % record meta data % channel_meta % stimchans % cell array of stim channel records % toffset % vector of length record_meta ecg % raw ecg sign...
02d944343998ad05b2849681dfbbf1e4121be1174fde54e5487b78993636ecca
MATLAB
27,352
619
function plot_theta_vs_replay_backup(bayesian_control,rest_option,time_chunk_size) if ~isempty(bayesian_control) path = 'X:\BendorLab\Drobo\Lab Members\Marta\Analysis\HIPP\Chapter 2\Raw_replay_analysis\Bayesian Controls\Only first exposure'; path2 = 'X:\BendorLab\Drobo\Lab Members\Marta\Analysis\HIPP\Chapter 2\Ra...
ce15b803a323dcaa8084a663135aef894d3f42dac183f86a60ce8f753b8354a7
MATLAB
27,400
563
function dishRig4() % Etho View Protocol % Rev. Jun 06 2012 % Mar 01 2013: New protocols (appear suddenly & grow nearby). % Mar 06 2013: Further modified. % Dec 08 2014: Color of the dot changed from brown to grey. %%% =========== CONSTANTS AND PARAMETERS ================= screenDim = [1024 768]; % Vertical tankR = ...
10b756a3831af04cc2e4271f18fbf03bd17aa96611e0a1fecc26fcc998c0a73d
MATLAB
27,425
575
% Script to plot Figure 3, 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/ % Load isoluminance crossing points (cp) responses to opposing motion % ---------------------------------------------...
a8ed24eff0a07714f75026d2b68be89837084748fe9d13c338d749e5586a15cc
MATLAB
27,531
463
% Script to save Figure 5d data to Excel spreadsheets that are then % imported into the Source Data file. % Kit Longden 2023. % Data parameters frate = 6.147; N_frames = 47; dt = 1/frate; t = (0:dt:dt*(N_frames-1))-3; % Load data that is plotted in Figure 5d load ../../results/Figure_5/Medulla_cells_looming_UV_disc...
378cbd6ccb049f258fde37329255876df60f6a817ea41583c0d875678f3fdcf4
MATLAB
27,602
446
% Plot single cell correlation between laps between exposures % Marta Huelin % Loads extracted data for each protocol session and for all rats, and calculates the difference in specific parameters (e.g. centre of mass) % between the last laps of the first exposure and each lap in the second exposure. % INPUT: % 'pa...
363544a2f991c4d45a20494bd0af9747dd3e936b31268817940bf486c58f5faa
MATLAB
27,696
295
% DECODING ERROR FOR BAYESIAN DECODING % Marta Huelin_2019 % Calculates decoding error between real position and the bayesian decoded position. % INPUTS: % estimated_position: structure witht the matrix and information of the position decoded. % place_fields: structure. place fields as a template for decoding...
266ba976e7a8aa34b1cded39f8d53a028ae525d5cacb659440294a524c915184
MATLAB
27,700
717
function [idx, C, sumD, D] = weightedkmeans(X, k, varargin) %KMEANS K-means clustering. % IDX = KMEANS(X, K) partitions the points in the N-by-P data matrix % X into K clusters. This partition minimizes the sum, over all % clusters, of the within-cluster sums of point-to-cluster-centroid % distances. Rows of ...
d06c472b976e554623578b3f7e0c152a32b289da40d429bce285d78a5f24e47f
MATLAB
27,789
455
% Plot single cell correlation between laps between exposures % Marta Huelin % Loads extracted data for each protocol session and for all rats, and calculates the difference in specific parameters (e.g. centre of mass) % between the laps 13 to 16 from the re-exposure and each lap in the first exposure. % INPUT: % '...
db58f72edb9f31e788915f4a4a37b8063d745e662703bde3b4d228645f67f233
MATLAB
27,870
667
% PLOT AWAKE REPLAY PROPERTIES ON TRACK % MH 2021 % Extracts and plots information about each awake replay event on track - duration, % bayesian bias (loaded) % Protocol structure loaded is as follows: each row is a protocol (e.g. protocol(x)) and each column contains information about replay events on % each track (e...
6c647292827927143dab390ab2439de7c6b462b704ff7a0d046347d4e3b4723b
MATLAB
28,007
770
function [D] = spm_eeg_review_switchDisplay(D) % Switch between displays in the M/EEG Review facility %__________________________________________________________________________ % Copyright (C) 2008-2015 Wellcome Trust Centre for Neuroimaging % Jean Daunizeau % $Id: spm_eeg_review_switchDisplay.m 7221 2017-11-16 14:25...
49fdbbb82ec33e540060dc4673bb2cda635782951f2439bb2e7578671a8cc78b
MATLAB
28,021
628
function [idxbest, Cbest, sumDbest, Dbest] = fun_kmeans2(X, k, distance,... emptyact, reps, start,Xmins,Xmaxs,CC,online,... display, maxit,useParallel, RNGscheme,... wasnan,hadNaNs,varargin) % KMEANS uses a two-phase iterative algorithm to minimize the sum...
63ee28198b2de1a1233c71c58574c86098631e1328c3a499a9ba76e6208c9b3a
MATLAB
28,028
479
% function MAP_generate_maps %% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION % MAP_generate_maps script to analyse data for: % Grieves et al. (2020) Quantification of firing rate map procedures % This script is dependent on graphtest for inputs and data % % USAGE: % MAP_generat...
6a8d28f2786963de186b5813bee1e41cfe004475162c33bdabdd26df5bfe7016
MATLAB
28,066
817
function out = spm_deformations(job) % Various deformation field utilities % FORMAT out = spm_deformations(job) % job - a job created via spm_cfg_deformations.m % out - a struct with fields % .def - file name of created deformation field % .warped - file names of warped images % % See spm_cfg_deformation...
2391ed5ed19da98fd2a6a5e2a2b8be152b88577e62f903f24ff9188bef6f5ddb
MATLAB
28,115
973
function pot = potential_fun(ptype, delta, param, varargin) %function pot = potential_fun(ptype, delta, param, varargin) %| %| Define roughness penalty potential functions (as strum). %| %| The penalty will have the form %| R(x) = sum_k w_k * potential_k([Cx]_k, delta_k) %| where w_k is provided elsewhere, not here! %...
b2b0af793296dba4bf80800d9f684f554d0f27d9ec1ec0132d6f9c177cdb5d3b
MATLAB
28,204
954
% this script takes behavioural data created with step_1_read_in_behav_data % and calculates integration kernels leading up to a button press and % fitting an exponential to it %% add paths addpath(genpath('/Users/maria/Documents/Matlab/cbrewer')) addpath('/Users/maria/Documents/MATLAB/raacampbell-shadedErrorBar-9b19a...
e5cf5f0cab7b09e38e313eb0e9ce78897e1b02ab095190fe12c4acf69fe74345
MATLAB
28,315
748
% % This code reproduce the main results of the article 'The evolution of % information transmission in mammalian brain networks' - Alessandra % Griffa, Mathieu Mach, Julien Dedelley, Daniel Gutierrez-Barragan, % Alessandro Gozzi, Gilles Allali, Joanes Grandjean, Dimitri Van De Ville, % Enrico Amico. % % % Alessandr...
37982017d5b94a71b1e9097825a56d6d2b3d4c1a6a282ac4c427740f34c2b1e9
MATLAB
28,333
521
function [sig_cells,areasSternberg] = NWB_calcSelective_SB(nwbAll, all_units, params) %NWB_CALCSELECTIVE Takes the output of NWB_SB_extractUnits and runs %selectivity tests for the sternberg task. Optionally plots trial aligned %spikes if isfield(params,'rateFilter') && params.rateFilter > 0 rateFilter = par...
49c8149d263ab150b81f299aecf66f7f23ddf6b8ba54a9ede6d050b96c1bc18d
MATLAB
28,421
719
classdef SuhJsonSplitter<SuhModalSplitter % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland S...