sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
5d4d1f0739e0a418b4529de864e81502a1af9c8ad2e8046e5d77e19bcf263195
MATLAB
4,856
153
% function [results] = figureS1_item(data_dir, id, data, read_from_xlsx) % this function creates full rasterplots for item cells % % INPUTS: % data_dir (str): path to source_data directory % id (int): 1 or 2, since there are 2 units of each type % (responding to items or location...
63e5f7704bd4993e3696e37a113d99321b854f4680da7b56288b91a2543f95b5
MATLAB
4,858
180
%fig7_HR_diffs_highFR_synthetic.m %% clear all; close all; clc; warning('on','all') scriptdirs = {pwd; '..\..\plot'; '..\..\analyze'; '..\..\helper_functions'}; addpath(scriptdirs{:}) datadir = pwd; ssfile = 'subsample1000_highFR_stdRP.mat'; sspath = fullfile(datadir,ssfile); %% fprintf('loading %s\n',sspath) ...
350e2a9ca57527ab8aeb04010567098b067db0785c884803f36939970903f051
MATLAB
4,859
180
%figS3_FA_diffs_highFR_synthetic.m %% clear all; close all; clc; warning('on','all') scriptdirs = {pwd; '..\..\plot'; '..\..\analyze'; '..\..\helper_functions'}; addpath(scriptdirs{:}) datadir = pwd; ssfile = 'subsample1000_highFR_stdRP.mat'; sspath = fullfile(datadir,ssfile); %% fprintf('loading %s\n',sspath)...
cce422505558d69a7ea4658ca26825ddb970e2e8b5ae5213bed45246288addae
MATLAB
4,860
166
function [psd_out] = interevent_residual_psd(src_spk,start_events,end_events,boundSpec,psdopt) poolobj = gcp; resopt.oneModel = optCheck(psdopt,'oneModel',true,[true false]); resopt.concatWins = false; win_len_msec = psdopt.win_len_msec; psd_out.win_len_msec = win_len_msec; min_oscil_spk = psdopt.min_oscil_spk; psd...
48de4267f96e94f738ff98654b1a668e9569ff4fe9ace6ca1cffcd16e6b32688
MATLAB
4,862
75
function Tracks = find_stereotyped_behaviors(Tracks, L, xx, velocity_based_behavior_edges, parameters) %enforces the constraint that stereotyped behaviors have stay in a %watershed region for more than 0.5 seconds in order for it to count % velocity_cutoff = 27; %% need to load in value velocity_cu...
32fac45e50e30a086b72652834e88ec0db43b9c341da9877609c42fb017b5f00
MATLAB
4,863
137
% This script computes tissue mesh intersections with the YZ plane % (saggital plane) located at X=0 or elsewhere, displays and saves the % result % % Copyright SNM 2012-2018 % The Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General % Hospital & ECE Dept., Worcester Polytechnic ...
0da74620fd821172737e5a7ece06682548bf4e9171b4f2075d3d7bc8b5e5e5f8
MATLAB
4,865
151
% ---------------------------------------------------------------- % Load Dataset % ---------------------------------------------------------------- unzip datasetImages.zip data = load('vehicleDatasetGroundTruth.mat'); vehicleDataset = data.vehicleDataset; rng(0) shuffledIndices = randperm(height(vehicleDataset)); id...
8b3ab0f8e9119cb26b8d0b5353e478d966aef37b92c3d998ecbcca6ac7e78da3
MATLAB
4,865
160
% cfsWriteRL.m % an example of writing a cfs file for data as RL4, RL8 % must have cfs32.dll in system directory % calls matcfs32.dll % note: this is by far the easiest way to write from Matlab % stays in native format, not problems with Y scaling (or offset) % 20.02.09: JGC initial version % 24.02.09...
ac071c1144dcc8846db4a128a4389766fb3005b47e0c17467c78049269aeda4a
MATLAB
4,865
147
% Written by Léa Ripoll % Quantifies the background subtracted fluorescence at segmented endosomes broot = cd; parentfile = dir; for i = 3:size(parentfile,1) if parentfile(i).isdir %if directory, get in it cd([broot,'/',parentfile(i).name]) final = {'File name','Fluo cell','Fluo endosomes','Enrichme...
ef4c525f5cca8a3e042e70d6ed0237d8d2cac994c701c5f2bd54a671f1ca962b
MATLAB
4,871
150
function LDR = openldr(FN,PERMISSION,Mode,arg4,arg5,arg6) % OPENLDR loads neuroscan LDR files % LDR = OPENLDR(Filename [, PERMISSION [, Mode]]); % LDR = OPENLDR(LDR [, PERMISSION [, Mode]]); % % LDR is a struct with the following fields % LDR.FileName Name of LDR-file % LDR.Label_Out Labels of output channels % ...
4098b4a7c82d6fd463b8613a3796059b1c5dd597233e95b55f2a3113ded63965
MATLAB
4,872
180
%fig5_HR_diffs_primary_synthetic.m %% clear all; close all; clc; warning('on','all') scriptdirs = {pwd; '..\..\plot'; '..\..\analyze'; '..\..\helper_functions'}; addpath(scriptdirs{:}) datadir = pwd; ssfile = 'subsample1000_stdFR_stdRP.mat'; sspath = fullfile(datadir,ssfile); %% fprintf('loading %s\n',sspath) ...
e3dd865143bf4eddc6a2de7bc02a64325cedbdbf1a8625c99dbbae02de448600
MATLAB
4,872
166
%% Script for NB propagation in the different configurations %% % attenzione non da worning su nomi %% Set up iniziale % nbins=100; clear close all binwidth = 1; Involved_Beads_18_all = []; %da cambiare manualmente per ora per ogni configurazione (seleziona tutti e modifica) NearestInvolved_Beads_18_all = []; %d...
766539b1436cdde9419f75503952b41cb650d192985f7d4393977bed1baedbec
MATLAB
4,873
180
%fig6_FA_diffs_primary_synthetic.m %% clear all; close all; clc; warning('on','all') scriptdirs = {pwd; '..\..\plot'; '..\..\analyze'; '..\..\helper_functions'}; addpath(scriptdirs{:}) datadir = pwd; ssfile = 'subsample1000_stdFR_stdRP.mat'; sspath = fullfile(datadir,ssfile); %% fprintf('loading %s\n',sspath) ...
c36b27193e5b9b1e3ad7152285b76a79a6d716f663b2671e1e69ebcca71fc3b5
MATLAB
4,875
186
function [] = ExtDataFig03_AveTimeCourseSongTrans() % Code for plotting calcium signals and song probabilities during song type transitions in Extended Data Fig. 3d,k. GT = 'dPR1'; % Extended Data Fig. 3d % GT = 'TN1SG'; % Extended Data Fig. 3k selpath = ['../Data/Summary_',GT,'/']; load([selpath,'Transitions']) %% ...
d89cc752cf93dc44f9d091b02c21aaa8903f898aa749e8d769566cc87e78c24c
MATLAB
4,875
150
% selectDroppedFicTrac.m % % Function to manually select times in experiment where FicTrac was not % tracking the ball. Loads FicTrac data from pData file. Saves back into % same pData file. % % Adapted from function of same name in 2PAnalysisCode-Helen % % INPUT: % none, but user selects trial folder to process %...
c148b910e4cf865174e4bd9b7881c97b898b71b287b88e8927bb8aee1c721ffe
MATLAB
4,879
186
function [] = ExtDataFig03_Example_TimeCourseRaw_dPR1_IsolatedSong() % Code for plotting the example trace in Extended Data Fig. 3p. GT = 'dPR1'; Target_FileID = 2; Target_ROI = 1; Target_Trial = 1; FileID = Target_FileID; %% parameters Thre_pulse = 0.1; Thre_sine = 0.6; RecDur = 190; DownSampleRate = 10; nTrials ...
95f01e1bf19f83d5906fed293bac8836146c175693ef4b8f7b3b44b78517078f
MATLAB
4,880
87
function [EC] = meshneighborints_2(P, t, normals, Area, Center, RnumberE, ineighborE, numThreads) % Accurate integration for electric field/electric potential on neighbor facets % Copyright WAW 2020 N = size(t, 1); integralxc = zeros(RnumberE, N); % center-point Ex integrals for array of neighbor ...
ccb63b5210461cad8f39284d4d58d1a8c6cec0586659d5d4b2482523b45931f8
MATLAB
4,884
123
function [rmin_sol, set_rm_SA, VR_sizes] = ... SA_func_d2soz(w_use, rec_set, cost1) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % If you use this code, then please cite: % 1.- Ana P. Millan, et al. "Individualized epidemic spreading models % predict epilepsy surgery outcomes: a pseudo-prospecti...
c13f0476e0e63919fcacfb3971c33ef20e46993d2686e3747086c954834f85b3
MATLAB
4,885
152
%% LOAD if ismac load('/Volumes/Runyan2/Christian/Processed Data/Event Analysis/standard_ds_onsets.mat') else load('Y:\Christian\Processed Data\Event Analysis\standard_ds_onsets.mat'); end %% PARAMETERS ds=1:12; conditions = {'SOM', 'PV','Mixed'}; Np=3; %%number of conditions? Nsample=length(ds); % 10 sam...
02c88f9b83e82f0d3ee42f486548ad0b1ecdfcfb98466d299ac5880efa6c05b6
MATLAB
4,892
117
%%% demo of the full MIN1PIPE %%% clear warning off gcp; % To disable parallel processing, change "parfor" to "for", and change "min1pipe_h5_vary_nopar" to "min1pipe_h5_vary" min1pipe_init; addpath(genpath('../ANE')) %% Set data and folder scale_lowBG = 5e3; scale_noise = 1; data_name = sprintf('lowBG=%.0e,poisson=%g...
af8749d9eed190d3b9e08ff67d477af3b515c09fdf62b84faa9878c8cc78f3a6
MATLAB
4,893
146
% taskTemplateSeglenPrecompute.m % % $Id: taskTemplateSeglenPrecompute.m 835 2010-06-29 04:04:08Z justin $ % usage: taskTemplateSeglenPrecompute % by: justin gardner % date: 09/25/2013 % copyright: (c) 2006 Justin Gardner (GPL see mgl/COPYING) % purpose: example program to show how to use...
5a774e2bb2937e22c4b035316560870d1ce340dbba9377fce77071e1cc127ef7
MATLAB
4,899
139
% data_name = 'lowBG=5e+03,poisson=1'; % dir_SUNS_sub = fullfile('SUNS_TUnCaT_SF25','4816[1]th4'); addpath(genpath('.')) gcp; %% num_Exp = 10; list_Exp_ID = arrayfun(@(x) ['sim_',num2str(x)],0:(num_Exp-1), 'UniformOutput',false); rate_hz = 10; % frame rate of each video avg_radius = 6; r_bg_ratio = 3; leng = r_bg_rat...
563b9f57b00560cf1d6e7c51ce823e486462febe5fae78dfbbbd54fbcedc8f58
MATLAB
4,901
111
function [wmlMat,trainFit,testFit]=fitData2FoldMAPRidge(dspec,parametrizationParms,numNeuron,modelVars,wInit,k,numFolds,factor,rho) % k=0 means fit all trials, no test dataset is created numTrials=length(dspec.expt.trial); dt=dspec.expt.binSize/1000; if k>0 sections=numFolds*factor; edges=(round(linspace(1,numTr...
799563dc68c4387163441759ff9a6bbe3a57918a7e1ff1d5663c57b532e9f883
MATLAB
4,901
81
function Track = labview_track_to_matlab_track(Track, timestamps, decoded_camera_frames) % converts a labview track to a matlab track by interpolating between % dropped tracking frames. Ensure the first dimension is matching % frames Track.WormIndex = Track.WormIndex + 1; %change to matlab indexing...
ff5a1b93bd44cadf8f881f2ee0731a55b4c80c817114c7cd2fac0a7e408e3d9c
MATLAB
4,904
112
%% Script to merge regional brain maps of empirical centile/effect sizes %% with each regional brain map of their respective significant regions and %% predicted centiles/effect sizes into separate figures % Copyright (C) 2023 University of Seville % Written by Natalia García San Martín (ngarcia1@us.es) % ...
3e31f25fcba84e1dde231b134fd4155d161a7705d890a10a0c47680d68c650ae
MATLAB
4,908
106
clc, clear close all %% this file is used to generate NAOMi1p data % last update: 5/29/2022. YZ %% add path installNAOMi1p %% load pre-defined data % pre-defined configuration file for RUSH RUSH_ai148d_config %% RUSH 148d config FOV_sz = 600;% FOV, um nt = 1000; % frames fn = 10; % frame rate pavg = 0.5; %mW per ...
1cfcd9b76ee77b24a0ab2956f9d41eae3cc464d0195e8116651904ea93fd97e0
MATLAB
4,918
142
function [G_prime, M_class,class_size] = training_optimal_space(TrainBatch) % gets the training batch and find the optimal space % % [G_PRIME, M_CLASS,CLASS_SIZE] = TRAINING_OPTIMAL_SPACE(TRAINBATCH) gets % the training set TRAINBATCH, trains the DLD classifier and returns the % projection matrices G_PRIME, cent...
e8afc00675822d36cd4b8f80bc3735766b69dafc9e7d6a9c73d830db328ae856
MATLAB
4,919
139
% This script computes tissue mesh intersections with the XZ plane % (coronal plane) located at Y=0 or elsewhere, displays and saves the % result % % Copyright SNM 2012-2018 % The Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General % Hospital & ECE Dept., Worcester Polytechnic I...
63a341f6d3edf58f0b4605e5ab27a922be70dcbc6ae33654fceb925861ea2245
MATLAB
4,921
190
%{ For the specified k, find the frequency metrics for each run separately, then average across runs. This includes occurrence, dwell time, transition number, and transition probability. Adapts code from: https://github.com/trendscenter/gift Output: avg_substat.csv Frequency metrics averaged across runs for each sub...
ce9e93583f35bcf7f8f191ed75535b3d1d5906fa226b614d14c64cbec5c0d5cc
MATLAB
4,921
140
% This script computes tissue mesh intersections with the XZ plane % (coronal plane) located at Y=0 or elsewhere, displays and saves the % result % % Copyright SNM 2012-2018 % The Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General % Hospital & ECE Dept., Worcester Polytechnic I...
d9e414c5e739efb797ae90018fcfaf019f5f4aee8a7b96a36639f5fec4270f6d
MATLAB
4,921
177
%% Load Data addpath([cd,'/helper_scripts/']) load([cd,'/data/OscilloscopeData.mat'],'T2') time1 = T2(:,1)-T2(1,1); time1 = time1*(10^6) - 3.6; source1 = T2(:,3); targ1 = T2(:,2); m = min([source1(:);targ1(:)]); source1 = source1-m; targ1 = targ1-m; load([cd,'/data/experiment_LearningMaterial_V2_23-04-2...
2ae499303f818b77444424804e448b7179ab9f9c9642e1219b44466e5347c8a0
MATLAB
4,922
95
function ideals = separateIdealByCorrelation(ideals,est,cnmf,pcaica,suite2p,cuttoff) if isempty(cuttoff) cuttoff = 0.5; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Get pairings % Get pairing infor for CNMF cnmf.allpairs.strongpairs = cnmf.pairs(cnmf.corrvals>=cuttoff,:);...
314b8a077367a8b397a41e1720f827a3541473881169fed0671da841097b1db7
MATLAB
4,922
142
%% Fig. 1 Experiment 2 % Run config.m % Define number of stimulus types win.vis = 24:35; % 0.4 s to 2.0 s, 12 frames % Process data for each animal using the processAnimalData function [psth, response, visI] = processAnimalData(cell_activity_allday, stim_type_allday, trials, nanimals, nstim_type, win, threshold, n...
6c5dd49a7663855810ca306ecc48701187608e5742ac5f08fdb7bdb91c99f957
MATLAB
4,922
142
% loadTrk2PData.m % % Function that finds the .trk file corresponding to the selected pData % file(s), preprocesses the .trk data, and saves it into the pData file % Assumes that .trk file name matches pData name in date_fly#_cell#_trial# % .trk file as standard output from APT % % INPUTS: % pDataPath - full path to...
a6ee9445a96ef74e5afe6707a7b8f985e989da83ddcb4fbeb48dc77a5f348c1b
MATLAB
4,925
153
function h = vl_plotframe(frames,varargin) % VL_PLOTFRAME Plot a geometric frame % VL_PLOTFRAME(FRAME) plots the feature frame FRAME. The frame can be % either a 2D point, a circle, an oriented circle, an ellipse, or an % oriented ellipse, as follows: % % Point:: % FRAME has 2 components. FRAME(1:2) are the x,y...
5603c897ebb5546ca39632b25a732b83aca9b99dc4dac792c06a8c949968bf17
MATLAB
4,926
131
%% MAIN % Preprocesses the nirs data and saves this for each participant. % % INPUT: % - *run.mat files (contains raw nirs & motion data) % - *events.mat files (contains the events) % - participants.xlsx: table with participant demographical and clinical % info % % OUTPUT: % - *run.mat files (now also containing the pr...
36ac677dadd1eddf295914f7a5cfd8bddfeded346639ae229546eedc0c9a58f8
MATLAB
4,927
189
function [] = Fig02_AveTimeCourseSongTrans() % Code for plotting calcium signals and song probabilities during song type transitions in Fig. 2d,g. GT = 'dPR1'; % Fig. 2d % GT = 'TN1SG'; % Fig. 2g selpath = ['../Data/Summary_',GT,'/']; load([selpath,'Transitions']) %% switch GT case 'dPR1' Ylim_1 = [0 3.5...
96b847d7934ae71f6e9af87071b4be339a34842e5d9ee99f9ba0024141271956
MATLAB
4,927
123
function [hdr] = read_brainvision_vhdr(filename); % READ_BRAINVISION_VHDR reads the known items from the BrainVision EEG % header file and returns them in a structure % % Use as % hdr = read_brainvision_vhdr(filename) % % See also READ_BRAINVISION_EEG, READ_BRAINVISION_VMRK % Copyright (C) 2003, Robert Oostenveld %...
effccf476323319dc5b3fb290cf1a590bdd1180322f1ff0e6e5495c4f4ce61b4
MATLAB
4,928
170
% plotEphysKernel.m % % Function to plot kernel relating of spike rate to behavioral param % (output of computeKernelFromAutoXcorr()). Plots the autocorrelation itself as well % as the FWHM, across conditions. Plots one line/pt per cell and mean +/- % SEM across cells % Select output files through GUI % % INPUTS: %...
dd30d2f348b7b3ac5521e5f817ffef5fafa4c090c80b394f5cf278df2e7eb969
MATLAB
4,929
159
% plot_globalIBI.m % by M. Chiappalone (26 Maggio 2006) % modified by Luca Leonardo Bologna 04 June 2007 % - modified in order to handle 64 channels clr [FileName,PathName] = uigetfile('*.mat','Select a Burst Detection file'); cd (PathName) cd .. cd .. start_folder = pwd; d = dir; control = 0; for k = 3:length(d) ...
6d335c4c5c749b9843827ed084ee25c0e6a26c433d1b7e90b5e0474e138408ae
MATLAB
4,930
113
%% Script to reproduce the results of the paper %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Note: A few sessions contain simultaneous recordings from M1 and PMd. % % We define: % % Session: Behavioural session. A file that contain one set of movements % and their...
d660960adfeef868570c2e0ac04f56c629d6e6e96172b3dc61bf7c684127184f
MATLAB
4,930
103
% function [] = RFT_ROI_topoplot_indiv(numSubs,badSubs,ROI_num,five_ROI) % topoplot individual ROIs and save % numSubs = 35; %number of all subjects % badSubs = 28; %code of bad subjects % ROI_num = 5; %how many ROIs to plot % five_ROI = 2; %1-> plot all ROI_num ROI, 2-> plot only the best ROI % Load necessary data ...
51d8002256ca72e95efcbea125b16b1872908ca6ce05eece387e1fded58ee905
MATLAB
4,932
146
function script10_save_computed_disp() % Concatenate FOD and dispersion properties for all samples % % This script needs the results from script: % script09_fods_dispersion.m % and the information in the .mat files in the folder % cc_cg_labels/ % The results of this script will be saved in folder % White_matter_EM_03_D...
5f331e8a8785ccf81738a64625012363ba1fd4263147e8d15d9e46a69a43edaa
MATLAB
4,936
140
% This script computes tissue mesh intersections with the XZ plane % (coronal plane) located at Y=0 or elsewhere, displays and saves the % result % % Copyright SNM 2012-2018 % The Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General % Hospital & ECE Dept., Worcester Polytechnic I...
741cc3c9398d3d20327c665350c4b968fa3e572b06af795ef48173e96ef8e7de
MATLAB
4,937
142
function [chi_res, SB_residual, SB_regularization, chi_M] = delta2chi_SFCR(deltaB, D, maskErode, DPWeight, MagEdgePer, chiEdgePer, lambdaSet, thred, AutoRefFlag) % [chi_res, SB_residual, SB_regularization, chi_M] = delta2chi_SFCR(deltaB, D, maskErode, DPWeight, MagEdgePer, chiEdgePer, lambdaSet, thred, AutoRefFlag) % d...
f88283aae18c7930c2d0b627f115408693c4bbc3a8ce8aafaef140d1330c85e7
MATLAB
4,937
136
% extractTrialsIinj.m % % Helper function for computeLegFictracEphysIinj_1Fly() that takes in one % trial's worth of data for one parameter and divides it into reps based % on current injection % Output appends trials into cell array given as input % Has option to align position data by subtracting value at stimula...
1ddd79df17a47d248f54724f431ce8cb34c65e14bbc06fd0a0a770cb60ee58aa
MATLAB
4,941
141
% OPENSINGLE Opens a single file for analysis (Lisberger lab format) % beh = opensingle(filename) Opens the file into Hannah's dat format % including manual alignment of complex spikes % beh = opensingle(filename, loadCS) % % Hannah Payne 2012 % https://sites.google.com/a/srscicomp.com/maestro/data-analysis/...
a0d64c4e208e90662e378bf7e7574d0501ac5d7c2961f0d577e2750f5948615c
MATLAB
4,941
152
% plotOptoContStepParam_allFlies.m % % Function that takes output files from extractContStepParamsOpto_fly() and % generates a plot of the specified legStep param for each leg. Plots % mean for each fly as well as across flies. User selects one dur, one ND, % one step parameter % Select output files through GUI % %...
a87214aa47620a41d09e897c7d43d19ade15510411874346b78b44be51670286
MATLAB
4,942
189
function [] = Fig01_AveTimeCourseSongTrans() % Code for plotting calcium signals and song probabilities during song type transitions in Fig. 1i,l. GT = 'dPR1NP'; % Fig. 1i % GT = 'TN1SGNP'; % Fig. 1l selpath = ['../Data/Summary_',GT,'/']; load([selpath,'Transitions']) %% switch GT case 'dPR1NP' Ylim_1 = ...
0c064688e1ff13883e4c89b0fbe483d02f4604b73e569911028f3d97669c2919
MATLAB
4,943
137
function fleiss(x,varargin) % FLEISS: compute the Fleiss'es kappa % Fleiss'es kappa is a generalisation of Scott's pi statistic, a % statistical measure of inter-rater reliability. It is also related to % Cohen's kappa statistic. Whereas Scott's pi and Cohen's kappa work for % only two raters, Fleiss'es kappa works for...
8eec6661abbd1789d03598180d5b935bad9a8ffd635dd694511f4fd1ac1e355c
MATLAB
4,946
133
classdef FeatureExtraction < types.core.NWBDataInterface & types.untyped.GroupClass % FEATUREEXTRACTION Features, such as PC1 and PC2, that are extracted from signals stored in a SpikeEventSeries or other source. % REQUIRED PROPERTIES properties description; % REQUIRED (char) Description of features (eg, ''PC1'')...
7d14c16c17679ef317cdfbc13d4b35f8961d7054663bf3320f81a8890b1f6502
MATLAB
4,947
136
classdef OptogeneticStimulusSite < types.core.NWBContainer & types.untyped.GroupClass % OPTOGENETICSTIMULUSSITE A site of optogenetic stimulation. % REQUIRED PROPERTIES properties description; % REQUIRED (char) Description of stimulation site. excitation_lambda; % REQUIRED (single) Excitation wavelength, in n...
24962d509bdc51a69ec9c407eb235a081a17b0189c284ecdea9dea26f9deb82e
MATLAB
4,949
192
function [] = ExtDataFig05_AveTimeCourseSongTrans() % Code for plotting calcium signals and song probabilities during song type transitions in Extended Data Fig. 5j. GT = 'TN1dsx'; selpath = ['../Data/Summary_',GT,'/']; load([selpath,'Transitions']) %% switch GT case 'dPR1' Ylim_1 = [0 3.5]; Yhor...
abd8a85262db3c84d2360f63b2e7dde45473bf5579c51236eb0f34bdaa4dcfac
MATLAB
4,959
153
% plotIInjContStepParam_allFlies.m % % Function that takes output files from extractContStepParamsIInj_fly() and % generates a plot of the specified legStep param for each leg. Plots % mean for each fly as well as across flies. User selects one dur, one amp, % one step parameter % Select output files through GUI % ...
0e7cf5967a7cdd99b61f1079abb3c3dcb32e22640f6cf2e96eee955eebad5cd8
MATLAB
4,963
106
function [nodes,neur_ves] = branchGrowNodes(nodes,neur_ves,params,idx,dir) % [nodes,neur_ves] = branchGrowNodes(nodes,neur_ves,params,idx,dir) % % Function to grow surface vasculature. Given a starting node (labeled as % idx and dir), blood vessels are grown and branched with a distribution % given by the parameters ...
e4afc75871a0675230e95c54a77381b1369a56ba3f539454f69a9ff525a5902a
MATLAB
4,966
164
function V = spm_create_vol(V,varargin) % Create a volume % FORMAT V = spm_create_vol(V) % V - image volume information (see spm_vol.m) %____________________________________________________________________________ % Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging % John Ashburner % $Id: spm_create_vol.m 8776...
44c28132e97ead8c9983496cb8762e732f7cf7373c3b4035528768a3dbda09cb
MATLAB
4,967
161
% cfsWriteRL64c.m % an example of writing a cfs file for data as RL4, RL8 % must have CFS64c.dll in matlab path % calls matcfs64c.mexw64 % note: this is by far the easiest way to write from Matlab % stays in native format, not problems with Y scaling (or offset) % 20.02.09: JG Colebatch initial version ...
311e5560a466e4fd898e199fa0074f836017bb155fdcb053e30e2baf2f8c8dde
MATLAB
4,970
144
% This computes tissue mesh intersections with the XY plane % (transverse plane) located at Z=0 or elsewhere, displays and saves the % resulting window parameters % % Copyright SNM 2012-2018 % The Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General % Hospital & ECE Dept., Worc...
5f52a9ab239004f7af97f02672d2fe016a239c54aa3f74f92334825463e3a80b
MATLAB
4,977
113
function [ds_corrs,ds_ratio,ds_xct,ds_xca,ds_skew,ds_mean,ds_vect] = get_partial_correlations_ratio(ds_events,activity_length,bin_size,type,id_list) start=0; corrs=cell(3,length(ds_events)); %% count=0; ds_corrs=[]; ds_ratio=[]; ds_mean=[]; ds_vect=[]; for d = 1:12 load(['Z:\Potter et al datasets\' ds_events(d...
dad6a365345f00a469d55a96ed823b8dd17cd512addb5f4203d9116ad50d0c4a
MATLAB
4,980
137
% plotScatterPCAStepParamsEphys.m % % Function to plot scatterplot of output of savePCAinterpStepParamEphys() % Plots each turn bout set 1 PC1 vs set 2 PC1. % Select output file of savePCAinterpStepParamEphys() through GUI % % INPUTS: % datDir - path to folder containing savePCAinterpStepParam() output files % plot...
8e4658d81d80494cb853129e925ca8502fb4743d3dc42d7303c58ef7da95c37c
MATLAB
4,981
145
% mglCreateTexture.m % % $Id$ % usage: mglCreateTexture(image) % by: justin gardner % date: 04/10/06 % copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING) % purpose: Create a texture for display on the screen with mglBltTexture % image can either be grayscal...
a135cf07c0cf3e0b67584eab2bea8354d250172842576c70c3acd154a589889a
MATLAB
4,981
144
% This computes tissue mesh intersections with the XY plane % (transverse plane) located at Z=0 or elsewhere, displays and saves the % resulting window parameters % % Copyright SNM 2012-2018 % The Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General % Hospital & ECE Dept., Worc...
09f1e927245c8881770f1df095ed4547f3613960f100c389c2b2ac42d6732611
MATLAB
4,984
142
function script01_props3d(samplei) % use regionprops3 on the segmented EM samples % samplei = the index of the EM sample to analyze % % This script needs the original DeepAcson segmentations in folder % White_Matter_EM/*/ % These can be downloaded from: % https://etsin.fairdata.fi/dataset/f8ccc23a-1f1a-4c98-86b7-b6365...
201da927d9f32efeaea559ef85b3354d0fef259fa4fd1fa9bb0251feef40ff88
MATLAB
4,984
114
%% CREATE VARIABLES/ SET PARAMETERS if ismac base = '/Volumes/Runyan/Potter et al datasets/'; else base= 'Z:\Potter et al datasets\'; end datasets = {'EC1-1R/2021-11-05/', 'EC1-1R/2022-01-13/','FL5-3L/2022-03-09/','FL5-3L/2022-04-18/','FU1-00/2022-03-17/','FU1-00/2022-05-10/','GE3-00/2022-10-27/',... '...
3a66ad4eb66f23f52df5cb034873201fd3637aad6926c5dbf393f592eb7272f9
MATLAB
4,985
132
function [clusinfo, sp, Params, recsesidxIncluded] = LoadPreparedClusInfo(KiloSortPaths,Params) %% Here we're going to actually load in all the sessions requested - only clusinfo to save memory for unitmatch clusinfo = cell(1,length(KiloSortPaths)); addthis=0; for subsesid=1:length(KiloSortPaths) if isempty(dir(fu...
8cf52352af174a395ba312b746564744d013d41f9bbc948b88ca51ee617e2ecd
MATLAB
4,985
139
% Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024 % This makes the figure of Proportions of cell types by day and dataset % (Figure S7). close all clear all clc % Paths run('../load_figure_config.m') INPUT_FOLDER = CHENGS_TASK_2C_FIGURES_CONFIG.DATA_FOLDER; OUTPUT_FOLDER = CHENGS_T...
0cabb5c3dc37555970dd3785e5b1da316a3b6d25c078bef5966279e54a6dce0f
MATLAB
4,986
149
% loadFreeWalkTrk2PData.m % % Function that finds the .trk file corresponding to the selected pData % file(s), preprocesses the .trk data, and saves it into the pData file % Assumes that .trk file name matches pData name in trial-#-date-time % .trk file as standard output from APT % % Modified version of loadTrk2PData...
066ff42f86d14784b4de1a6cc47360378e5878ea871c946fb46f5317e75c680a
MATLAB
4,987
147
clear close all clc addpath(genpath('J:\Data\Matlab')); %% Load file [spreadsheet,sheetpath] = uigetfile('*.txt','Select a txt file'); % Load the excel spreadsheet cd(sheetpath); t = readtable(spreadsheet); % 1: number of segments, 2: index of seg type(1:soma; 2:axon; 3:dend),3:x,4:y,5:z, 6:dia, 7...
34d32330831c6b0889e527a8d55d68d762f7d02a37ab8536d3963bf50ccfb810
MATLAB
4,987
144
% This computes tissue mesh intersections with the XY plane % (transverse plane) located at Z=0 or elsewhere, displays and saves the % resulting window parameters % % Copyright SNM 2012-2018 % The Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General % Hospital & ECE Dept., Worc...
bcd8a8e15a908cb1ec1acdc5836b6ca38c12174bd2a0ed1fe56bdecbbff74299
MATLAB
4,987
103
% mglSystemCheck.m % % $Id:$ % usage: mglSystemCheck(toCheck) % by: justin gardner % copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING) % date: 02/24/15 % purpose: Check for problems with system setup. Should return true if no problem % is detected. Called...
53b8cb22c8a98e8e0c3f2ca78a8a65390f23a37c8deedd21e1362ba5bf8cd763
MATLAB
4,988
83
%% Demo script %% Demo file for running HiddenMarkovModel training and decoding on emission sequences form neural spiking data %% authors: Stefano Diomedi %% date: 22nd February 2024 %% For every details regarding the implementation and logic of these functions please refer to % Diomedi, S., Vaccari, F. E., Ga...
83edd2e7b508265f0630327eeaedc15b2b53ece1c274017a738c751fbbf7a1d7
MATLAB
4,992
132
% callXYSwingStance.m % % Function to call swing, stance, and not moving based on comparing the % movement of the leg in the xy plane to the movement of the ball in the % xy plane. If the leg and the ball are moving in the same direction, % stance; leg and ball moving in opposite directions, swing. Not-moving % sp...
869fc654c690421c8dd39b078072e77702e5265f7707a53aad66882456666c2c
MATLAB
4,997
169
function [] = ExtDataFig05_OptStim_TuningCurve_Song % Code for plotting the tuning curves of pulse and sine songs induced by optogenetics in Extended Data Fig. 5e. GT = 'TN1dsx'; TargetPeriod = [0,10]; %% parameters nTrials = 6; nStim = 6; T = 1370; % T DAQrate = 10000; x1 = [0:1/DAQrate:190-1/DAQrate]; PreDurImg ...
1cec646cc9db2576d2bf0a934f0cbcb4dad9613d360427e1494bc691076cc4d0
MATLAB
5,000
187
function [] = ExtDataFig03_Example_TimeCourseRaw_dPR1_all() % Code for plotting example traces for dPR1 ΔF/F in Extended Data Fig. 3b. GT = 'dPR1'; Target_FileID = 2; Target_Trial = 6; FileID = Target_FileID; %% parameters Thre_pulse = 0.1; Thre_sine = 0.6; RecDur = 190; DownSampleRate = 10; nTrials = 6; nStim = 6...
25ff9c3337bf1612d7924f41206835647cca44064040d3f8b0190b6bbf7dadca
MATLAB
5,002
125
function [rot_tra] = rotation_translation(data, run, ID, varargin) % ROTATION_TRANSLATION % This function determines the translation vector and rotation angle % to reframe the motion data into the new coordinate system based on the % trajectory of the center of mass % % Use as % [data_reframed, rot_angle, tra_vec] = ...
9bfcf02dae0de3afed3655a18a0cabc006d17ebc1ec16c741740596134940351
MATLAB
5,003
144
% This computes tissue mesh intersections with the XY plane % (transverse plane) located at Z=0 or elsewhere, displays and saves the % resulting window parameters % % Copyright SNM 2012-2018 % The Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General % Hospital & ECE Dept., Worc...
c4926b9472aa9b6c198886cda07b6cd1e20134481767eccd319620383f613b78
MATLAB
5,005
153
% selectDroppedFicTrac.m % % Function to manually select times in experiment where FicTrac was not % tracking the ball. Save those indicies into fictracDat.mat, to allow use % in future analyses. % % INPUT: % none, but user selects trial folder to process % % OUTPUT: % none, but saves dropInd variable into fictr...
3239ec1d5734221a54b7b9b0042d481cf4617b4debf77c01e8107c460583fa02
MATLAB
5,007
161
% createEphysLegFictracMovie.m % % Quick and dirty script to generate movie showing ephys recording, FicTrac % variables, and leg movie. Starts from raw data. % Made 8/7/20, used for videos for leading edge symposium and U19 talk. Now % obsolete. Make new functions if new videos desired. % full path to data folder d...
e1f16a830b7397c696d5ea6d2bfc3adda30d3e47a8a06f1a3f0f7ed887257aa8
MATLAB
5,013
200
% mglSwitchDisplay.m % % $Id$ % usage: mglSwitchDisplay(displayID,<displayNumber>) % by: Christopher Broussard % date: 10/16/07 % copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING) % purpose: switch displays when using mgl to display to multiple displays % % ...
73b1624abce3aa4c2c49b0fd131498e94cdb9b007bea5030a24798abfe95d585
MATLAB
5,014
177
function gui_s (x, y) % % This file is used by FASTICAG % The save dialog for saving the results % @(#)$Id: gui_s.m 8776 2013-11-14 09:04:48Z roboos $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Global variables % Handle to the window global hf_FastICA_Save; % Handles to some...
56442561dcb6af0296068bc084e6a32c57c13324ba79cbf26f2b425ff4d14eae
MATLAB
5,016
150
function write_gdf(filename, hdr, data); % WRITE_GDF(filename, header, data) % Writes a GDF file from the given header (only label, Fs, nChans are of interest) % and the data (unmodified). Digital and physical limits are derived from the data % via min and max operators. The GDF file will contain N records of 1 sample ...
b2f5e60e0120614728d7017cf06b9ddb2a773934b8db79fe5253fc690927a0aa
MATLAB
5,018
103
% mglSystemCheck.m % % $Id:$ % usage: mglSystemCheck(toCheck) % by: justin gardner % copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING) % date: 02/24/15 % purpose: Check for problems with system setup. Should return true if no problem % is detected. Called...
b9da961d15c363c56793ed301afcaa2f8c96ad9fd2e2b92e7d61d067a0cb9db8
MATLAB
5,018
142
classdef simul3Dcylinder_cuda < handle properties (GetAccess = public, SetAccess = public) sig; TD; dtime; Tstep; NPar; Nbvec; Din; Dex; kappa; res; dx2t; dx4t; bval; bvec; end properties (GetAccess = private, SetAccess = private) D_cnt = [1 2 2 1 2 ...
9641f262fe2b0ffd12313f28ecfeb4534e2417b1d35933344657f7780fb508b0
MATLAB
5,023
130
%% put data into matlab format savename = TDT_MATformatBDH(1); %channel 1 or 2 %savename = FormatForFPpipe(sig,ref); %if data already converted, feed to FP pipe % preload in sig and ref .mat savename=strcat(savename,'.mat'); load(savename) %% debleach, calc df/f, subtract 405 from 472...
ae3052aa97e83b3ceab706d4cd9379f7fca0d7fc071aeea196dd2b15eec3370c
MATLAB
5,023
151
% getStepParamsSwingStance.m % % Function to get step parameters during swing and stance phases, instead % of during 1st and 2nd half steps % % INPUTS: % legSteps - struct of leg step data, output from processLegTrack(), with % fields: % maxIndsAll % minIndsAll % maxWhichLeg % minWhichLeg...
157b0c1639466d09536c3189e42b7616f42c4477e14496f960cb78e2615aa2c1
MATLAB
5,027
176
function [procpar,msg] = aedes_readprocpar(filename) % AEDES_READPROCPAR - Read VNMR (Varian) PROCPAR-file % % % Synopsis: % [procpar,msg]=aedes_readprocpar(filename) % % Description: % The function reads the VNMR parameter file and returns a % procpar-structure with parameters as structure fields...
d4031657821d58cec9b63411573d61338c58d3c76f61d40ba58dfe8093aa3cca
MATLAB
5,028
182
function [] = ExtDataFig03_Example_TimeCourseRaw_TN1SG_all() % Code for plotting example traces for TN1A ΔF/F in Extended Data Fig. 3i. GT = 'TN1SG'; Target_FileID = 3; Target_ROI = 1; Target_Trial = 4; FileID = Target_FileID; Target_WithinTrialID = 6; % 4-4 TargetMic = 1; Xrange = [(Target_WithinTrialID-1)*30+14 (T...
16626219671bc9c085a66972e539a583e5a3afc0ced4891e73e5a88791b5e404
MATLAB
5,036
119
function sal_opt = treeRankingSegment(I_p, grids, slabel, sc, sr) [imh_p, imw_p, ~] = size(I_p); [~, blobIndIm, ~, hierarchy] = getHierarchicalsuperpixels(I_p); % if 0, imshow(showGrid_DownSamplingImage(I_p, blobIndIm)); end if isempty(hierarchy), sal_opt = zeros(imh_p, imw_p); return; end if ndims(...
ba2b3ab825c4c3fb3d506ff99a4a1cc8556cc3e54b37f8c3d2935bb400322f6e
MATLAB
5,039
146
% VL_SVMTRAIN Train a Support Vector Machine % [W B] = VL_SVMTRAIN(X, Y, LAMBDA) trains a linear Support Vector % Machine (SVM) from the data vectors X and the labels Y. X is a D % by N matrix, with one column per example and D feature dimensions % (SINGLE or DOUBLE). Y is a DOUBLE vector with N elements with...
3d62c16b228617a98eeb462668a1d3d9f1f7e72adec9186b131f2e0c03def171
MATLAB
5,042
117
function [] = plot_worm_frame_post_analysis_showing_path_no_projector_image(I, center_lines, centerline_color, centerline_stimulus,in_track_index,current_ellipse_ratio,smoothed_path_x,smoothed_path_y,stimulus_delivered,path_history,demo_mode) % % % % % % [] = plot_worm_frame(I, center_lines, centerline_color, Uncertai...
a8402cea53f10330c45dd1b5396d4bd6c85d58f27ce472df3f95214d2ef63472
MATLAB
5,042
163
function [dat] = read_neuralynx_cds(filename, hdr, begsample, endsample, chanindx); % READ_NEURALYNX_CDS reads selected samples and channels from a combined Neuralynx dataset with separate subdirectories for the LFP, MUA and spike channels % % Use as % hdr = read_neuralynx_cds(parentdir) % dat = read_neuralynx_...
9d6e200d23cf29d1b412627a80f493780b88c1fc80a2e207459531304ec98414
MATLAB
5,044
122
% figureS2 (data_dir, read_from_excel) % creates figure S2 (line pltos, "Selectivity of responses to items and % spatial locations" % % Inputs: % data_dir (char): Directory path where data files are located. % read_from_excel (logical): Indicates wh...
2a8c0a1d4c86272b9e032dd78dcdd3616d5961fcae094d73c8620413a992449b
MATLAB
5,046
115
%%% demo of the full MIN1PIPE %%% clear warning off gcp; min1pipe_init; addpath(genpath('../ANE')) %% Set data and folder patch_dims = [160,160]; list_Exp_ID={'Mouse_1K', 'Mouse_2K', 'Mouse_3K', 'Mouse_4K', ... 'Mouse_1M', 'Mouse_2M', 'Mouse_3M', 'Mouse_4M'}; num_Exp = length(list_Exp_ID); rate_hz = 20; ...
b94cd237db97f822181669dea5e4a1378123267bf055abd5f478327a4a7b8152
MATLAB
5,048
139
function write_brainvision_eeg(filename, hdr, dat, event) % WRITE_BRAINVISION_EEG exports continuous EEG data to a BrainVision *.eeg % and corresponding *.vhdr file. The samples in the exported file are % multiplexed and stored in ieee-le float32 format. % % Use as % write_brainvision_eeg(filename, hdr, dat) % % See...
ef28261e8a67496dba63b2759d1d21d69319b3c5c8ae96d7f9335a5051f38216
MATLAB
5,050
157
% plotCondIndptStepParam_allFiles.m % % Function to plot 1D step parameter (i.e. not AEP or PEP) value across % conditions. Each condition mean +/- SEM or std. Separate subplots % for each leg. Specify one step parameter to plot. Select data (output % of saveLegStepParamCond_indpt()) through GUI % % INPUTS: % % OUT...
13cf2940dcd18b22a28ab59751c2e4b5fedcd4edfa4d4a26e38f1ad56cd042dd
MATLAB
5,060
131
function [lateral, order, gamma, beta, ratio, osci, level, psd] = judge(r, v, g, allTime) %JUDGE give property of the parameter setting % Detailed explanation goes here % lateralSheet = zeros(delta_e_steps, delta_i_steps,5); % -1-NaN, 0-disagree, 1-agree % orderSheet= zeros(delta_e_steps, delta_i_steps); % -1-NaN...
3e181fa0b3d4ce5ff9937314302020c7312dc6d449feda9ae34db115f0fed7c8
MATLAB
5,060
158
function vl_compile(compiler) % VL_COMPILE Compile VLFeat MEX files % VL_COMPILE() uses MEX() to compile VLFeat MEX files. This command % works only under Windows and is used to re-build problematic % binaries. The preferred method of compiling VLFeat on both UNIX % and Windows is through the provided Makefile...
38df0b5b8baa37b60f88578d3d40020134eac8d786069162ee24edb97927bbcf
MATLAB
5,061
127
%% Berron et al manual subfields in unfolded space addpath(genpath([getenv('AUTOTOP_DIR') '/tools'])); APres = 256; PDres = 128; unfoldedSubfields = nan([APres PDres,35]); n=0; for s = 0:34 sub = sprintf('%03d',s); for LR = 'LR' if LR=='L'; lr = 'left'; else lr = 'right'; end AP = load_untouch_n...
3ce6114cd68ac1acae84d38efc9684c0c10384c957a3372bc4ae85b9e036fbf1
MATLAB
5,067
153
function [hh,ff] = old_freqz(b,a,n,dum,Fs) %FREQZ Z-transform digital filter frequency response. % When N is an integer, [H,W] = FREQZ(B,A,N) returns the N-point frequency % vector W in radians and the N-point complex frequency response vector H % of the filter B/A: % -1 ...
779cd1ae44e08dd988036dd4252eb3ad0a7d9a0a8f4339523065a4ae758e37ba
MATLAB
5,067
114
function mltp_make_pfstats_excel(obj, session) pfStatsFilename = fullfile(session.getAnalysisDirectory(), 'pfStats.xlsx'); pfStatsMatFilename = fullfile(session.getAnalysisDirectory(), 'pfStats.mat'); if isfile(pfStatsFilename) delete(pfStatsFilename) end if isfile(pfStatsMatFilename) ...