sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
af0088295f368eb59219a019d4ba729a04139b20d19bd85ad57dcaa3c5e6e278
MATLAB
17,350
485
%% This code is used to generate the figure related to miniscope imaging in Masuda et al., 2023 %% Calculate and store information score in batch by comboSession load ('neuronIndividualsf.mat'); load ('behavIndividualsf.mat'); load ('thresh.mat'); meanFRindividuals = cell(1,length(neuronIndividualsf)); infoPerSecIndivi...
4a152210968bdabb1b9657fe75256a70ec27070ca5630a76f1ca1dd9ef1698e8
MATLAB
17,376
414
function SBJ08e_HFA_plot_grp_GLM_reg_cnfmat_ROI(SBJ_id, proc_id, stat_regs, hemi, roi_id,... plot_out, plt_id, save_fig, varargin) %% Plot confusion matrix of overlap in mass GLM effects per ROI % COMMENTS NOT ADJSUTED SINCE STROOP COPY % INPUTS: % SBJ_id [str] - ID of subject...
ee0a15bb0c5b709670ae0b4fba6c817f46b276aa193bb247a1d6e4af2c7a9cb6
MATLAB
17,377
479
%absolutes_for16_rms05.m mlp 4/22/2009 %rm332_development_rms05.m mlp 3/22/2004 %this is similar to rm332_corrected and RM316_analysis however, will extract first trial, will extract second trial,will extract 1-5 %trials, and then avg of 2-6 trials %will also plot cdfs aand sawtooth mlp 8/2011 %an...
d2db2d0eab2af5764fac6914238456770bd901441f20128bed1f6864e7a10231
MATLAB
17,411
388
function ps2pdf(varargin) %PS2PDF Function to convert a PostScript(R) file to PDF using GhostScript(R) % % Converts a PostScript file into PDF. The resulting PDF file will contain % one page for each page defined in the PostScript files, so a multi-page % PostScript file, like those generated by using the '-app...
6df98dfc497f8b1898ee97d4b1f30d29d2af17e76abd7be2e6d0a2c5dd636a42
MATLAB
17,422
656
function R = Rmem(kappa, varargin) %function R = Rmem(kappa, [options]) % % Build roughness penalty regularization "object" based on C = Cdiff() object, % for regularized solutions to inverse problems. % This version is somewhat less flexible than Robject() but uses less memory. % % General form of nonquadratic penalty...
7a62f2501ea2e6c246fee653bf4236b7edc96f0ce4cad84fea10de293f079276
MATLAB
17,448
489
classdef SuhTree < 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 ...
c8b07881634171fc3d95522e57101b8ef0ec097b950deeed878e6432345b4e1a
MATLAB
17,455
493
%% Analyzing Neural Time Series Data % Matlab code for Chapter 18 % 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...
41a29c9583720721c704305fb024be291eb377dc5590717806d3800d68c73031
MATLAB
17,459
488
function [M,scal] = spm_affreg(VG,VF,flags,M,scal) % Affine registration using least squares % FORMAT [M,scal] = spm_affreg(VG,VF,flags,M0,scal0) % % VG - Vector of template volumes. % VF - Source volume. % flags - a structure containing various options. The fields are: % WG - Weigh...
90533d76779b4728ab83af910f10a5c867dff6f3d311c00d8a017743a8e9d0a6
MATLAB
17,485
312
function [vessel_graph, record] = fun_graph_refine_by_classifier(vessel_graph, vessel_image, vessel_mask_dt, opt) %% Initialize parameters % Record refinement process if ~isfield(opt, 'record') || ~isfield(opt.record, 'num_self_loop') record = struct; [record.num_self_loop, record.num_bilink_loop, record.n...
45bbc629e36d5124b5cde6e1aa87a87e964c78dd3b8233d049c99b42980d817d
MATLAB
17,504
444
% pop_loadbv() - load Brain Vision Data Exchange format dataset and % return EEGLAB EEG structure % % Usage: % >> [EEG, com] = pop_loadbv; % pop-up window mode % >> [EEG, com] = pop_loadbv(path, hdrfile); % >> [EEG, com] = pop_loadbv(path, hdrfile, srange); % >> [EEG, com] = pop_loadbv(path, hdrf...
18449d1b5c2409455e5ec58c513ed766eb384efd6c4ea640c918b1508a395731
MATLAB
17,511
369
% As the reviewer requested, I analysed the sliding windowed FCs % This script is for doing stats % % Xiao Chen 230706 % chenxiaophd@gmail.com %% initialization clear; clc; work_dir = 'DynamicFC'; data_dir = 'DPABISurf Preprocessing Files'; template_dir = 'DPABISurf surf template directory'; hemisp_name_set = {'lh',...
d4aa2d0bf23f34744b24859dd4bfe98cdf4b10b74f77177cd0991b960f1a3528
MATLAB
17,527
485
function [SPM] = spm_spm_Bayes(SPM) % Conditional parameter estimation of a General Linear Model % FORMAT [SPM] = spm_spm_Bayes(SPM) %__________________________________________________________________________ % % spm_spm_Bayes returns to voxels identified by spm_spm (ML parameter % estimation) to get conditional parame...
b4fe18e42d09791fcfe734df1d28e66cc0d3da2e448c34c347b06fb236349944
MATLAB
17,553
498
function [pox,poy,pot,wmap] = getWALK2(varargin) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% ################################################################# %% DESCRIPTION %FUNCTION short descr. % long descr. % % USAGE: % [out] = template(in,in2) % % INPUT: % in - input...
93cc26aa6177ec00c1ef4f8a9eb308826a71e6555385083a2d5e5f316e5274b0
MATLAB
17,556
774
function fit = de_ftab_fit(sl, fm, varargin) %function fit = de_ftab_fit(sl, fm, [options]) %| %| Fit to DE table fm(), suitable for subsequent interpolation / extrapolation. %| Uses either classic polynomial basis functions, %| or an exponential model: -log(sum_k p_k exp(-m_k . s)) %| %| in %| sl {L} sample location...
5986aefdad96b8d55303c859f68125e5b5e59e07156249ad8a2b89ff777642d9
MATLAB
17,669
396
function [f_orco,exitTrajectory,timeOfState,kinOfState,biasOfState,dFSmooth,FSmooth] = ... getDistInhibition(f_orco,crossingtype,timeInterval,plotFig) % getDistInhibition calculates the turn optimality, and kinematics as a % function of time since the start of the inhibition period % % Inputs: f_orco = fl...
74b6a0f63e7b9336850a0b864473043d16f6625016d60fd5ff4f237a8002c34e
MATLAB
17,677
396
%PlotPlaceCellAna.m % This function is to plot the result of PlaceCellAna using output from PlotBinFirRate.m % 1) Find Place field centers % 2) plot Spatial info of cells from PF analysis % 3) plot averaged rate map. % place cell input data (pData.mat file made by PlaceCellAna.m) % pData{ian, iday}.spi(icells...
cc6e3131e4fe81727abc6b8d6d099b649f7e6fc2037347614e749af2d3e8ad3b
MATLAB
17,690
387
% ParforProgressbar Progress monitor for `parfor` loops % ppm = ParforProgressbar(numIterations) constructs a ParforProgressbar object. % 'numIterations' is an integer with the total number of % iterations in the parfor loop. % % ppm = ParforProgressbar(___, 'showWorkerProgress', true) will display % t...
413c6050d86f7a9f46d528da82d3d431dde54c879dcc3d2e4916da57915e28a6
MATLAB
17,697
483
% GBM Numerical Simulations clear load('ABCminfornumsim.mat') %ABCfigures.m output (obtained after using minimum data for ABCrejection.m) minminP = minP; errormin = min(error(1:n)); load('ABCmaxfornumsim.mat') %ABCfigures.m output (obtained after using maximum data for ABCrejection.m) maxminP = minP; errormax = min...
78883e00bff6c3fba795e8933cdf30fd8ed0732ba7fea6fdc4780b68ce580127
MATLAB
17,715
553
% NOTE: this script is meant to be run with the matlab GUI to make figures clear all % Add package to read NPY files into matlab addpath('/Users/askeller/Documents/npy-matlab/') % Load in prediction results folder_name='/Users/askeller/Documents/Kellernet_PrelimAnalysis/RidgeResults/results_matchedsamples_081822/al...
bb73751c5e0ffac0ff54ddf256516336c883c99db0daf0ac7ab1647a447c88e0
MATLAB
17,734
523
function varargout = playfmf(varargin) % PLAYFMF M-file for playfmf.fig % PLAYFMF, by itself, creates a new PLAYFMF or raises the existing % singleton*. % % H = PLAYFMF returns the handle to a new PLAYFMF or the handle to % the existing singleton*. % % PLAYFMF('CALLBACK',hObject,eventData,handl...
6347f75e3bda2016a590ae6ef9c7ffd915cac973594734c8df77be41d82096de
MATLAB
17,753
551
function spm_dcm_review(DCM,action) % Review an estimated DCM % FORMAT spm_dcm_review(DCM,action) % % DCM - DCM structure or its filename % action - one of: % 'fixed connections' % [' effects of ' DCM.U.name{i}]; % 'contrast of connections' % 'location of regions' % 'i...
84b6df9ff6c1cfd4831f7487a168a72b91754eed0d7bf5158d03441aff007fd7
MATLAB
17,766
314
% COMPARES SIGNIFICANT EVENTS BETWEEN PRE AND POST % INPUT: % State: 'sleep' for only sleep replay, or 'ALL' for both sleep and awake replay function pre_post_comparison(state,method) % Load replay information if strcmp(method,'wcorr') cd('X:\BendorLab\Drobo\Lab Members\Marta\Analysis\HIPP\Chapter 2\Raw_repl...
9bc080b82e3a3a12ebe280842f687cd6a9c24d29fd604c3aae0027e4098e08b1
MATLAB
17,823
395
%% Script to create output for Fig. S8 - parameter comparisons between Young, healthy Elderly, MCI unknown, MCI negative, MCI positive % Andrea Castegnaro, UCL, 2023 uceeaca@ucl.ac.uk % Fits the model on all of the groups and run a two-way Anova % (group*condition) on Young Controls, Elderly Controls and MCI Unk/Neg/Po...
06d29b675ef1326843cb3972799d6e90992a84b8886bd46d09ceaba4c265262d
MATLAB
17,848
398
% Script to generate the average score vector and the Group % Consensus vector for each user subtype : % "experts (exp), researchers (re), Non-experts (ne)" % and each phase (phase 1 and phase 2) of MODA. % % Generates the score averaged across annotators as a "scoreAvg_usr_px.mat" % (without 2.5 s overlap between...
17bf130c6a19b3e18c89b4b1980b9d90efa20039bf973d0664580b13c6978cf0
MATLAB
17,862
466
function varargout = retrack_settings(varargin) % RETRACK_SETTINGS M-file for retrack_settings.fig % RETRACK_SETTINGS, by itself, creates a new RETRACK_SETTINGS or raises the existing % singleton*. % % H = RETRACK_SETTINGS returns the handle to a new RETRACK_SETTINGS or the handle to % the existing ...
e23fee6e47a72a84bbbe8daafd86dcc590162f750d60d71d4254884f558282aa
MATLAB
17,888
404
function [qrs_amp_raw,qrs_i_raw,delay]=pan_tompkin(ecg,fs,gr) %% function [qrs_amp_raw,qrs_i_raw,delay]=pan_tompkin(ecg,fs) % Complete implementation of Pan-Tompkins algorithm %% Inputs % ecg : raw ecg vector signal 1d signal % fs : sampling frequency e.g. 200Hz, 400Hz and etc % gr : flag to plot or not plot ...
a1de28a8610aea5625ed9881cff42a96131e60a9260987e0b4f6fbccc7f61516
MATLAB
17,916
452
%aim to calculate the latency of the response, find the time and CI, and %the bootstrap % close all; clearvars; addpath ('/data/local/u0114568/ephysio/test'); listname={'sp_color', 'con-vs-att', 'allSP', 'Att-Inte', 'Att-Congruency', ... 'cueRight', 'allCon', 'all', 'allIncon', 'targetLeft',....
4404af49a6681186a864787a6a0d1d4fff75028d0f196ca3a99465347d1c4e04
MATLAB
17,936
559
%% Figure 5a % this script rungs additional analysis required for the plots of figure % 5a. %% - HOUSE KEEPING - %% clear close all; ft_defaults; %% -SUBJECTS - %% % ID 18 missing because of LP at 50Hz subjects = {'OSL13', 'OSL14', 'OSL17', 'OSL21', 'OSL24', 'OSL26', 'OSL27', 'OSL28', ... 'OSL29', 'OSL30', 'OS...
efbce48f63a8eaf8bc40f354beb011652d5ced18723e09e20f26f895e3f1b0d5
MATLAB
17,950
407
%% load_XML.m % % Purpose: % Load the accessory data from xml format PSG files. % % % Usage: % [events, stages, epochLength] = readXML.m(myFile.xml) % % % Notes: % This currently only supports loading of compumedics-format xml. % Need to modify to load physioMimi format xml % % 6 Sections of the compumedics.xml: % <...
433d430dc35c837d5d66582d465620b674c5512fa69451493b8a5ae6a9e4f125
MATLAB
17,953
311
function plot_proportion_cum_replay_periods(epoch) % 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 sessio...
821ed3cc624b2d210754fd40c11198be11ee9adbcfabe120f076c7d7006a7797
MATLAB
17,953
405
function out = loadVideo(filename, varargin) % Open a video file for playback and return the handle to it. % % The file is opened for the stimulus window, so initWindow has to run % before this function. Nothing is shown yet: startVideo starts the % playback engine, showVideo fetches and draws the single frames. % % Th...
fb1127e8a0044e9d5d06f6e86deac517ff75088414637c423afe4bb8fad1d2df
MATLAB
17,958
279
function plot_SWR_temporal_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\Analysis\HIPP\Chap...
a6b97aa67c0ae0625048a8259b3c3b65eff2f409bddea2784c8175b5299f14ba
MATLAB
17,987
204
function [eeg_data, Sorig, Sclean, f, amps, freqs, g] = cleanline2(eeg_data, s_rate, varargin) % CWH: This modifided version from KLA hopefully runs without EEGLab and taking just [trials,time] matrix % Mandatory Information % ------------------------------------------------------------------------------...
5112eccddd72d315100d869b7c5d2a6d2342c19e5758be85dfb50d9b07b15e71
MATLAB
18,026
356
% plot bar plot stim_onset = 301; %% CA1-3-dg rng = 4 dur = 750 subj_length = 5 bar_vector_mn1 = [nanmean(nanmean(squeeze(nanmean(CA13_1(freq<rng,stim_onset:stim_onset+dur,: ),1))', 2))... nanmean(nanmean(squeeze(nanmean(CA13_2(freq<rng,stim_onset:stim_onset+dur,: ),1))', 2))... nanmean(nanmean(squeeze(nanme...
c78bcd2c26fcff88a797893d767b2f1b92452ccb39d6d4f42727bf2f4fd1d655
MATLAB
18,046
668
function st = newfft(om_in, Nd_in, varargin) %function st = newfft(om, Nd, [options]) %| %| New version of NUFFT (pun intended) that uses real interpolation kernels. %| (The original NUFFT code used complex interpolation needlessly.) %| %| This returns a "strum" object with methods for both forward and adjoint %| d-di...
c7950855ddd2e029f836fce171154d213535ec5b56cd14bfd80f76883af58ab0
MATLAB
18,070
433
function norm_theta_seq = plot_num_theta_seq_lap(data_type) % MH 2021 % Plots both number of theta sequences per laps and normalised number of sequences in lap by the time spent moving in each lap % Also calculates the difference in the number of theta sequences lap by lap if strcmp(data_type,'main') load('X:\Bend...
2f069a0999139d1f73734d869c9016051bde4c4f8cb3496600b038a612be8ad7
MATLAB
18,113
495
close all; clear; load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_bin\Space_bin_filt30Kalman.mat') load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_bin\Spatial_Vel_ROI4.mat') load('U:...
abe9501de96a9578220ed4b41a4203bec06e3bf27db127c6a0abb0d3fec666fe
MATLAB
18,157
390
classdef LeG_vox2atlaslabel < handle properties NMMDir; %default atlas (required) AtlasDir; AtlasNames; AtlasLabels; AtlasVals; AtlasData; AtlasMat; AtlasCnt; AtlasImg; DefFile; DefMat; Def; %ptvox2mnimm deformation (iy_MR.nii) VoxDef; %ptvox2atlasvox d...
7dded95186dff6670f64aa2784b76a47262df853594a7738e7de3f124995a124
MATLAB
18,160
546
%% add paths %addpath(genpath('/Users/maria/Documents/Matlab/cbrewer')) %addpath('/Users/maria/Documents/MATLAB/raacampbell-shadedErrorBar-9b19a7b') options = continuous_RDK_set_options('LTHiMac'); EEGpreproc = options.path.preproc.behaviour; % path to behav data all subjs condition = {'Tr frequent TR short', 'Tr ...
2722b5011b0bb0d2bad69e578a950d17cf06287d36f19bcd4593c7eb2c66cf85
MATLAB
18,182
473
classdef AdaptiveBins<handle % Class for probability binning described at % https://www.ncbi.nlm.nih.gov/pubmed/11598946 % Bioinformatics inventors % Original: Roederer M1, Moore W, Treister A, Hardy RR, Herzenberg LA. % Incorporation into QF matching: % Darya Orlova <dyorlova@gmail.com> % ...
99672116c6032b770f159c13f7147e0e7d6e482028d7ae765a592329b9384111
MATLAB
18,203
570
%% Analyzing Neural Time Series Data % Matlab code for Chapter 29 % 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 ...
7af075ec6e91ff1853d949be45419c19e0581f9c9599b6c029faf81be1209211
MATLAB
18,232
315
function plot_track_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 activ...
9b3e7601a5c6d3904156031353e25f713aaefe11326e851c0d743759fdee27b2
MATLAB
18,235
494
close all; clear; load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_bin\Space_bin_filt30Kalman.mat') load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_bin\Spatial_Vel_ROI4.mat') load('U:...
7280a87e21fe852277e23e03afb71d5486f08186afc4fd93474236c1a7143286
MATLAB
18,253
371
function plot_directional_place_cells % Load name of data folders if strcmp(computer,'GPU') sessions = data_folders_GPU; session_names = fieldnames(sessions); else sessions = data_folders; session_names = fieldnames(sessions); end c = 1; [track_lap_cells(1:4).unidirect] = deal(nan(20,16)); [track_lap_...
e5771762ed16c1eaec86aa289da242bdea58640336427a30d426108282f5dc7c
MATLAB
18,269
790
%% Autocorrelations clear all close all rec_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; save_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; clusters=10; mice_number=14; mice=['L08M1';'L08M2';'L08M3';'L08M4';'L09M1';'L...
5b98bce815d49284317a0c41ea93bdf19a57a03ef568ca40646edba9e9b44715
MATLAB
18,284
481
function [stats,stats1,stats2,t] = mTRFattncrossval(stim1,stim2,resp,fs,Dir,tmin,tmax,lambda,varargin) %MTRFATTNCROSSVAL Cross-validation for attention decoder optimization. % STATS = MTRFATTNCROSSVAL(STIM1,STIM2,RESP,FS,DIR,TMIN,TMAX,LAMBDA) % cross validates a forward encoding model (stimulus to neural response)...
6db8b186a62887e508ddbf7c06796a2f2fdfea57726b13df497ce9ad95ee63ae
MATLAB
18,310
346
function mergedata_newFeatures_082421( strain_name ) %mergedata_newFeatures_tocsvs_021621.m % This function loops over _FINAL.mat files in a directory and processes % them to derive new fields using NewFeaturesPostProcessing_021321.m % Generates .mat files timenow = datestr(now,'mm_dd_yy'); outpath = uigetdir(pw...
7a3875e0a8e0d54e6a68a86bf0ac61c9ce524a220b6e3c76219532f968159b47
MATLAB
18,344
515
%% Figure 2a & b (lower left) % 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', 'OSL32...
c6cea178be85ec4def77ff5a78960f99b137ecdd08503789f6867bbf02d4347b
MATLAB
18,353
462
function out = readcfs(cfsn,plotdata) % This function reads the CED's signal file (.CFS) and gives a structure as % an output. % % cfsn: full file name of the CFS file (including directory, if not in the % same folder) % % out: structure with the following sub-structures: % out.GH: General Header % out.FVI: File Variab...
213d9cf4a2b3a0ab38f4fab8dd16efd95881988fe0fd5b2d5130f198dde5d4c8
MATLAB
18,354
508
function [skeleton cWidths] = linearSkeleton(headI, tailI, minP, minI, ... maxP, maxI, contour, wormSegSize, varargin) %LINEARSKELETON Skeletonize a linear (non-looped) worm. The worm is %skeletonized by splitting its contour, from head to tail, into short %segments. These short segments are bounded by matching pai...
b8e109b4505634a7058214f0376052f2ea0e34c010802251703ae92dcae89b73
MATLAB
18,405
602
%% run each visium genes: find axial patterned genes clear all close all clc direct='/data/Technion_analysis/goldfish/visium/spatial_fs'; cd(direct) %% update names and colors load('/data/Technion_analysis/goldfish/scRNAseq_gf/gf_sc_new/non_normalize_all_data_15_8_2022.mat','g_geneid','g_cluster_name','g_data','g_ca') ...
35677458318c56e2e53e71e5e4f0ece8f0a6fcbf987a837659dc90f99db34092
MATLAB
18,407
451
function varargout = spm_diffeo(varargin) % Mex function called for image registration stuff % %_______________________________________________________________________ % % FORMAT u = spm_diffeo('vel2mom', v, param) % v - velocity (flow) field n1*n2*n3*3. % param - 8 parameters (settings) % - [1][2][3] Voxel...
44436088969af971a7efd72ba3f4fee2d18fee55d45e1f675fb5a850df546d42
MATLAB
18,422
503
classdef SuhGater < handle % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland Stanford Junior University; Herzenberg Lab % License: BSD 3 clause properties(SetAccess=private) gml; fcs; gates; gate...
67d47cb62d6d0b10a27f300811f6d33353efc1d49f08c7d85d738948746ecca3
MATLAB
18,443
604
function output = inspects_multi_img(img,gradechoinv,mask,options) %inspect quatitative mapping version %assumes that the signal from each voxel is a weighted sum of contributions %from different spectra if ~iscell(img) %single image as input - just put into a unit cell tempimg = cell(1); tempmask = cell...
b74a32b7e7cc60a5b491df1404c794eca4356ea97b6c3392b5452d64d200e908
MATLAB
18,465
359
function mmap = initMRIChatPart1 % Prepare the trigger channel of an MRI experiment. Call this BEFORE % initWindow; initMRIChatPart2 has to be called after it, and that one waits % for the first triggers. % % The scanner triggers are not read by the toolbox itself. A separate % application -- the trigger counter -- cou...
b05e74aca873d33e7c43bd62b10f7487a5eb5930abc3cec0d8de6aa184ff6ca4
MATLAB
18,486
822
function fit = de_ftab_fit(sl, fm, varargin) %function fit = de_ftab_fit(sl, fm, [options]) %| %| Fit to DE table fm(), suitable for subsequent interpolation / extrapolation. %| Uses either classic polynomial basis functions, %| or an experimental exponential model -log(sum_k p_k exp(-m_k . s)) %| %| in %| sl {L} sam...
41a3fce8121917aa2a38f587b8167900591deb2bba96884df4837e159cc89004
MATLAB
18,557
434
function SBJ08e_HFA_plot_grp_GLM_reg_pie_ROI(SBJ_id, proc_id, stat_regs, hemi, roi_id,... plot_out, plt_id, save_fig, varargin) %% Plot pie chart of overlap in mass GLM effects per ROI % COMMENTS NOT ADJSUTED SINCE STROOP COPY % INPUTS: % SBJ_id [str] - ID of subject list to l...
147124ade8d711be9f754295b641c5a8f0a7bd31c6c64a6849a3d95359a2f565
MATLAB
18,657
430
% 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...
83532ca8dec5db940c3b5cd11504e6163f2d99909040cc5b132a18ac805f6c11
MATLAB
18,673
594
function [Ep,Cp,Eh,F,L,dFdp,dFdpp] = spm_nlsi_GN(M,U,Y) % Bayesian inversion of nonlinear models - Gauss-Newton/Variational Laplace % FORMAT [Ep,Cp,Eh,F] = spm_nlsi_GN(M,U,Y) % % [Dynamic] MIMO models %__________________________________________________________________________ % % M.IS - function name f(P,M,U) - generat...
3b4939628633ce76614cc0439ed1712bcf45fa1b5057692a5067dfc92c5cf0c0
MATLAB
18,801
480
function varargout = FCSVCompare(varargin) % FCSVCOMPARE MATLAB code for FCSVCompare.fig % FCSVCOMPARE, by itself, creates a new FCSVCOMPARE or raises the existing % singleton*. % % H = FCSVCOMPARE returns the handle to a new FCSVCOMPARE or the handle to % the existing singleton*. % % FCSVCOMPA...
98593a90802a29ffe65887001b5cd4d46521defaea5f58237c0ab5e73f4aa7dc
MATLAB
18,801
625
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 = [4...
f3e1dd9059efb7d677c77539fbcb3267ba3315167e60f4af2fe2691f3c34ee94
MATLAB
18,805
600
%% One session - PI N_sh_dist=500; w=8; row_w=waves(w); count=count+1; mouse=['L',num2str(big_table(row_w,1)),'M',num2str(big_table(row_w,2))]; day=big_table(row_w,3); s=big_table(row_w,4); munit=big_table(row_w,5); clus=10; disc_phase=10; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Load files load([rec_data_path,strcat('re...
98cac1bd1486d8a819af211085274ce3ebe96533b466efd0e6f0ad55cfc37c2e
MATLAB
18,888
404
% 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...
051c1f7ce6cd456601238bd2b6de3e44c3f7a0441cb024c35ba652d36c716854
MATLAB
18,918
278
% EXTRACT THETA SEQUENCES FOR EACH LAP % MH 2020 % For each track, extracts theta sequences for each lap. Uses place fields % from individual laps. Meaning each lap needs to be decoded individually % Then averages all theta sequences within a lap and scores it using quantification methods, function extract_lap_thetase...
b684d3cbe6175af03d796af3ce1f2c7d6087b2e82e9922967c800a13db148916
MATLAB
18,934
277
% EXTRACT THETA SEQUENCES FOR EACH LAP % MH 2020 % For each track, extracts theta sequences for each lap. Uses place fields % from individual laps. Meaning each lap needs to be decoded individually % Then averages all theta sequences within a lap and scores it using quantification methods, function extract_lap_thetase...
0ee305669626f4e8769d9cbd17274478f5e4640b60c04849e6b4c7110d2f20b9
MATLAB
18,953
262
% CALULATES AVERAGE THETA CYCLE PER TRACK AND DIRECTION % MH 2020 % For each direction and track, gets decoded theta windows and centres to the actual position of the animal at the trough. Then creates a smaller % window of 100ms around the trough and centres the decoded position around it. Finally average of all cente...
16fa4b30378ec6a4bddc723dc8d9f9622fd0d54f253fb0f222d9549bacc06f32
MATLAB
18,960
278
% EXTRACT THETA SEQUENCES FOR EACH LAP % MH 2020 % For each track, extracts theta sequences for each lap. Uses place fields % from individual laps. Meaning each lap needs to be decoded individually % Then averages all theta sequences within a lap and scores it using quantification methods, function extract_lap_thetase...
8a5aa362aec68b13b0cd0df30b651d175929d87fd77b87891d64a969a7399333
MATLAB
18,968
418
function [epp, subset_ids]=run_epp(csv_file_or_data, varargin) %RUN_EPP runs exhaustive projection pursuit to discover/learn significant % subsets of a given data set. % % EPP is an unsupervised data subset discovery method intended for any % N-dimensional dataset containing continuous numeric measurements. See %...
a1c6e115cec4f7c1a01731cd337edc28dc80b787b0f6de85877da3a27695eb2b
MATLAB
18,977
279
% EXTRACT THETA SEQUENCES FOR EACH LAP % MH 2020 % For each track, extracts theta sequences for each lap. Uses place fields % from individual laps. Meaning each lap needs to be decoded individually % Then averages all theta sequences within a lap and scores it using quantification methods, function extract_lap_thetase...
70c6617d17eb67ff8e5c25e8f31144d3ad60731e571c810e87ae98c0c5bbed3b
MATLAB
18,990
825
function ob = Cdiff1(isize, varargin) %function C1 = Cdiff1(isize, [options]) %| %| Construct Cdiff1 object that can compute C1 * x and the adjoint C1' * d %| for a "finite differencing" matrix C1 for roughness penalty regularization. %| This object provides the finite difference in only a *single* direction, %| so it...
b566090f0ca5b85d0447a80e968320ccedb3d800e71d0804ed7157d8da2a3dc2
MATLAB
19,060
417
% This script does stats based on FC analysis from one cluster % Xiao Chen 220429 % chenxiaophd@gmail.com %% initialization clear;clc; data_dir = 'DPABISurf preprocessing directory'; work_dir = 'FC_analysis'; TemplateDir = 'DpabiSurf SurfTemplates directory'; if ~exist(work_dir, 'dir'); mkdir(work_dir); end % load ...
002aac06a9313b5822bf9ae4c0002a3e04db3f3ad9ee383b1421be451156db1a
MATLAB
19,083
391
function d = datastrm(a,varargin) % DATASTRM - data object constructor for opening data recorded with MC Rack % % d = datastrm(a,varargin) is a datastrm constructor for MC Rack data files of all MC Rack versions % (MC Rack version 1 and above uses the OLE Server Object contained in MCSt...
4b78576f523f155c1460672c95fe8afb7725c5618dd43a251ad5a34786831d03
MATLAB
19,108
443
% This script loads the tracked data, adds together data from multiple flights, and rotates the pattern to align with the cardinal coordinataes clear all close all %load data %select all data from the same animal same pattern (=multiple flights) filenames=uigetfile('data*.mat','multiselect','on'); %if only on...
c9cb4be3053228b12b66674282886e4524617c9f775f816e752f60c9f2958c4f
MATLAB
19,143
375
function linear_Model(exname, varargin) % Bharath Talluri & Jacob Yates, Dec 2021 % adapted from linear encoding model used in the study "Single-trial neural % dynamics are dominated by richly varied movements" by Musall et al., 2019 % Inputs: % datadir <char>: path to experiment director % exname <char>: ...
940c67cdbc14a935c4257f2613c57aa728b4be9612e43cebaa6b0cee7c0f9c32
MATLAB
19,156
451
function [I_shar, I_syn, I_unx, I_uny, q_opt] = partial_info_dec(p) % partial_info_dec(p) Partial Information Decomposition of a trivariate probability distribution. % % [I_shar, I_syn, I_unx, I_uny] = partial_info_dec(p) gives the four atoms of the % partial information decomposition following the pro...
8f3d312411ae23e4b823d2d6c9c0e41c8ec5e7a3f28b54e77adbe6631c8e481b
MATLAB
19,168
399
% PLOT DECODING ERROR ACROSS LAPS % Uses information extracted with 'bayesian_decoding_error_stability.mat' to plot median decoding error across laps (each lap compared to the last % lap(s). Plots for each rat, for each protocol, and a figure with all protocols overlapped (showing both first and second exposure). Also ...
f4c92c3d5c53aacbde92e9fd612b7ae40057976d6d070b2411703cdf2d9df3be
MATLAB
19,183
533
classdef SortTable < 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 Junio...
ba12b14410cad6bce4637d305b660f0266d56f8d2962b180e9b2b710487d13ad
MATLAB
19,331
594
clear all close all dbeh_path='C:\Users\xscogno\MATLAB\Flavio2\Waves\Tracking data\'; rec_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_spikes='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_sorting='C:\Users\xscogno\MATLAB\Flavio2\Waves\Sorting\'; dpath='C:\Users\xscogno\MATLAB\F...
139889f12bbce5b0131caf9375810952704e8f57025e383eac05bf07312bc242
MATLAB
19,367
541
function P = spm_realign(P,flags) % Estimation of within modality rigid body movement parameters % FORMAT P = spm_realign(P,flags) % % P - char array of filenames % All operations are performed relative to the first image. % ie. Coregistration is to the first image, and resampling % of image...
edff10d8ede87428483b46b70fa38529335842683cd52b25edd03e8f1b04aa33
MATLAB
19,390
563
function spm_dcm_fmri_csd_results(DCM,action,fig) % Review an estimated DCM for BOLD CSD % FORMAT spm_dcm_fmri_csd_results(DCM,action,fig) % % Action: % 'Spectral data' % 'Coupling (A)' % 'Coupling (C)' % 'Inputs' % 'Outputs' % 'Transfer functions' % 'Cross-spectra (BOLD)' % 'Cross-spect...
fea641bdd953e062a4211265dd614b7fd3aa2c93fe5f22fcd0ecc6ec4e995ece
MATLAB
19,416
638
clear all close all dbeh_path='C:\Users\xscogno\MATLAB\Flavio2\Waves\Tracking data\'; rec_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_spikes='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_sorting='C:\Users\xscogno\MATLAB\Flavio2\Waves\Sorting\'; dpath='C:\Users\xscogno\MATLAB\F...
ca19235dfef63ee3a925c17bce17cec369f25ba0d03c18cd02c87f88da9ffca5
MATLAB
19,497
584
clear all close all dbeh_path='C:\Users\xscogno\MATLAB\Flavio2\Waves\Tracking data\'; rec_data_path = 'C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_spikes='C:\Users\xscogno\MATLAB\Flavio2\Preprocessed_data\'; dpath_sorting='C:\Users\xscogno\MATLAB\Flavio2\Waves\Sorting\'; dpath='C:\Users\xscogno\MATLAB\F...
248dbab9a893d7342354efc49e488035d7e920ca139ffbb52a7015a481c5dd25
MATLAB
19,505
498
function [details,paths] = conrdk_subjects(id,options,reference,csdFlag) %DPRST_SUBJECTS Function that sets all filenames and paths % IN: EITHER (for quering both general and subject-specific paths: % id - the subject number as a string, e.g. '0001' % options (optional) - th...
8e2c7fd378d8ce52be316a6c651852f56dd1f0eec9741f7dda77f816c39a3530
MATLAB
19,550
487
classdef SuhCompensator < handle % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Copyright (c) 2022 The Board of Trustees of the Leland Stanford Junior University; Herzenberg Lab % License: BSD 3 clause properties(Constant) DONE='Already compensated'; CHOI...
0b495c94633a574bd7bccb465719a9dd0917153c37bebc2dda10f5ff48e938a8
MATLAB
19,566
249
% Marie_FP_IndivData_quantification % Marie Labouesse, marie.labouesse@gmail.com - Feb 2021 % INDIVIDAL TRIALS AND MEAN, PEAK/DIP QUANTIFICATION % load matlab spaces generated in: Marie_FP_IndivData_extraction and PooledData % uses individual trials aligned to specific event to calculate basic quantifications to ...
56b138ef290a6539b5a30efe6c53d903b256f1256f604cb392180991e3311019
MATLAB
19,569
453
clear close all clc MainFolder = uigetdir([], 'choose main directory with all subjects'); %Main directory with all subjects subjects = {''}; for subj=1:length(subjects) currSubj = subjects{subj}; disp(currSubj) %cd to subj dir cd(fullfile(MainFolder,currSubj)) tdcs_lf = sim_struct('TDCSLEADFI...
2cb53a88f9d1a158ea5c849a451b796ecc0459df73d44a21881d31894a76ed72
MATLAB
19,574
383
function [outGroup] = CalculateTrackingPath(Group, config) %% CalculateTrackingPath % Andrea Castegnaro, UCL, 2022 uceeaca@ucl.ac.uk % Calculate trial information based on tracking data. % Despite having a separate output in our dataset (i.e. cones locations, % cones triggered position, cones spawning times, triggered ...
3e065d37371e8122a9507a8eded7cf20e38c2f0558aecb7522927cb0dd0abeb4
MATLAB
19,611
341
% Plot correlation across laps at a population level % Marta Huelin % INPUT: % 'parameter' is a string and defines the information you are analysing and that is a field in singleCell_LAPScorr structure. % Can be centremass_r, peak_r, normcentremass_r % 'comparison_type' is a string that defi...
b71c8a9168d9008a0bed076e92c5cf343478e386af69b6cb62c9c3413adc58ce
MATLAB
19,635
466
function A = NUMERIC_SIM(Sim) % comments here % last change: 2015/06/11 by PS % NUMERIC_SIM solves the Bloch-McConnell equations stepwise for trains of % arbitrary pulses. % it requires: % Sim.xZspec % Sim.B1, Sim.n,Sim.tp,Sim.DC % Sim.shape % Sim.MT_lineshape % pool concentrations % y0 = [0 0 0 0 0 0 0 0 0 0 0 0 Sim.f...
d0b4a68eecab5477923fd57b71f9c223b599b4e000b0626655dc395e7ae91784
MATLAB
19,656
516
function nfmi = using_FMI(ima, imb, imf, feature, w) % FMI calculates the Feature Mutual Information (FMI), the non-reference % performance metric for fusion algorithms, proposed in: % % M.B.A. Haghighat, A. Aghagolzadeh, H. Seyedarabi, "A Non-Reference Image % Fusion Metric Based on Mutual Information of Ima...
fb658a2904a1ba78969d529a9f4817d23c522fb206b21a5e00405258b7f19149
MATLAB
19,659
648
function [output,outputsummary] = inspect_seg(img,gradechoinv,mask,kernel,options) %inspect segmentation version %assumes that each voxel is associated with a single cluster, and each %cluster has an associated spectrum % % Reference: ?Slator, P. J. et al. ?InSpect: INtegrated SPECTral % Component Estimation and Mapp...
537cb9f73e14acd05db786035f7a92ebce3600b24760fc8948edc1b0d25dd601
MATLAB
19,684
351
function plot_track_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 activ...
57530514ad23559bcde119c4e0041ef3ac892e4a39056e2341e130341335f78c
MATLAB
19,732
557
function [table_u_r,N,T]=identify_waves_latestversion_6_f(mouse_num,day,num_clus_discr,dt,make_fig,spikes) min_amp=5; %used to be 2 [N,T]=size(spikes); [~,sorting,~] = get_sorting(spikes); for i=1:N FRp(i,:)=full(fire_rate(spikes(i,:),1*dt,'g')); %smooth in the dt chosen for each session end [~,sorting_FRp,~] =...
051a2b19ae53a0f13b3b7a0b65761b05b4796157382b95a22ca1309610875369
MATLAB
19,759
532
% Script to plot Figure 4, 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/ % Data parameters frate = 6.83; N_frames = 52; dt = 1/frate; t = (0:dt:dt*(N_frames-1))-3; t1 = ceil((3+1)*frate); t2...
cda83ca42b84ca265dbabe4e18b2e72c1a4c656edbadacb1f20026457cff4366
MATLAB
19,769
555
function [table_u_r,N,T]=identify_waves_latestversion_6_f(mouse_num,day,num_clus_discr,dt,make_fig,spikes) sf=7.73; min_amp=5; %used to be 2 [N,T]=size(spikes); [~,sorting,~] = get_sorting(spikes); for i=1:N % FRp(i,:)=full(fire_rate(spikes(i,:),1*dt,'g')); %smooth in the dt chosen for each session FRp(i,:...
9f3e567c1957ee8b915a2d8d519a97e4e2f5564a81ae607e6e9853151ace06c4
MATLAB
19,786
638
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. % %...
2eee3c5b5102c91d11f17613741d42fbe0885ebae74362886b46e50bac5b2541
MATLAB
19,813
558
close all; clear; load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_bin\Space_bin_filt30Kalman.mat') load('U:\rg-yoshida\Yoshida_lab_shared_folder\Shared Data\Antonio\In vivo data\Babak\preliminary analysis\Space_bin\Spatial_Vel_ROI4.mat') load('U:\r...
2733cc455d9db94d4ac0bf7108acec77a367e75b913fcc4144110e3a6f7e9ccb
MATLAB
19,879
402
% PLOT DECODING ERROR ACROSS LAPS % Uses information extracted with 'bayesian_decoding_error_stability.mat' to plot median decoding error across laps (each lap compared to the last % lap(s). Plots for each rat, for each protocol, and a figure with all protocols overlapped (showing both first and second exposure). Also ...
ebd736068b9762386a5ca113060983422fbac4ac143e5b5e576cf5c5d4f808a9
MATLAB
19,907
610
function ress = plot_figures(model, params, opt) % Show or not vars plotNeuronVoltage = opt.plotNeuronVoltage; %1% Single Neuron Voltage and Glutamate plotSpikeRaster = opt.plotSpikeRaster; %3% Voltage Map plotIappMAP = opt.plotIappMAP; %5% I applied M...
fb4309f006519432bbc21eb4d6681ec106985e63f8f09d53524eeccc4b929fac
MATLAB
20,003
556
%LOAD_ACQ load BIOPAC's AcqKnowledge file format for Windows PC % % Usage: acq = load_acq(filename, [force_chan_by_chan_load]) % % acq - AcqKnowledge file structure containing ACQ header field, % and data matrix. % % filename - BIOPAC's AcqKnowledge file % % force_chan_by_chan_load - Optional. By default, this op...