sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
0d8c9152df623a8e481a7a8793d6d7f06913c84b5d87837b794e5c259fb61852 | MATLAB | 25,492 | 664 | classdef SubjClass < TreeNodeClass
properties % (Access = private)
sess;
end
methods
% ----------------------------------------------------------------------------------
function obj = SubjClass(varargin)
obj@TreeNodeClass(varargin);
... |
1134f1583a3c21a2a811131720eb581ea1bdfec00c2089cf8bd897bf49d89e9c | MATLAB | 25,523 | 495 | classdef ReferenceAtlasImporter_exported < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
ReferenceAtlasImporterUIFigure matlab.ui.Figure
EstimatedDownloadSizeLabel matlab.ui.control.Label
DownloadButton matlab.ui.c... |
6ed30bfc7f454310b5d1f7283d9b037fd6eec41a92f4fd6a19a2698282fb52db | MATLAB | 25,655 | 604 | % STATUS: experimental.
% Not for publication
%
% SYNTAX:
% preprocessFNIRS06_CV_GLM_ssBeta_PostVsAnt_MultiOnly(s,numClasses,...
% rejTrOp,rejChnOp,rerunOp,plotOp)
%
% DESCRIPTION:
% Compare posterior vs anterior FEF
% Preprocess raw data (light intensities) and perform cross Validation
% where SS beta coeffic... |
b3234d2d7952ff177a9412adfdafe29e6df39048d32bc11b301e95fa0086efe0 | MATLAB | 25,807 | 522 | % Status: Inactive
%
% Only for sbj 12 and after.
% For sbj 08 and 10, use createSingleTrialHRF_Updated_DiffBasis(sbjNum,respData,numClasses)
%
% Add repts and CI. Used for publication
function calcCumSum_MultiOnly_DiffStartT_AllChn_CompClassifiers_Final(sbjNum,numClasses,saveOp)
processedDataDir = ['C:\Users\mn0mn\D... |
78695a3f02175604de7bc6e68ded0b19fc7c5f1931e9b17e9bfd98451c137185 | MATLAB | 26,072 | 506 | % For Figure 7 and 8 in Draft 2
% Plot performance as a function of window length for different subset of
% probe.
function grpPlotPerfVsDiffTLen(goodSbj,numClasses,saveOp,itrOp)
if goodSbj == 1
%sbjList = {'08','10','12','16','17','18','19'};
%sbjList = {'08','12','13','16','17','19'};
% ... |
7c82e5fa9fc467fd43c9e54dfc29047898eed3f8e85a7d657179c8ca95873d96 | MATLAB | 26,136 | 423 | classdef Sharedmethods
%SHAREDMETHODS A superclass with universal methods
% From ABFBatch, through ABFFiles, AnalogInputs, and Sweeps down to Epochs, a number of methods are shared by all.
% Using this Sharedmethods class, all levels can share these methods using class inheritance. Also used as a centr... |
cdfa230eef0ea4bca334d5ed9bceba8802f60f26af246c2120181a65e855cab9 | MATLAB | 26,137 | 423 | classdef Sharedmethods
%SHAREDMETHODS A superclass with universal methods
% From ABFBatch, through ABFFiles, AnalogInputs, and Sweeps down to Epochs, a number of methods are shared by all.
% Using this Sharedmethods class, all levels can share these methods using class inheritance. Also used as a centr... |
a7084fd00203637173f4ad040e7c18e9e26aad777d0fcaf6ef772c77c6588f34 | MATLAB | 26,184 | 666 | function outfile = cifti_conn_matrix_for_wrapper(wb_command, ...
dt_or_ptseries_conc_file, series, motion_file, FD_threshold, TR, ...
minutes_limit, smoothing_kernel, left_surface_file, ...
right_surface_file, bit8, remove_outliers, additional_mask, ...
make_dconn_conc, output_directory, dtseries_conc)
... |
6a1d0c7804fedbcd5094350b1b1bd5c1d026efc662264bafe61609375786b39a | MATLAB | 26,197 | 545 | % GLM Cross validation. 2 rounds of GLM Fitting nested according to this
% paper:
% von Lühmann A, Ortega-Martinez A, Boas DA and Yücel MA (2020) Using the
% General Linear Model to Improve Performance in fNIRS Single Trial
% Analysis and Classification: A Perspective. Front. Hum. Neurosci.
% 14:30. doi: 10.33... |
bbf2ddffc685f28398ac531724f32fdab1b95bcf3e6dbed5a5221ffe980fb88a | MATLAB | 26,380 | 620 | % STATUS: experimental.
% Not for publication
%
% SYNTAX:
% preprocessFNIRS06_CV_GLM_ssBeta_PostVsAnt(s,numClasses,rejTrOp,...
% rejChnOp,rerunOp,plotOp)
%
% DESCRIPTION:
% Compare posterior vs anterior FEF
% Preprocess raw data (light intensities) and perform cross Validation
% where SS beta coefficients from... |
8d5ecdd8f21758838844102749ad630ada0b62602d5b8b958c1ad38759599702 | MATLAB | 26,459 | 762 | function varargout = ThresholdAndCropGUI(varargin)
% ThresholdAndCropGUI MATLAB code for ThresholdAndCropGUI.fig
% ThresholdAndCropGUI, by itself, creates a new ThresholdAndCropGUI or raises the existing
% singleton*.
%
% H = ThresholdAndCropGUI returns the handle to a new ThresholdAndCropGUI or the hand... |
48f424b702b3bab92993b2e1f3cf09f801a21d8bb1dba51a2c365843b5ad884e | MATLAB | 26,498 | 413 | %% Fig. 1C bottom: plot the change in event count/region for defined time bins
% Test the difference from permuted data
%
% 1. Load 'AQuA_CytoGCaMP_ReceptorAgonistBathApp_Fig1.mat' workspace
% 2. Run'Fig1_PreppingDataStruct.m':
% Section A: experiment_type = 'BathApp'; method_AgonistEntry = 'MaxCurve'
% ... |
021ed1ce56f80551c06d8460cd0ff348203665008098bd0e9b12c6772c8a8caa | MATLAB | 26,519 | 654 | % function [designs, all_perms] = make_design_permutation(cfg,n_perms_select,combine)
%
% This function creates designs for a number of label permutations carried
% out at the decoding level for a full permutation test, but importantly
% allowing to keep data from different decoding chunks (e.g. runs)
% separate. ... |
13606d60160f6f9c90dfafa0113cc98358c4eff83e192ae1f8f199b307e6e5b7 | MATLAB | 26,546 | 837 | % Script for eta-epsilon plots (Figure 3 or 4)
dt_val = 0.008; % set effective time step to be 8 ms
% 10000 steps = 80 s. Longest avalanches are ~8 s.
% 200 loops = 260 minutes -> about 4 hours recording
% 1000 loops is about 20 hours recording
%% LOAD... |
517ca64217cf2eb0b088b1cae93d898cb38b6fd351b998f3eb7d538e5978f730 | MATLAB | 26,596 | 503 | %% Extended Data Fig. 1 k: ROI-based analysis of fluorescence traces
% pinkFlamindo (cAMP) and GCaMP (Ca2+) responses to bath application of receptor agonist
% Peak counting: comparing between cAMP and Ca2+ datasets
%
% 1. Load workspace 'FIJI_AQuA_CytoGCaMP_BathAppBacLY_ExtFig1k.mat' and
% run Section A & B wi... |
de5b23d77ed3c505a7965accf98fad42d5b315a9c48012f675d818c1bf1400be | MATLAB | 26,775 | 819 | function test_suite = test_bids_file %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite;
end
% TODO
% function test_forbidden_order()
%
% i... |
da88553b1412140406dae79ab822e50f23f27d81839db1ef783ac78bad19484c | MATLAB | 26,824 | 583 | function [perf, result] = mv_regress(cfg, X, Y, varargin)
% Regression of multi-dimensional data. The interface is very similar to
% that of mv_classify.
%
% Usage:
% [perf, res] = mv_regress(cfg, X, Y, <X2, Y2>)
%
%Parameters:
% X - [... x ... x ... x ] data matrix or kernel matrix of
% ... |
a8de9b8612f39d3ecbb9a0e6f6e465027b09216431fe21b4219129cd012f7fa3 | MATLAB | 26,996 | 555 | % STATUS: Inctive
%
% SYNTAX:
% calcCumSum_DiffStartT_AllChn_CompClassifiers_Final(sbjNum,numClasses,
% saveOp)
%
% DESCRIPTION:
% Perform cross validation where SS beta coefficients from training fold
% is passed to test fold. Perform all-channel classification using 6
% different classifiers:
% 1) lin... |
cc1aeb9ab8ec7222879390627928cd8d92ce4e318834a1dc030c1abc218c4f62 | MATLAB | 27,238 | 667 | % 1. Add the path of the current script to the search path
% 2. Change the current folder to "Supp Fig1 PFstimulation_stimulus dependence"
% 3. analyze the data within the folder
% 4. Using ctrl+enter within each function to run each section
%% Section 1: Open files
% 1. ctrl+enter to run this section
% 2. Sele... |
ec7c8c7ec055767896094aa42cb42a4959a78dff892d2b24c2e73fc59cf26904 | MATLAB | 27,338 | 790 | % Avalanche count plots
rep_list = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'};
eta_list_sf1 = 1:10;
eps_list_sf1 = -2:-2:-14; % [ -6.0, -8.0, -10.0, -12.0, -14.0, -16.0, -18.0, -20.0];
% eps_list = [ -10.0, -12.0];
[x_info_sf1, num_ava_sf1] = loadSimulationRunResults('run_f1smallfinesweep', rep_list);
N_sampl... |
b9c54d682022d72ea703dc8459cf332b7e37a86a2eaea45047620c08a2c0063c | MATLAB | 27,404 | 541 | % 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.
function grpPlotPerfVsDiffTLen_Fig6_10HzTest(goodSbj,numClasses,saveOp,itrOp)
i... |
3d58b81e63fd0acd5e3e6f802eba424be2bb3341761848bf0c6bbb5c779e713c | MATLAB | 27,417 | 1,006 | % STATUS: active
%
% SYNTAX:
% plotAllHRF_Grp_ChnCriteria_Fig3_TTest(saveOp,opHBCorrected)
%
% DESCRIPTION:
% Plot HRFs for all 3 chromophores and spatial locations.
%
% RESTRICTION:
% None.
%
% INPUTS:
% saveOp - int: option to save figure.
% 0 - don't save
% 1 - save
% opHBCorrected - int: option to u... |
21804c2e3e88ca2bb0098e2fbc2bef5319eea321e0ca62fa9f896843525db89e | MATLAB | 27,483 | 350 | %Creates table of IED counts along with all variables of interest, for the Poisson model.
%2024/02/26
function produce_flicker_ied_tbl(root_dir,output_dir)
%% fetch metadata:
metadata_tbl=readtable([root_dir '/FlickerStudyMetadata.xlsx'],'Sheet','Subjects','PreserveVariableNames',1);
metadata_tbl=metadata_... |
cec843cec13871f373a9db46310ccded1e990482f53eaa2ff463e52eef5cf091 | MATLAB | 27,533 | 788 | function PLOT_MODEL(filepathname, option_final)
% Plot summary results from models fit (using RUN_MODEL.m) using multiple
% levels of positive feedback
%
% Provide full path to folder with results
%
% Hannah Payne, 2019
% Raymond and Goldman Labs
close all
ptick = 0.5; % scaling for ticks, increase to make longer
if ~e... |
bd8c98d09fdd27fa41cc01671d93645b99d3143b061e2d3d06048686a5c9497e | MATLAB | 27,583 | 679 | function res = calcSleep(sleepSeries, mask, gapSeries, epoch_sec, clockTime)
%CALCSLEEP NOcturnal (primary) sleep + nap metrics
%
% INPUTS
% sleepSeries: Binary vector (0=wake, 1=sleep)
% mask: Binary vector (Primary Sleep Window)
% gapSeries: Binary vector (1 = Invalid/Off-wrist dat... |
fe6f04cb5b59f51526947843f51a487fccc4c6862bb42976192bb90423d97ef5 | MATLAB | 27,616 | 867 | function varargout = ProcStreamEditGUI(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ProcStreamEditGUI_OpeningFcn, ...
'gui_OutputFcn', @ProcStreamEditGUI_OutputFcn, ...
... |
0c1c126e4431429529ba67b4e7b5ecd88123eb62a4de3c0c349712aeecce1624 | MATLAB | 27,805 | 692 | clear
clc
%load('D:\Brewer lab data\HFS\No Stim\Wells_5SD\well_spike_dynamics_table_nostim.mat')
load('D:\Brewer lab data\HFS\No Stim\Wells_5SD_500maxSD\well_spike_dynamics_table_nostim.mat')
well_spike_burst_dyn_table = well_spike_dynamics_table;
clear spike_burst_dyn_table
well_regList = {'EC','DG','CA3','CA1'}... |
57d6dd7fa5878e5eb5f82563dfff4e2a864233294c16ecba8fe01f653dc078a7 | MATLAB | 27,849 | 695 | clear
clc
% load('D:\Brewer lab data\HFS\Theta Stim\Wells_5SD\well_spike_dynamics_table_theta.mat')
load('D:\Brewer lab data\HFS\Theta Stim\Wells_5SD_500maxSD\well_spike_dynamics_table_theta.mat')
well_spike_burst_dyn_table = well_spike_dynamics_table;
clear spike_burst_dyn_table
well_regList = {'EC','DG','CA3','... |
687c1da3580081e6610691df1638b3ba14df644d51cbcb40f6114ecd1c1ea8ec | MATLAB | 27,900 | 704 | clear
clc
%load('D:\Brewer lab data\HFS\HFS Stim\Wells_5SD\well_spike_dynamics_table_HFS.mat')
load('D:\Brewer lab data\HFS\HFS Stim\Wells_5SD_500maxSD\well_spike_dynamics_table_HFS.mat')
well_spike_burst_dyn_table = well_spike_dynamics_table;
clear spike_burst_dyn_table
well_regList = {'EC','DG','CA3','CA1'};
... |
983d5f68df7a4655c4a06d038241f8760118ec2b4928fb1510eab051ee57c2b9 | MATLAB | 28,000 | 733 | % This function was used for single-trial decoding analysis
function single_trial_decoding
% listed are example files for illustration only
folder_name_hm4d={
'20180605#3',[5,9,13,17,21,25,29],[]; %cno
'20180912#3',[-1],[];
};
folder_name_control={
'2020101302', [1,5,9,13,21,25,29] [];
... |
1b73a3c77aab150aad191eaf7536281c65097af9f0598beba79f4e7e6a506d67 | MATLAB | 28,073 | 579 | function stat = mv_statistics(cfg, result, X, y)
% Performs statistical analysis on classification or regression results of
% the high-level functions such as mv_classify_across time and mv_regress.
%
% mv_statistics implements both Level 1 (subject-level) and Level 2 (group
% level) statistical analysis of MVPA result... |
d5ee84cfefa7c7453b3f8445b80049487bfaae1d665a797fd1df4aeaf1514dfe | MATLAB | 28,116 | 683 | %% Overview
%
% This code is for making figures in
% "Getting Personal: Brain Decoding of Spontaneous Thought Using Personal Narratives"
%
%
% Dependencies
% https://github.com/cocoanlab/CocoanCore
% https://github.com/canlab/CanlabCore
% https://github.com/spm/spm12
%
% Tested on
% MATLAB version 2018a
% Ma... |
52a32deaaa709dc122e4dab0dd6fbca0bb098d9881268127ef0d3dfc3352f138 | MATLAB | 28,221 | 542 | %%% Alejandra Sel 25/06/2018 [BH Update 2021] %%%%
%%% Pre-processing EEG data HEP reward learning task
close all
clear all
% Configure eeglab, ERPlab, fieldtrip and dependencies
% Update with your paths.
addpath('\eeglab2020');
addpath('\CARE-rCortex');
addpath('\ERPLAB8.02');
addpath('\Dependencies');
... |
2cda81342b981a0657983182eb93d8d232a9fb5681ce07af5b55bbc5ccca0c4f | MATLAB | 28,272 | 703 | function [conduction_time,max_area,direction,num_peaks,up_times,down_times]=...
ISI_sum_area_nonpeakstest_211025(bincountvec, bincount_ISI,bar_graph,max_fb_locs,max_ff_locs,max_pk_fb,max_pk_ff,times_struct,duration)
% Find feed forward and feedback peaks
% Assumes even number of elements in bincount vec and bin co... |
215043ed31b816282b4f52ca354edab0019a6e106f1763189630be6f2b76f55b | MATLAB | 28,303 | 471 | %% Extended Data Fig. 2e & Extended Data Fig. 3e-f:
% Histograms of event area and duration pre- and post-uncaging
% Choose which cells to pull events from (uncaging cells or neighboring
% cells)
%
% 1. Load 'AQuA_CytoGCaMP_2Puncaging_WTCx43CBX_Fig2_3.mat' workspace
% 2. Run the following sections of 'Fig2_3... |
324b82b85e3a1dcfebdbf506a381df26794614aa95b6df229b0acf0239582438 | MATLAB | 28,323 | 811 | function [output] = estimate_coh2x2_2dip_subsample(sourcemodel, freq, freqnoise, varargin)
% [COH] = ESTIMATE_COH2x2_2DIP(SOURCEMODEL, FREQ)
%
% estimate the coherence between all dipole-pairs.
% using a pairwise dipole spatial filter. This is an adjusted version of
% estimate_coh2x2_2dip, with a (slower) inner loop o... |
d3d59f4c1e0fb9001e7b313b28867f22a6c9142107854cbac69faa3468db65f5 | MATLAB | 28,348 | 829 | function [cancel,figh] = multiWaitbar( label, varargin )
%multiWaitbar: add, remove or update an entry on the multi waitbar
%
% multiWaitbar(LABEL,VALUE) adds a waitbar for the specified label, or
% if it already exists updates the value. LABEL must be a string and
% VALUE a number between zero and one or the str... |
594584a97a39ddfb8f0dd27b554623e43ce6348a5d9fda59e1c0504963cbd034 | MATLAB | 28,458 | 848 | %% IBSR and BD ANOVA from Inputs
clear
clc
close all
cd("D:\Brewer lab data\HFS\")
nostim=load('D:\Brewer lab data\HFS\No Stim\23-Nov-2021_A\spike_burst_dyn_table_stim.mat');
% hfs5=load('D:\Brewer lab data\HFS\Theta Stim\03-Mar-2022_B\spike_burst_dyn_table_stim.mat');
hfs5=load('D:\Brewer lab data\HFS\Theta S... |
71232cdb0a6148019fb46617251a5ba2ccdce7e84160675eebed3362dc09aa4e | MATLAB | 28,536 | 592 | % GLM Cross validation. 2 rounds of GLM Fitting nested according to this
% paper:
% von Lühmann A, Ortega-Martinez A, Boas DA and Yücel MA (2020) Using the
% General Linear Model to Improve Performance in fNIRS Single Trial
% Analysis and Classification: A Perspective. Front. Hum. Neurosci.
% 14:30. doi: 10.33... |
572e04ca5435b04649126cdf4f19c3ade11e69184e0671eab034ec64bc3e3444 | MATLAB | 28,650 | 861 | %% IBSR and BD ANOVA from Inputs
clear
clc
close all
cd("D:\Brewer lab data\HFS\")
% 11 SD
% nostim=load('D:\Brewer lab data\HFS\No Stim\23-Nov-2021_A\spike_burst_dyn_table_stim.mat');
% % hfs5=load('D:\Brewer lab data\HFS\Theta Stim\03-Mar-2022_B\spike_burst_dyn_table_stim.mat');
% hfs5=load('D:\Brewer lab d... |
3830e2464070fd62de3a77e931961bdc480a1432914879a2808c8615128f3809 | MATLAB | 29,016 | 537 | classdef nwbchannel < Sharedmethods
%Stimset object
% A stimset object is a group of acquisition sweeps in an NWBfile that were acquired by the same protocol/stimset
%
% ---------------------------------------------------------------------------------------------------------------------
% Auth... |
192afbb90dd5272ac6535f91efc29d5e82a71178047a9169d88ee12624c83262 | MATLAB | 29,205 | 544 | % function [cfg, n_files, n_steps] = decoding_basic_checks(cfg,output_arguments)
%
% This is a subfunction of decoding and an integral part of the decoding
% toolbox. This function should not be called directly. It fulfills two
% purposes: First, it carries out a lot of checks that make sure the user
% specifie... |
46c94798a8ef416450cbc31d228b9c81ef31f14bc27e82e09cd7c36cc3d0632c | MATLAB | 29,304 | 644 | function registration_execute()
% REGISTRATION_EXECUTE Performs image registration on the data in the struct 'registration'
%
% registration_execute()
%
% Note that the struct 'registration' is a global variable
%
% struct registration
% fixed - Fixed image
% moving ... |
551c027d76742c69b593ce138a5400df87311698079736da20f682beb31f6c44 | MATLAB | 29,336 | 539 | classdef nwbchannel < Sharedmethods
%Stimset object
% A stimset object is a group of acquisition sweeps in an NWBfile that were acquired by the same protocol/stimset
%
% ---------------------------------------------------------------------------------------------------------------------
% Auth... |
eeb0a6370f37fbf3678f5031babc7b1ba4a54324f5f504769429cae2e323de06 | MATLAB | 29,601 | 528 | classdef Abfbatch < Sharedmethods & Sharedpaths
%ABFBATCH List or batch of Abffile objects.
% A class to oversee the handling of abf files. Includes methods to:
% - Convert .abf files into matlab abffile objects
% - Save abffile objects in a designated folder
% - Return tables of metadata f... |
c188c7b82cc9d8f8cc736e31a0580073474305f2f2f9109fea6e7884e1595426 | MATLAB | 29,949 | 606 | function [subj best_penalties penalty_iteration_results results] = optimal_penalty_search(subj,patin,regsname,selgroup,runs_selname,mask,actives_selname,varargin)
% Determines effective penalties from training data and applies the best in
% a testing classification.
%
% [SUBJ BEST_PENALTIES PENALTY_ITERATION_RESULTS R... |
6df886a37c4a1eb54d7e4a4f4995b5fe6678f80c81f4acd26dcf324c021a1231 | MATLAB | 30,006 | 711 | %% mRatSpikeBatch (fileName,Electrodes,RatName)
% The program gets the multiple electrode EEG data and marks the spike on below principle:
% 1 - long events are excluded
% 1.1 - data filtered in 2 - 15 Hz frequency band
% 1.2 - Line Lenght (LL) calculation
% 1.3 - finds windows in which LL is more than 2std... |
2b57758435676f74fc8944dbea1d12e4c9276ce901b1247a917ab1abc4b171d5 | MATLAB | 30,111 | 593 | % function decoding_write_results(cfg,results)
%
% This is a subfunction of The Decoding Toolbox that saves previously
% processed data to a prespecified target location. For example, it can be
% used to write brain images in a searchlight analysis or write a mat-file
% for ROI analyses, containing a structure wit... |
114eafe12928d74cd0151ea6471c48cf9db68a22def7eea16220cbd04826ce2d | MATLAB | 30,279 | 1,110 | % STATUS: active
%
% SYNTAX:
% plotAllHRF_Grp_ChnCriteria_Fig4_TTest(saveOp,opHBCorrected)
%
% DESCRIPTION:
% Plot HRFs for all 3 chromophores and spatial locations, grouped by task
% performance. plotAllHRF_Grp_ChnCriteria_Fig4 used Welch t-test. Here
% use standard t-test.
%
% RESTRICTION:
% None.
%
% INPUTS:... |
adc676de85fef71a2383821dab908b9397a464102d4ba2f310569b9795e29c6a | MATLAB | 30,288 | 421 | load('data.mat', 'data');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Fig. 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure('color', 'w', 'NumberTitle', 'off', 'name', 'Fig. 1'); pause(0.1); jf = get(handle(gcf),'javaframe'); jf.setMaximized(1); pause(0.5);
FontSize = 20;
%%% A
subplot(6, 5, [1:2 6:7]);
imshow(data... |
00c07e2ee35ebb0cc86ab459526bc281f2f18f8830ad2fbc1039147e22ea18db | MATLAB | 30,533 | 574 | classdef ROIVolumeSegmenter_exported < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
ROIVolumeSegmenterUIFigure matlab.ui.Figure
ActiveContourOptionsPanel matlab.ui.container.Panel
SelectModelButtonGroup matlab.ui.contai... |
95a536774d184e7ffff6e986f67facee2466c77e6def9f61d1a0badda3f506d5 | MATLAB | 30,953 | 740 | % UNDERSTANDING STATISTICS
%
% In the introductory tutorials, various metrics are calculated for
% classification and regression problems. In many neuroimaging applications,
% we also want to quantify the statistical significance of these metrics.
%
% To this end, we look into how to perform statistical testing of MVP... |
3e0d18de3fc8069114f6926a981a5ac88b04764af799ef301ca76d0b8e256fa0 | MATLAB | 31,073 | 1,054 | classdef Model
%
% Class to deal with BIDS stats models
%
% See the `BIDS stats model website
% <https://bids-standard.github.io/stats-models>`_
% for more information.
%
% USAGE:: matlab
%
% bm = bids.Model('init', true, ...
% 'file', path_to_bids_stats_model_file, ...
% ... |
95d2e7e2d6579c060646266b3737f6aecefcbde4668e49cdaf7bcbfb39a4de73 | MATLAB | 31,165 | 593 | classdef DSCSettings_exported < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
DSCMappingAdvancedSettingsUIFigure matlab.ui.Figure
ApplySettingsButton matlab.ui.control.Button
ResetToDefaultButton matlab.ui.control.B... |
f3b2aeb2a3696cdefc522c47afd1ab9b6fb95a9ca9f43d2b4e51e1f8adbb3e68 | MATLAB | 31,182 | 713 | function SE_tracking_step(wholestack,outputpath)
% thi function tracks neurons with the parameters found in the outputfolder
% The inputs are:
% - wholestack: Stacked recording as a matrix with shape (x,y,z,t)%
% - outputpath: folder path, specified as a character vector or
% string... |
7ae460bd728e744703dc2d037c27b28ca7d473d6619adcebb9451d786125c03b | MATLAB | 31,269 | 940 | % GROUP COMPARISONS ON SPECTRAL ESTIMATES AND SLEEP/WAKE STATES
%
% Organization and selection
% specific periods
% concatenate states
%
% Power and Coherence
% per frequency
% per band
% per band peak
%
% 2D statemap
% states and transitions
% automatic clustering
%
% Similarity betw... |
ed3e9807402e0cdbad585cf8b29094b359fa565fdbca26e6340ae14caab9d9f4 | MATLAB | 31,299 | 799 | % UNDERSTANDING SPATIAL FILTERS
%
% This tutorial builds on the understanding_preprocessing tutorial so make
% sure you have finished that one first.
%
% The purpose of this tutorial is to gain an understanding of spatial
% filters and how they can be used as a preprocessing tool for
% classification. Spatial filters ... |
11b9b7a817dd2059fb70abb770f45752fa2c999528686de7192e1889f92592c3 | MATLAB | 31,463 | 809 | function varargout = DFATool(varargin)
% DFATOOL MATLAB code for DFATool.fig
% DFATOOL, by itself, creates a new DFATOOL or raises the existing
% singleton*.
%
% H = DFATOOL returns the handle to a new DFATOOL or the handle to
% the existing singleton*.
%
% DFATOOL('CALLBACK',hObject,eventData,... |
d6b896d764d4b6f270e4c6f55b5dcc13638d2003fff4811fbbd0a4b856d5b17d | MATLAB | 31,569 | 626 | function [perf, perf_std] = mv_calculate_performance(metric, output_type, model_output, y, dim)
%Calculates a classifier performance metric such as classification accuracy
%based on the classifier output (e.g. labels or decision values). In
%cross-validation, the metric needs to be calculated on each test fold
%separat... |
21ac92117524858148a65f6c3caf938afeefc6a30313e3ce248717f3f13c7d7b | MATLAB | 31,797 | 749 | IsCombiMultiROIs = 0; % 0 for luminance repeat measurement, 1 for all other encoding space
HasProcessed = 0;
clear PL PLTab
nclip = 11;
nType = 7;
% lockoffset = [80];%76
% IsCellAlignment = 1;
% qualthr = 0.2; % R-squared
addpath(genpath('\\storage1.ris.wustl.edu\kerschensteinerd\Active\Emily\BasicFunctions\Op... |
959db1f01998b84b88d32d8c9e0514864cd7b1e9a573843248adde13cb6a1c89 | MATLAB | 32,021 | 918 | function tderica_main(dimEmbed,numComp,subsample)
% set meta parameters
dirRaw = 'C:\Users\toyo\Desktop\tcrs4d_200218\20221118freezed\';
strHeaderRemove = {'180710h','180712e','190313g','190314e'};
frameRemove = [ 3000, 2450, 4600, 3900];
idxNormalize = 2;
numSamplesSelect = 10;
% set d... |
af102825f3fc9c5fc52ff7fb37704a13b8643e877bcddbaecb7343b20e6a1c1f | MATLAB | 32,086 | 822 | %% nostim
clear
clc
load('D:\Brewer lab data\HFS\No Stim\Wells_5SD\well_spike_dynamics_table_nostim.mat')
well_spike_burst_dyn_table = well_spike_dynamics_table;
clear spike_burst_dyn_table
well_regList = {'EC','DG','CA3','CA1'};
figOrder = [1 2 4 3 ];
col_array = ["#D95319","#77AC30","#4DBEEE","#7E2F8E"];
co... |
2c7a8435791b941650b3ffdc157c876f8b1a1ed413e12905e41872e887e539ae | MATLAB | 32,474 | 790 | % STATUS: experimental. Not for publication.
%
% SYNTAX:
% plotPerformance_CV_GLM_ssBeta_AllClassifiers(sbjNum,numClasses,saveOp)
%
% DESCRIPTION:
% Plot decoding performance (accuracies) of a subject as a function of
% trial timeline for 6 different classifiers.
%
% RESTRICTION:
% Only for sbj 08 and 10.
%
% INPUT... |
262c01d33b3a5a03188ebfe0d74518bdb139ff6379aa49c649a8bed1eb794e75 | MATLAB | 32,485 | 1,252 | function Duszkiewicz2024_Figure_GLMRemWake
% This script reporoduces panels from:
% Figure 6, Extended Data Figure 9
% Dependencies:
% TStoolbox
%TODO: script dependencies, links to external functions
% Copyright (C) 2023 by Adrian Duszkiewicz and Adrien Peyrache
%
% This program is free software; you can redistri... |
547d770c5ec3281cf10e6d970ef790d92a3ded85258b6f4a2493e1ee16c21cfc | MATLAB | 32,804 | 613 | %% exclude trials based on video coding
all_markers = [experimental_markers, baseline_markers];
videobased_exclusion_overview = 0;
videobased_count_overview = 0;
total_trials_exp = 0;
total_trials_base = 0;
for x=1:length(EEG.event)
if sum(strcmp(EEG.event(x).type,experimental_markers))==1
total_tri... |
2f6c4b3c1021deabc389e5eb6efa46b0b2b9af27603a601abf0ccf43c8867f17 | MATLAB | 32,829 | 771 |
%% input and output directories:
opts=detectImportOptions([output_dir '/IED_count_table_all-sessions.csv']);
opts.VariableTypes(1)={'char'};
data_table_original=readtable([output_dir '/IED_count_table_all-sessions.csv'],opts);
%% Generate a data table where ied counts are aggregated
% for channels from same conse... |
b2f743ba003650f913c06f67649f91012a0f3122ab31a9a943bce077e14979d8 | MATLAB | 32,880 | 598 | %Parts of figure: 4.
%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'];
%% Panel A- illustration of flicker response in time and... |
a3378cafff74ee6f3749e68764ec77dc9a2225eb5bfc213e9838b2372c8d2eb5 | MATLAB | 33,404 | 771 | % function [results, cfg, passed_data, misc] = decodingCustom(cfg, passed_data, misc)
%
% The Decoding Toolbox, Version: 3.997, by Martin Hebart & Kai Goergen
%
% This is the main function of The Decoding Toolbox which links to all
% subfunctions performed for brain image decoding. This toolbox is capable
% of ru... |
d633e694171c994da8da28b020eb42bdfae20e7ab59ba7da78683cd2aea430af | MATLAB | 33,725 | 817 | % SYNTAX:
% [yavg, yavgstd, tHRF, nTrials, ynew, yresid, ysum2, beta, R, hmrstats] = hmrR_GLM(data, stim, probe, mlActAuto, Aaux, tIncAuto, trange, rcMap, glmSolveMethod, idxBasis, paramsBasis, rhoSD_ssThresh, flagNuisanceRMethod, driftOrder, c_vector)
%
% UI NAME:
% GLM_HRF_Drift_SS
%
% DESCRIPTION:
% This script esti... |
41d36e1e72ba6ca6a65145a348dba73e8b6c319f552c01afb90b166ca71b8794 | MATLAB | 33,749 | 929 | % Script to plot basic parameters from each run (like the coupling
% matrices)
rep_list = {'A', 'B', 'C', 'D', 'E'};
x_info = cell(length(rep_list),1 );
% file_name_rep = @(str) ['avalanches_code/data/fields5ultrafinesweep/sweep_ultrafine_rep' str ...
% '_av_stim5e-10.0et6.0ph1.0p1.0tstatfr_stats.mat'];
file_na... |
fbf5a2930da740498fb1e091454dac4f26273b386b09200337844b2db96c1aa8 | MATLAB | 33,843 | 816 | %% Create Graphs with strength of connections varying with time representing slopes of AFR between nodes
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:\Br... |
44857452e66d96d99456298c0b9bbf39c061d9cd5f98b01b2077e32f0315a2f1 | MATLAB | 33,877 | 704 | function parameter_selection_and_tracking(data, outputpath, voxel_size)
% tasto deseleziona tutto
% tasto per la scala dei colori nel video
% tasto luminosità
% deve lasciare un simbolo nel punto in cui tracki
% se i primi vicini sono troppo lontani non deve considerarli
% se passi col mouse su una traccia sare... |
db8c7e0bb08a343d7f65e2bf900ae64f6f8ef175c73c6b9e97dab3c7bb2318dd | MATLAB | 33,879 | 704 | function parameter_selection_and_tracking(data, outputpath, voxel_size)
% tasto deseleziona tutto
% tasto per la scala dei colori nel video
% tasto luminosità
% deve lasciare un simbolo nel punto in cui tracki
% se i primi vicini sono troppo lontani non deve considerarli
% se passi col mouse su una traccia sare... |
c2866625f1578580460eaee240e45170695643fe64e55aa3f8ff5ecb37d29117 | MATLAB | 33,918 | 705 | function parameter_selection_and_tracking_batch(data, outputpath, voxel_size)
% tasto deseleziona tutto
% tasto per la scala dei colori nel video
% tasto luminosità
% deve lasciare un simbolo nel punto in cui tracki
% se i primi vicini sono troppo lontani non deve considerarli
% se passi col mouse su una tracci... |
bfb438b0dc2ff3fddf3aa179d44d41e39d369e388d846a3e1267c3c31aa22606 | MATLAB | 33,997 | 891 | classdef DataTreeClass < handle
properties
files
filesErr
groups
dirnameGroups
currElem
reg
config
logger
warningflag
dataStorageScheme
warnings
errorStats
end
methods
%... |
8499d9eaffe41ead5f4285dcd19d5960bfa16cd931d1dc8a735b25f75144fa1a | MATLAB | 34,007 | 672 | % This is relatively fast
% For figure 7 in Draft 3.
% Plot time of peak performance as a function of different sbj
function grpPlotBoxPeakPerf(goodSbj,numClasses,saveOp,rejTrOp)
if goodSbj == 1
%sbjList = {'08','12','16','17','18','19'};
% high-performing
sbjList = {'08','12','13','16','1... |
db53a1a0440ac5e426c07713454cd378609f7115272c14206cdf37c7c8410241 | MATLAB | 34,039 | 769 | clc; clear all;
tic
%% Input section
imagePath = '/archive/bioinformatics/Danuser_lab/Fiolka/MicroscopeDevelopment/Lattice/Data_Gaussian/NA0.55,0.52/200322';
file_interest = 'Cell'; %'Squ_0,93,-93_1.00_'
number_interest = [5:12]; %%[1,2,3-5]
ChannelstoProcess= [1];
%y_ROI {1} = [1151:1200];
%y_ROI {2} = [1201:1250];
%... |
ae724fa10b40c524bc1c54a310ae745df9c6c06183927897e591fedcd658cc6f | MATLAB | 34,057 | 761 | % function [results, cfg, passed_data, misc] = decoding(cfg, passed_data, misc)
%
% The Decoding Toolbox, Version: 3.997, by Martin Hebart & Kai Goergen
%
% This is the main function of The Decoding Toolbox which links to all
% subfunctions performed for brain image decoding. This toolbox is capable
% of running ... |
60a71f2559ca755d76266778a8d5d9b2cfc67efe4d12047065884e9f264b5f23 | MATLAB | 34,245 | 604 | %% Mean dF/F per 30s time bins from active astrocytes in each t-series
% Extended Data Fig. 1d: time-series traces of average dF/F in 30s windows
% from active astrocytes in each slice. Permutation testing used to
% determine time windows with dF/F values significantly greater than chance.
% dF/F values calculated... |
2fe7ee592774d6c210ad52dc1448753b2101dd4f0812bf5dd8f596ddec5f9ff8 | MATLAB | 34,492 | 464 | %% Preparing data structs with AQuA res files from 2P Ca2+ imaging experiments
% during receptor agonist bath application
% Used to prepare data struct for Fig. 1: bath application of receptor agonist (Baclofen & t-ACPD)
%
% Michelle Cahill 20231208
%% Section A: preparing mydata struct
% From Aggregate_MC_fts... |
a6d04363d820397d453138c4d7f4c334c2e946cd29ea2677e2a24b080c687f35 | MATLAB | 34,516 | 760 | % 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
function PlotSpik... |
e1a2476ca49ea918e7ab4d51cec94968c33473ec4ec7c4f0f73b476c09450724 | MATLAB | 34,592 | 599 | %% Fig. 2i, 2j, Extended Data Fig. 2a,c, Extended Data Fig. 3d:
% mean dF/F values per-and post-stim from identified AQuA events from
% chosen cells ('UncagingEvents' for events from the directly stimulated cell,
% 'NeighboringEvents' for events from cells not directly stimulated by uncaging)
% For a flexible... |
4502d764dcc7204b337c922c7ea501cf774d5a92efa7d6c9756590305ec0464d | MATLAB | 34,613 | 869 | function [message] = AccuSleep_viewer(EEG, EMG, SR, epochLen, userLabels, savepath)
%AccuSleep_viewer A GUI for manually assigning sleep stage labels to EEG/EMG data.
% Zeke Barger 103019
% Arguments:
% EEG: the EEG signal as a vector
% EMG: the EMG signal as a vector
% SR: the sampling rate for the EEG... |
631d066a4b9b4fa1c145fd7b7e194dc8c0a66427a6731a7f11389597bd66dde7 | MATLAB | 34,754 | 1,026 | function BIDS = layout(varargin)
%
% Parse a directory structure formatted according to the BIDS standard
%
% USAGE::
%
% BIDS = bids.layout(pwd, ...
% 'use_schema', true, ...
% 'index_derivatives', false, ...
% 'index_dependencies', tru... |
b4ebeaa5110ad021cfaf45d9cd50fa6bf455476c4a571092c51a470fcf8dbeb9 | MATLAB | 34,777 | 1,005 | % Script to plot basic parameters from each run (like the coupling
% matrices)
rep_list = {'A', 'B', 'C', 'D', 'E'};
x_info = cell(length(rep_list),1 );
% file_name_rep = @(str) ['avalanches_code/data/fields5ultrafinesweep/sweep_ultrafine_rep' str ...
% '_av_stim5e-10.0et6.0ph1.0p1.0tstatfr_stats.mat'];
file_na... |
16e423b43ae3ea66071284eefc5f7cf1af974ecaf7df39c5f8d30e69bb5df7af | MATLAB | 34,793 | 707 | % STATUS: active
%
% SYNTAX:
% grpPlotPerfVsTime(goodSbj,numClasses,saveOp,rejTrOp,itrOp,errBarOp)
%
% DESCRIPTION:
% Plot decoding performance (accuracies) as a function of time course of a
% trial for all 3 chromophores.
%
% RESTRICTION:
% None.
%
% INPUTS:
% goodSbj - int: group of subjects. Encoding as follow... |
d3c28baea19b1225e21235f9e8e92230d13c1336a2484513592f2e080ba6c2cd | MATLAB | 34,898 | 850 | #import "UnityPurchasing.h"
#if MAC_APPSTORE
#import "Base64.h"
#endif
#if !MAC_APPSTORE
#import "UnityEarlyTransactionObserver.h"
#endif
@implementation ProductDefinition
@synthesize id;
@synthesize storeSpecificId;
@synthesize type;
@end
void UnityPurchasingLog(NSString *format, ...) {
va_list args;
va_s... |
cf2e98166d2e6a6c7ce46bb75c92fd88ee02d9a84743d0ceaec712d2189d7c5a | MATLAB | 35,274 | 845 | close all; clear; clc;
% Get plexus data and its assigned BCTypes
%%
NatMovPath = '//storage1.ris.wustl.edu/kerschensteinerd/Active/Emily/NaturalSceneVideo/Analysis/';
SpotMovPath = '//storage1.ris.wustl.edu/kerschensteinerd/Active/Emily/Circle/Analysis/';
NoisePath = '//storage1.ris.wustl.edu/kerschensteinerd/Act... |
b85a95a03fd6939f25969ed448122ce182258789a758cbc02cbe6cb3a127cec0 | MATLAB | 35,410 | 746 | classdef RegistrationViewer_Basic_exported < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
RegistrationViewerUIFigure matlab.ui.Figure
ResetSelectionButton matlab.ui.control.Button
EndSlicesNotationTextAreaLabel matlab.u... |
252b1f5ca914cfed0e490d4b66ffe6ca0cacbeedaed173345e76786cdb1a41ad | MATLAB | 35,586 | 812 | % STATUS: active
%
% SYNTAX:
% preprocessFNIRS06_FInteraction_Ind_MultiOnly(s,numClasses,rejTrOp,...
% rejChnOp,rerunOp,plotOp)
%
% DESCRIPTION:
% compute 3 single-channel classification as well as classification
% leaving 3 channels out of entire probe. 3 channels are manually
% selected from leave-one-featur... |
e2a7d2d060b4599b49a6133a9af8d6994a25e9ea0bd86f7ea7d2415667ea45bc | MATLAB | 35,632 | 831 | % STATUS: active
%
% SYNTAX:
% preprocessFNIRS06_LOFO_MultiOnly(s,numClasses,rejTrOp,rejChnOp,...
% fefOnlyOp,rerunOp,plotOp)
%
% DESCRIPTION:
% Performs leave-one-feature-out classification on entire dataset (using
% Markov Blanket).
% Otherwise identical. Repeated description here:
% Preprocess raw data (li... |
fe76be82d4e2664e073a13343731090331034db2a8fe92229886f064a651bc6e | MATLAB | 36,139 | 899 | %% Create Graphs with strength of connections varying with time representing slopes of AFR between nodes
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")
... |
0df13b2b4a85d1446bd1a72c6fcd0f2419c79ca3800b3c266e650395c35a607c | MATLAB | 36,159 | 845 | % STATUS: active
%
% SYNTAX:
% preprocessFNIRS06_LOFO_MultiOnly(s,numClasses,rejTrOp,rejChnOp,...
% fefOnlyOp,rerunOp,plotOp)
%
% DESCRIPTION:
% Performs leave-one-feature-out classification on entire dataset (using
% Markov Blanket).
% Otherwise identical. Repeated description here:
% Preprocess raw data (li... |
49b82bc0a11d4591748e9ed5828ebf1ae108eb2a6ae44d8d3dd0dae5e81c38bf | MATLAB | 36,247 | 826 | % STATUS: active
%
% SYNTAX:
% preprocessFNIRS06_FInteraction_Ind(s,numClasses,rejTrOp,rejChnOp,...
% rerunOp,plotOp)
%
% DESCRIPTION:
% compute 3 single-channel classification as well as classification
% leaving 3 channels out of entire probe. 3 channels are manually
% selected from leave-one-feature-out clas... |
e7d71f8e0b7e5ab39f068c3195d379c2457d9149ffa39cbac9278c4c7070192b | MATLAB | 36,328 | 764 | % 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.
% 08/01/2022, add CI options
% 1 for counting each fold as one sample point
% 2 f... |
9c07bd890263631ef515642f8a27ef95d2dc14d381da8be15fe4316e8ba8e51f | MATLAB | 36,558 | 615 | %% Extended Data Fig. 1 j: ROI-based analysis of fluorescence traces
% pinkFlamindo (cAMP) responses to bath application of receptor agonist
%
% 1. Load workspace 'FIJI_pinkFlamindo_ReceptorAgonistBathApp_ExtFig1.mat'
% 2. Run the following code
%
% Michelle Cahill 20231206
%% Section A: From PrepPinkFlamindStr... |
28505329e3fc4d4126a6f8724078edb3f3220ded60131a4a489df2e43a97385d | MATLAB | 36,606 | 998 | classdef RunClass < TreeNodeClass
methods
% ----------------------------------------------------------------------------------
function obj = RunClass(varargin)
%
% Syntax:
% obj = RunClass()
% obj = RunClass(filename);
... |
1ee3b18be2a7fae46b3c7be78e1ee22f3e5de5b97e9200e6a89001de6df90283 | MATLAB | 36,613 | 710 | function tracking_step(wholestack,outputpath)
% This function tracks neurons with the parameters found in the output
% folder
%
% The inputs are:
% - wholestack: Stacked recording as a matrix with shape (x,y,z,t)%
% - outputpath: folder path, specified as a character vector or
% ... |
2e7d74ed82d9ca199d343164b2f2ba0b9a65a8dd55b11acf56b696a5f115ed14 | MATLAB | 36,829 | 582 | %% Fig. 2l-o & Extended Data Fig. 2f: Event number/30s near and far from the uncaging site
% pre- and post-uncaging.
% Bin events into time bins of a chosen duration, in concentric circles
% radiating out from the uncaging site (with band width of choice),
% including events from chosen regions.
% - Designed for ... |
9a14585bfbd9cfcc699b4748d033b12fc4e47f4c875a2fc18208ece98e1fc65e | MATLAB | 36,873 | 885 | % GETTING STARTED WITH CLASSIFICATION
%
% This is the go-to tutorial if you are new to the toolbox and want to
% get started with classifying data. It covers the following topics:
%
% (1) Loading example data
% (2) Cross-validation and explanation of the cfg struct
% (3) Classification of data with a time dimension
% ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.