sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
0c3b72b69912b21d5a4312ad0541a13bcb97b04bd6b959c13383936817a97a85
MATLAB
10,773
269
function hText = xticklabel_rotate(XTick,rot,varargin) %hText = xticklabel_rotate(XTick,rot,XTickLabel,varargin) Rotate XTickLabel % % Syntax: xticklabel_rotate % % Input: % {opt} XTick - vector array of XTick positions & values (numeric) % uses current XTick values o...
84f34abaf86dbae5814a0a1b3580b141a8624831ddb4d6d805ea6367387b64c8
MATLAB
10,775
231
function [Signal_time] = SignalModelR2_Submission(D_axons,V_Fiber,G_axons,params) % This function estimates the averaged signal in an unitary voxel with a % specific amount of axons aiming to specific directions (D_axons), with % specific volume (V_axons) and G ratio (G_axons) dispersed with a specific % Watson ...
d4b1994477214137cc9e9b6148c24150559264e818df61be91eb456c6b9da27d
MATLAB
10,955
226
function [crp_parms, crp_projs]=CRP_method(V,t_win) % function [crp_parms, crp_projs]=CRP_method(V,t_win) % % This function performs canonical response parameterization % % % Input variables: % % V: single-trial stimulation-evoked voltage matrix (Dimensions of V are % T×K, with T total timepoints by K tota...
cfebbed95b086372451e183b966e094255ada2286b5cfe91cc34804dfa1d76e4
MATLAB
11,002
246
function [corr_db, mdata] = gather_correlation_statists(db) % Function gather_correlation_statists() produces flat db from a db of a single experiment, % as produced by the pipeline. % % Inputs: % db - (struct) - The db that holds the complex datastructure, as in db_h.data of the % ...
6efefd79e81e6373d6105155fe0a075e64cddbb0ed0493056e6e2aea260072db
MATLAB
11,030
263
%---------------------------------------------------------------% % This is the main script for calculating INSeq vs. OUTSeq % % trajectory distance in the original state space. % % -- Wenbo Tang (Jan 07, 2023) % %-------------------------------------------------------...
893c3982ebc34b34ba6ad24ebf5d9d5e9e3f22a2e8313f06c3e6109e0d822c7f
MATLAB
11,062
200
function y_est = MIRO_Fast_Wiener(z, y_hat, sigma, smp) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This algorithm is adapted from the article: % % [1] K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian, "Image Denoising % by Sparse 3D Transform-Domain Collaborative Filtering," ...
62861832df5c0e855cce500c4cc883ce2cf433eae3be34349d228d295f492d28
MATLAB
11,090
277
% ============= Opening functions ======================= function varargout = rat_direction_labeler(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @rat_direction_labeler_OpeningFcn, ... ...
fdf949e615e027676b02ba77fcd18076f1411ffa038a11d5ec249f88730109e7
MATLAB
11,090
263
%% MAIN MASTER: NEURODEGENERATION CODE % Written: ASC + ZK % Date: 2022-04-27 % Updated: 2022-01-26 % Main script for AUDDIT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Initialization and user input close all clear; clc; % Add path of code location (CHANGE TO WHERE IMA...
6dc28480648b2f3785d6c5e2b0c40b1a41cbf5d64294084df3d81ee04a39ae02
MATLAB
11,102
406
function varargout = FinchScopeMk3(varargin) % FinchScope DAQ software. % WALIII % d02.09.15 % % NOTE: before starting, you will need to identify that both the camera, % and arduino are recognized by matlab. This can be done with the comand: % >> imaqhwingo % for the camera % >> % % % % gui_Singleton = 1; gui_Stat...
2a745b3b784fd57ea4471649e4f46a70b9343ec4db16f3deff7c262895b215e6
MATLAB
11,116
151
%% LaBGAS_get_firstlvl_dsgn_obj_pmods % % This script contains a function that defines a number of fields of % the CANlab style first level DSGN structure array % for Maaike's emosymp study on IAPS picture-induced bodily symptoms, % including parametric modulators. % This function is used in LaBGAS_1_spm_fit_firstlvl...
d77558895bf868ba6d504eb6ff6cdc3a1b004753577f103e6980909b89ef3c50
MATLAB
11,128
166
% ClinicalASL toolbox 2023, JCWSiero %%%%%%%%%%%%%%%%%%%% ASL Analysis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % written by Jeroen Siero 25-05-2023 for the MOYAMOYA study % includes automatic DICOM file loading, anatomy segmentation and registration, outlier removal, data construction, BASIL analysis, CBF, map smoot...
7843b46239e90db198fb66216ce25b582669744db24fc068e690560709756fd7
MATLAB
11,280
366
function saveastiff(data, path, options) %% usage: saveastiff(im2uint16(yourfile/max(:), double type), 'yourfile.tiff') % options.color % : true or FALSE % : If this is true, third dimension should be 3 and the data is saved as a color image. % options.comp % : 'no', 'lzw', 'jpeg' or 'adobe'. % Compression t...
4572e6fa91bbc1c27f0214f5859f699e12bb0f0d6f44b96a8c0287c02d132ea3
MATLAB
11,326
205
%Authors: Tatjana Schmitt & Simon Wadle, 2019-2022 % based on concepts published in Romero et al. (2019): Cellular and Widefield Imaging of Sound Frequency Organization in Primary and Higher Order Fields of the Mouse Auditory Cortex. Cerebral Cortex 30: 1603-1622 %requieres Matlab packages chronux_2_12 (info : ht...
84c97ad3bc8a52c6ef12b89d1db6a3178562992faabfc04f4f03c41b6c33b9fa
MATLAB
11,328
274
%---------------------------------------------------------------% % This is the main script for calculating the distance of % % neural states between N' and shuffled neural activity in the % % original state space. -- Wenbo Tang (Jan 07, 2023) % %------------------------------------------------------...
cbe40d0b29dffa28c63b40430a90319c13612c7b348bb89034008f51af7c799c
MATLAB
11,503
396
function IDX = IDXforbmcBRFS2021 %% load session data global STIMDIR cd(STIMDIR) didir = strcat(STIMDIR,'\'); saveName = 'IDXforIOTana'; anaType = '_MUA_old.mat'; flag_saveIDX = true; saveYourFigs = true; kls = 0; list = dir([didir '*' anaType]); sdfwin = [-0.15 .8]; clear holder IDX SupraCount = 0; Gra...
78f8f70b827b4c9c740c3b1bd3fd639119c4f40e7daf6ca04d35c60f0c928be3
MATLAB
11,542
268
%---------------------------------------------------------------% % This is the main script for calculating the distance of % % neural states between N' and shuffled neural manifolds. % % The UMAP MATLAB toolbox (V4.1) is needed (https://www. % % mathworks.com/matlabcentral/fileexchange/ ...
8439a96152dec39b01d62f4774ab4031169602174b3094cf6ee3a92de92ad8f3
MATLAB
11,554
270
%Author: Tatjana Schmitt, 2019-2022 clearvars %% set parameter save_flag = true; % objective parameter wf_objective = '10x'; % either '10x' or '4x' imaging_objective = '16x'; % either '16x' or '20x' if strcmp(imaging_objective, '16x') pixel_size = 1.602; elseif strcmp(imaging_objective...
46243df7b290683f5fa17a7360a70619f663b863c2f9291e546d5110ba023282
MATLAB
11,645
212
%% About this script % % Optional: Run these load and attach behavioral data from files (e.g., from Excel) % % This script is an example script only. You should modify it to fit your % needs, which will depend on which types of behavioral/non-imaging data % you have and what variables you want to store and...
e33c7834107050097edab95601d836628449a1d332fe35da632531503467cc66
MATLAB
11,824
256
function [imLocCont,imFeatures,imDend,imOrigBig] = findBlebs(imOrig,sFactor) close all % Get background standard deviation t = adaptthresh(imOrig,.2); imbw = imbinarize(imOrig,t); imNot = ~imbw; bkStd = std2(imOrig(imNot)); % Local contrast adjust cropped image. %...
63791381d0a849d7aac0221a273d05fe04c0a9211eadf21d0881be05c3acb1df
MATLAB
11,835
275
%---------------------------------------------------------------% % This is the main script for calculating INSeq vs. OUTSeq % % trajectory distance based on UMAP manifolds of neural % % population activity. The UMAP MATLAB toolbox (V4.1) is % % needed (https://www.mathworks.com/matlabcentral/filee...
dd4081c4656b358573a6d51635bd835ea001794996ae3dbaa37870649467c7d3
MATLAB
11,994
376
function implement_MDP % Initialize hardware connections % Set initial state % Main loop: % observe animal - position and action % as a function of current state and animal state, select action % as a function of current state and animal state, select next state % % Animal state: x, y and nose poke state % MDP st...
69f50abdaa38b36186e2cb3b43b5086f908fc14af9590f3478e65bd230fbf3f2
MATLAB
12,006
303
function res = saveastiff(data, path, options) % options.color % : true or FALSE % : If this is true, third dimension should be 3 and the data is saved as a color image. % options.compress % : 'no', 'lzw', 'jpeg' or 'adobe'. % Compression type. % 'no' : Uncompressed(Default) % 'lzw' : lossles...
d3b748bcbdb2d119382e4d97a950b09ea75c7649c9a07d07c02a33033efd9f42
MATLAB
12,010
322
% breakyaxes splits data in an axes so that data is in a low and high pane. % % breakYAxes(splitYLim) splitYLim is a 2 element vector containing a range % of y values from splitYLim(1) to splitYLim(2) to remove from the axes. % They must be within the current yLimis of the axes. % % breakYAxes(splitYLim...
845748791f56c1916c327247a70e83a484873bf96a2d33795d1e2b50b9066fd2
MATLAB
12,042
373
function X = diUnitTuning_BRFS(RESP,STIM,brfsfiles) X = []; if ~isequal(size(STIM.eye),size(RESP)) error('pass resp for 1 channel and 1 window only') end if all(isnan(RESP)) return end % Determin Neuron's Orientation Tuning clear I varnames I = (STIM.monocular | STIM.dioptic) ... & STIM.adapted == 0 .....
9d452e5c95ec71fc3c6a0d9af87c6066d38a2444bca74c7f09cb471857d74744
MATLAB
12,071
368
function X = diUnitTuning(RESP,STIM,goodfiles) X = []; if ~isequal(size(STIM.eye),size(RESP)) error('pass resp for 1 channel and 1 window only') end if all(isnan(RESP)) return end if nargin < 3 || isempty(goodfiles) goodfiles = unique(STIM.filen); end % Determin Neuron's Orientation Tuning clear I varna...
f2edebd1119acade7dba400fb318311ec46afd50b02fc518f6b0299c1f15a21a
MATLAB
12,248
364
function [C,numberOfOverlapPixels] = normxcorr2_general_freq(varargin) %NORMXCORR2_GENERAL Normalized two-dimensional cross-correlation. % [C,numberOfOverlapPixels] = NORMXCORR2_GENERAL(TEMPLATE,A) computes the % normalized cross-correlation of matrices TEMPLATE and A. The resulting % matrix C contains correlatio...
0c6b343784eae306dd95ee634a592847f94f30005cda5f1d67d6a4ceba4fb895
MATLAB
12,270
216
%% Figure 2 measure = 'envCorrDBTorth_gamma'; ephysMeasures = {'envCorrDBTorth_highGamma','envCorrDBTorth_gamma','envCorrDBTorth_beta','envCorrDBTorth_alpha','envCorrDBTorth_theta','wPLI_dbt_beta','wPLI_dbt_alpha','wPLI_dbt_theta'}; RSdata = loadReportDate([getLocalPath('ECoGoutput') 'Embeddings' filesep 'RSda...
e9014477313e4db35bcd87f286b3321491134ef7cde644db8b0082b2f67dfe88
MATLAB
12,278
328
function camera_parser_module_mat_to_pdf(db, out_folder) % JN 2019-01-28 added saving in `out_folder`, made figures invisible % Function camera_parser_module_mat_to_pdf generates graphical evaluation of the analysed data from % the camera. The script produces two figures in .png format. % Runtime: 4 sec % Input: % ...
1af3ba028ea987c6f9083e7fc6c50ccb758a5107b5709baea887ba90dfdb7809
MATLAB
12,323
440
function AUTOdiIDX_monocOccCompare % Make sure tm goes out to .9 (in time for the second stimuli) Hopefully I % can crop the extra .1 later if needed. But this should at least show me % the second peak as a sanity check. clear tic didir = 'T:\diSTIM - adaptdcos&CRF\STIM\'; saveName = 'diIDX_AUTO_monocOccCompare'; % ...
5558e1b4b2564ee3ffa365313b328e3a0f1d85b1f13d0cd88b5a5556424176e8
MATLAB
12,432
407
function AUTOdiIDX_RESPonly_equiocularIncluded % Make sure tm goes out to .9 (in time for the second stimuli) Hopefully I % can crop the extra .1 later if needed. But this should at least show me % the second peak as a sanity check. clear tic didir = 'T:\diSTIM - adaptdcos&CRF\STIM\'; saveName = 'AUTOdiIDX_RESPonly_...
5f4d42b48e3b042b2751bbc8413773f7c209bf300dea918bc7b993dd980cab6d
MATLAB
12,547
347
IDX = IDX_iScienceSubmission %% load session data global STIMDIR cd(STIMDIR) didir = strcat(STIMDIR,'\'); saveName = 'IDX_iScienceSubmission.mat'; % THIS IS CONTRAST LEVELS OF .41-.75 INCLUSIVE anaType = '_AUTO.mat'; flag_saveIDX = true; kls = 0; list = dir([didir '*' anaType]); sdfwin = [-0.05 .9]; clea...
cb252b1ec623bc7ea368b2a79f89b214c452ce9471bb93fbd6ad1c254c668476
MATLAB
12,593
408
function AUTOdiIDX_RESPonly_AllTMandAdaptedEffect % Make sure tm goes out to .9 (in time for the second stimuli) Hopefully I % can crop the extra .1 later if needed. But this should at least show me % the second peak as a sanity check. clear tic didir = 'T:\diSTIM - adaptdcos&CRF\STIM\'; saveName = 'AUTOdiIDX_RESPon...
b0203094d693245942403ea1bc6d6cacba040a74ebbfdea3bda971f0e85e06a3
MATLAB
12,620
361
function [Y,ndx,dbg] = natsort(X,rgx,varargin) % Natural-order / alphanumeric sort strings or character vectors or categorical. % % (c) 2012-2021 Stephen Cobeldick % % Sorts text by character code and by number value. By default matches % integer substrings and performs a case-insensitive ascending sort. % Options sele...
e128d69afd88e0a42a79b569e5e47a7d2ca9367b8f0c04afb6c305cde7744c9c
MATLAB
12,622
428
function [IDX,ERR] = IDX_iScienceSubmission(ROOTDIR) % This function loads in event-triggered data, establishes unit % preferences, and then sorts condition types from the perspective of the % individual multi-unit's tuning. anaType = '_AUTO.mat'; list = dir([ROOTDIR '*' anaType]); sdfwin = [-0.05 .9]; clear ...
2ba8e3ee2b2fd91caef2cb0d188b13bdbed0e7b50acfb4be5290bd2db72688b8
MATLAB
12,810
326
filePath = '\\ODIN\p\graham_preprocessing\importnat_data_from_graham\'; subjects = {'369','372','376','400','405','409','418','423','456','460'}; ROIsToUse = {'OG','PHG','STGM','TFG','PP','PT','ITGP','SPL','vPostCG','TP','IFGor','GR','ITGA','STGA','MOG','IFGop','PMC','STSL','STGP','SMG',... 'dPreCG','CingM',...
2b233dc6fcb05a37f0421f12ddc9f903f0bfb6389038eeadd240dcb34a047917
MATLAB
12,825
384
function [n_signif,index_signif] = fdr(pvals,qlevel,method,adjustment_method,adjustment_args) % % Attribution: % % Version 0.1.3; May 10, 2004 % % License: GPL version 2 or later % % This program is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License % as p...
2dabdb5ebc5a7c79ba5735e7461ba1216ba05ec1f35c1f6ce148332e059a857c
MATLAB
12,903
296
function mdp_analysis_nightRIFF(sounds_table, mdp_table, outputdir) if sum(mdp_table.type == 'playSound') %sounds played in session pSi = find(mdp_table.type == 'playSound'); pSii = find(diff(pSi) > 1); pSarea = mdp_table.s_area(pSi(pSii)+1); fig = figure('Position', [0 0 1000 800], 'Visible', 'off...
7d3fdf2cd49b14feb6a27c3eecce3743c679230564d1e83e29658b01af0e9437
MATLAB
12,923
308
%---------------------------------------------------------------% % This is the main script for calculating the distance of % % neural states between N' and F in the the original state % % space -- Wenbo Tang (Jan 07, 2023) % %-------------------------------------------------------...
cb210d59c0e0c0fe74333074c052d6e0e6213f88b0dd12faca097594cb1e59f4
MATLAB
12,947
437
function [h0, h1] = dfilters(fname, type) % DFILTERS Generate directional 2D filters % % [h0, h1] = dfilters(fname, type) % % Input: % fname: Filter name. Available 'fname' are: % 'haar': the "Haar" filters % 'vk': McClellan transformed of the filter from % the VK book % 'ko': orthogonal filter in the Kov...
b50382cba94ab2ac51852d4b607362474191e9e199471e954434516038839b3e
MATLAB
12,988
433
%% HouseKeeping clear; close all addpath('D:\Documents\Software\spm12\PublicVersion'); spm('defaults', 'eeg') addpath('D:\Documents\Software\FIL-OPMEG\OPM'); addpath('D:\Documents\Software\linspecer'); addpath('D:\Documents\Software\export_fig'); %% Config resultsSavePath = '.\EnvironmentalNoise\results'; rawDataPath...
fed76ee0505ebec7059982d09b504fe91861362d3d162db1c5225c1b7768049f
MATLAB
13,088
443
% Mean firing rate in the time window from spike latency to 100ms % bar graphs in Fig. 2, a-c clear; clc; close all; % load spike data load('spikes.mat'); %% Monkey A % Firing rate b1c100 = mSpikes_A_b1c100; % wide-prior, high contrast b2c100 = mSpikes_A_b2c100; % narrow-prior, high contrast b1c008 = mSpikes_A_b1c0...
62b87ecd0160383f4e694afb027998ff1c568f6a4ac887d88bcdb045b6be34ca
MATLAB
13,114
251
% This script describes the statistical analysis of age effects on MEG power and connectivity as well as cortical thickness. % Steps for visulatization of the results are described and are partially done using Matlab or R. % % Christina Stier 2022 %% Vertex-wise analysis using PALM (https://fsl.fmrib.ox.ac.uk/fsl/fs...
459d755b5773744c0a7c17481d5e81f0ca5d106b7573194f2b1ce91471ce7811
MATLAB
13,117
314
classdef CocoApi % Interface for accessing the Microsoft COCO dataset. % % Microsoft COCO is a large image dataset designed for object detection, % segmentation, and caption generation. CocoApi.m is a Matlab API that % assists in loading, parsing and visualizing the annotations in COCO. % Please visit http:...
ea5b331a472d39f1cbb0a1cab79953b5a977b0fa86f16a7ce4ea6f0b0251c407
MATLAB
13,136
327
%analysis parameter definitions, to be used for all subjects in this stream % This is a unified configuaration file for EEG (EGI 256) und MEG params=[]; % Directory that has the mapping functions for dataset detection params.dataset_mapping_dir='conf/dataset-mapping'; % -------------------------------------------...
5e22ed8f65e6b3570756fd8e67085a1181e3f8ab35d87f1b4da1000752ef9a45
MATLAB
13,233
444
function IDX = IDX_iScienceSubmission_onlyE48 %% load session data saveName = 'IDX_iScienceSubmission_onlyE48.mat'; % THIS IS CONTRAST LEVELS OF .41-.75 INCLUSIVE flag_saveIDX = true; global STIMDIR cd(STIMDIR) list = dir(['*_E_*','AUTO.mat']); anaType = '_AUTO.mat'; sdfwin = [-0.05 .9]; clear holder ID...
d43c4241bfbdd420c45f4d5eb2c5eb74714325bf132fabaff0a7c58f46ce1dcc
MATLAB
13,233
444
function IDX = IDX_iScienceSubmission_onlyI34 %% load session data saveName = 'IDX_iScienceSubmission_onlyI34.mat'; % THIS IS CONTRAST LEVELS OF .41-.75 INCLUSIVE flag_saveIDX = true; global STIMDIR cd(STIMDIR) list = dir(['*_I_*','AUTO.mat']); anaType = '_AUTO.mat'; sdfwin = [-0.05 .9]; clear holder ID...
5656e36f7bfd115703377f09c93f5a9b7b196dd2c6c8f7830a7f599dd243ed0b
MATLAB
13,257
368
function [Y,ndx,dbg] = natsort(X,rgx,varargin) % Natural-order / alphanumeric sort strings or character vectors or categorical. % % (c) 2012-2021 Stephen Cobeldick % % Sorts text by character code and by number value. By default matches % integer substrings and performs a case-insensitive ascending sort. % Optio...
1bfae124292c0c2af992085aaf8939f85929c71d41d25dc54a7a6ec9b5745f2d
MATLAB
13,406
387
function [y_est, sigma_est] = bm4d(z, distribution, sigma, profile, do_wiener, verbose) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % BM4D is an algorithm for attenuation of Gaussian or Rician noise in % volumetric data. This algorithm reproduces the results from the articles: % % ...
57a3d740d5dea8e0ebb846f68111e16bb873d7c6e4a89798a4f8e0feb9da9112
MATLAB
13,445
465
function [D, movement_data, feedback_applied, saturated_frames, beep_start_stop] = ... preprocess_feedback_ERF(raw_data_filepath_root, analysed_data_path, results_save_path, MRI_file_name, subject, session, task, run, varargin) % Preprocess auditory ERF data for feedback experiment. % Steps: % load data, % re...
baadfce7e6af4e707d755f235c555e0a789c2c590b5bae8b4920a0117f679ac8
MATLAB
13,513
446
function IDX = IDX_iScienceSubmission_unbalancedContrast %% load session data global STIMDIR cd(STIMDIR) didir = strcat(STIMDIR,'\'); saveName = 'IDX_iScienceSubmission_unbalancedContrast.mat'; % THIS IS CONTRAST LEVELS OF .41-.75 INCLUSIVE anaType = '_AUTO.mat'; flag_saveIDX = true; kls = 0; list = dir([did...
829e9efe4c6bc17a0b014e9818ce085711840f01eb959c1b7681f1ab43bd459f
MATLAB
13,550
446
function IDX = IDXforGrammJuly2021; %% load session data global STIMDIR cd(STIMDIR) didir = strcat(STIMDIR); saveName = 'test'; % THIS IS CONTRAST LEVELS OF .41-.75 INCLUSIVE anaType = '_AUTO.mat'; flag_saveIDX = 1; kls = 0; list = dir([didir '*' anaType]); sdfwin = [-0.05 .9]; clear holder IDX SupraCoun...
11957b63ce8a47898037059c1970a19fd351755d9debe1393f9917febdbc2031
MATLAB
13,575
387
% direction, speed, latency of smooth pursuit eye movements for prior direction % Fig. 1 d,e and fig. S1 c-f clear; clc; close all; % load data load('behavior.mat'); %% direction direction = direction_day_prior_A; % direction_prior_day_A: prior direction, monkey A, for each day % direction_prior_day_B: p...
4d9868321babf655893251043b2abccc76b1e598cc85e4da038ef6b2ad2a3e91
MATLAB
13,644
270
%Author: Tatjana Schmitt 2019-2022 function FRA_analysis_combine_awake_redcell(root_path) save_flag = true; %% matrices Rsquare_red = zeros; Rsquare_green = zeros; FWHM_1_red = zeros; FWHM_1_green = zeros; FWHM_2_red = zeros; FWHM_2_green = zeros; all_BFs_red = zeros; all_BFs_green = zeros; BF_single_peak...
6055780dd9ca46e7094f816b2d425bfdb6ee0a1aa5fa8d6164f25d25c7a3dfe5
MATLAB
13,647
402
function GLM_stLevel(subID) % compute first level model contrasts reward-control % no PM -> covariate 2nd level % dbstop if error %% define experiment setting parameters subj = subID; % to run on server %% What to do firstLevel = 0; constrasts = 1; copycontrasts = 1; %% define task variable sessionX...
49d00ba373bd911320661ce6297602c7fa229b078be3d0ecd7073af4aae16893
MATLAB
13,857
444
function varargout=gui_msgbox(varargin) %MSGBOX Message box. % msgbox(Message) creates a message box that automatically wraps % Message to fit an appropriately sized Figure. Message is a string % vector, string matrix or cell array. % % msgbox(Message,Title) specifies the title of the message box. % % msgbox...
458076f6d581ccfd4df028ff57f4a8fabf14b744e59c229af2f292ca3fe64109
MATLAB
13,881
474
function varargout=notBoxPlot(y,x,varargin) % notBoxPlot - Doesn't plot box plots! % % function notBoxPlot(y,x,'Param1',val1,'Param2',val2,...) % % % Purpose % An alternative to a box plot, where the focus is on showing raw % data. Plots columns of y as different groups located at points % along the x axis defined by t...
7b4a9e7885ae2f29a8c007146254735b3a3a120e8a2306c7f9db99b13c110ea3
MATLAB
13,886
443
function [IDX,ERR,pValue,effect] = findPValueDistribution() %% load session data global STIMDIR cd(STIMDIR) didir = strcat(STIMDIR,'\'); anaType = '_AUTO.mat'; flag_saveIDX = true; kls = 0; list = dir([didir '*' anaType]); sdfwin = [-0.05 .9]; clear holder IDX SupraCount = 0; GranularCount = 0; InfraCoun...
d06d4f40208ec120c3f1c7cf692331ca7416878bbd345c6e98d12bc8248e3a0b
MATLAB
13,921
486
%% %% Paths clear all; close all; % TDR path tdrDir = '/Users/jeongjunpark/Desktop/Joonyeol/Mante'; addpath(fullfile(tdrDir,'TDR')); addpath(fullfile(tdrDir,'TDR','nansuite')); addpath(fullfile(tdrDir,'TDR','tools')); %% Load data % Data directory datadir = fullfile(tdrDir,'/TDR/PFC data 1a'); % datadir = fullfi...
f90cf7cbf9fa5f63134f71261d87a56f584ed1b4260f90a98a069b57619f7e6d
MATLAB
13,952
414
%%% This script contains all single subject preprocessing steps %%% of CamCAN-data (resting-state, maxfiltered) % written by Christina Stier, 2020/2022 %% Load full list of CamCAN subjects subjlist = importdata('participants.tsv'); subjects = subjlist.textdata(2:end,1); %% Selection of subjects % Either use all su...
ee03869134c5ef60d17d13de81bf9bc722d0c149317eded2f7b117a7514bcdc1
MATLAB
14,166
457
function AUTOdiIDX_160108allCond % taken from diIDX_May27 % AUTODdiIDX can be found in "Event-alignment fuctions." % It takes all STIM_AUTO.mat inputs, finds relevant conditions, makes sure % the contact is tuned, and then saves results in a diIDX matrix which is % stored locally on HDD D:\5 diIDX dir. Note that all...
fa6d79032526fc13ba6214e871520bd8b34502169af198b9aa661aff0e4220fa
MATLAB
14,280
452
function SeparateAxes(varargin) % SeparateAxes - FUNCTION Push apart axes on a figure, around the origin % % Usage: SeparateAxes % SeparateAxes(..., hAxis) % SeparateAxes(..., fProportion) % SeparateAxes(..., 'on') % SeparateAxes(..., 'off') % % SeparateAxes provides a visual "improvement" ...
b9c191526b28f5f75adcadddf3671fd90fc3e5654cbcf7911f300d1e79e881d2
MATLAB
14,331
332
%---------------------------------------------------------------% % This is the main script for calculating the distance of % % neural states between N' and F neural manifolds. % % The UMAP MATLAB toolbox (V4.1) is needed (https://www. % % mathworks.com/matlabcentral/fileexchange/ ...
a7818d74a94535632d9faef5717bc9b79ceb56fc2fd247e16554cecdb692c205
MATLAB
14,344
269
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% --------------- supporting functions ---------------------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %----------------- Leaky accumulation --------------------------- function [err, simdat, pred, DecValue] = NID...
6deb1dabc875974ff2962bdb2962afb0a5f85b6d91533915aeb489ca78b6f798
MATLAB
14,768
504
% Using 3D affine matrix to rotate, translate, scale, reflect and % shear a 3D image volume. 3D image volume is represented by a 3D % matrix, and data type can be real integer or floating-point. % % Usage: [new_img new_M] = ... % affine3d(old_img, old_M, [method], [voxel_size], [bg], [verbose]); % % old_img...
f9acf6b986d0fd98755b2e9e52928179683e07e35698ba5ddf2e7dc7d4678d3e
MATLAB
15,068
492
function AUTOdiIDX_halfTM_MedMedC_Untuned % Make sure tm goes out to .9 (in time for the second stimuli) Hopefully I % can crop the extra .1 later if needed. But this should at least show me % the second peak as a sanity check. clear tic didir = 'T:\diSTIM - adaptdcos&CRF\STIM\'; saveName = 'diIDX_AUTO_halfTM_MedMed...
1e405af076cb7ce309afa89adf82c2f504a7f122b8cc1ea3211c316b88d20aa3
MATLAB
15,088
497
function AUTOdiIDX_halfTM_MedMedC % Make sure tm goes out to .9 (in time for the second stimuli) Hopefully I % can crop the extra .1 later if needed. But this should at least show me % the second peak as a sanity check. clear tic didir = 'T:\diSTIM - adaptdcos&CRF\STIM\'; saveName = 'diIDX_AUTO_halfTM_MedMedC'; % TH...
2768431ab2e3ab9ffe557ae316ade03362adbdd8f3e759cd9674f8931c926040
MATLAB
15,157
356
function varargout = ionpathtracker_gui(varargin) % IONPATHTRACKER_GUI MATLAB code for ionpathtracker_gui.fig % IONPATHTRACKER_GUI, by itself, creates a new IONPATHTRACKER_GUI or raises the existing % singleton*. % % H = IONPATHTRACKER_GUI returns the handle to a new IONPATHTRACKER_GUI or the handle to %...
9a1cb512e7457608462e20d208176872f3e776c54f1876629ea100da917322e0
MATLAB
15,157
328
% Neuromag layout of whole channels % This function returns the positions of 306 MEG channels % Copyright by Hong Gi Yeom % You can use this code for academic purposes function [position]=neuromag_layout_all() p=[ 1 -73.416206 33.416687 5.000000 4.800000 0113 2 -73.416206 38.416687 5.000000 4.800000 0112 3 -67.416206...
32ebbfa78193d8db15d894411be542bdff69454397d1bb95ea7f2d3c3c5efa00
MATLAB
15,177
289
%DAWN Black-purple-blue-green-yellow-white colormap % % Examples: % map = dawn; % map = dawn(len); % B = dawn(A); % B = dawn(A, lims); % % A black to white colormap with several distinct pastel shades reminiscent % of colors at dawn. This colormap has been designed to achieve perceptual % uniformity....
a86a1f3c2c012dcb5d1599d019b3544f11d44c4d0773616bf1e167cf17f0dca3
MATLAB
15,354
506
function AUTOdiIDX_fullTM_MedMedC % taken from diIDX_May27 % AUTODdiIDX can be found in "Event-alignment fuctions." % It takes all STIM_AUTO.mat inputs, finds relevant conditions, makes sure % the contact is tuned, and then saves results in a diIDX matrix which is % stored locally on HDD D:\5 diIDX dir. Note that al...
b328638378544cfb8e1a14218354ef72b0b5474b6f6189527aecb3027732ca98
MATLAB
15,360
506
function AUTOdiIDX_MediumMediumContrast % taken from diIDX_May27 % AUTODdiIDX can be found in "Event-alignment fuctions." % It takes all STIM_AUTO.mat inputs, finds relevant conditions, makes sure % the contact is tuned, and then saves results in a diIDX matrix which is % stored locally on HDD D:\5 diIDX dir. Note t...
e9b3c92c205fef5a8e639a3fc09449df35080afd45c0276969a66c1cde74484f
MATLAB
15,478
372
%% How to Run This Code % Run sections #1 and #2 % (Optional) For checking other parameters, run section #3 %% clc clear close all %% #1 Loading Data % Folder path where the zip file was unzipped folder_path='C:\Users\Sanghyeon Park\Dropbox (IBS)\CLASS-SMLM Paper\Nature Communications Submission\Resp...
282c2efa60f03c361f0d02041c4e9f24ac454cdae9d8f87c8b43eacfc6abc76e
MATLAB
15,534
474
% internal function % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) function [img,hdr] = load_untouch_nii_img(hdr,filetype,fileprefix,machine,img_idx,dim5_idx,dim6_idx,dim7_idx,old_RGB,slice_idx) if ~exist('hdr','var') | ~exist('filetype','var') | ~exist('fileprefix','var') | ~exist('machine','var') e...
0aa86c000f175ed94380b3f2a487f8e2102c2d7d243e8eead5b28dc59f644ca2
MATLAB
15,558
338
%% mdw_postprocessing, fourier analysis clear all,close all,clc Analysis = 'Fourier'; brain_slices_select = 8:11; %Change here, usually 8:11 slices for whisker AllData_dir='E:\mouse_development_whisker'; cd(AllData_dir) age_list = dir('mouse*'); ROIs = ["_SSpbfd" "_Subcortex" "_SS Cortex" "_SSpbfdR"]; for ...
2d217f3785110019f25aff57766eae84e5d19947e645524197340506c7cf9fe2
MATLAB
15,561
475
function varargout = record_gui_synced6(varargin) % RECORD_GUI_SYNCED6 MATLAB code for record_gui_synced6.fig % RECORD_GUI_SYNCED6, by itself, creates a new RECORD_GUI_SYNCED6 or raises the existing % singleton*. % % H = RECORD_GUI_SYNCED6 returns the handle to a new RECORD_GUI_SYNCED6 or the handle to %...
f9632ecb36f5889f19ddf2c530dcebf268a547cb780b9857535e3b9c100df430
MATLAB
15,567
533
% Test LFP spec on MUA trial selection clear close all PostSetup('BrockHome') flag_SaveFigs = false; %% load session data global STIMDIR cd(STIMDIR) penetration = '151221_E_eD_LFP.mat'; load(penetration,'STIM') matobj = matfile(penetration); %% Establish variables to change sdfwin = [-0.150 .5]; ConditionToTest = ...
49fc09f03abd6f5ca65a52c6129b47de321c5e6b181d5c514d61fea171818367
MATLAB
15,624
326
%% LaBGAS_1_spm_prep_firstlvl_models % % This script generates a CANlab style first level DSGN structure array and % CANlab/spm style onset/duration and noise regressor files % % See canlab_glm_single_subject('dsgninfo'), or documentation in % Github\CanlabCore\CanlabCore\GLM_Batch_tools for details on first level % a...
d3f73de8d279b2dd3c1b274252489857dc319a1413edb1750ad856dc70ffd16e
MATLAB
15,739
516
function AUTOdiIDX_LowLowContrast % taken from diIDX_May27 % AUTODdiIDX can be found in "Event-alignment fuctions." % It takes all STIM_AUTO.mat inputs, finds relevant conditions, makes sure % the contact is tuned, and then saves results in a diIDX matrix which is % stored locally on HDD D:\5 diIDX dir. Note that al...
00bf6abd003bfbb0e6c2e9e5bbd9e46cbb1ed83ddad7a7470042a92ddd0c5bb3
MATLAB
15,770
401
%% LaBGAS_run_MVPA_regression_single_trial % % This script runs MVPA regression analysis on a continuous outcome Y % (lasso-pcr, but can easily be adapted to support vector regression or % other methods available in CANlab's predict function) on an fmri_data_st % object created using LaBGAS_create_single_trial_fmri_dat...
188a8887e5e9dd3fb77ddb4a3d55ffd49e51b75ba8effe8dc12b0a5ef873b811
MATLAB
15,886
486
% Modifications to original code are Copyright (C) Alex A. Bhogal, 2022, University Medical Center Utrecht, % a.bhogal@umcutrecht.nl. Please see the original license file provided by % Tong et. al that is included with this code. % % <carpetEdgeDetect: performs shag carpet plot analysis and outputs transit maps > % % T...
9530efe409af2f66fd6889086283dc8f94914ba04b156f63f64640fe79d85c6f
MATLAB
15,917
317
%% LaBGAS_extract_confound_reg_fMRIprep % % This script will extract noise regressors from fMRIprep output for % the emosymp study, including % a) CSF signal % b) 24 head motion parameters (six directions, derivatives, and squared % values) % c) dummy spike regressors % % DEPENDENCIES % a) CANlab Github repos on your...
1594302ed2e75782f297bfa200c0a5b0dfb9db522816789cea39512199dcc553
MATLAB
16,013
514
function AUTOdiIDX_highContrast % taken from diIDX_May27 % AUTODdiIDX can be found in "Event-alignment fuctions." % It takes all STIM_AUTO.mat inputs, finds relevant conditions, makes sure % the contact is tuned, and then saves results in a diIDX matrix which is % stored locally on HDD D:\5 diIDX dir. Note that all ...
0b35548879d728e6c1d395608c64c6f6b4dd874d8264e5a4a81648a6ce4a0a64
MATLAB
16,016
517
function AUTOdiIDX_JoVContrast % taken from diIDX_May27 % AUTODdiIDX can be found in "Event-alignment fuctions." % It takes all STIM_AUTO.mat inputs, finds relevant conditions, makes sure % the contact is tuned, and then saves results in a diIDX matrix which is % stored locally on HDD D:\5 diIDX dir. Note that all t...
aafbcb8bb81bacbe2f8920e8b5a0b1b282074c061d43ba65c21eb117c7af5e10
MATLAB
16,039
544
function hfig = plotslm(slm) % plotslm: plots a Shape Language Model (slm) or its derivatives % usage: plotslm(slm) % usage: hfig = plotslm(slm) % % % arguments: (input) % slm - slm struct, as returned by slmengine or slmfit, % or evaluated by slmeval % % % arguments: (output) % hfig - figure handle. Only retu...
44027dd0f541aa776fad0b4c3172ad1e1ef350007991a47c665c9b798aa56afb
MATLAB
16,041
385
function [crp_projs,crp_parms,bad_trials]=CRP_illustration(fname) % % This function reproduces all of the figures, etc, from the manuscript % "Canonical Response Parameterization: Quantifying the structure of % responses to single-pulse intracranial electrical brain stimulation" % by Kai J. Miller, et. al., 2022 % % ...
61968b02b51959869510b1ff319acafd4cb892fc52c3e27ba65164b7903ff4f0
MATLAB
16,388
257
function [ExVivoTable,HistInfo] = ... AnisotropyBinning_Submission(Angle_Meas,Kappa_Meas,ICVF_Meas,BetaParams,Mask,params) %ANISOTROPYBINNING Here the beta values are binned anisotropically to %ensure equal number of "voxels" as a function of angular orientation. %Several filters are performed. % This f...
baa4f1d6b0dd6d54e1dbba694b730c8a0301174d4484587f1a2416b8a11a4d0a
MATLAB
16,584
356
classdef CocoUtils % Utility functions for testing and validation of COCO code. % % The following utility functions are defined: % convertPascalGt - Convert ground truth for PASCAL to COCO format. % convertImageNetGt - Convert ground truth for ImageNet to COCO format. % convertPascalDt - Convert d...
49ca9613991e25892a56d6f41652d5a0314bb530e60626f5c5ca86e50c9017a3
MATLAB
17,297
259
data.Is = -15000; % [pA/pF] STIMULUS data.R = 8314; % [mJ/(mol*K)] Ideal gas const. data.T = 308; % [K] Temp. data.Cm = 0.05; % [pF] Membrane capacitance data.F = 96487; % [C/mol] Faraday const data.RTON...
a645f48b1948d7c3eec9c286cae0e4fe2f65d5a4f0044e8693a4982edc089575
MATLAB
17,347
308
%% General cylinders study %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This code was created to obtain R2* synthetic data for any cylinder % configuration and be fitted afterwards by R2* signal models. % The code operates as follows: A set of % directions (defined by a file or created on...
83892e94d03b084ffb97d9509fd5dab8e9713fca2f78a25a8a3357f7749b1efa
MATLAB
17,575
318
%% OC_AnalysisCode %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This code analyses the optic chiasm (OC) data 4D_X27P.nii R2* weighted % data. This dataset has 16 angular measurements and 16 echo times per each % angular measurement. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
3312fd76db9786b0b98ed234b6c6b099b433e31bd4ff98f5db22c8d93c6d5818
MATLAB
17,724
427
classdef Point < handle %UNTITLED4 Summary of this class goes here % Detailed explanation goes here properties name point_path path_ext counts labels tags runinfo % for denoising int_norm_d k_values count_hist ...
e96a69dd4f42b1302db86c38e43d2051ef5ab15b918031fedb3bbf2a0f3e883b
MATLAB
18,058
561
%% Support Vector Machine % Fig. 3d clear; clc; close all; % load experimental data load('Monkeys_cir.mat'); Monkeys = Data; % simulate the neural data % gamma parameters of prefer and null response distribution % high, prefer hp = Monkeys(1).Tuning_pfnull(1,:); nanidx = find(isnan(hp)); hp(nanidx) = []; params1 = ...
27492efee3137b36dcda0fe9dc1677844ed5fc7d3c9693d1f22cef7eb787ed21
MATLAB
18,208
266
function Binarised_Data = AnisotropicBinning_InSilico_fromExVivo(varargin) %31.08.2020: Small code who creates 4 different figures with the "loaded" % matlab file. If it is OLS or MLE, it should apply the same principle. But % it is required that the entire dataset is calculated. % OLS: (Max TE data (1,3 and 5),(Disp...
7fc279acd8c55b37c7792842622cd92a7f592640904a632baffaec3fbc6beb7c
MATLAB
18,950
428
function [fcsdat, fcshdr, fcsdatscaled, fcsdatcomp] = fca_readfcs(filename) % [fcsdat, fcshdr, fcsdatscaled, fcsdat_comp] = fca_readfcs(filename); % % % Read FCS 2.0 and FCS 3.0 type flow cytometry data file and put the list mode % parameters to the fcsdat array with the size of [NumOfPar TotalEvents]. % Some ...
8c5cc34f1e589e45029aa9eca3c382bef33b506a685a38d4c6a37e55a519682a
MATLAB
19,024
723
function varargout = FinchScopeMk4(varargin) % FinchScope DAQ software. % WALIII % d05.23.15 % % NOTE: before starting, you will need to identify that both the camera, % and arduino are recognized by matlab. This can be done with the comand: % >> imaqhwinfo % for the camera % >> % % % %% INITIALIZE CODE (DO NOT EDI...
38596832d3cf57bbab3fd38b02675c307c44104a2032e8d76b790ee65eb08ae5
MATLAB
19,072
573
% External coil frequency sweep clear; close all addpath('D:\Documents\Software\spm12\PublicVersion'); spm('defaults', 'eeg') addpath(genpath('D:\Documents\Software\FIL-OPMEG\OPM')); addpath('D:\Documents\Software\linspecer'); addpath('D:\Documents\Software\export_fig'); %% Config resultsSavePath = '.\ExternalCoils...
de854a6a92be41aa4473a71ffc8099bbee5fd4866bf09a5c775661de0a22ccc7
MATLAB
19,256
424
function [im_dend,imOrig] = findDendrites(img,side,sFactor) % Purpose: Imports images of neurons and crops to the size that has % dendrites for future processing (tracking and degradation % quantification). User chooses which number image gets sent into the % function. % Updated: 08-29-2022 %% Step 1: Load and rotate...
a68cc92e0966e486e388528d48811ecb9ed57d3e988e134945615bc9955d664f
MATLAB
19,309
752
function FS_TemplateMatch(TEMPLATE,varargin) %FS_TemplateMatch allows the user to select a song template, and then attempts to find %matches to the template through a running Euclidean distance score (similar to SAP) % % fb_template_match(TEMPLATE,varargin) % % TEMPLATE % template (vector, default: empty, user selects ...
436fae228f761eb0d7fa0f15675db502eb196937c6ab49dcf0068077ab251254
MATLAB
19,336
372
% CREATE_PLOTS manages the update of the created plots in each trial of the % experiment. % CREATE_PLOTS(OUT_MANAGER,LINE_TABLES,TRIAL_INDEX) manages the update of % the created plots with the help of the OUT_MANAGER object (that holds the % list of created plots and the number of instances of each one of them), % LIN...
06d62c8206f4de2b3a06692cf5f218c7fdb6c9e9b4b527c80fd958cec12c5e9c
MATLAB
19,586
382
% CREATE_PLOTS manages the update of the created plots in each trial of the % experiment. % CREATE_PLOTS(OUT_MANAGER,LINE_TABLES,TRIAL_INDEX) manages the update of % the created plots with the help of the OUT_MANAGER object (that holds the % list of created plots and the number of instances of each one of them), % LIN...