sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
9a741e1ece7e817841aec2eb4c779de2d43d9de88cc9a3258210d988d147239b
MATLAB
20,014
603
%% Figure 2a & b (peak metrics) % this script rungs additional analysis required for the plots of figure % 2a & b. %% clear ft_defaults %% - SUBJECTS - %% % ID 18 missing because of LP at 50Hz subjects = {'OSL13', 'OSL14', 'OSL17', 'OSL21', 'OSL24', 'OSL26', 'OSL27', 'OSL28', ... 'OSL29', 'OSL30', 'OSL31', 'OSL...
6a8db1c1cd652a5b851c75c6599d46974d3a2082f92bb2811f5f79c440e5eec4
MATLAB
20,090
454
% function MAP_fig_1_multi(mname,config) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ################################################################# %% DESCRIPTION % Script to analyse data for: % Grieves et al. (2020) % Quantification of firing rate map procedures % % This script % NO...
aec6e682e62a344477ff76e736773c70813d1c9998aa9c5e60666b913ec03340
MATLAB
20,093
349
function plot_cum_replay_temporal(epoch,bayesian_control) % Plots distribution of replay events over sleep periods for each track and protocol. % Histogram is calculated as the sum of cummulative replay event times across tracks & each experiment (always within a protcol), % and averaged (divided) by number of active...
3a8add968e97848fd25bf5169c463acb03bb0b35c500395fa515c71e56a4c402
MATLAB
20,122
792
function st = ct_geom_par(type, varargin) %|function st = ct_geom_par(type, varargin) %| %| Same as ct_geom, but adds a rebinned variable %| ct_geom should be changed to include a new type instead %| %| Create the "CT geometry" structure that describes the sampling %| characteristics of a cone-beam CT system (axial o...
d4972bb43dde55644b19ef512eefc6e2932ef8611d9961477ce8a5af05770dbd
MATLAB
20,128
801
% LICENSE % % _This file is Copyright 2018 by the Image Processing and Analysis Group (BioImage Suite Team). Dept. of Radiology & Biomedical Imaging, Yale School of Medicine._ % % BioImage Suite Web is licensed under the Apache License, Version 2.0 (the "License"); % % - you may not use this software except in compl...
3f175a0cd93628f7888bd964f45a297ee21ceeb8de5797b8e51e26d927a2aee4
MATLAB
20,190
527
function check_neuralynx_validsamples(directory) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % CHECK_NEURALYNX_VALIDSAMPLES searches and inspects neuralynx (.ncs) files % for invalid samples in a directory and all of its subdirectories. It then % prints out in the command window how man...
1913523ada2c443cb49ab8d4ef6290450b2d0438179ae43672ef53cd0ee90657
MATLAB
20,198
603
function D = spm_eeg_convert(S) % Convert various M/EEG formats to SPM12 format % FORMAT D = spm_eeg_convert(S) % S - string (filename) or struct (see below) % % If S is a struct it can have the optional following fields: % S.dataset - file name % S.mode - 'header' - only convert the...
198ceb88d2bee141b6ba1436612e1228b3f8ceeaf03dc33d4e79fe001bcea63a
MATLAB
20,251
538
%% Analyzing Neural Time Series Data % Matlab code for Chapter 27 % Mike X Cohen % % This code accompanies the book, titled "Analyzing Neural Time Series Data" % (MIT Press). Using the code without following the book may lead to confusion, % incorrect data analyses, and misinterpretations of results. % Mike X Cohen...
73ae33ca645ae2d43f82ceae3fa94d76edda470b6003f2068a83ab4036eeebd5
MATLAB
20,276
738
% This code sets up and runs a Grimbert and Cang simulation function r = runGrimbertCang(phenotype,useAltP,Pfactor,ignoreGradients,experiment) % Cached data, used by estimateDensity Xgrid = []; Ygrid = []; mask = []; densityNormalisation = []; SCmaskPad = []; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
739b6ae80aee4056b957cb75eedda25282d8c13c6929fd6d3a2b8141dea96a66
MATLAB
20,279
678
function ob = Gtomo_nufft(mask, dim_data, varargin) %function ob = Gtomo_nufft(mask, dim_data, options) %| %| Construct Gtomo_nufft object, for Fourier-based forward and backprojection. %| Currently handles 2D parallel and fan-beam cases. %| %| See Gtomo_nufft_test.m for example usage. %| %| Basically, you create an o...
750a9fa9682a8e89c6d208511e11f0219b3aad59a0d54849cfe5c361da75d999
MATLAB
20,378
414
function [Nburstlets, ISI_c, overallISI, IBI_c, overallIBI, sortedBwidth_iter, sortedBwidth_time, ... sortedBbegin_iter, sortedBend_iter, sortedBelec, sorted_Itersinburst, sorted_Voltsinburst, ... sorted_Timesinburst, sorted_Nspikesinburst, sorted_Bbegin_allE, sorted_Bend_allE, ... EFireArray, EFireMatri...
33ff57ac4900762bd8f4967687db1c8613c8c4d466cdd7302e32c917b1da2131
MATLAB
20,391
398
function harvest_vars(varargin) ip = inputParser(); ip.addParameter('include_eye', 0) ip.parse(varargin{:}); include_eye = ip.Results.include_eye; analysis_dir = '../data/analysis'; preprocessed_dir = '../data/preprocessed'; results_dir = '../data/results'; ex_names = {'M1_0008', 'M1_0010', 'M1_0012', 'M1_0013', 'M1_...
66fed8fe8bf7521371ae3b7492442495c867fd01f503f2f19bbd2055df92f973
MATLAB
20,470
694
%freq_ranges = [2.9 6] % low theta %freq_name =[]; freq_ranges = [40 200];freq_name = 'g' strt_time = 500 end_time = 800 addpath('/mnt/yassamri/iEEG/sandra/analysis_pipeline_final') % elecs if strcmp('57', subj) fro_chan_idx = [1 4:8 13 16:17 25:27 35 37 44 46:47 70:83 89 91 98 99 101 102 108 109 110 1...
dcd4f0f767d7849845f861c2c811cef41d59ef109ca3c0f134e0614b04d9f656
MATLAB
20,490
609
function vtc = importvtcfromanalyze(imgs, bbox, res, imeth, trans, opts) % importvtcfromanalyze - import a VTC from Analzye files % % FORMAT: vtc = importvtcfromanalyze(imgs [, bb [, res [, im [, t [, o]]]]]) % % Input fields: % % imgs cell array with HDR filenames for xff % bb option...
e7ee4690ca99f4291bca6c80909e16915f5c9279baafabaffd2079a00cf7eb8f
MATLAB
20,490
558
function VO = spm_write_sn(V,prm,flags,extras) % Write out warped images % FORMAT VO = spm_write_sn(V,prm,flags,msk) % V - Images to transform (filenames or volume structure). % prm - Transformation information (filename or structure). % flags - flags structure, with fields... % interp - i...
e65e75ce25b336003353ca30a6341377dc4ef7d658dfd4cdb9542279e56ed6b3
MATLAB
20,524
412
function [chanRefIdx, trialFRBoth_Grasp, trialFRBoth_Carry, trialFRGrasp, trialTargetBoth, trialTargetGrasp] = Behavioral_Comp(DataSqueeze,DataGT) %Channel Indexing restrictM1 = zeros(1,1280); allM1 = [1:5:316 481:5:956 1121:5:1276];%[641:5:956 1121:5:1276]; restrictM1(allM1) = ones(1,192);%ones(1,96); % Breakout imp...
6e9764107a794e61f5654df4aa0f1c0eb9887e6053368c6dc25a1ff2136c24e9
MATLAB
20,640
720
% GUI for manual labeling of seizure data % %Input is the output of the SzRecTime_processing.m script % %The purpose of this GUI is to enable allow for manual labeling of your %data to compare to algorithm's performance. % Note that this script is not designed to rewrite over previously scored % data, but rather to ...
5cd85427635a1031f20aaf2df6d1f269c59e16d7af70b3bd88b785b89084b55e
MATLAB
20,670
490
function PLOT_SPACE(Sim,Space,NUMERIC_SPACE,ANALYTIC_SPACE) % plot function for asym- and z-spectra simulated using BATCH_simulation.m % last change: 2014/04/03 by PS assert( isstruct( Sim ), 'Simulation parameter Sim not set.'); assert( ~isempty( fieldnames(NUMERIC_SPACE) ) || ~isempty( fieldnames(ANALYTIC_SPACE) ), ...
f9d6cb15f751e4f84c13bd0c99cd58db138359359565c4cc6e4a4a061c616212
MATLAB
20,689
766
%Matlab code to segment, track and obtain metrics of motion and density for myocytes clear; nf=0; %input video number for tracking and image parameters prompt = {'Pixel width (microns):','Frame length (mins):','Number of first video:','Number of last video:','Filename suffix:','Position:'}; dlgtitle = 'Input'; di...
eaa5c7681850a1f37f4b0eedbdcea03756a514105a93d6506c0b6e588cc1754a
MATLAB
20,708
553
function EEG = c_EEG_ReplaceEpochTimeSegment(EEG,varargin) if nargin == 0 testfn(); return; end p = inputParser(); %p.addRequired('EEG',@isstruct); p.addParameter('timespanToReplace',[],@(x) isnumeric(x) && length(x)==2); % in s p.addParameter('prePostFitDurations', [], @(x) isvector(x) && (isempty(x) || len...
4ced33e89fa2ee41bb84cd0b2c0171833bc4b74381df111283809a913c7d1ac4
MATLAB
20,711
767
%Matlab code to segment, track and obtain metrics of motion and density for myocytes clear; nf=0; %input video number for tracking and image parameters prompt = {'Pixel width (microns):','Frame length (mins):','Number of first video:','Number of last video:','Filename suffix:','Position:'}; dlgtitle = 'Input'; di...
b9086ecb9cb128eda882e1e12247d7a7bbb5fa635b47e164348a863dd27c2efe
MATLAB
20,720
568
% Script to plot Supplementary Figure 2, calculate statistics reported, and % save data to Excel spreadsheets that are then imported into the Source % Data file. % Kit Longden 2023. addpath ../Shared_functions/ % Set up main figure properties % ------------------------ fig_h20 = figure(20); set(fig_h20, 'color', 'w',...
b7ba46b6ab41355e471f7c3460382e7ac0fcf8364ae007c8cbedf5856b3745ec
MATLAB
20,761
481
function out = plotScale(duration, text, varargin) % Use this function to plot a rating scale on the stimulus presentation % window. The scale is highly configurable in position, width, color and % text, and can be either active (capturing a mouse response) or inactive % (display only). % % Usage: out = plotScale(durat...
bf172fbd4a2946f5e8fb092d9f216f098fb8db5d28e169048540c7eb200bbd64
MATLAB
20,800
568
% Script: generates figures of pwoer traces as a functin of a desired freq. % Runs perm testing stats of traces, using channels as observations. % Generates also group matrices, using subj as observations (last cell). clear all;close all;clc addpath('/mnt/yassamri/iEEG/sandra/analysis_pipeline_final') exp_type = ...
864a32e94bda798d4ae554f0409bebb2309a19ba2b1a1a7209e4e5be6c2b4ebc
MATLAB
20,805
449
%% Preprocessing Pipeline % This script should be run in sections. Functions/scripts with the SBJ## % prefix can be run automatically, and all other sections should be % manually editted for each dataset. clear all; close all; %% Check which root directory if exist('/home/knight/hoycw/','dir');root_dir='/home/knight/h...
954518905467adf9fc7c9fe1e3e56f33acf117cdde97952883f93d5fa455ed15
MATLAB
20,830
571
function [table_u_r,spk_trace_aux,spk_trace_aux_full,sorting,cells_to_keep]=identify_waves_latestversion_6_f_forNpx(num_clus_discr,bin_size,dt_s,make_fig,spikes_data,chunk_ini,chunk_end) sf=1/bin_size; min_events=50; dt_s=floor(dt_s*sf); %number of bins used to bin the data %Generates sorting sorting_ini=chunk_ini*fl...
9d9c0f08a464a98e2edad2ad0a0391dcf914637f5f55e33fb97d91d5041947c9
MATLAB
20,833
294
function [laps_corr,singleCell_corr] = plfield_LAPScomparison(tracks_compared,number_of_laps) % Marta Huelin_ 2019 % Assess place field stability between same track exposures or between % different tracks. It does so both at population level and at single cell level. % It looks at the correlation and difference (...
a7a5ce5d67e267145e2bd64f02a095bd3e83244a6ef744461aff0086f80767f2
MATLAB
20,882
570
function results = spm_preproc(varargin) % Combined Segmentation and Spatial Normalisation % % FORMAT results = spm_preproc(V,opts) % V - image to work with % opts - options % opts.tpm - n tissue probability images for each class % opts.ngaus - number of Gaussians per class (n+1 classes) % opts.warpreg ...
1349cfb5b414fdd8346486d200ddae60ee299a03c9558365c23a669a7adfcc8f
MATLAB
20,893
571
function nvr_record_data(wavfid,nvrfid) % % % This file is the meat and bones of the digital vocalization recording system. % It will read in data from the specified channels at the specified SR, and will % save that data to disk (wavfid)until either the stop button is pressed, or the % total recording time exce...
d41dfeb3e1b6729540f0e922d6d92003b62ffff37eb65ad77f93b7ccfe6b3db7
MATLAB
20,932
421
function gap_linking_str = fun_graph_get_linker_ep2skl_th_rlx(vessel_image, vessel_mask, vessel_skl, ep_sub, ep_all_sub) % fun_graph_get_linker_ep2skl use threshold relaxation and shortest path on % designed metric to find a 3D line segment that connect the inut endpoint % to a skeleton voxel in the nearby connected co...
8ae258f6a077b556eb744d7194fa8b30d5556a669badb6f71b81a4d4f1806180
MATLAB
20,936
350
function plot_cum_replay_periods(epoch,bayesian_control) % Plots distribution of replay events over sleep periods for each track and protocol. % Histogram is calculated as the sum of cummulative replay event times across tracks & each experiment (always within a protcol), % and averaged (divided) by number of active ...
3be92a1848e94d968d3c45284622adbde2b7672e84b99d33e5cd5b88a835ed10
MATLAB
20,954
355
function plot_theta_cycles_vs_SWR_log2(bayesian_control,rest_option,time_chunk_size,time_window) if ~isempty(bayesian_control) load('X:\BendorLab\Drobo\Lab Members\Marta\Analysis\HIPP\Chapter 2\Raw_replay_analysis\extracted_time_periods_replay_excl.mat') path = 'X:\BendorLab\Drobo\Lab Members\Marta\Analys...
afeab34e36eb72df809f6cd38a0d129178b7736d940c251b4ab19c085e4b38ab
MATLAB
20,972
657
function output = inspect_map(img,gradechoinv,mask,kernel,options) %inspect continuous mapping version %assumes that the signal from each voxel is a weighted sum of %contributions from a set of canonicial basis spectra % REQUIRED INPUTS: % % img - either a single image, a cell of multiple images, or file path to a %...
747bcf7f070959e10c8363a6d33b85d80d2b9869e23baf617b9f6291c72d8a74
MATLAB
21,045
554
function [globalCBF, DVARS, FD, tSNR, tSD, CBF, adjCBF] = LOFT_CBFquantify(images, Mzero, FieldStrength, ASLType, FirstimageType, SubtractionOrder, SubtractionType, PLD, LabelTime, Slicetime, threshold, optionPCA, ASLscaling, M0scaling) %%[globalCBF, DVARS, FD, tSNR, tSD, CBF, adjCBF] = LOFT_CBFquantify(images, Mzero,...
3c5df6c3096ddf2ec9f3500c7aea644553d135c96e638138c590afccb78677be
MATLAB
21,054
483
% function MAP_fig_1_multi(mname,config) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ################################################################# %% DESCRIPTION % Script to analyse data for: % Grieves et al. (2020) % Quantification of firing rate map procedures % % This script % NO...
1157a9ccea284ea97115fde24e756421893778aaf2e0d90ee2da0da9e196073c
MATLAB
21,106
533
clc;clear;close all root='..\'; addpath(genpath([root,'NeuralCorrelateEvidenceAcc'])) %% ------------------------------------------------------------------------ rootpath='..\dataset\Mice\result\Accumulator\spikes_subsample_postWheel_bestfiles\'; data_path='..\dataset\Mice\result\total_clusterArea_paper_results_kernel_...
6c2ac14ae16ac39b7e40d9c455b3de5db02ffcdaf0f69c7cd958eb367af23b08
MATLAB
21,133
639
function [cls,M1] = spm_preproc_write8(res,tc,bf,df,mrf,cleanup,bb,vx,odir) % Write out VBM preprocessed data % FORMAT [cls,M1] = spm_preproc_write8(res,tc,bf,df,mrf,cleanup,bb,vx,odir) %__________________________________________________________________________ % Copyright (C) 2008-2016 Wellcome Trust Centre for Neuroi...
87174cb2ca45fda7a5cdfd21245d984cfcb3ca7eb6206543e9199ecf185de204
MATLAB
21,139
635
% plot cluster determined group bar plots clear all;close all;clc reg = 'NC' % NC HC CA3 'OFC_FRO_TEMP' 'OFC_FRO_TEMP_significant' 'OFC_FRO_TEMP_CING_INS_EC_significant' fn_ext = '_cue_responseiveyes' baseline = [ '_cond_spec_prestim' fn_ext] lock = 'response' % onset % response exp_type ...
06053ca32bcb35144496c5954c7bcdda6da885425584476b0995d543a48ca349
MATLAB
21,143
610
function spm_eeg_cfc(S) % Compute GLM for phase-amplitude and amplitude-amplitude coupling % FORMAT spm_eeg_cfc(S) % % Xamp = independent variable to be explained: % Xamp = B1*sin(Xphase) + B2*cos(Xphase) + B3*Xlowamp % % Additional regressors may be included % - overall estimates of PAC & AMP are obtained from ...
4c6acab2839c2ddeae4803e2243f40c3dfe8c84e4bb7fa68dd54b0aea7fe3c8a
MATLAB
21,143
675
function varargout = spikesort_iofxn(varargin); % % Function spikesort_iofxn() % % This function is the file input interpolator for the spike sorting package. % It contains the file format specifications and interpreters for a variety of % file formats. Any additional file formats should be specified here. % %...
22c014be171e86e7948789a7f80775d813ddd25771f930e82fbe5884a7403060
MATLAB
21,157
369
% The following is the code used for the periodicity analysis of SOX2-mKate2-GBM1 cells used in Fig 6. of Fu et al., 2023 clear all; close all; clc; %% Preallocation of labels Condition = {'BMP4','PROLIF'}; Protein = {'GFP','SOX2mKate2'}; % names for the labels on figures Condition_name = {'Quiescent',...
d38290399c12ae6b2eedfc9b5a80e1edf442fd2b4e7a39a37048756990008ea7
MATLAB
21,205
587
% freq_ranges = [2.9 6] % low theta % freq_name =[]; freq_ranges = [40 200];freq_name = 'g' addpath('/mnt/yassamri/iEEG/sandra/analysis_pipeline_final') % elecs if strcmp('57', subj) fro_chan_idx = [1 4:8 13 16:17 25:27 35 37 44 46:47 70:83 89 91 98 99 101 102 108 109 110 112]; MTL_chan_idx =...
6a6180dea0b43a7fea92972b796afc8a5d212881c369fd5e6032b4e97a0aa3cd
MATLAB
21,286
685
% This code will get integrated into ComparePhenotype code, but % right now I am running simulations, so want to make sure that % code does not get an error introduced, and stop running half way through. % % makeFiguresForCompareArticle('WT',1001:1010,'koulakov') % makeFiguresForCompareArticle('Isl2homozygous',1001:101...
b0f0f52dee22ee0163f81cb6b00f3584f46fcf2fb2246327879ba369f3b3ec72
MATLAB
21,287
598
function varargout = Raman_pre_processing(varargin) % RAMAN_PRE_PROCESSING MATLAB code for Raman_pre_processing.fig % RAMAN_PRE_PROCESSING, by itself, creates a new RAMAN_PRE_PROCESSING or raises the existing % singleton*. % % H = RAMAN_PRE_PROCESSING returns the handle to a new RAMAN_PRE_PROCESSING or t...
4fae65d6b795797b7d23c0b153ee1276250808d77980edcdcc8ce554d86392e7
MATLAB
21,297
659
% Code for snippets of traveling wave as a function of time clear all close all [big_table, waves] = get_big_table(); N_sh=100; count=0; load('C:\Users\xscogno\MATLAB\Flavio2\Waves\Semi final scripts\Final scripts\Outputs\locking_all_sessions_280821\locking_all_sessions.mat'); for w=8%1:length(waves) row_w=wa...
86c9f21204d6f3810527e165607dbea132dfd91a3d025cb6dc5c1802eea5f197
MATLAB
21,300
550
function varargout = spm_jobman(varargin) % Main interface for SPM Batch System % This function provides a compatibility layer between SPM and matlabbatch. % % FORMAT spm_jobman('initcfg') % Initialise jobs configuration and set MATLAB path accordingly. % % FORMAT spm_jobman('run',job[,input1,...inputN]) % FORMAT outpu...
49850127523eb779ce1727481d9a409acd0cc57c23db5a32c32519cfae0609f5
MATLAB
21,305
610
function PPI = spm_peb_ppi(varargin) % Bold deconvolution to create physio- or psycho-physiologic interactions % FORMAT PPI = spm_peb_ppi(SPMname,ppiflag,VOI,Uu,ppiname,showGraphics) % % SPM - Structure containing generic details about the analysis or % the fully qualified filename of such a str...
8ca12cb23c2e1da668138f95d71b32b2d4e6e7952d76234a25201d72b632acde
MATLAB
21,335
502
classdef Flies < handle properties id nFly nPt fs rBound x y r xH yH rH curv spk spkSS lightOn states model end methods function [self] = Flies...
c4971c60546d761b84a0e96a4d41e675e037792bdef12f37478032fde5c4c7c3
MATLAB
21,345
393
%% Find spots close to Filaments and substructures % By Thomas Murphy, UC Riverside % % Find spots close to multiple Filaments and subdivide by proximity to filament and % substructures thereof (dendrite shaft/spine/spine terminal). Originally based on % default Imaris script for finding spots within a speci...
240067da960000a38142ef1aeeaa304863dee542687aa0fa8821739f331a8f89
MATLAB
21,352
421
function gap_linking_str = fun_graph_get_linker_ep2skl_th_rlx(vessel_image, vessel_mask, vessel_skl, ep_sub, ep_all_sub) % fun_graph_get_linker_ep2skl use threshold relaxation and shortest path on % designed metric to find a 3D line segment that connect the inut endpoint % to a skeleton voxel in the nearby connected...
da104b2651a88af02a87d4da00eb343084e77440a57c65054c827d09f976d99a
MATLAB
21,354
615
classdef SortGui < handle % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland Stanford Junior ...
c167134900f449bd7a8112a5cb3da58600922a4727416d37cf27387562a944a5
MATLAB
21,395
538
classdef DensityBiased<handle % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland Stanford Junior University; Herzenberg Lab % License: BSD 3 clause properties(SetAcce...
70d9d9840cf89d078e35bfa02b314f57be0144ddf5b8f2ab2fe127f804e92c38
MATLAB
21,419
581
clc; clear all; close all; theDir = 'C:\Users\kmfo8\Dropbox\Rutgers\Firestein Lab\Manuscript DRAFTS\2022 BDNF MEA paper\figures\data - GLU only\revision_newPlots\data\';%D:\kate_dropbox\Dropbox figDir = 'C:\Users\kmfo8\Dropbox\Rutgers\Firestein Lab\Manuscript DRAFTS\2022 BDNF MEA paper\figures\data - GLU only\revis...
cb42b9d1b51b942f98766047fb97ab850ab49e016530d74c5603f1b2fccc7549
MATLAB
21,546
721
%% Figure S3 % this script rungs additional analysis required for the plots of figure % S3. %% clear ft_defaults %% Subjects % ID 18 missing because of LP at 50Hz subjects = {'OSL13', 'OSL14', 'OSL17', 'OSL21', 'OSL24', 'OSL26', 'OSL27', 'OSL28', ... 'OSL29', 'OSL30', 'OSL31', 'OSL32', 'OSL34', 'OSL35', 'OSL36'...
5d5b46acb7f31bf30f9089b525e2df1f9c26a0171e23ad34e7b75cb1445065b5
MATLAB
21,581
632
function handles = plotSpread(varargin) %PLOTSPREAD plots distributions of points by spreading them around the y-axis % % SYNOPSIS: handles = plotSpread(data, propertyName, propertyValue, ...) % handles = plotSpread(ah, ... % deprecated: % handles = plotSpread(data,binWidth,spreadFcn,xName...
005c5e9327c8bff9d23b0b16eff37ca0b3bbad9b4670e578d4512f87de7aca64
MATLAB
21,584
389
classdef decoderClass % Class for decoder operations properties numFold double = 20 % Number of folds for cross-validation varExplained (1,:) double = 80 % Variance explained threshold nIter double = 3 % Number of iterations end methods function obj = decoderCla...
64b66e7c8fe789cfbf60b8fdcaddb1d7564f08d8585ab960bf74a960c341bfd8
MATLAB
21,588
468
%% Script that will run searchlight analysis and save results %% User defined settings split_on_sulcus = true; remove_sulcus_pixels = true; %% Load data data = load_doppler_data('single_or_multiple', 'multiple'); % Spatial filter data.dop = preprocess_data(data.dop,... 'spatial_filter', {'disk', 2, 0}); [y_pi...
33c78e3d28566c5c8976c72802a8f10e649d9f69db9e0f7db36cc4876ad46f1d
MATLAB
21,625
606
%% Analyzing Neural Time Series Data % Matlab code for Chapter 30 % Mike X Cohen % % This code accompanies the book, titled "Analyzing Neural Time Series Data" % (MIT Press). Using the code without following the book may lead to confusion, % incorrect data analyses, and misinterpretations of results. % Mike X Cohen...
57aa31922a3b82221b52e9f540ce1f7650849c1cf8b8425b994493b719ee9b1a
MATLAB
21,675
499
classdef Ising < BCFWObjective % Ising BCFW interface for Ising models. properties (Dependent) % Flat vector interface for the BatchFW routine. The vectorization % format is % x = vertcat(vec(TN'), vec(TE')) = vectorizeNE(TN, TE) x end properties % vector...
a07774e80b25b57ebed454812f26c1b33eb469f67728bf66e321658b8ba6324a
MATLAB
21,676
499
classdef Ising < BCFWObjective % Ising BCFW interface for Ising models. properties (Dependent) % Flat vector interface for the BatchFW routine. The vectorization % format is % x = vertcat(vec(TN'), vec(TE')) = vectorizeNE(TN, TE) x end properties % vector...
669e21d9e35a6a3aabd95d6d16502a63b7999767e739736ea85ae3e16b58c85e
MATLAB
21,685
628
function EEG = c_TMSEEG_Preprocess_AARATEPPipeline(varargin) % c_TMSEEG_Preprocess_AARATEPPipeline - Preprocess raw TMS-EEG data % % Inputs: % EEG: input dataset in EEGLab struct format, assumed to not yet have been epoched % 'pulseEvent': string indicating event type marking each pulse % 'outputDir': path to a...
c1e2ff15e5cc1a149573b9223eb50fc160d14a164876989ef2c4c4b8389f3399
MATLAB
21,686
518
function [D, montage] = spm_eeg_montage(S) % Rereference EEG data to new reference channel(s) % FORMAT [D, montage] = spm_eeg_montage(S) % % S - input structure % fields of S: % S.D - MEEG object or filename of M/EEG mat-file % S.mode - 'write' (default) apply montage ...
c5181c1bde1a6c93865ab1d33bc5d1840ea69d9bedb4f75944a2cb99191e2d30
MATLAB
21,706
677
function [ob,m,mz] = Gocrf(k,fov,N,mdomswitch,dt,varargin) %function [ob,m,mz] = Gocrf(k,fov,N,m0,mdomswitch,dt,varargin) % % Construct Gocrf object for fast optimal control large-tip-angle % multidimensional (and parallel) MR RF pulse design. Used in % conjunction with an optimization routine, this object can be %...
7befa941d2dfc3b1ca1ee18b54e20175eb6fb0048eba9599ef85488a55a4dc14
MATLAB
21,827
529
function Header = spm_dicom_header(DicomFilename, DicomDictionary, Options) % Read header information from a DICOM file % FORMAT Header = spm_dicom_header(DicomFilename, DicomDictionary, Options) % DicomFilename - DICOM filename % DicomDictionary - DICOM dictionary (see spm_dicom_headers) % Options - an (opti...
8497415ebc8ff3c2e47722127a103a28a56c05b5924849f18a7279518b04665f
MATLAB
21,833
662
% Script to plot Supplementary Figure 1, calculate statistics reported, and % save data to Excel spreadsheets that are then imported into the Source % Data file. % Kit Longden 2023. addpath ../../src/Shared_functions/ % Figure properties % ----------------- figh10 = figure(10); set(figh10,'color','w','position',[100...
4d7a8fe4bfc91aa51b5579e7c5b4d40bf46fd7955b25e1c98ed173bbd457260f
MATLAB
21,895
649
function [PEB,P] = spm_dcm_peb(P,M,field) % Hierarchical (PEB) inversion of DCMs using BMR and VL % FORMAT [PEB,DCM] = spm_dcm_peb(DCM,M,field) % FORMAT [PEB,DCM] = spm_dcm_peb(DCM,X,field) % % DCM - {N [x M]} structure array of DCMs from N subjects % ---------------------------------------------------------------...
d31badd9192218d9c9462f1c8c9c986deab6762bbb047a1bdc48a5d91d615613
MATLAB
21,920
542
%% indicate variables tic for iSubj = 1:4 clearvars -except iSubj close all; subj_list = {'39' '44' '57' '63' } %subj_list = {'66' '84' '85' '87'} subj = subj_list{iSubj} % adjust theses removeERP = 'yes'; cue_responsive = 'yes'; lock = 'onset'; % 'response...
264471bb563defe9ff270c608e4b1dc929f17d1dbe60bea0ea214aef6e08c2e8
MATLAB
21,922
476
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ################################################################# %% DESCRIPTION % Script to analyse data for: % Grieves et al. (2020) % Quantification of firing rate map procedures % % This script % NOTE: This script is dependent on graphtest...
c2c795f03da1246c255bc9bbd9c1cb1fa9c9beb31c34a6c5580a597b504995ed
MATLAB
22,012
666
%% Principal Component Analysis on F-statistic obtained from sliding window ANOVA %% % Step 1: Load Data obtained from sliding window ANOVA % Step 2: Extract MNI coordinates for active channels for later group-level analyses % Step 3: Extract trials for task-active electrodes and concatenate along subjects % Step...
8e10f20d2d7d205ea2b4e493c6c694db8b2d0340bc902a31835c8f495ae40068
MATLAB
22,065
473
function plot_heat_map(plot_type,pattern_type) % analyses the distribution of proboscis contacts on the flower, relative to the pattern. % It plots a heatmap of proboscis contacts and generates histograms of the % contact distributions along the cardinal axes of the pattern, % and in the outer and inner thirds ...
cacbcd7ef17b358cdf85f9531ac30a0c4ad3ff9a513df9fd94d71983c287add8
MATLAB
22,072
497
%% plotRawData_BDNF clc; clear all; close all; theDir = 'C:\Users\kmfo8\Dropbox\Rutgers\Firestein Lab\Manuscript DRAFTS\2022 BDNF MEA paper\figures\data - BDNF dose response\revision_0B25B50Bonly_newPlots\data\';%D:\kate_dropbox\Dropbox figDir = 'C:\Users\kmfo8\Dropbox\Rutgers\Firestein Lab\Manuscript DRAFTS\202...
8870781bffccbb1b8ac54fc77be16d80e78d7359f412a4d354ec30bb761dc37f
MATLAB
22,103
392
function raster_replay_times(state) % Plot replay times as raster plot for all sessions % Loads 'extracted_replay_plotting_info.mat' % INPUT: % track: being 1 - for 16 runs,2 - for short exposures,3 - for re-exposure to track 1, or 4 - for re-exposure to track2 % state: 'sleep' for plotting only SLEEP replay (...
74b78a114d1625eaa5b15ee0a13d4456fbe845a15fea08dc9a91bcf6b1790fcd
MATLAB
22,119
522
classdef SuhModalSplitter < SuhSplitter % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland St...
896458d08bc97b19cae1071d737ad0098f63c0f1e47f851cdd6524fce966cfc3
MATLAB
22,184
812
close all; clear; load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_bin\Space_bin_filt20binNew.mat') load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_bin\GLchc_epoch10.mat') load('U:\rg-yoshi...
37429ecdbe02f6ed9ba1fa4fff5701d666a6ee4b85cf13e82807a9c3c2cfbde7
MATLAB
22,222
610
%% part 1 - concatenate data from excel clc; clear all; close all; overallFolder = 'C:\Users\kmfo8\Dropbox\Rutgers\Firestein Lab\Manuscript DRAFTS\2022 BDNF MEA paper\submission materials\3_Comms Biol\2_revision\from Srini\'; resultsFolder = [overallFolder,'results_10x\']; load([resultsFolder,'excelData.mat']...
50da42df31e99d935209b1670c251848b854b46d7b2237ca92c47f1f9046881a
MATLAB
22,229
463
classdef SuhMatch < handle % SuhMatch.Run is a wrapper for run_HiD_match and run_QfTree. It % preprocesses CSV input files to marshall the data and label arguments % for both. % % The publication that introduces QfMatch is % https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5818510/ % % A publication that furt...
c49132595f42d4f905e6aef5c299c75f7a331bacb8d734f7986383d84864fa47
MATLAB
22,242
451
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ################################################################# %% DESCRIPTION % Script to analyse data for: % Grieves et al. (2020) % Quantification of firing rate map procedures % % This script % NOTE: This script is dependent on graphtest...
0cfb9e625ed7dd44cd19fd5b614099ed0a69908ec4ef38f97e122849454b4e13
MATLAB
22,259
624
function [EEG, misc] = c_TMSEEG_fitAndRemoveDecayArtifact(varargin) p = inputParser(); p.addRequired('EEG', @isstruct); p.addParameter('artifactTimespan', [], @c_isSpan); p.addParameter('topoFitDuration', 10e-3, @isscalar); % in s (specify this or topoFitTimespan) p.addParameter('topoFitTimespan', [], @c_isSpan); % in ...
6c53ca16bd5f15ce459600f2cdac1785443c06a497ca5b1b4bad6d8beab25558
MATLAB
22,279
530
% Some subjects' scale data are missing, so all the analyses regarding % scales were listed here, with some MDD patients excluded. % Written by Xiao Chen 220922 % Modified 230703 % To explore the correlations between subjective affect ratings and DC, FCs % chenxiaophd@gmail.com %% initialization clear;clc; data_dir =...
44ce44ae18355ba662c5f52d9c203264eabc4475d9972081bacace57bd373014
MATLAB
22,310
571
function WORMTRACK = head_and_tail_kalman5(WORMTRACK, pixpermm) %head_and_tail_kalman.m This function tracks each endpoint of the spline %independently with kalman filters. head_movement_threshold = (100/112)*pixpermm; origPlayer = vision.VideoPlayer('Position', [120, 160, 100, 100]); [tracks,tracksThatLeft] = init...
ed81735135e5c6f6cab9e4ae30690bfecf4044a4f48fef5a5c5897b2358afa6c
MATLAB
22,344
534
function rect = showStimuli(im, position, varargin) % Displays previously loaded image(s) on the monitor. % % This function can be used in two different modes: % Mode 1: second argument is a scalar/number that is linked to the % previously defined "response keys" in the file myParadigmSetup.m % This mode allows to pres...
28cccf733e08ff5e1276a50cbcc41e143383202a272b571fe4c1f1df1d251fd6
MATLAB
22,473
557
function [assembliesCells, matchIndexTimeSeries, matchIndexTimeSeriesSignificance, assembliesVectors, PCsRot,confSynchBinary]=FindAssemblies(); clear all %% %%%%%%% INPUT FILES [filename,pathname] = uigetfile({'*_RASTER.mat';'*_RASTER.MAT'},'Open file with raster data', 'MultiSelect', 'off'); filenameRASTER=fullfile(pa...
7444d5bf879f35f85d858ca965e9e26ca98df6e18f2857843478f9c9702d7a8a
MATLAB
22,480
793
% Code for snippets of traveling wave as a function of time clear all close all [big_table, waves] = get_big_table(); N_sh=100; count=0; load('C:\Users\xscogno\MATLAB\Flavio2\Waves\Semi final scripts\Final scripts\Outputs\locking_all_sessions_280821\locking_all_sessions.mat'); for w=8%1:length(waves) row_w=wa...
ab5d94e6102da61a9c6745a430e236f5fa5fc7705acf81b7720037646cb79bbf
MATLAB
22,561
658
function varargout = showufmf(varargin) % SHOWUFMF M-file for showufmf.fig % SHOWUFMF, by itself, creates a new SHOWUFMF or raises the existing % singleton*. % % H = SHOWUFMF returns the handle to a new SHOWUFMF or the handle to % the existing singleton*. % % SHOWUFMF('CALLBACK',hObject,eventDa...
6ed30b82b0b72f149cc98be554a8ff62f52b046f14ebb708723d70e8594cd6fb
MATLAB
22,580
495
function [xPoints, yPoints] = plotSpikeRaster(spikes,varargin) % PLOTSPIKERASTER Create raster plot from binary spike data or spike times % Efficiently creates raster plots with formatting support. Faster than % common implementations. Multiple plot types and parameters available! % Look at Parameters section...
b206daf1908bd7b53c08bb7ebfdfc1538aaf6527c82f6cfb9df8e3c416984129
MATLAB
22,624
661
%% Extract task informative electrodes %% % Step 1: Load Data and Electrode Files % Step 2: Segment the data to all conditions (probe, button press, hit lower limit, button release) % Step 3: Perform sliding window ANOVA % Step 4: Find active electrodes that exceeded critical threshold % Step 5: Extract Index and...
22294af17b6f9f56722a3e27e4ee2856e5bae8976901bfef9d9b4550b34c7649
MATLAB
22,647
405
clear all; close all; clc format shortg fn_ext = 'cue_resp'; % phase = 'encoding'; %'encoding' 'retrieval' lock = 'onset'; %'onset' 'response' freq_range = 'deltatheta'; fpass_list = [4;5]'; reg1_name = 'TEMP' reg2_name = 'HC'; subj_list = { '85' '87' }; % {'39' '44' '57' ...
f4b0583ed8fd52fa631c3e10c18c85375a872a6a1105d39719f1708a6885b40e
MATLAB
22,652
495
function [bval]= GetBvalues(protocol) % % camino.m-------------------------------------------------------------- % Computes b-values % % [bval]= GetBvalues(protocol) % % Description: Returns an array of b values, one for each measurement defined % in the list of measurements in the protocol. % % Paramaters: % b - lis...
6e7b0d2537d1aaa98db3420210bec3a9ae403418dff204657a5dd095a89f7a0e
MATLAB
22,672
658
%% Figure 4c % this script rungs additional analysis required for the plots of figure % 4c %% clear ft_defaults %% - SUBJECTS - %% % ID 18 missing because of LP at 50Hz subjects = {'OSL13', 'OSL14', 'OSL17', 'OSL21', 'OSL24', 'OSL26', 'OSL27', 'OSL28', ... 'OSL29', 'OSL30', 'OSL31', 'OSL32', 'OSL34', 'OSL35', ...
4bf05ebd05ece7680dd4d38bd56a19c7f7a16eab8b88ab43cc2e7810a8281e5f
MATLAB
22,738
417
% description: script which will generate the null distribution for a given % condition, subject, and region. Will shuffle the phase data of the sender % region. Will save ch1 -> ch2, ch2 -> ch1, and normalized ch->ch2 clear all; close all; clc format shortg cond_nums = 1; % condition to generate null distribut % enco...
244d624451dbd1f705815e30ab0fae1b7562cf97323f3b09e3caa7add3956fc7
MATLAB
22,742
543
function [rgb]=cmap(x, mapName, greyPerc, grayColor, grayFunction, greyPosition) % [rgb]=cmap(x, mapName); % [rgb]=cmap(mapName); % [rgb]=cmap(x, mapName, greyExt, grayColor, grayFunction, greyPosition) % TODO se il primo argomento di ingresso non ? una matrice numerica, scalare i successivi parametri in % modo ...
6857c4d89ec8e51196f29e2e4ac7f26d81d01e9f54b1e48bbc610e7531db441c
MATLAB
22,746
490
function [PSNR, y_est] = BM3D(y, z, sigma, profile, print_to_screen) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % BM3D is an algorithm for attenuation of additive white Gaussian noise from % grayscale images. This algorithm reproduces the results from the article: % % [1] K. Dab...
adf4da5779dcd48ac5af6479d33df5ffc507662e1fb5a6ad5bf60c3e96d101b0
MATLAB
22,781
476
% Defines the class currentSourceViewer for visualization of EEG inverse solutions on a realistic head model. % This class is part of MoBILAB software. % For more details visit: https://code.google.com/p/mobilab/ % % Author: Alejandro Ojeda, SCCN/INC/UCSD, Jan-2012 classdef currentSourceViewer < handle properties...
3e34426016ba1ddc1669808242e7c3eaeb671697bccb690fd82a73c85e8b6e3b
MATLAB
22,833
599
function D = spm_eeg_prep(S) % Prepare converted M/EEG data for further analysis % FORMAT D = spm_eeg_prep(S) % S - configuration structure (optional) % (optional) fields of S: % S.D - MEEG object or filename of M/EEG mat-file % S.task - action string. One of 'settype', 'default...
62ac4b1d7f82df2ab43e516231ea84f0a4640edf9ee6223004088fba2c4fb14b
MATLAB
22,860
644
function varargout = spm_check_installation(action) % Check SPM installation % FORMAT spm_check_installation('basic') % Perform a superficial check of SPM installation [default]. % % FORMAT spm_check_installation('full') % Perform an in-depth diagnostic of SPM installation. % % FORMAT rev = spm_check_installation('rev'...
2cbb986c1b0b874b690880302f96deb563c786e6cd84125cb1ade834876c1e38
MATLAB
22,973
388
function raster_replay_times_new(state) % Plot replay times as raster plot for all sessions % Loads 'extracted_replay_plotting_info.mat' % INPUT: % track: being 1 - for 16 runs,2 - for short exposures,3 - for re-exposure to track 1, or 4 - for re-exposure to track2 % state: 'sleep' for plotting only SLEEP replay (thus ...
20abf0f0f8194ecbe1928410b8a25e5ebf3e391b6b6334cad73f608565d58b9a
MATLAB
22,980
625
function [MDP] = spm_MDP_VB(MDP,OPTIONS) % active inference and learning using variational Bayes % FORMAT [MDP] = spm_MDP_VB(MDP,OPTIONS) % % MDP.S(N,1) - true initial state % MDP.V(T - 1,P) - P allowable policies (control sequences) % % MDP.A(O,N) - likelihood of O outcomes given N hidden states % MDP...
69cf5404f273221b55228cbed3db4c5ac5e84cc27e05b31985d0700bce26b808
MATLAB
23,135
625
function varargout = SleepScoring_Manual_ver2(varargin) %SLEEPSCORING_MANUAL_VER2 M-file for SleepScoring_Manual_ver2.fig % SLEEPSCORING_MANUAL_VER2, by itself, creates a new SLEEPSCORING_MANUAL_VER2 or raises the existing % singleton*. % % H = SLEEPSCORING_MANUAL_VER2 returns the handle to a new SLEEPSC...
286a4c6c46657aa621e59e3b2943c621f1e6d76ff1c59ac53cabf00ec91781c9
MATLAB
23,210
811
function R = Reg1(kappa, varargin) %function R = Reg1(kappa, [options]) %| %| Build roughness penalty regularization "object" based on Cdiff1() objects, %| for regularized solutions to inverse problems. %| This version supercedes Robject() by providing its capabilities while %| also providing options that use less mem...
e69699a4951cb1af65b05035b13a414c43826b78a3ea1b2fce5defcc00f9d2b3
MATLAB
23,225
701
% clear all % close all % clc %% indicate variables subj = '39' exp_type ='tuning_correct' % {'study_test' 'tuning' 'tuning_correct' 'tuning_incorrect' 'indoor_outdoor'} freq_analysis = 'spectrogram' % load info cd (['/mnt/yassamri/Sandra/subj_' subj ]) if strcmp('spectrogram',freq_analysis) load(['baseline_info...