sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
50e20a53946918d77487d00d06661dda7200492b701d053fbfcba19e52881973
MATLAB
19,347
797
%% Pattern analysis %compute pattern space %~60 dimensional, consistent over animals and in total %highly overlapping over animals and days: siloette score %an active sleep bout traces out a trajectory in this space %and overlapping %distributions in nearest points (all-all vs within octopus). Should look %within...
2aca344686dc092d3cdce4335bfeec71d011af3d98920115ac901fa0b1d008ad
MATLAB
19,405
476
function [dat,info]=loadIntanRHD(filename,timeRanges) % load intan files % timeRanges=[start,end] in sec % modify from read_Intan_RHD2000_file, 2022-07-18 % read_Intan_RHD2000_file % Reads Intan Technologies RHD data file generated by Intan USB interface % board or Intan Recording Controller. Data are parsed a...
326c90017e443908e445f72813adbacbe2529eec8b13bdc4345d8c210353cbdc
MATLAB
19,736
451
function [] = Training_assolearn_fmri(suj_code,orig_path) % INPUTS: - suj_code (ex: 'P01') % - orig_path % - run_nb (0 to 5) % % OUTPUTS: in the folder Results/suj_code, Results_Assolearn_fMRI_suj_code_Run_nb_time_exp.mat', with trial_list: % c1/ block number - 0 (training) t...
8b480df358cc6270fa5da4c1acf0ae6e4294dd3fb91356ca885468a076084a14
MATLAB
19,860
514
classdef ImageType < handle % This class is compliant with itk::Image class % by Alberto Gomez, 2011 % % Update: add Support for passing several points, for speed (start 18/oct/2011) properties(GetAccess = 'public', SetAccess = 'public') data=[]; size=[]; origin=[]; % fi...
fa87606eefd597d37e11671a4c137615436eebe4e218afade9bf5ea20f64da71
MATLAB
20,047
547
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MRI Estimation for MEG Sourcespace (MEMES) using Elekta rather than % Yokogawa data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function MEMES3_elekta(dir_name,fif_file,path_to_MRI_library,me...
12e3d6e911707b8f6278289584e0d7035a4238288e71efe5e37ccbac067e3bde
MATLAB
20,124
380
% This script loads saved outputs from TargetRFMap_Figure2_SavedOutputs, % GratingRFMap_Figure2_SavedOutputs and Expt_Screen_Info % Using this data it plots the RF centres for both the Grating and Target % RFMaps for all neurons. Comparisons of Target and Grating RFs screen position are also made. % Note this analysis...
18f89664b0b6968c5f2bd2f1696f4c4d45b8f3562196c50bf4bf66e36cfbf183
MATLAB
20,155
588
function handles = plotSpread(varargin) %PLOTSPREAD plots distributions of points by spreading them around the y-axis % % SYNOPSIS: handles = plotSpread(data,binWidth,spreadFcn,xNames,showMM,xValues) % handles = plotSpread(ah,...) % % INPUT data: cell array of distributions or nDatapoints-by-mDistributions % ...
2d0738bc4906e42ce6065f911571db618030c40948b25a6756095c939db0d736
MATLAB
20,197
420
function [Ysrc,Ycls,Yb,Yb0,job,res,T3th,stime2] = cat_main_updateSPM(Ysrc,P,Yy,tpm,job,res,stime,stime2) % ______________________________________________________________________ % Update SPM preprocessing. % Subfunction of cat_main. % ______________________________________________________________________ % % Rober...
ba18a0001d5814d7dabefc8202dfd34d78a7bbe86dd251b6fe5a3ef8d486f2b0
MATLAB
20,265
590
function handles = plotSpread_modified(varargin) %PLOTSPREAD plots distributions of points by spreading them around the y-axis % % SYNOPSIS: handles = plotSpread(data,binWidth,spreadFcn,xNames,showMM,xValues) % handles = plotSpread(ah,...) % % INPUT data: cell array of distributions or nDatapoints-by-mDistrib...
8e3c17405e8453d692d8e66f949c3ecd5758f5c6d24dfd1176cabbb8f0470858
MATLAB
20,312
419
%%% runafew clear close all clc %% %path_temp = 'S:\R-MNHS-SPP\Bellgrove-data\4. Dan Newman\Participant Folders_new\'; %Monash PC path_temp = 'C:\Users\Dan\Desktop\Big_Dots_Data\'; %% subject_folder = {'LK_07_04_14','AR_08_04_14','MH_14_04_14','AA_15_04_14','NT_16_04_14', ... 'OF_28_04_14','RO_25_04_14','PR_20_04_...
786f00f39982a3782956ef943d650335e0a8e05b02de327614d198eaca76aed0
MATLAB
20,393
438
% This script loads saved outputs from TargetRFMap_Figure2_SavedOutputs, % GratingRFMap_Figure2_SavedOutputs and Expt_Screen_Info % Using this data it plots the RF centres and directionality of both the Grating and Target % RFMaps for all neurons. Comparisons of Target and Grating RFs directionality and screen position...
d6b40e345ddd2e260889249b7d70f36fd1d3c25a652ca6e0325a3a9938bab39b
MATLAB
20,482
370
%Script to plot Extended Data Figure 3: neural responsiveness varies as a function of stimulation parameters % %To use this script, first set path to response_calibration_data.mat file % %Next, define which calibration type you want to plot (set variable calibration type). The options are as follows: % - 1: Interpuls...
64cd94218ff4a13930b2442ad2362d21c86ccb218a3c900ad363e5d2a9da88b5
MATLAB
20,605
293
%----------------------------------------------------------------------- % Job saved on 25-Apr-2020 11:25:08 by cfg_util (rev $Rev: 7345 $) % cfg_basicio BasicIO - Unknown % spm SPM - SPM12 (7771) %----------------------------------------------------------------------- % ----------------------------------------------...
274aecc88ed54fdedaf84d695b765058c1f8200cefdf71e96bd873f09294dc59
MATLAB
20,745
530
function [DD_session1, DD_session2, VV_session1, VV_session2,LDV_session1,LDV_session2,RDV_session1,RDV_session2, ... within_session1, within_session2, between_session1, between_session2, ICCvalue, ICCvalue_CI ] = REL_helper_CalculateConnandRel(method,dataDir,subjects,analysisSpace, sessions, CorrType, roiTS,fileN...
c025e60f696907d70b3c1a7be0d347a4e3a3975bd71d55f3d4a11aad5f42482b
MATLAB
20,750
503
function [map,num,typ] = brewermap(N,scheme) % The complete selection of ColorBrewer colorschemes (RGB colormaps). % % (c) 2016 Stephen Cobeldick % % Returns any RGB colormap from the ColorBrewer colorschemes, especially % intended for mapping and plots with attractive, distinguishable colors. % % Syntax (basic...
4a77250579dfbf1b0e2636cff4a8449f1c00dc7ec30ebfc187e8133a7c95b9e3
MATLAB
20,772
412
auto_stimulus_period = true; %stimulus_period is found by autocorrelation if this is true BTA_playback = false; stimulus_period = 60*14-1; starting_shift = 0; relevant_track_fields = {'BehavioralTransition','Frames'}; load('reference_embedding.mat') %load('C:\Users\mochil\Dropbox\LeiferShaevitz\prelim data\Vibrations...
b48d629182927b489485a838c238129bb01f15bf5c66eeeb651d29c2b56f5150
MATLAB
20,794
400
% Written by Aleh Sudakou (https://www.researchgate.net/profile/Aleh-Sudakou) % Nałęcz Institute of Biocybernetics and Biomedical Engineering, Polish Academy of Sciences % This is one of the codes shared on https://github.com/asudakou/Analyzing_TD-NIRS % Last updated: 20 May 2023 %% Description: % Using LMA ...
cf1eb7874b89eaa8297c1cb3fe8e9febc645604ced08b34252c9d2edec20d983
MATLAB
20,905
530
%This Matlab code is associated with Chowdhury et al PLOS Computational Biology %It gives an example of the major algorithms used in the paper % %It can be run directly from the data file that has been uploaded % %It starts by performing a neural network relating the sequences on the % peptide array to the bin...
bb6913893a47551a3e156d2dc540397c833f74b8644198a0a0c5096c3a29f5de
MATLAB
20,951
572
function bh = figure_boxplot(data_input,... text_label_in,label_xaxis_data_in,text_title_in,label_orientation_choice_in,... box_color_in,box_lineWidth_in,box_widths_value_in,box_color_transparency_in,... median_lineWidth_in,median_color_in,... whisker_value_in,... outlier_marker_in,outlier_mark...
c931be519d7186c0975866c9b3aadc3757ddc2f3b10bb5e09bfff5969131ebbb
MATLAB
20,993
519
%% Spike trigerred power plots clear all %close all %% Load files cell_id=[];Is_ratio3=[];d_id=[]; pT=[];pT2=[]; nn=0;nn1=0; CHANNEL=1; i_motion_threshold=300; % image motion threshold sw_t=2; for gh=[ 1 2 ] if gh==1 %cd('/home/hanlabadmins/eng_handata/eng_research_handata2/Hua-an_Tseng/Data/SomArc...
4f9e2c1f95ee671ee7ca2e8537931d3fec5b31f666ef133b670df31e1cd056f8
MATLAB
21,309
440
function DynamicPredictions_RUN_ERFdynamicRSA_searchlight(cfg,iSub,~) % You can run this function locally (by looping over subjects), or send to a cluster (which I did using the accompanying "cluser_shell.m" function) % set some directories depending on running this locally or on a cluster: if isfield(cfg,'cluster...
4e1028927971dbdec3265e4ff6ace09de1baed24f002be23948b9e85bdb696ae
MATLAB
21,368
420
function output = fitCHTC(config, name, user) % fitCHTC % This function creates a zip file containing the files necessary to perform a gLASSO/wgLASSO fit on CHTC or other % HTCondor systems % % config: This struct contains all the necessary information for the configuration to be run on CHTC. % Details ...
05d312de9f5d24e5064f06116322294e916fa26fc6fa833b58dcb5bcc6ef02d5
MATLAB
21,391
526
%% Online performance when changing stanchion % ReFIT both monkeys - changing stanchion monkey = { 'Joker', 'Joker', 'Joker', 'Joker', 'Joker', 'Joker', 'Joker', 'Joker', 'Joker', 'Joke...
54324a978d0d4c71280968352547fc89f9fb3d9343bba33e22d7152615d258e9
MATLAB
21,625
530
function [img,img_out]=general_NCZLd(image_name, stim_radius, mida_min, epsilon, kappay, normal_output) % NCZL main file % stimuli location addpath([pwd '\black_and_white_stimuli_Sets_1_to_4\']) % mirror (toroidal) wrapping do_toroidal_wrapping = 1; %-----------------------------------------------------------------...
6d1d46371fca9e1da324f7e78456529d716a336d19027512618a31c1308f19c2
MATLAB
21,692
576
function MEMES3(dir_name,grad_trans,headshape_downsampled,... path_to_MRI_library,method,scaling,varargin) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MRI Estimation for MEG Sourcespace (MEMES) % %%%%%%%%%%% % Inputs: %%%%%%%%%%% % % - dir_name = directory fo...
c38c000479aeb85950ffd0b135aa19f9e124666fc5295e21baa4894feba40390
MATLAB
21,758
720
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % global settings % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% highres = false; %FM = 'BM'; FM = 'MBM'; %highres = true; %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% label2 = load_unto...
379c11d923051c61e4235433944f82330636ae685c862cb3f667996a1b4773a5
MATLAB
22,245
461
function Obj=SOFAconvertConventions(Obj,varargin) % Obj = SOFAconvertConventions(Obj) converts a SOFA object to SimpleFreeFieldHRIR % % Supported conventions: % SimpleFreeFieldSOS % SimpleFreeFieldTF % SimpleFreeFieldHRTF % FreeFieldHRTF % some special cases of GeneralTF, GeneralTF-E. % % When usin...
a6662e55535a8c61655ab8424f0359b837b7d5b5101d9c8f43966d780a5cd680
MATLAB
22,273
593
% Some parameters samprate = 50000; % 50k sampling rate use_textures = 1; if use_textures samprate = 20000; %sampling rate was only 20k for McDermott files %Needt remember this for when port over to check performance end fband = 32; % Frequency...
81f32769d93a34f08c47678d711469328c2cfefcf08e5faf15582be5498c119c
MATLAB
22,330
380
function [] = analyse_behavior_conf(suj, group, comp) % --------------------------------------------------------------------------- % Analyze the associative learning task of the fMRI study % % INPUTS: % - Subject code: suj = 'ML_C01' for instance % - Group: group = 'NT' or 'ASD' % - Comp: co...
88617ffb85516a85d693551807c3937a1ee7ead821427794de934222a54005e2
MATLAB
22,379
265
% Marjan Biria; 14/01/2022 % This scripts uses the GM, WM, CSF segmentations for the whole brain (taking C1, % C2,C3 which are respectively GM, WM,and CSF; It takes one file from the spectroscopy data to % find the location of our voxels, running it for ACC, SMA, and OCC to get % tissue-fractions. It has a for loop to ...
2ac1339226173f474e542c97ccc2e145e37251edc4ca939db783d5432eba4c1f
MATLAB
22,426
449
load('reference_embedding.mat') %load('C:\Users\mochil\Dropbox\LeiferShaevitz\Papers\mec-4\AML67\behavior_map_no_subsampling\Embedding_LNPFit\LNPfit_behaviors_reordered_20171030.mat') % LNPStats = LNPStats_directional_ret; % meanLEDPower = meanLEDPower_directional_ret; load('C:\Users\mochil\Dropbox\LeiferShaevitz\Paper...
c8b49f052a5671558bb84ac5a9fdc07e1a8c759fa883bbd80b4dd9887207d239
MATLAB
22,635
473
function DynamicPredictions_RUN_ERFdynamicRSA_ROIsource(cfg,iSub,iROI) % You can run this function locally (by looping over subjects), or send to a cluster (which I did using the accompanying "cluser_shell.m" function) % set some directories depending on running this locally or on a cluster: if isfield(cfg,'cluste...
56aa7d41b43ef1cb78381b0a3597a4fc5eafdbb068f60ad0e39291a5a4079f09
MATLAB
22,776
239
function [varargout] = ... Vulintus_Collate_Functions(start_script, collated_filename) % %Vulintus_Collate_Functions.m - Vulintus, Inc., 2016 % % Vulintus_Collate_Functions collates all of the *.m file dependencies % for the Vulintus program specified by "start_script" into a single *.m % file with a filena...
f46fad688963ccf83dbd86a66ecd98dbc4396c04e21a631ccab34baf94c8317f
MATLAB
22,777
550
% This script is used to analyze each neurons response to dual stimuli % traversing the target RF, stimulated with a small target, and the grating % RF, which is stimulated using a bar of varying heights and comparing % these response to the same neurons response to the individual stimuli. % It then calculates and p...
a0a94aceac85c019ba0725bbb3a7e36ad67c54b51af8c872fa31b6a9cf60a9d5
MATLAB
22,878
550
%% Offline prediction plots for multiple days clearvars runFiles = {{'Z:\Data\Monkeys\Joker\2021-08-05\Run-003', 'Z:\Data\Monkeys\Joker\2021-08-05\Run-004', 'Z:\Data\Monkeys\Joker\2021-08-05\Run-005'}, {'Z:\Data\Monkeys\Joker\2021-08-12\Run-003', 'Z:\Data\Monkeys\Joker\2021-08-12\Run-004', ...
a254757ae31dcade8e068afda38475c6c0196ccd92b723bb0c797e219687fb38
MATLAB
23,111
522
function [] = Main_code_assolearn_conf(suj_code,orig_path) % INPUTS: - suj_code (ex: 'P01') % - orig_path % - run_nb (0 to 5) % % OUTPUTS: in the folder Results/suj_code, Results_Assolearn_fMRI_suj_code_Run_nb_time_exp.mat', with trial_list: % c1/ block number - 0 (training) t...
7ed7bd5062c28cf7a950547bbe02e56b7cea576075dcded88c0933c10059d4dc
MATLAB
23,141
691
function [gx_final,gy_final] = Rmodelinductiond_v0_3_2(Iitheta,struct) % from NCZLd_channel_ON_OFF_v1_1.m to all the functions for implementing Li % 1999 %------------------------------------------------------- % get the structure and the parameters % scale=wav.scale; % orient=wav.orient; wave=struct.wave; use_fft=st...
b22909eba3ac2c8d37be0ba4ea82df182a4642e60ec9883a13a5452da87870cd
MATLAB
23,240
514
function [] = Main_code_assolearn_fmri(suj_code,orig_path,run_nb) % INPUTS: - suj_code (ex: 'P01') % - orig_path % - run_nb (0 to 5) % % OUTPUTS: in the folder Results/suj_code, Results_Assolearn_fMRI_suj_code_Run_nb_time_exp.mat', with trial_list: % c1/ block number - 0 (tra...
c17d62b67c3460c9218d972c9bad8053e68bdb12484efed8afb158cf2f983acf
MATLAB
23,407
637
function HelperData = dspCMap2T(map,ChanPos,varargin) % dspCMap2 - Display topographic scalp maps % ---------------------------------------- % Copyright 2009-2011 Thomas Koenig % distributed under the terms of the GNU AFFERO General Public License % % Usage: dspCMap(map,ChanPos,CStep) % % map is the 1xN voltage map to ...
249e264bba5c3f412f046a04c76d46baf134c1cea3dad9106fbc9847947c8dc5
MATLAB
23,688
593
function [DD_session1, DD_session2, VV_session1, VV_session2,LDV_session1,LDV_session2,RDV_session1,RDV_session2, ... within_session1, within_session2, between_session1, between_session2, ICCvalue, ICCvalue_CI ] = REL_helper_CalculateConnandRel_Segmental(method,dataDir,subjects,analysisSpace, sessions, CorrType, r...
4eb966bbb65fd14a99f8aa57992961d3df1199fe88196263fafba9be8c0e37f4
MATLAB
23,781
487
% Written by Aleh Sudakou (https://www.researchgate.net/profile/Aleh-Sudakou) % Nałęcz Institute of Biocybernetics and Biomedical Engineering, Polish Academy of Sciences % This is one of the codes shared on https://github.com/asudakou/Analyzing_TD-NIRS % Last updated: 20 May 2023 %% Description: % This scrip...
2b22ebd8a9fc5cd0c9c05151cd1406264f4dd70f287b5887eb73dfc5273c0a89
MATLAB
24,004
438
% plot figures that will go in the paper % please download the following plotting toolbox and add it to the folder "export_fig": https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig/ % created in matlab R2021a clear all close all export_figPath = what('export_fig'); cleanupFcn = onCleanup(@() rmpath...
345b16dcd69ea4a205932817111536eedbe0d95728c6c78fbc893af7cd68194a
MATLAB
24,213
882
close all clearvars addpath(genpath('figureDataFunctions')); %% params caxis_fixed = [0 30]; drawColors = [0,0,0;... 230, 159, 0;... 86, 180, 233;... 0, 158, 115;... 213, 94, 0]/255; speed_bins = linspace(0,50,500); speed_bins = interp_resample(speed_bins',100);...
5d55d50ab8baeaed77a30f8415b492216f9e8e7434f80ee83b1a84ca79da6304
MATLAB
24,282
596
% noise on weights (stimulus and behavior) to compute robustness % local weights for optimal decoder stimulus and behavior % global weights for fish decoder (computed with EArmse) % M Metzen 01/23 % needs the following: % datafiles: Binaries*; EArunsRMSE* (-> unpack Binaries.zip and EArunsfiles.zip !!) % for ...
f2b51c1b40a80b4abea8ab13a36fd7dbdebb4a02ce5673601ae6d15a422befcb
MATLAB
24,360
599
function [par] = readpar(parfile) %[par] = readpar(parfile); %read scan parameters from exported PAR files (Philips research tools) % % output : % - par : scan parameters and image scaling factors - % float_data = (int_data * RS + RI) / (RS*SS) % par.problemreading=0; % will be set to 1 when an error occ...
38edafd5929a6ebbb5add9220681a34f8b430dd69d8bf89b95aae013110bb812
MATLAB
24,838
529
function [status] = ft_hastoolbox(toolbox, autoadd, silent) % FT_HASTOOLBOX tests whether an external toolbox is installed. Optionally % it will try to determine the path to the toolbox and install it % automatically. % % Use as % [status] = ft_hastoolbox(toolbox, autoadd, silent) % % autoadd = 0 means that it will ...
efeb89cf6cb513124847aab2645302120a8a13b01338d4810466eadfc30cdf6f
MATLAB
24,944
714
%This code is for 1x10 min long movies and %with movement detection. It is based of Jake Jordan's version and ABC %version %subtract offset of position data (new baseline at zero) clear all filelistdata2 = dir('filelist') %location of first movie (any file will do) MaxIterations=1; %set number of iteratio...
92baffd0755a5ceff187866f5a02505ea65be76a771fac1cb0aea650eebd22ff
MATLAB
25,007
549
clear all close all dataset_list_paths = [ ... {'C:\Data\Code\general_code_old\data_folder_lists\Janelia\d5HT1b_similar_od_handovers.xls'};... {'C:\Data\Code\general_code_old\data_folder_lists\Janelia\c305a_similar_od_handovers.xls'};... {'C:\D...
327c0bcb0cd20ad9384913ec02ecebfb707481198bfa17945de120fd26b3f52e
MATLAB
25,430
595
% Written by Aleh Sudakou (https://www.researchgate.net/profile/Aleh-Sudakou) % Nałęcz Institute of Biocybernetics and Biomedical Engineering, Polish Academy of Sciences % This is one of the codes shared on https://github.com/asudakou/Analyzing_TD-NIRS % Last updated: 20 May 2023 %% Description: % This scrip...
d2ff22bed6d15cdcd1ed593abc033c1ce9e189363c55d058c034c556007959a5
MATLAB
25,760
678
%% Running notes %2022-09-29 Decide to make this its own separate file instead as toggling %this in addition to all of the other toggles will be obnoxious. Need to %figure out exactly what Yale meant...only do this for correlation %analysis? Make the null distribution from randomly sampling from all %correlation ma...
a08e51f08c72241c753492359ec324c4efd240fc3182a6c4f699b47de0976dd9
MATLAB
25,791
597
function fMRI_Preprocessing(group, comp, fieldmapcor) % ------------------------------------------------------------------------- % Original code downloaded on https://github.com/ilcb-crex/CREx_fMRI (http://www.blri.fr/) % Modified by Laurie-Anne - February 2020 - for the fMRI Assolearn experiment % INPUTS: % ...
b78b43a9c649817f6ffdac89a868df95d3f6fbc6a78398d940c56c969b0a9eea
MATLAB
26,307
510
function Track = initial_sweep(image_stack, Track, parameters, plot_index) % given a sequence of worm images, this function finds the centerlines %% STEP 1: define parameters %% nPoints = 20; %20 Numbers of points in the contour gamma = 15; %Iteration time step ConCrit = .1; %Convergence cr...
7efce97ac95ca453fbee2fa83c7787a443c2db27640ff80e252f1e52fb7a9853
MATLAB
26,476
751
%% get raw spikes at different time bins for decoding dwindow=[-0.5 2.5]; dbinsize=0.25; dbinEdges=dwindow(1):dbinsize:dwindow(2); dbinTimes=dwindow(1)+dbinsize/2:dbinsize:dwindow(2)-dbinsize/2; preRun = true; if preRun load('dactivity.mat'); else dactivity=cell(totalNeurons,6); NN=0; for incses=1:su...
9aa2c82a4729ebb3d1babfc98196aa93c801a31cd3fb975b465da7d02f31d1e3
MATLAB
26,479
833
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Evaluating the Mutual Information (MI) between Schaefer ROIs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ParRunFiles store the presentation of each block for each par for each % run ParRunFiles=addpath('C:\Users\dk00549\OneD...
822061b32db522008100b3daf7bc42cd7f5f5dc72748fa49c2b75632bd543d91
MATLAB
26,633
674
function child_MEMES(dir_name,elpfile,hspfile,confile,mrkfile,path_to_MRI_library,bad_coil,varargin) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MRI Estimation for MEG Sourcespace (MEMES) cutomised for child MEG. % % Written by Robert Seymour (Macquarie Univ Dept of Cognitive Sci...
d6e9acec438a3cfa2b8749d9fd6cd8d8a2fbc627e32e8d3216b435d72c938d76
MATLAB
26,798
656
function cat_main_reportfig(Ym,Yp0,Yl1,Psurf,job,qa,res,str) % ______________________________________________________________________ % % Display CAT report in the SPM grafics window and save a PDF and JPG % file in the report directory. % % cat_main_reportfig(Ym,Yp0,Psurf,job,res,str); % % Ym .. intensity no...
0a55af50588532328f9f6ea9f3d2cd3255e916e7ca23bd372f0cb042d108e052
MATLAB
27,134
495
% plot figures that will go in the paper % please download the following plotting toolbox and add it to the folder "export_fig": https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig/ % created in matlab R2021a clear all close all export_figPath = what('export_fig'); cleanupFcn = onCleanup(@() rmpath...
e5a6700dde278727e21855f860ba8afcb9d2c9f8c71b2773f3cc2a5b555bac6e
MATLAB
27,414
514
function success = track_image_directory(folder_name, analysis_mode) % tracks and saves individual worms for all the images in a directory addpath(genpath(pwd)) parameters = load_parameters(folder_name); %load experiment parameters %% STEP 1: initialize %% if nargin < 2 analysis_mode = 'al...
5ced4053e8d0894bf3f7643a2b7adc321acadbbd2a0849bd673432587000ce73
MATLAB
27,565
685
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MRI Estimation for MEG Sourcespace (MEMES) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function MEMES(dir_name,elpfile,hspfile,confile,mrkfile,path_to_MRI_library,mesh_library,initial_mri_rea...
278ee67e430b63f377d42e2461430dc657cb6620b32c10742139a3a7f7109fec
MATLAB
27,857
693
%% Offline prediction plots for multiple days - kinematics clearvars runFiles = {{'Z:\Data\Monkeys\Joker\2021-08-05\Run-003', 'Z:\Data\Monkeys\Joker\2021-08-05\Run-004', 'Z:\Data\Monkeys\Joker\2021-08-05\Run-005'}, {'Z:\Data\Monkeys\Joker\2021-08-12\Run-003', 'Z:\Data\Monkeys\Joker\2021-08-1...
06089d5344447e5e922fb31bfd705de3bb8bd1bbab1cc936995a1f260cf94495
MATLAB
28,085
616
function cat = tbx_cfg_cat % Configuration file for segment jobs %_______________________________________________________________________ % % Christian Gaser % $Id: tbx_cfg_cat.m 1605 2020-04-14 18:44:36Z gaser $ % %#ok<*AGROW> addpath(fileparts(which(mfilename))); addpath(fullfile(fileparts(which(mfilename)),'cat_ru...
d9a440a1e5d94c41e983f483eecfd4c10f63bf93bc6641fb0ddcb733e8fee8b4
MATLAB
28,170
444
function [] = analyse_behavior_mri(suj, group, part, type, comp) % --------------------------------------------------------------------------- % Analyze the associative learning task of the fMRI study % % INPUTS: % - Subject code: suj = 'ML_C01' for instance % - Group: group = 'NT' or 'ASD' % ...
ec24fc07193eac287a869ff3dadc60518e6e94bf4838d5f2572540eea9e3c8c0
MATLAB
28,187
832
function [axh,figh] = lassoPlot_YC( B, plotData, varargin ) %LASSOPLOT Plot coefficient values or goodness of fit of lasso or elastic net fits. % [AXH,FIGH] = LASSOPLOT(B, PLOTDATA) creates a Trace Plot showing the % sequence of coefficient values B produced by a lasso or elastic net fit. % B is a P by nLambda matr...
1b0b3ad86d0f6b769ea7270635861d6a360a74023476b9cc84279eb76ab5dc26
MATLAB
28,381
703
%% Online performance when using two models % KFs changing model - both monkeys monkey = { 'Joker', 'Joker', 'Joker', 'Joker', 'Joker', 'Joker', 'Joker', 'Joker', 'Joker', 'Batman', 'Bat...
c6779476194e0bfc0f90301bd16d91b9928af5c06740961de808a8e3effb51e5
MATLAB
28,792
472
% This script is used to map a receptive field (RF) for each neuron based % on the output files of the TargetScan function, which extracts responses % to small target traversing the entire height or width of the screen in % either direction into 20 bins for each height and width. % For each of these 400 positions, ...
adbb2ae2a87e60819771d68c239b306c72ab2a1eef21142efc6ed2f0542813d8
MATLAB
29,624
1,118
%% Example traces cd('/home/sam/bucket/octopus/8k/oct_06') [bb,aa]=butter(3,[.5/(24/2)],'low'); currMI=h5read('OCT14936.MP4.meanInt','/int'); currMI=filtfilt(bb,aa,currMI); frames=[405, 783, 1181,1522, 1941, 2318,2668] figure plot((1:length(currMI))/30,currMI) hold on scatter(frames/30,currMI(frames),'k') xlabel('t...
a0018eb983559f5987a8387ee50f6e2f2c4dcb20f2ce0639f816dc5ea0dd2d81
MATLAB
29,759
967
function [tmp2,name]=get_the_stimulus(M); if strcmp(M,'mach') tmp=imread('Mach_OP.ppm'); name='Mach_OP'; elseif strcmp(M,'im_ver_2') tmp=imread('im_ver_2.png'); name='im_add_ver_2'; elseif strcmp(M,'im_ver_4') tmp=imread('im_ver_4.png'); name='im_add_ver_4'; elseif strcmp(M,'im_ver_6') tmp=imread('im_ver...
7c75a21f120a41a63b08d2a48e915a075c364d136a5e92939b4eaf07d5a4005f
MATLAB
30,162
665
clear all close all %MBONA3 imaging dataset_list_paths = [... {'C:\Data\Code\general_code_old\data_folder_lists\Janelia\Berry_handover_WTalpha3_fedshock_PAplus.xls'};... {'C:\Data\Code\general_code_old\data_folder_lists\Janelia\Berry_handover_WTalpha3_fedshock_BAplus.xls'};...
13ad82da5639fa30c94e3fd214735c5db268031f32cb2b01ab59aa0cc71973b3
MATLAB
30,196
540
%not used in paper load('reference_embedding.mat') %load tracks % relevant_track_fields = {'BehavioralTransition','Path','Frames','LEDPower','LEDVoltages','Embeddings','Velocity', 'LEDVoltage2Power'}; relevant_track_fields = {'BehavioralTransition','Frames', 'Size'}; %select folders % folders_platetap = getfoldersGUI...
a82ebef9ddd55deff142059087364c59195ae6edc5b5599e4f8a4dd3128a7a09
MATLAB
30,374
1,078
% This code takes in one cleaned excel sheet and produces all desired % graphs and processed information regarding myelinated and unmyelinated % lengths of traced processes % Rev 2 only uses overall average fiber radius for conduction velocity % estimates % plot unmyelinated length vs myelinated length % plot histogr...
3b127f8575716e63872fa2faaa417608e966d0dc78e39340735ca9d8e8baf751
MATLAB
30,611
642
clear all close all dataset_list_paths = [ ... %{'C:\Data\Code\general_code_old\data_folder_lists\Janelia\d5HT1b_similar_od_handovers.xls'};... %{'C:\Data\Code\general_code_old\data_folder_lists\Janelia\c305a_similar_od_handovers.xls'};... {'C:...
0f4545b0686c6ba4f1b898084bc561b1a3a8e6b27fe557b2f3971a884c25b9f3
MATLAB
31,370
785
%BlandAltman Draws a Bland-Altman and correlation graph for two datasets. % % BlandAltman(Data1, Data2) - Data1 and Data2 have to be of the same size % and can be grouped for display purposes. 3rd dimension is encoded by % colors and 2nd dimension by symbols. The 1st dimension contains % measurements with...
24228d74a771372bd739712f611b62720f93269a1c38e31cf3c21e07ed9f02ed
MATLAB
31,658
564
function DiffusionSimulation(data) %% Show window with diffusion sumulation the real data %% repsesnted as a set on polygons and calculated cylinders. % After simullation graphs show up. global TimePeriod GTimeStep np charge interCoef diffCoef simComplexity plotTimeStep global figures stopSimulation ...
fe073753035a3317ec653745e41e86108b009f35db6d15c8258e01214f940649
MATLAB
31,669
587
auto_stimulus_period = true; %stimulus_period is found by autocorrelation if this is true BTA_playback = true; stimulus_period = 60*14-1; starting_shift = 0; relevant_track_fields = {'BehavioralTransition','Frames'}; load('reference_embedding.mat') load('C:\Users\mochil\Dropbox\LeiferShaevitz\Papers\mec-4\AML67\behav...
513a5cdad381d4a33dca1a1a1fe2ea440fe1daa0a605a55ed1c2afbdbaff560a
MATLAB
31,939
874
% This script is used to analyze each neurons response to a leading edge, % trailing edge and a discreet object of different heights (3°, 84° or 138°) % traversing the target RF, the grating RF or both. %% Filenames to be analysed - Bar eSTMD model clear all folders = {'211006_N03P01' '211005_N01P01' ...
59052f162bb3fa1dff73edfa78d05fba5a248ac055ae9020de463a62a5db9ff3
MATLAB
32,017
848
function ft_write_cifti(filename, source, varargin) % FT_WRITE_CIFTI writes functional data or functional connectivity to a cifti-2 % file. The geometrical description of the brainordinates can consist of % triangulated surfaces or voxels in a regular 3-D volumetric grid. The functional % data can consist of a dense o...
ad6e21cfc00cfd5e6be3a3e554b9e159d5aec2d31652a329861b0f9caa13963f
MATLAB
32,210
384
function ardy = Connect_MotoTrak(varargin) %Connect_MotoTrak.m - Vulintus, Inc., 2016 % % Connect_MotoTrak establishes the serial connection between the computer % and the MotoTrak controller, and sets the communications functions used % for streaming data. % % UPDATE LOG: % 05/09/2016 - Drew Sloan - Separat...
5bb6296255e115cec69df336726a3a1acad6cc1c6fe4d43c91b7fac9867f661f
MATLAB
32,529
1,100
%initialize ephys recordings initEphys %% amplitude over channels during active sleep %taking mean/max starting at wake transition allLFP=zeros(384,120000); allOct=[]; allDset=[]; allBout=[]; for currOct=1:9 dsets= find(oct==currOct); for dset=1:numel(dsets) currDset=dsets(dset); ...
0f4e9f25b692f09c617cf965735d912a3b2a8e0a248d75a4a2972a408500684c
MATLAB
32,744
692
classdef preprocess_ct < matlab.apps.AppBase %PREPROCESS_CT A GUI for cropping and re-orienting CT scans. % % Use this GUI to crop and re-orient your CT scans to comply with the % coordinate system used in this toolbox (Rigth, Anterior, Superior). % Follow the steps outlined in the GUI, check that the pink labels ar...
2b3151bdb42518dc6f0652700f01257cbfbe814b28426cb47d3c85042b2d9911
MATLAB
32,955
790
% Written by Aleh Sudakou (https://www.researchgate.net/profile/Aleh-Sudakou) % Nałęcz Institute of Biocybernetics and Biomedical Engineering, Polish Academy of Sciences % This is one of the codes shared on https://github.com/asudakou/Analyzing_TD-NIRS % Last updated: 20 May 2023 %% Description: % This scrip...
068ad282df77832b00d5dc29a6655fee09346026b1d8fd01d4e4c18ba0206191
MATLAB
34,518
978
% Figures for the Gnomes project % % Other m-files required: % figset.m (common stats and figure settings) % EEGLAB toolbox https://github.com/sccn/eeglab % brewermap: https://github.com/DrosteEffect/BrewerMap % subtightplot: https://uk.mathworks.com/matlabcentral/fileexchange/39664-subtightplot % cspy: https://uk.ma...
1331690e8cef21fe3881d09c0432bf0c90b37f28c81080fb21a65b08d1fbbf16
MATLAB
34,735
816
clear close all clc chanlocs = readlocs('cap64.loc'); % path_temp = 'D:\Participant Folders_new\'; %TCD Laptop % path_temp = 'S:\R-MNHS-SPP\Bellgrove-data\4. Dan Newman\Participant Folders_new\'; %Monash PC path_temp = 'C:\Users\Dan\Desktop\Big_Dots_Data\'; %% Create paths for subjects subject_folder = {'LK_07_04_14...
f3fcd9df91cbd49e2d7a9940197c8d2c4c8896fedc46499b6ac4ca5f34bca324
MATLAB
34,740
953
function [shape] = ft_read_headshape(filename, varargin) % FT_READ_HEADSHAPE reads the fiducials and/or the measured headshape % from a variety of files (like CTF and Polhemus). The headshape and % fiducials can for example be used for coregistration. % The input can be a filename (a string), or a cell array of filena...
a01ca9f7ada6814b2776af4b629ca558e73207f22ada9fe3298409d60c38db75
MATLAB
35,148
620
auto_stimulus_period = true; %stimulus_period is found by autocorrelation if this is true BTA_playback = true; stimulus_period = 60*14-1; starting_shift = 0; relevant_track_fields = {'BehavioralTransition','Frames'}; load('reference_embedding.mat') load('C:\Users\mochil\Dropbox\LeiferShaevitz\Papers\mec-4\AML67\behav...
c62ae0bf96e6baa07861345caab9a4e732e697890700bda432ba9a569e39dd57
MATLAB
35,148
578
% This scipt loads data that has been used to map a receptive field (RF) % using a local sinuoidal grating moving in different directions at % different locations on the screen. It assumes that the experiment has been % designed so that the patch appears in one location ant moves in x different % directions, before mov...
aa42af095347f5a8ce428a6dd52ef5429283fafe999b09b5beccd49546772ed8
MATLAB
35,322
632
function fMRI_RunSecondLevel_HGF() %-------------------------------------------------------------------------- % Process the 2nd level analyses % Model used: Standard whole-brain (event-related) GLM % % % Contrasts: % - 1: Tilt % - 2: Tilt_Eps3: PM epsilon 3 on regressor tilt % - 3: Tilt_Eps2: PM...
135f475e3275a5f9ab9d600a5667f3eb4fd88595e0bf3fac3552ae48dcefcb89
MATLAB
35,575
998
% miro :: Measured Impulse Response Object % % miro Class Definition % % MIRO V1, Release 1.04 - 07/Feb/2014 % MIRO V1, Release 1.05 - 25/Dez/2016 % MIRO V1, Release 1.06 - 20/Sep/2017 % #Author: Benjamin Bernschütz (2012-2014) % #Author: Johannes M. Arend (2014-2017) % #Author: Christoph Pörschmann (TH Köln, Universi...
9bb4a06c0cba1dbcf1c5a22c1dd46a4675c4083d96d235bbb98861249ba78b5b
MATLAB
36,362
789
classdef AABB_tree < handle % This class defines a AABB_tree % by Alberto Gomez, 2012 % properties(GetAccess = 'public', SetAccess = 'public') rootNode = AABB_node(); mesh; % structure with input Meshes max_tree_depth=Inf; % we want that each ending leaf is a single...
2bce8819bb2d6ee2095f2f90d3bc295934e23a7c70b89c8e9968cc43030d9d95
MATLAB
36,812
842
function [Yml,Ymg,Ycls,Ycls2,T3th] = ... cat_main_LAS2(Ysrc,Ycls,Ym,Yb0,Yy,T3th,res,vx_vol,extopts,Tth) % This is an exclusive subfunction of cat_main. % ______________________________________________________________________ % % Local Adaptive Segmentation (LAS): % % This version of the local adaptive intensity corr...
fa5ecc9d1531668396be251b077861a0d25ca371de6eeb76a2f92f7b38accc35
MATLAB
36,916
917
function source = ft_read_cifti(filename, varargin) % FT_READ_CIFTI read functional data or functional connectivity from a cifti-1 or % cifti-2 file. The functional data can consist of a dense or a parcellated % representation. The geometrical description of the brainordinates can consist of % triangulated surfaces or...
df34d5c233860b02eb4c400e9a63aa7f9d1961a6190b0031995a0cc2b5e3bc49
MATLAB
38,664
805
%GLOSSCATS_CALCFEATURES.m % Image analysis code for Schmid, Barla, & Doerschner (2023) Nat. Hum. Behav. % Last update: A.C.S., March 2023 %------- References: ------------------------------------------------------ % Please cite: % Schmid, Barla, & Doerschner (2023) Material category of visual objects compute...
d2de5c5f8f21bb19342416f72031492b621f728cf0771ffd20d86339caff5d22
MATLAB
38,881
1,182
% Script to analyze olfactory conditioning data across day 3 of each odor set githubDir = 'D:\GitHub'; addpath(genpath(fullfile(githubDir, 'npy-matlab'))) addpath(genpath(fullfile(githubDir, 'steinmetz-et-al-2019'))) direc = 'D:\GitHub\ottenheimer-et-al-2022\Imaging'; addpath(direc); %% behavior summary mice={'pl08',...
b950c107e71769febaf653098e2b2e0433c1b3fda86055af9f22e1605db60cca
MATLAB
39,116
855
clear all close all dataset_list_paths = [... {'C:\Data\Code\general_code_old\data_folder_lists\Janelia\MBONG2_PaBaEl_simp_pairing_Berry.xls'};... %{'C:\Data\Code\general_code_old\data_folder_lists\Janelia\MBONG2_PaBaEl_handover_pairing_Berry.xls'};... ...
d850b563bf480f14736f0c5d3766aa86770e9067b33eefdd467faa31a2d8ed0a
MATLAB
39,295
962
% In this code, the preprocessing steps are listed for the following % manuscript: "" and for the following dataset: % https://openneuro.org/datasets/ds004386 % In order to run this code the Spinal Cord Toolbox (version 4.2.2 or higher - % note that for the manuscript version 4.2.2 was used) % and FSL should be added ...
499f5368856eca9875d2c49cc512499ab785b6f72eea6c0b96bedef8bbf9d2a4
MATLAB
40,089
925
function varargout = cat_vol_qa(action,varargin) % CAT Preprocessing T1 Quality Control % ______________________________________________________________________ % % Estimation of image quality measures like noise, inhomogeneity, % contrast, resolution, etc. and scaling for school marks. % % [QAS,QAM] = cat_vol_qa(act...
5f11e677d776f04e7bfe2f74f963c9ab112ec0b69ba606963f14e268ea6cfa9b
MATLAB
40,279
540
%% 3DEPI distortion correction piplines at 7T for in-vivo data % No-correction, B0 field mapping and reversed-PE (fsl_topup) techniques % V Malekian, FIL Physics clc;clear;close all; addpath('/export/home/vmalekian/Matlab_lib/spm12/') %% Topup LSR and Jacobian %%3DEPI fsl topup for sub=1:22 dir1= [...
e898aedce0146b496e92543f0066ab2b22acb44125ce5bedf92208ba1d381ea5
MATLAB
40,936
941
clear all close all base_order_paths = [{'C:\Data\Data\Raw_data\Adithya_airgap_expts_v220210610\30s_Test\CS+_First\'};... {'C:\Data\Data\Raw_data\Adithya_airgap_expts_v220210610\30s_Test\CS-_First\'}]; vid_path = 'C:\Data\Data\Analysed_data\Analysis_results\air_gap_traj_an\vert_al...
6c01d92557120493d93d87b0adce5132b292b370799b3350f13cef4a74b332c9
MATLAB
41,073
1,183
% Script to analyze olfactory conditioning data across day 3 of each odor set githubDir = 'D:\GitHub'; addpath(genpath(fullfile(githubDir, 'npy-matlab'))) addpath(genpath(fullfile(githubDir, 'steinmetz-et-al-2019'))) direc = 'D:\GitHub\ottenheimer-et-al-2022\Imaging'; addpath(direc); %% behavior summary mice={'pl08','...
d34410938b42b28528cdbba46e8d7f0eef9c2fedccf30eb716ce1ed91fe3eeda
MATLAB
41,199
899
function cat_run_job(job,tpm,subj) % run CAT % ______________________________________________________________________ % % Initialization functions for the CAT preprocessing % * creation of the subfolder structure (if active) % * check of image resolution (avoid scans with very low resolution) % * interpolation % ...
ba4bf923502c7e4237c6d4e79aa73c8e8baacbaab3daea041d668d19fa8b591f
MATLAB
42,025
965
clear close all clc chanlocs = readlocs('cap64.loc'); % path_temp = 'D:\Participant Folders_new\'; %TCD Laptop path_temp = 'S:\R-MNHS-SPP\Bellgrove-data\4. Dan Newman\Participant Folders_new\'; %Monash PC % save_path = 'D:\Participant Folders_new\'; %% Create paths for subjects subject_folder = {'LK_07_04_14','AR_08...