sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
461640ebf4813b7dba30b53e0990117c4e37294d9e8ad7918449b7717bf6f7e3
MATLAB
18,404
489
function save = write_to_spm(subj,objtype,objin,varargin) % Writes an MVPA data object or group to a SPM file. % % [] = WRITE_TO_SPM(SUBJ,OBJTYPE,OBJNAME,...) % %% Required Fields % % Writes an MVPA object in the subject structure SUBJ to an SPM file. This % structure is to be of type OBJTYPE and must corespond to th...
e3ed34916d8946a8bc7e25866dd6027c13aa50d1efbfcbb5124d79769d6c71cb
MATLAB
18,445
448
function DOMnode = xml_write(filename, tree, RootName, Pref) %XML_WRITE Writes Matlab data structures to XML file %Downloaded from: %https://nl.mathworks.com/matlabcentral/fileexchange/12907-xml-io-tools/content/xml_write.m, 1-Mar-2017 % % DESCRIPTION % xml_write( filename, tree) Converts Matlab data structure 'tree' ...
e1c9f156ccb98f00cc56114703dc8961a1eefbc3637d1d778dc14bddd3a9ee2e
MATLAB
18,463
466
function cf = train_logreg(param,X,clabel) % Trains a logistic regression classifier with logF or L2 % regularization. % % Note: Due to the exponential term in the cost function, it is recommended % that X (the data) is z-scored to reduce the probability of numerical % issues due to round-off errors. % % Usage: % cf...
20ac5c5455306a0562695a1d989bc49228b7a3da3e96f3bd788b2500f8457765
MATLAB
18,479
448
% STATUS: outdated. % use preprocessFNIRS06_CV_GLM_ssBeta_Version02 instead % % SYNTAX: % preprocessFNIRS06_CV_GLM_ssBeta(s,numClasses,rejTrOp,rejChnOp,lpFilt) % % DESCRIPTION: % Cross Validation where SS beta coefficients from training fold is passed to test fold % Perform classification using 6 different classifi...
719c0154eafca8af448f5e7ff848832cd22c577599f49251a1dcb6f02d4334be
MATLAB
18,502
345
function [FigMS,FigSZ,statsOut] = barrierAnalysis_v2( Res, area, varargin ) % Run analyses specific to how BVCs/Border cells respond to barrier insertion. % ANALYSIS PARAMETERS: prms.ageBins = [16 18; 19 21; 22 25; 26 36; 40 40]; prms.bslTrial = 2; % Which baseline trial to use classify the tunin...
a013ce75c5fba11c371ecc8bd475f6f7a6e4a67e9e372690f2ed610673001b1f
MATLAB
18,538
470
% code for making a beamformer image from regions of interest clear all; spm('defaults','eeg'); %% subject settings subject = 'LN_C10'; [files, sequence, root, details] =dbs_subjects(subject, 0); image_name = {fullfile(root,'SPMstim/evoked_R_5_i1.nii');... fullfile(root,'SPMstim...
994b0b8b8db960957cdf899d64333616067ca5240965cec8f32f1fd649cb8ff2
MATLAB
18,565
372
classdef Channel < Sharedmethods %Channel Object describing amplifier channel % Each amplifier channel has analog outputs and analog inputs. Here, the mapping of these inputs and outputs onto the % BNCs of the axon digidata is specified. Also contains the lists of corresponding Analogin and Analogout ob...
b1447a780f6b7aa4f368b6e5b57202bf1e96ebd24f7abf459e846129f1102496
MATLAB
18,583
389
% STATUS: experimental. Not for publication % % SYNTAX: % preprocessFNIRS06_CV_GLM_ssBeta_MultiOnly(s,numClasses,rejTrOp,rejChnOp,... % lpFilt) % % DESCRIPTION: % Preprocess raw data (light intensities) and perform cross Validation % where SS beta coefficients from training fold is passed to test fold. % Perform c...
37b3b9aff34c91dde400a61c66b53924375caf9d8e1b8d4dba777a7a13d02e2c
MATLAB
18,587
473
function [Lambda, Psi, T, stats, F] = factoran(X, m, varargin) %FACTORAN Maximum Likelihood Common Factor Analysis. % LAMBDA = FACTORAN(X, M) returns maximum likelihood estimates of the % factor loadings, LAMBDA, in a common factor analysis model with M % factors. Rows of the N-by-D data matrix X correspond to o...
c1ddd0eef90ff0c2c84050bed58c41169d754342dd26555b0e474a24b6419589
MATLAB
18,791
533
function [sig_out,topographies] = roi_tsss(dataset,leg) spm('Defaults','eeg') %MNI_roi = [40 -20 50];% %MNI_roi = [0 -56 58]; % mni co-ordinate to act as centre of harmonic expansion MNI_roi = [0 -46 42];% %MNI_roi = [0 -50 40]; prefix = 'D:\home\Data\DBS-MEG\Phantom\090715\SPMstim'; inversion = 'bf'; if s...
3b74c31c7c2438cd5f2b0fba1d0b917ad1d206d53f59ce0a24f4040427ac6bbe
MATLAB
18,831
558
classdef FileClass < matlab.mixin.Copyable properties % Same properties as the fields in the file struct returned % by matlab's dir function name fid date bytes isdir datenum % FileClass specific properties namePrev idx ...
c5dbd74f38227db3bba5e39e806e5d2578b4e83b03e6fb068f565015f057c402
MATLAB
18,838
431
% fighdl = plot_selected_voxels(position_index,sz,brain_data,mask_index,border_images, fighdl, cfg) % % This function plots a given voxelselection (e.g. searchlight, ROI), and % can in addition show a 2d projection of an image. % % Example usages: % plot_selected_voxels(position_index,sz) % Plot currentl...
a43d85e19fc5086f10237bb5687de798d13a0904553ec8ea1a2d8dc5fedf030a
MATLAB
18,854
550
%% Plot PC activity during VORD and cancellation function [fH_vord, fH_canc, fH_traces, P_gain_vor_mean, P_gain_canc_mean] =... plotVorCancSplit(I, K1, K2, K0, pop, B, S) % Makes one complete figure for VORD, and one figure for VORC % One for gain up, and one for gain down %% Plotting parameters swap_order = 1;...
f5f6bcb24cd0456824f1dfda6566731f3fc1690850dc01bb54056a8e9fc670f4
MATLAB
18,900
453
% STATUS: active. % % SYNTAX: % preprocessFNIRS06_CV_GLM_ssBeta_Version02(s,numClasses,... % rejTrOp,rejChnOp,lpFilt) % % DESCRIPTION: % Preprocess raw data (light intensities) and perform cross validation % where SS beta coefficients from training fold is passed to test fold. % Perform classification using 6 diff...
2acf8907ad6adf0e786700ca4c6bcf76c04cab7508de1881fc96f156614ea6e1
MATLAB
18,907
421
%% Scatter plots for AFR 300s Linear model %% load prerequisites clear clc close all %Loading prerequisites load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim\dataInfo.mat") % load("D:\Brewer lab data\HFS\No Stim\23-Nov-2021_A\allregion_unit_matched_stim.mat") load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim...
042ee099871cb39e1cba0f236c9605242fb275bfbbfade2711857fa8c372afc2
MATLAB
19,008
481
% function [p,results] = decoding_statistics(cfg,results,reference) % % Calculates statistical results of a given analysis at the decoding level. % For example, if decoding was done within subject, the statistics is % returned within subject, too. If decoding was done between subject, the % statistics reflects bet...
3299f8a778d8ec8bf93e7bbeb2f7c13a9bd0230423ad8ea5d54cd1bcb2d1c355
MATLAB
19,132
484
% option to re-run training and classifying or pull from saved data % sbjList is cell array of experiment "number". Ex: sbjList = {'01','02'}; % sbjList = {'08','10','12','13','14','15'};tInd = 8;featureName = 'Cumulative Sum';numRept = 5;numClasses = 2;saveOp = 0;rerunOp = 1; % Group channels by "islands" of probe. f...
b2127251d4e5fd96f8c636e99242a9680fdbab21e653c44a83c67faaef89b6b5
MATLAB
19,140
601
%% Plot PC activity during VORD and cancellation function [fH_vor_pop, fH_canc_pop, fH_vord, fH_canc, fH_vord_split, fH_canc_split] =... plotCancellationPop(I, K1, K2, K0, pop, B, S) % [fH_vor_pop, fH_canc_pop, fH_vord, fH_canc, fH_vord_split, fH_canc_split, fH_traces] =... % plotCancellationPop(I, K1, K2, K0...
e6ae05f4798f439c521d73ae1c1b4f82647d6c4acfeaae8d70b6d713e3fee2ec
MATLAB
19,164
458
% STATUS: active. % % SYNTAX: % preprocessFNIRS06_CV_GLM_ssBeta_Parallel(s,numClasses,... % rejTrOp,rejChnOp,lpFilt) % % DESCRIPTION: % Parallel computing version of % preprocessFNIRS06_CV_GLM_ssBeta_Version02.m % Preprocess raw data (light intensities) and perform cross validation % where SS beta coefficien...
b1964a1faa6f840001ccb9c08a34b17a8d6538713e3d3fd7826328ece5f89f62
MATLAB
19,246
401
% function [passed_data, misc, cfg] = decoding_load_data(cfg, misc, passed_data) % % Function to load data for decoding.m % % INPUT % cfg: Struct that specifies which data should be loaded. % Required fields: % cfg.files.mask: 1xm cell with filename(s) of mask(s) as strings % cfg.files.name: 1xn cell ...
1859ad25c4e3cda1420def574e3787c30bda5b63e38e87eeabcb8b2b9480a57d
MATLAB
19,301
271
%% Aggregate together individual AQuA res files % into a structured array called 'mydata', each condition is a field % within mydata and rows contain individual AQuA res files & information specific % to that recording % % From Aggregate_MC_ftsFilter_uncMod_MultCond_20210302.m section 1 % % All MATLAB work...
a36a6b9ef213223ba07b060513e8bfb9e47a2198eaa72da684aaee6474b4825f
MATLAB
19,328
381
classdef NWBfile < Sharedpaths & Sharedmethods % NWBfile: % This uses matlab's built in hdf5 functions to load electrophysiology data from a % NWB file (Neurodata Without Borders, see https://neurodatawithoutborders.github.io/) % -----------------------------------------------------------...
4fe57229bfd59ce447f310c01352e43e4a72cf465fcc2bf7278a908a1b60f194
MATLAB
19,466
425
%% Update 4/25/22: updated to have sliding time step % added non uniform time scale clear clc % outfolder = "D:\Brewer lab data\HFS\Temporal Analysis\40 HFS\AFR Output"; load("D:\Brewer lab data\HFS\Temporal Analysis\40 HFS\dataInfo.mat") outfolder = "D:\Brewer lab data\HFS\Temporal Analysis\40 HFS\AFR Output Full Inde...
e2e1f64f1714ed2f098c49b6f832d140ad387ff3beaaaa7490eaa49b9a1b614a
MATLAB
19,468
512
% code for making a beamformer image from regions of interest clear all; spm('defaults','eeg'); %% subject settings subject = 'LN_C10'; [files, sequence, root, details] =dbs_subjects(subject, 0); image_name = {fullfile(root,'SPMstim/evoked_R_5_i1.nii');... fullfile(root,'SPMstim...
6ff49b0e353195fcb68cd0c58a4ecf8ab13d6922ca09d515603a36f967ae2352
MATLAB
19,575
489
% @title Main script for in silico organoid simulation % @file sim_organoid.m % @author Romain Beaubois % @date 14 Jan 2021 % @copyright % SPDX-FileCopyrightText: © 2021 Romain Beaubois <refbeaubois@yahoo.com> % SPDX-License-Identifier: GPL-3.0-or-later % % @brief Main script for in silico organoid...
3a5d833bb3fd9ea6179ea0e264cc8ccc3b46c499c33bfa9d624b14095e032708
MATLAB
19,638
334
%Parts of figures: 3, S3B. %2024/02/26 %% define dirs and fetch data: root_dir=define_flicker_root_dir; source_data=[root_dir '/stg-analyses/NatureComm2024-figures/Source Data']; %where source data for figures is stored figures_dir=[root_dir '/stg-analyses/NatureComm2024-figures']; all_subjects=fetch_flicker_subjectI...
0a4e88bb11159f555f0c4513f75d9a7f5cc0a4adb6bae6257371ac6fdf4c4cc0
MATLAB
19,673
508
% 1. Add the path of the current script to the search path % 2. Change the current folder to "Fig7 and Supp Fig7 8 Airpuff_map plasticity\probability" % 3. analyze the data within the folder of "Fig7 and Supp Fig7 8 Airpuff_map plasticity\probability" % 4. Using ctrl+enter within each function to run each section ...
a14fef95ac4fd46064896fcd55463ba93e31d43f6b114604fc3cbbc8fac49dbf
MATLAB
19,698
588
%% Field Synthesis Proof Illustration Live Script % Supplementary Material to: % % *Universal Light-Sheet Generation with Field Synthesis* % % Bo-Jui Chang, Mark Kittisopikul, Kevin M. Dean, Phillipe Roudot, Erik Welf % and Reto Fiolka. %% Field Synthesis Theorem for an Ideal Line Scan % We want to prove tha...
3cb891c39f02e1ac6ec85bb3a7deb91263612e8c41e487af0865a8535bef231a
MATLAB
19,723
375
% %2024/02/26 %% define dirs: root_dir=define_flicker_root_dir; source_data=[root_dir '/stg-analyses/NatureComm2024-figures/Source Data']; %where source data for figures is stored figures_dir=[root_dir '/stg-analyses/NatureComm2024-figures']; metadata_tbl=readtable([root_dir '/FlickerStudyMetadata.xlsx'],'Sheet','Su...
65c18f9bef4e870aa936a8675719b9d6c6c1be06bdf96c1e8431aa751d24337d
MATLAB
19,802
434
%% Update 4/25/22: updated to have sliding time step % added non uniform time scale clear clc % outfolder = "D:\Brewer lab data\HFS\Temporal Analysis\40 HFS\AFR Output"; load("D:\Brewer lab data\HFS\Temporal Analysis\40 HFS\dataInfo.mat") outfolder = "D:\Brewer lab data\HFS\Temporal Analysis\40 HFS\AFR Output Full Inde...
c4dcd16f02364466cfe59709e29c3bdcb9fec0fc3f5624de2853ff46bc225175
MATLAB
19,909
430
%% Update 4/25/22: updated to have sliding time step % added non uniform time scale clear clc % outfolder = "D:\Brewer lab data\HFS\Temporal Analysis\40 HFS\AFR Output"; load("D:\Brewer lab data\HFS\Temporal Analysis\40 HFS\dataInfo.mat") outfolder = "D:\Brewer lab data\HFS\Temporal Analysis\40 HFS\AFR Output Full Inde...
8554db8a1d42d0ce350128bcddec108b947558c075bda4f086703195d5178bf0
MATLAB
20,054
422
function [mappedA, mapping] = compute_mapping(A, type, no_dims, varargin) %COMPUTE_MAPPING Performs dimensionality reduction on a dataset A % % mappedA = compute_mapping(A, type) % mappedA = compute_mapping(A, type, no_dims) % mappedA = compute_mapping(A, type, no_dims, ...) % % Performs a technique for dimension...
d4cecf8c2bf1018aacf834aad718ecccc0b86849ac6d04a0dc22e97e8c731aac
MATLAB
20,055
754
function Duszkiewicz2024_Figure_Stability % This script reporoduces panels from: % Figure 2, Extended Data Figure 2 % Dependencies: % TStoolbox % CircStat %TODO: script dependencies, links to external functions % Copyright (C) 2023 by Adrian Duszkiewicz and Adrien Peyrache % % This program is free software; you ca...
50bd327e48a4ea0cf1ca738ea1ab4f2061d3f86182e0f2e4298b252bda798f57
MATLAB
20,198
475
close all; clear; clc; %% Topic = 'Ai148_AAV-Grm6Cre'; BCTerminalPath = '\\storage1.ris.wustl.edu\kerschensteinerd\Active\Emily\BipolarCellTerminal\Analysis'; SpotPath = '\\storage1.ris.wustl.edu\kerschensteinerd\Active\Emily\Circle\Analysis\'; addpath('\\storage1.ris.wustl.edu\kerschensteinerd\Active\Emily\BasicF...
913db6f15446fcaf6fab6cc01b4638a6fa71764859fca9b9975802d1f5890877
MATLAB
20,270
473
% rtDCCA - Real-time detrended cross-correlation analysis of multiple % time series components. % % Contains a custom defined class in which 'single-click' DCCC % calculations can be performed on custom analysis scales. The % class also contains methods to simplif...
c777a612d9c741eb8b92a5a3e3e9be9bad6dcfe736a03d0feb9b2d82099fffc9
MATLAB
20,302
487
function [Summary, missing] = ecodeAnalysis(cellname, celldir, destinpath, cellinfo) %UNTITLED5 Summary of this function goes here % Detailed explanation goes here a=dir(celldir); tmp=endsWith({a.name}, '.abf'); files=fullfile({a(tmp).folder},{a(tmp).name}); Summary=table; Summary.Cellname(1) = {cellname}...
9dd5b01a5d7e18429dbcef6f502a546d7d3bb033faf78835fbdab5013ca35539
MATLAB
20,354
521
% 1. Add the path of the current script to the search path % 2. Change the current folder to "Fig7 and Supp Fig7 8 Airpuff_map plasticity" % 3. analyze the data within the folder of "Fig7 and Supp Fig7 8 Airpuff_map plasticity\probability" % 4. Using ctrl+enter within each function to run each section %% Section ...
ef7201aa2a1fbcbd64966b13b12ac2d6e5ae8dfbc2be758f631d3f01084de920
MATLAB
20,381
630
classdef ConfigFileClass < handle properties filenames fids linestr; params; err end methods % ---------------------------------------------------- function obj = ConfigFileClass(rootdir) obj.linestr = ''; obj...
b59557536ecf38b6858705a2bba3fdc84a3bc3239cda84364050b9aa4efa162d
MATLAB
20,415
450
function varargout = batchviewer(varargin) % BATCHVIEWER MATLAB code for batchviewer.fig % BATCHVIEWER, by itself, creates a new BATCHVIEWER or raises the existing % singleton*. % % H = BATCHVIEWER returns the handle to a new BATCHVIEWER or the handle to % the existing single...
868df09e482ed9dae29b255f67c71b89e1f719e8bcfe56155a4c156302c95814
MATLAB
20,453
496
% This script loads all slides of one subject, compute trends %run this script twice to correct slide alignment based on stack trned %% Inputs %Set to true if you would like these results to be saved to the cloud, %false if saved locally only isUpdateCloud = false; subjectFolder = s3SubjectPath('21','LFM'); ...
8d6065b3b81a03e3c1e65494f2a82d9bb46d31d4ab42a37148462bc918525882
MATLAB
20,631
591
classdef DataFilesClass < handle properties files; filesErr; filetype; dirFormats; err; errmsg; rootdir; config; nfiles; logger end properties (Access = private) lookupTable end methods ...
bab04f20188158efb33ec31bfee7e5cce923a265f456eac8190f47ba3f3838b8
MATLAB
20,632
527
%% No Stim clear clc close all %Loading prerequisites load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim\dataInfo.mat") load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim\full_idx_allregion_unit_matched_stim.mat") allregion_unit_matched=convert_allregion_unit_matched_220222(allregion_unit_matched_stim); % ful...
9c5f7196cd71963257fbd62bcb5f3f40e0ebf9e1f523b358f45ca2f7fc25a768
MATLAB
20,737
497
% Preprocessing level 1. This level of preprocessing includes: changing % sampling rate, applying filters, faster, ICA, Adjust, etc. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is an EEG data preprocessing script based on the MADE pipeline (Debnath et al., 2020). %%%%%%%%%...
a314b80c4ff8ac2e7a650e30ab05bf233caed5e75149cf0bbf3b1a641d25fa33
MATLAB
20,787
489
% Goal Visualize if spike events is in an individual trials % combine @CircleAnalysis_BipolarCellTerminal & % @CircAnalysis_ResponseScreening072122_MorphSeg & % @ReanalyzeVG3Circle_withoutintensitycorrection % run CircleAnalysis_ResponseScreening072122_MorphSeg.m or % CircleAnalysis_ResponseScreening071222_Morp...
12c19b6ff9d80288a062386a5884230d78b2c39c143a434154c8dc005ecf0038
MATLAB
20,813
581
function [A, b, c, params] = make_Abc_fast(signal, spatial_size, ... region_of_interest, options) % [A, b, c] = make_Abc_fast(signal, spatial_size, region_of_interest, options) % or % [A, b, c, params] = make_Abc_fast(signal, spatial_size, ... % region_of_interest, options) % ...
791b867d0ff2602a3da494ea8f1efbaa6414848e7ee59d6145b5b135c620a640
MATLAB
20,950
619
function [subj] = statmap_3dDeconvolve(subj,data_patname,regsname,selname,new_map_patname,extra_arg) % Use AFNI's 3dDeconvolve to select features that vary % between conditions % % See the TutorialAdv MVPA wiki page for more information. % % [SUBJ] = STATMAP_3DDECONVOLVE(SUBJ,DATA_PATNAME,REGSNAME,NEW_MAP_PATNAME,EXTR...
27f7b87d2e40ba42709fd22b8447a5159a3ba1291ff4880b68566e21f81dd5a4
MATLAB
21,024
380
classdef Spike2Sweep < Sharedmethods & Trace %SWEEP A vector of continuously recorded samples % Sweep objects are a subclass of timeseries with access to all timeseries methods. Further, % Sweeps inherit a few methods from Sharedmethods. The default time unit is milliseconds. Note time series collecti...
75e3f371dc1e6cea924744ed8e7ea1a526df53dac0e53e732295a71ea50c77c5
MATLAB
21,139
520
function [tf, lthresh, uthresh, center] = isthisanoutlier(a,varargin) % ISOUTLIER Find outliers in data % TF = ISOUTLIER(A) returns a logical array whose elements are true when % an outlier is detected in the corresponding element. An outlier is an % element that is greater than 3 scaled median absolute deviati...
6d11235fd97a72d079868703e4ce41d3c5435b02ac959c47cd018b96878988a2
MATLAB
21,180
383
% Measuring baseline event frequencies in chosen cells/regions: % Calculate baseline event frequency per cell/region using the res file for each tseries % Modified from CompBLEventFrequency_XSecStatBins_MultCond_MC20230830.m % Only written for param_name 'Number' % % 1. Load 'AQuA_CytoGCaMP_2Puncaging_WTCx43CBX_F...
32ab0049a4fbcb08b4350647ed61d37ee344564fd67cb2ca6cd7ca8fa2868bda
MATLAB
21,232
535
function preprocessfmri(SubjectI, ConfigFile) spm_path = ''; % path for spm8 or spm12 spmpreprocscript_path = ''; % path for spm tempaltes sprintf('adding SPM path: %s\n', spm_path); addpath(genpath(spm_path)); sprintf('adding SPM based preprocessing scripts path: %s\n', spmpreprocscript_path); addp...
757b0c7939ced6a8bdfd9b21ad56db7299f7cb71749d06bc354e04d9427e6cd5
MATLAB
21,262
485
% clear all close all clc %% % Code lines for Optical Flow Post-processing masterImportpost='D:\Michael_Shannon\MartinezMaster\PIV_analysis_CD18only\'; masterPlotspost='D:\Michael_Shannon\MartinezMaster\PIV_analysis_CD18only_OUTPUT_relvalpoint01magval1_9-6-2022\'; % headers=[]; SHOWPLOTSANDFIGS=1; MAKEQUIVERMOVI...
007fe6c5b95882bfc58e39229becdb10ef78bae5acbedccb180364b7c8f63114
MATLAB
21,418
676
clear all; clc; load('E1Sep_ConjPF.mat') load('E2Sep_ConjPF.mat') load('E1_Mix.mat') load('rndE1_Mix.mat') load('rndE1_Sep.mat') load('E2_Mix.mat') load('E1_Sep.mat') load('E2_Sep.mat') load('ChMatTest.mat') E1mix_ori=E1_Mix(E1_Mix(:,7)==1,:); E1mix_clr=E1_Mix(E1_Mix(:,7)==2,:); E1mix_cnj=E1_Mix(E1_Mix(:...
c232d9557f199e0271b44ce2c54d488b94740383fb299825c93425fa53a73d64
MATLAB
21,471
381
% Parts of figures: 1D, 1F, S2, S3A. %2024/02/26 %% define dirs and fetch data: root_dir=define_flicker_root_dir; source_data=[root_dir '/stg-analyses/NatureComm2024-figures/Source Data']; %where source data for figures is stored figures_dir=[root_dir '/stg-analyses/NatureComm2024-figures']; %figures dir if ~exist(so...
fa0f5d3f8f93c9981f5253037bbb2a663b6b56ebea00a743b046516fd6078c94
MATLAB
21,636
528
classdef ProbeClass < FileLoadSaveClass properties wavelengths wavelengthsEmission sourcePos2D detectorPos2D landmarkPos2D landmarkPos3D sourcePos3D detectorPos3D frequencies timeDelays timeDelayWidths momentOrders ...
598e23eff4095129e598cf2a188617d374b53bd84bd2995230e2dfa53f87507d
MATLAB
22,085
346
function [Res, LUT_out] = generateAllBVCResponses(ModMaps,DataIn,varargin) % Generate and save the complete BVC response map for every dataset. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Analysis Parameters % prms.usePCModMaps = 0; prms.ke...
a0d43ae973a663a186246c918a885bcbb961467855037e5ca49d0be455c7e41d
MATLAB
22,114
488
classdef OverlayPicker_exported < matlab.apps.AppBase % Properties that correspond to app components properties (Access = public) OverlayPickerUIFigure matlab.ui.Figure ThresholdEditField matlab.ui.control.NumericEditField ThresholdEditFieldLabel matlab.ui.contr...
47baada5b6cee42049e03c5929578ce8c834020c51eba5a78ee41cdc5306864d
MATLAB
22,145
471
%%% AUTHOR: Mitch Butler (MPB) %%% DATE: 21 October 2021 %%% Last Mod Date: 13 November 2021 %%% %%% PROJECT LEAD SCIENTIST: Rachael Smith %%% PROJECT LEAD ENGINEER: Biswajit Maharathi %%% %%% Mod Log. %%% -(11/13) %%% turning this into a function to be batch-run ! %%% Rachael fo...
e97dbbcf534153b3c354fb84721dc138d8a719f9eb4ea44727fd6d8bbb1b09f1
MATLAB
22,425
663
%% Field Synthesis Proof Illustration Live Script % Supplementary Material to: % % *Universal Light-Sheet Generation with Field Synthesis* % % Bo-Jui Chang, Mark Kittisopikul, Kevin M. Dean, Phillipe Roudot, Erik Welf % and Reto Fiolka. %% Field Synthesis Theorem for a Non-Ideal Line Scan % We want to prove ...
005fcba9fc1cc653b3dd42e025a0e0974761db2b2f23f5e8546262b90fc698c7
MATLAB
22,601
423
% function [fs_index,fs_results,fs_data] = decoding_feature_selection(cfg,fs_data) % % This function performs feature selection of decoding data and is an % integral part of the decoding toolbox. This function is called from % decoding.m and should not be called directly. Currently there are two % forms of feat...
a8878d991ddcd9484849efd804819077963baeb7dc22f35b40b7b8fcd679ec4f
MATLAB
22,656
427
%% retrieve all data: %fetch all flicker sessions: root_dir=define_flicker_root_dir; figures_dir=[root_dir '/stg-analyses/NatureComm2024-figures']; [~,all_sessions]=fetch_flicker_subjectIDs(root_dir,'all'); all_sessions(strcmp(all_sessions.task,'spep'),:)=[]; selected_examples=readtable([figures_dir '/NatureComm202...
7246fb53811b0c01cd714ceffe4dd972c608c36cd6a1d15d5a95a636bf2b195c
MATLAB
22,851
499
% % multilevel regression with BSETS data % lines calling the export_fig external function creating scatterplots are % commented out. The may be used again if the user downloads this function. templatedata=readtable('Multilevel raw data.xlsx'); %add the appropriate path to the xlsx file next to this code ids=unique...
ccc5984c5cd2d75ccd1e138907dc1b70c569bd166b3c41a8ee6a5aa3c56cbc59
MATLAB
22,915
663
% mv_classify unit test rng(42) tol = 10e-10; mf = mfilename; % In the first part we will replicate behaviour of the other high-level % functions (mv_classify_across_time, mv_classify_timextime) to mv_classify % output nsamples = 100; nfeatures = 10; nclasses = 2; prop = []; scale = 1; do_plot = 0; [X, clabel] = sim...
826a82967d18a21ff9caa67d65a2986757701654123e6c2c545727534e14eecc
MATLAB
22,967
876
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Slice by slice SIM processing % % -edge mirroring added % -Unmixing at native resolution, then upsampling via zero % padding % -throw...
a0ec06527961894424f0fbbed920bec9af8800d59b9a2a744fd2bbedfc16905f
MATLAB
23,042
443
classdef Spike2Epoch < Sharedmethods & Trace %EPOCH An Epoch object % Epochs are sections of sweeps and describe the analog output signal within that section. Most common is the epoch % "step", which means a constant current or voltage of a given amplitude was applied to the cell during this epoch. ...
6f4a48d972c027912511762bc722042d742d9e850e71dc788b29669b311f5084
MATLAB
23,108
949
% Arithmetic average of HRFs % Light line color, plot ind HRFs % Different processing for sbj 08 and 10 because they use old SD design and % has both single and multi conditions % new codes, ignore grpPlotHRF function plotAllHRF_Grp_ChnCriteria_Fig4(saveOp) goodSbjList = {'08','12','13','16','19','21','24'}; badSbjLi...
a891871c2b0383deb876bcb656b13bd87d0515df0e2d216787dd7adbec6b3d61
MATLAB
23,133
849
classdef Schema % % Class to interact with the BIDS schema % % USAGE:: % % schema = bids.Schema(use_schema) % % use_schema: logical % % % (C) Copyright 2021 BIDS-MATLAB developers % TODO use schema to access regular expressions properties content verbose = false % is_bids_sc...
593970c74dd35a8fee9a60eb830fd5f089bf44a4571cfeb6f9cac738b5dd50ba
MATLAB
23,212
443
classdef Epoch < Sharedmethods & Trace %EPOCH An Epoch object % Epochs are sections of sweeps and describe the analog output signal within that section. Most common is the epoch % "step", which means a constant current or voltage of a given amplitude was applied to the cell during this epoch. % ...
424e78f2ec3f3b3d2f3b0b24af0b69d066f700313fbb03beb85eff9ef92f1490
MATLAB
23,342
613
classdef SessClass < TreeNodeClass properties % (Access = private) runs; end methods % ---------------------------------------------------------------------------------- function obj = SessClass(varargin) obj@TreeNodeClass(varargin); ...
7e626ad0fd291a680c62616a6b6ef131ed0b1ed9b7d9b9d01a0bda4085b3308b
MATLAB
23,379
588
function varargout = DFAFit(varargin) % DFAFIT MATLAB code for DFAFit.fig % DFAFIT, by itself, creates a new DFAFIT or raises the existing % singleton*. % % H = DFAFIT returns the handle to a new DFAFIT or the handle to % the existing singleton*. % % DFAFIT('CALLBACK',hObject,eventData,handles,...
45c9924de7f65a6bb67dce35711e101cf9ab8ce79e84a422a163fc791c485963
MATLAB
23,400
856
%% Length FF region=["EC-DG","DG-CA3","CA3-CA1","CA1-EC"]; regLabel1ff=[];regLabel1fb=[]; set(0,'defaultAxesFontSize',16) set(0,'defaultAxesTickLength',[0.04,0.08]) set(0,'defaultaxeslinewidth',2) region=["EC-DG","DG-CA3","CA3-CA1","CA1-EC"]; well_regList={"EC-DG","DG-CA3","CA3-CA1","CA1-EC"}; figOrder=[1 2 4 3]; if ~e...
f2fb8bd455cc0b0bf700c306171c20a7d1e0ab9b9f00f197f3c74e0a0266d077
MATLAB
23,419
794
function varargout = PlotProbeGUI(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @PlotProbeGUI_OpeningFcn, ... 'gui_OutputFcn', @PlotProbeGUI_OutputFcn, ... ...
1f485d7c2c89ad7f9429e7b6b8bef343cc3d3a0eff08aaf1b5847b7880abbaa9
MATLAB
23,519
832
% Author : Andreas Seas % Created : 22-10-28 % Edited : 22-10-28 % Descr : generate figure 3 and its subfigures %% clear slate close all;clear;clc %% Inputs CBcolor = [255, 215, 0]/255; FMcolor = [255, 0, 0]/255; CCcolor = [0, 0, 213/255]; % save figs? savefigs=false; % set up fonts s = set...
ddc26c46977a0e38bbc17fa081034daa205808e5e8fbdc0de1dd3ea73fdad374
MATLAB
23,602
602
% ADVANCED CLASSIFICATION % % This tutorial covers more complex classification scenarios such as % higher-dimensional data (time-frequency), searchlight analysis across % multiple dimensions and precomputing of kernels. % % Contents: % (1) Create a time-frequency dataset % (2) Classification of 4D time-frequency data %...
17a8ae8077433b36a26da81b4f520e4b8ac8bc99d1b1b1794435589982247b5b
MATLAB
23,688
582
%% Make Flow Figure Images function FlowFigureMovies(fileParams, flowFigureImageParams) %% Start FlowFigureImages Script fprintf('\n\n- - - Starting FlowFigureMovies - - -\n\n'); %% Import Parameters % Input parameters numMicrons = 10; % File Parameters pxPerMicron = fileParams.pxPerMicron; secBtwFrames = fileParams...
1c79c975c82bc95bf829ca309779d1cb355a5e0559bcd97187b92d3c8919146c
MATLAB
23,764
471
% For figure 6 in Draft 3 % 2 subplots (1,2). HbT. Show only high performing group. % Only show LDA classifier. % 2-class classification at left panel. % 3-class classification at right panel. % look at 7-color scheme for readability. % preprocessFNIRS06_CV_GLM_ssBeta_PostVsAnt_MultiOnly function grpPlotPerf_PostVsAnt...
5380ce07f1d937150ae38fa3474ffdb9d7a2b086a63cd196c944965617c478a5
MATLAB
23,764
598
% Script for fitting power law models to the avalanche data generated by % simulation % 1. use MLE estimate to get slope parameters for discrete distributions % 2. use KS statistic between empirical and model distribution to determine % x_min. % 3. goodness of fit: using the best-fit parameters, generate simulated % ...
a8e1477b0f514947a6ff3026ff0ab00d0805022616759f9a9eda654b51672d93
MATLAB
23,773
441
function [sig_cells,areasSternberg] = NWB_calcSelective_SB(nwbAll, all_units, params) %NWB_CALCSELECTIVE Takes the output of NWB_SB_extractUnits and runs %selectivity tests for the sternberg task. Optionally plots trial aligned %spikes if isfield(params,'rateFilter') && ~isempty(params.rateFilter) && params.rateFilter...
1a8da0314121c10d52549bae6c594af7e39ed4aa31e3f6250014d41fb91a5633
MATLAB
23,811
520
% find good subject and channel % ISI bins: 27s, 27-30s, 30-33s, 33-36s, 36-39s, >39s % For sbj 8 and 10 function plotHRF_ISI(sbjNum,rawDataFN,respData) srcIdxGrp = {[1 2 3 4] [5 6] [8 9 10 11] [12 13 14 15] [16 17 18 19] [20 21] [23] [25] ... [27 28 29] [31 32 33] [35 36] [37 38] [40] [42]}; figSaveDir = ['C:\U...
6ac373dd9542a4bc110469c5f8e6594d4abd456a2934e5dd23905e2a6eb69573
MATLAB
23,814
905
% Arithmetic average of HRFs % Light line color, plot ind HRFs % Different processing for sbj 08 and 10 because they use old SD design and % has both single and multi conditions % new codes, ignore grpPlotHRF function plotAllHRF_Grp_ChnCriteria_Fig3(saveOp) sbjList = {'08','12','13','14','15','16','19','21','22','23'...
f64a7796a010f12c1c9238280e5efb13c730f8f661a78d850a6db106349ccded
MATLAB
24,015
431
%% Event features pre- and post-stim (area, duration and propagation) % Fig. 1f-h: dose-response curves for various event features (avg. change in feature post-pre) % Modified from 'DistOfEvtsPrePost_SpecTimeWindow_NoRegions_MultCond_MC_20210907.m' % Ext. Data Fig. 1g: CDFs of event features pre- and post-stim. Modi...
12f6bdeb480074e39b526e4b60780b38cfe0445b765a93c1245029ff74be82da
MATLAB
24,048
414
function natsortfiles_test() % Test function for NATSORTFILES. % % (c) 2014-2022 Stephen Cobeldick % % See also NATSORTFILES TESTFUN NATSORT_TEST NATSORTROWS_TEST fnh = @natsortfiles; chk = testfun(fnh); % c2s = @(c)struct('name',cellstr(c)); rmf = @(s)rmfield(s,setdiff(fieldnames(s),'name')); % try pad(s...
03cf03459d8a0a71a8ae35bd5c6a2e525327851700a503b1c26ba2484ac72a51
MATLAB
24,066
693
function varargout = mapping_parameters(varargin) % MAPPING_PARAMETERS M-file for mapping_parameters.fig % MAPPING_PARAMETERS, by itself, creates a new MAPPING_PARAMETERS or raises the existing % singleton*. % % H = MAPPING_PARAMETERS returns the handle to a new MAPPING_PARAMETERS or the handle to ...
85952e50e3cffe46672b579acbd9d459d74ec50887d36a0632f3148d1bed0541
MATLAB
24,085
620
% STATUS: analysis. For internal report. % % SYNTAX: % plotAllHRF(sbjNum,opCI,opTTest,opSave) % % DESCRIPTION: % Plot hemodynamic response functions for each condition and choromophore % for all channels. % Figure legend: % 1) If line is bold, then that condition is statistically % significant with th...
acb29d001afe3e1f765b65aa7921fec36deffe467fc01a37bc10bc4c04d26e53
MATLAB
24,165
617
%% ISI comparison bar graphs and anova clear clc load('D:\Brewer lab data\HFS\No Stim\02-Oct-2022_A\spike_burst_dyn_table_stim.mat') %5 SD nostim_table=spike_burst_dyn_table_stim; load('D:\Brewer lab data\HFS\Theta Stim\27-Sep-2022_A\spike_burst_dyn_table_stim.mat') % 5SD hfs5_table=spike_burst_dyn_table_stim; ...
7aa15e3bdd2ceb4a59ae56a90ed3c7a373a37c8f428bc3d87d2b72052127488c
MATLAB
24,188
431
function st = generateStatusReportByLibrary(libraryNames) % Go over all subjects in library(by library name) and returns status per % slide. Sorted by subject name. % % INPUTS: % libraryNames - can be a string or a cell containing library names. % Examples: 'LA' or {'LA','LB'} % OUTPUTS: % st - secti...
679e8899f2de1d775b8496747436941cf622c6d6f53c359faed268457d639c38
MATLAB
24,240
603
%% spnb comparison bar graphs and anova clear clc ff_colors=["#3869EE","#FF2303","#EE9B00"]; fb_colors=["#4fb7ff","#FF9B9B","#FFDA49"]; %% Feedforward nostim=load('no_stim_ff_ancova_vars_spnb.mat'); theta=load('theta_stim_ff_ancova_vars_spnb.mat'); hfs=load('HFS_ff_ancova_vars_spnb.mat'); subregions_ff=...
eb51b535521a56d33dcbaefcf4f5d5ef66f93daa7efe7535b3d20b9c37254a30
MATLAB
24,321
569
function identification_step(data,neurons_cleaned,outputpath,voxel_size) % vanno passati gli argomenti del grafico disp('Starting') % insert axes % automatic identity % apdvlr axes addpath('./Functions/'); % variables initialization if nargin < 4 voxel_size = [0.267 0.267 2]; end zratio = voxel_s...
1a73d0aad7efc4459237fb570bf2eb03ac915b44217fdcc85d5790e4442518de
MATLAB
24,333
986
% Plot average p-val for each channel, and number of sbjs with p-val below % critical value. % Light line color, plot ind HRFs % Different processing for sbj 08 and 10 because they use old SD design and % has both single and multi conditions % new codes, ignore grpPlotHRF % Channel numbers include SS. % % Finalized cha...
2d00a9a0c82c181d3119a16e8c7924036d212895c550578955442b1edce912e3
MATLAB
24,455
992
% Plot average p-val for each channel, and number of sbjs with p-val below % critical value. % Light line color, plot ind HRFs % Different processing for sbj 08 and 10 because they use old SD design and % has both single and multi conditions % new codes, ignore grpPlotHRF % Channel numbers include SS. % FEF 5, 18 % sPS...
1b2b7b2fcc19d38f225b1e9769ff33e0d8c41dc51723df38d31941da5ed0abe3
MATLAB
24,531
716
% 1. Add the path of the current script to the search path % 2. Change the current folder to "Fig6 and Supp Fig6 Airpuff_stimulus dependence" % 3. analyze the data within the folder of "Fig6 and Supp Fig6 Airpuff_stimulus dependence" % 4. Using ctrl+enter within each function to run each section %% Section 1: O...
5b822e1e7e62273319234fb8e3866968cbf9e0eeff4ed4d36ed22d89653677b4
MATLAB
24,824
680
function [T, params] = make_tensors_fast(signal, spatial_size, ... region_of_interest, options) % T = MAKE_TENSORS_FAST(SIGNAL, SPATIAL_SIZE, REGION_OF_INTEREST, OPTIONS) % or % [T,PARAMS]=MAKE_TENSORS_FAST(SIGNAL,SPATIAL_SIZE,REGION_OF_INTEREST,OPTIONS) % % Compute orientation tensors in up to four dimensions. ...
0531ef8a1530b409e7fbc3cf21d559f9d7ee65e9d92f0ac054841a952c9ea8a9
MATLAB
24,890
556
% statcond() - compare two or more data conditions statistically using % standard parametric or nonparametric permutation-based ANOVA % (1-way or 2-way) or t-test methods. Parametric testing uses % fcdf() from the Matlab Statistical Toolbox. % Usage: % >> [stats, d...
4e74e0715ef7b919bca6064e1f6194c0ed9d39f1551d2afa951023331ca090e3
MATLAB
25,176
345
function run_jsonlab_test(tests) % % run_jsonlab_test % or % run_jsonlab_test(tests) % run_jsonlab_test({'js','jso','bj','bjo'}) % % Unit testing for JSONLab JSON, BJData/UBJSON encoders and decoders % % authors:Qianqian Fang (q.fang <at> neu.edu) % date: 2020/06/08 % % input: % tests: is a cell array of strings...
20d256eac8e6cf5b9537dc8207391b56df1c5a3a6cc163626749ad1cc78056d2
MATLAB
25,219
672
% STATUS: analysis. For internal report. % % SYNTAX: % plotAllHRF_Special(sbjNum,opCI,opTTest,opSave) % % DESCRIPTION: % Plot hemodynamic response functions for each condition and choromophore % for all channels. % Figure legend: % 1) If line is bold, then that condition is statistically % significant...
b34b4581ce27436093b5b002cdf1d1aba9c36061f2eaa7f42f68c9d8b4f8fb6a
MATLAB
25,222
520
function [areas,total_bins,overlap_bins, total_area, overlap_area]=... ISI_interunit_peak_finding_211108... (spon,stim,spon_dir,stim_dir,times_struct_spon,times_struct_stim,spon_duration,... stim_duration,parent_dir,if_cw) % Testing peak finding capabilities across multiple units for elimination % of zeros ...
7767a3dafc5a77cbe8ec86e24f7added6806cb2475616dd5ccb10f0eedf8a1b8
MATLAB
25,242
519
classdef TransformParameterEditor_exported < matlab.apps.AppBase % Properties that correspond to app components properties (Access = public) TransformParameterEditorUIFigure matlab.ui.Figure InPlaneOnlyCheckBox matlab.ui.control.CheckBox CancelButton matlab...
204f1db1182a05eed2a2a3e865c811727daffb00ab65465be751b0c421bcc20f
MATLAB
25,266
754
classdef StimClass < FileLoadSaveClass properties name data dataLabels states % Stim marks enabled/disabled. Not part of SNIRF end % Properties not part of the SNIRF spec. These parameters aren't loaded or saved to files properties (Access = private) err...
94d8ecee67366acbe6e18fc8960e766c418a5f6f25b73151728c7fee3e122093
MATLAB
25,285
785
function [r, cout] = polyexp(signal, certainty, basis, ... spatial_size, sigma, options) % R = POLYEXP(SIGNAL, CERTAINTY, BASIS, SPATIAL_SIZE, SIGMA, OPTIONS) % or % [R COUT] = POLYEXP(SIGNAL, CERTAINTY, BASIS, SPATIAL_SIZE, SIGMA, OPTIONS) % % Compute polynomial expansion in up to four dimensions. The expansi...
15e1021d5565e09654d34d819dfb158f4f9430c367374fc915a133c6291bf0ba
MATLAB
25,389
475
classdef Sweep < Sharedmethods & Trace %SWEEP A vector of continuously recorded samples % Sweep objects are a subclass of timeseries with access to all timeseries methods. Further, % Sweeps inherit a few methods from Sharedmethods. The default time unit is milliseconds. Note time series collections ...
f61d7b6ea34f3c6e6bdf1a32a5e303c4d7aa433f6d4296d2bedfcab31799857e
MATLAB
25,474
475
classdef Sweep < Sharedmethods & Trace %SWEEP A vector of continuously recorded samples % Sweep objects are a subclass of timeseries with access to all timeseries methods. Further, % Sweeps inherit a few methods from Sharedmethods. The default time unit is milliseconds. Note time series collections ...