sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
8d6638e36e11dcd6102c577f80e88374bb1c74a0f0aec24965b38ace750628b0
MATLAB
30,031
890
clearvars close all clc fieldtrip_path = [project_dir,filesep,'fieldtrip-20220906']; if ~exist(fieldtrip_path,"dir") error("change 'fieldtrip_path' to valid path") else addpath(fieldtrip_path) end addpath ./Violinplot-Matlab-master/ results_dir = '.\Figs' script_dir = mfilename('fullpath');fname ...
9210841c72db18f50cebc459cecb75538152ec1762f774d6353c0c60cad7aa17
MATLAB
30,062
734
function varargout = ballistic_gui(varargin) % ballistic_gui MATLAB code for ballistic_gui.fig % ballistic_gui, by itself, creates a new ballistic_gui or raises the existing % singleton*. % % H = ballistic_gui returns the handle to a new ballistic_gui or the handle to % the existing singleton*. % % ...
e1fa07dddb107579211007ce4ad682d804e6150fd2c6bfd8395d282f6673ec6c
MATLAB
30,148
712
%% Lick probability for individual mice % Select lick responses based on brain regions of interest load('E:\CM_Photoinhibition_Analysis\Cross_modal_task\Performance_control\photoInh_behav') Genotypes = {'PV-Cre-Ai32'}; % Genotypes = {'PV-Cre-Ai32' 'VGAT-ChR2' 'all'}; inhSites = {'sham' 'S1' 'MM' 'ALM' 'AMM' 'Prt'...
c8c890d76d8e944f4e58ff020e266b78f9517e8b9002b066d400e795441c098d
MATLAB
30,171
420
%Set your directories resultsDir='/projects3/TaskFCMethods/data/results/'; CABNP_dir='/projects/netpartitions/cabnp/'; %Set FC estimates to be from the HRFBasis data, but the activations to be from the canonical HRF data output=output_BasisHRFs; output.taskGLMVars_CanonicalHRF=output_CanonicalHRF.taskGLMVars; %Load ...
4a4639ee3b0153f93d94ea476e73b5ab5724e5bb4c8d56a7e6d427ed9fbe741b
MATLAB
30,407
751
%input: Spike raster mat file; behavioral mat file % check vector(z_wi_vec, z_q_vec, and z_wq_vec) for responsive neuron; % vector(zs_wi_vec, zs_we_vec, and zs_q_vec) indicate less divergent responsive neuron (only for lick response judgement); % check vector(z_q_idx, z_w_idx, z_wq_idx, z_qw_idx) for time bias; ...
c32c1dcc7af02caac85ab1a7815dec1fd0f215583a70ac9d970862efbb3ac795
MATLAB
30,513
856
function [eprime_nruns,errcode,behav] = abcd_extract_eprime_sst(fname,varargin) %function [eprime_nruns,errcode,behav] = abcd_extract_eprime_sst(fname,[options]) % % Purpose: extract condition time courses % from eprime data files for SST task % % Required input: % fname: name of input eprime file % % Optional inpu...
5e4665b0c5295965a5e682c1dffaf74ed240a8a76c3d3e15239f8d508f7556d2
MATLAB
30,640
633
%% Code to simulate n (10) time series with the same spectrum as simulation challenge 1 len = 60; % len: simulation length (s) fs = 200; % fs: sampling rate ap_init = 1.5; % ap_init: initial aperiodic exponent (Hz^-1) pk_cf = [8 18 8 8...
ad473dfe8e862be16cbd5ae2eefb4173a0a1895609083cadbb8e647e4378f443
MATLAB
30,697
659
function varargout = colorbarpwn(varargin) %COLORBARPWN creates positive-white-negative colormap and colorbar. % White is asigned to zero, if while location is not specified. % Customized colormap/colorbar options are available for: % - automatic/manual positive, white, and negative color. % - predefined color...
faf8459d702d597d890f16688478642cf91e0dcf47209bc31ba08579acca0aea
MATLAB
30,717
792
%BlandAltman Draws a Bland-Altman and correlation graph for two datasets. % % BlandAltman(Data1, Data2) - Data1 and Data2 have to be of the same size % and can be grouped for display purposes. 3rd dimension is encoded by % colors and 2nd dimension by symbols. The 1st dimension contains % measurements within th...
52a280e33c03dee1643026c42e0dd4f3531aea2d543b6b241273730ae326e575
MATLAB
30,726
690
function [Xi,Yi,Zi] = polarplot3d(Zp,varargin) % POLARPLOT3D Plot a 3D surface from polar coordinate data % [Xi,Yi,Zi] = polarplot3d(Zp,varargin) % % Input % Zp A two dimensional matrix of input magnitudes or intensities. % Each column of Zp contains information along a single meridian. Each row % ...
986353e10c1af2240a2346ca38a05967174819b0b52371f72dacb83f0590c328
MATLAB
30,810
792
%BlandAltman Draws a Bland-Altman and correlation graph for two datasets. % % BlandAltman(Data1, Data2) - Data1 and Data2 have to be of the same size % and can be grouped for display purposes. 3rd dimension is encoded by % colors and 2nd dimension by symbols. The 1st dimension contains % measurements within th...
862e5f99b20fa2bb0f4c88dcd62f45479459c1795410ce481e5495e256c39784
MATLAB
31,002
799
function [ACSims, timingReport, fatnavdir] = processFatNavs_GRAPPA4x4(twix_obj, outRoot, varargin) % function [ACSims, timingReport, fatnavdir] = processFatNavs_GRAPPA4x4(twix_obj, outRoot, varargin) % % Process the FatNavs contained within the file specified by the 'twix_obj' % (loaded in using 'mapVBVD_fatnavs.m') - ...
1323fad74f47683979aeb204b13d5ae67b13b3344994b8ca43ac5760c4cdab0a
MATLAB
31,047
968
clearvars close all AEC_results_adults = table({},... 'VariableNames',{'ID'}); AEC_results_kids = table({},... 'VariableNames',{'ID'}); if badtrls project_dir = '.\Adults_badtrls\'; else project_dir = '.\Adults\'; end % conwin = [3,3.5]; % extension_T = '_3-3.5bl'; hp = 13;lp = 30; ...
1459b6680cce181066f0c98e8d96331906f84eb145b031da0ca70e8c9edd8645
MATLAB
31,232
695
function SpikeAnalysisSet20180703(n,U,M) %Autocor‚ÍSpikeArrayADrink‚ÍSpikeArrayWon,WaterOn/Off‚Å‚ÍSpikeArray %Touch‚Å‚ÍSpikeArray‚ÆT‚ðŽg—pB global StartTime FinishTime fname SpikeUnits TurnMarkerTime OneTurnTime RPegTouchAll LPegTouchAll DrinkOnArray dpath3... MedPegTimeR MedPegTimeL RpegTimeArray LpegTimeArray...
c140ba5c38080964c0ef4877bdc19bacbf2fc7cb6111b0306ef1d2a8cf19b75a
MATLAB
31,234
1,004
clear; addpath(genpath('.')); bigFont; subpanels = 'AB C DE F'; NCOLS = 3; NROWS = 3; WIDTH = 8*2.54; HEIGHT = 7.5*2.54; close all; [panel_pos, fig, all_ax, H] = panelFigureSetup2( NCOLS, NROWS, subpanels,WIDTH,HEIGHT, 0.5, 1.5); PX_TO_UM = 1.085; SCALE = 1.15; FSZ = 20; H(1).FontSize = FSZ; H(2).FontSi...
e0035593e6e85d7dede3fbe67d820c8776297010bedcb38579221042b692c092
MATLAB
31,637
938
function [out, discharges, d_decim, envelope, background, envelope_pdf]=spike_detector_hilbert_v25(d,fs,settings) % Mutichannel spike detector using statistical description of bacground % activity to finding of spike suspected section. Algorithm allows resampling % of signal (DEFAULT 200 Hz), detect fast discharg...
94df22cd67ffc5eb5b661ba984dcb7332095c05f30a08921949d809515da8610
MATLAB
32,031
712
function SpikeAnalysisSet20190214(n,U,M) %Autocor‚ÍSpikeArrayADrink‚ÍSpikeArrayWon,WaterOn/Off‚Å‚ÍSpikeArray %Touch‚Å‚ÍSpikeArray‚ÆT‚ðŽg—pB global StartTime FinishTime fname SpikeUnits TurnMarkerTime OneTurnTime RPegTouchAll LPegTouchAll DrinkOnArray dpath3 render ... MedPegTimeR MedPegTimeL RpegTimeArray L...
661718d528f6949892b7d4d112cf2d03a3ee3f1ad953481b3b06e60c7650401f
MATLAB
32,060
1,095
%% Housekeeping clear; close all; clc; %% Analysis parameters % Define pre-processing for raw EEG data params = echtparams('zeroPhase',1,'filterImplementation',1,'fslide',0,'tWin',[-0.250 0.500]); CH = {'Fpz','Fz'}; % Electrode channel labels % Select subjects to exclude from group analysis exSub = {'Sub_151','Sub_...
6fc038cb5cd1d71f7eaada3413553db5bce568680b658a2cf8e53f4f25a7e09b
MATLAB
32,126
892
%% Shinjini Kundu (c) 2022 %% Script that helps generate the results in the paper %% 1. Demographics load demographic; %load the demographic variables load paper_indices; %indices in the filename order that are included in the paper load original_volumes; %volumes of the original images GROUP = 1; %choose...
0ec42b9997c790135e453b1202420e1d22f8a15da76b6263529e201eaadfb61d
MATLAB
32,277
1,126
%% analyse factor analysis (June 2023 version) sessionTags = {'M22027', '20220517';... 'M22029', '20220607';... 'M22031', '20220524'; 'M22032', '20220621'; 'M22033', '20220706'}; dataDir = 'C:\Users\edward.horrocks\Documents\Code\V1Dynamics\Data\basic_111022'; s = struct; for isession = 1:5 tic ...
4218780a9683e993d35b175aa007391c9cd3b7eba5ab3659cf3401d77025ae64
MATLAB
32,383
572
%% FourCageDecision_Analysis % Extract, analyze, and pool data from the 4cage experiments. % For these experiments, a single animal (gregarious or solitarious) was % places in a circular arena (d=90cm) with four stimulus cages, placed on % opposing sides. The four cages were (i) an empty control Ctr, (ii) a cage % with...
87ef5a566b1d0afd5be15a7137507295fed16024fd8457a6c34366c590f2d34a
MATLAB
32,719
832
function [pi_0_lsim , coupling_tetha_IM , transition_matrices_IM , gmm_para_lsim , AIC, log_likelyhood, BIC, pi_steady] = em_lsim( channels_observations , channel_num_states , num_gmm_component , max_itration , extra, init_model) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SED inference %%%%%%%%...
2c00253b50dee93d9e239ba1b96bd21a7b523a23f2c2fa9414a46ca484475c29
MATLAB
32,833
593
%% ConfocalAnalysis_StaticResponse % This script analyses how stable repeated responses to the same stimulus % are. For this, we project each stimulus repetition's intensity projection % into PCA space and measure the distance within and across stimuli to % asses their potential differences. % % Version: % 05-Jan-20...
270265324099d7cf59d9730f38d231555b2a2c35a2e195756a161e088ba9cecc
MATLAB
32,933
932
3%Fusion Detector % This script imports traces from putative fusions events and filters these % events by detecting peaks and analyzing the surrounding areas. The traces % for the remaining putative fusion events are plotted one at a time and % the user confirms or rejects each hit. The final hits are stored in a % va...
ab759012fe3f2f3929c23e1161e8fce4c831f0110692de5e144b1e29d82eb92f
MATLAB
32,942
871
function [ClusterIDs,Centroids]=mnl_Basic_dCrawler(InputMatrix,EuThresh,FigYN) % Function to create clusters based on the Euclidean Distances, this is the % basic form with just a matrix provided. Now with improved speed on the % Adjust clusters section. Then after the merge clusters the points outside % the cluster ar...
339b23ab4aed53ead10a946c3b9e354de3d665c34cae6a5f11fb9a19d07bff86
MATLAB
33,203
642
function print2eps(name, fig, export_options, varargin) %PRINT2EPS Prints figures to eps with improved line styles % % Examples: % print2eps filename % print2eps(filename, fig_handle) % print2eps(filename, fig_handle, export_options) % print2eps(filename, fig_handle, export_options, print_options) % % This fun...
3fe41210a7534c0e4849a3cba3cbc09a402c68efdef2a82ab376f6c45131b8b3
MATLAB
33,244
917
function varargout = venn (varargin) %VENN Plot 2- or 3- circle area-proportional Venn diagram % % venn(A, I) % venn(Z) % venn(..., F) % venn(..., 'ErrMinMode', MODE) % H = venn(...) % [H, S] = venn(...) % [H, S] = venn(..., 'Plot', 'off') % S = venn(..., 'Plot', 'off') % [...] = venn(..., P1, V1, P2, V2, .....
f21347acbc35bc86fd011bb3535a84c95ad45c511f1e7d99a18dd16747912da2
MATLAB
33,425
833
classdef (Hidden) sdk % % Class: % adi.sdk % % This class is meant to be the singular access point for getting % data from a LabChart file. Methods in this class call a mex % interface which makes calls to the C API provided by ADInstruments. % % Function Definitions: ...
9fb8b6c25f3c44293e964b466a255b4b1a988f01b4deef718908945c424a51c7
MATLAB
33,504
850
function [eprime_nruns,errcode,behav] = abcd_extract_eprime_mid(fname,varargin) %function [eprime_nruns,errcode,behav] = abcd_extract_eprime_mid(fname,[options]) % % Purpose: extract condition time courses % from eprime data files for MID task % % Required input: % fname: name of input eprime file % % Optional inpu...
abd042dec28e0f418c45247e1bed3e8cb02c70a72de5557268541901f2474ca6
MATLAB
33,646
1,071
clear; addpath(genpath('.')); bigFont; subpanels = 'AB C DEF'; NCOLS = 3; NROWS = 3; WIDTH = 8*2.54; HEIGHT = 7.5*2.54; close all; [panel_pos, fig, all_ax, H] = panelFigureSetup2( NCOLS, NROWS, subpanels,WIDTH,HEIGHT, 0.5, 1.5); PX_TO_UM = 1.085; SCALE = 1.15; FSZ = 20; H(1).FontSize = FSZ; H(2).FontSiz...
da58e737e092da277137b444515a24a07a7e1856e26e339faf97d9de000dbc02
MATLAB
33,704
357
function Montage = GetChannelPositionsFromLabels(Labels) ChanInfo(1) = struct('Name','Fp1','CoordsPhi',-72.00,'CoordsRadius',1.00,'CoordsTheta',-90.00); ChanInfo(2) = struct('Name','Fpz','CoordsPhi',90.00,'CoordsRadius',1.00,'CoordsTheta',90.00); ChanInfo(3) = struct('Name','Fp2','CoordsPhi',72.00,'CoordsRadius',1.00,...
b62f6627990e59a1f4f9d5622f26f7291eba38da80f98695700ccaa9b03e7498
MATLAB
33,823
688
%% Load information about the raw data for rat37 filename = 'combined.dat'; % Concatenated Raw Data filename ratID='rTBY37'; num_files = 1; FileInfo = dir(filename); nChansInRawFile = 256; if ~isempty(FileInfo) % If the raw data is accessible num_samples = FileInfo.bytes / (nChansInRawFile * 2); elseif ismember(...
65f868d6f4f62c1aa2a7f6d9310f68f7aa6f1d05ead59634e54d16f2168aa08b
MATLAB
33,852
807
function twix_obj = mapVBVD(filename,varargin) % Reads Siemens raw .dat file from VB/VD MRI raw data. % % Requires twix_map_obj.m % % Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de) % % % Philipp Ehses 11.02.07, original version % [..] % Philipp Ehses 22.03.11, port to VD11 % Felix Breuer...
cedd2801d9cf06a15338e4bb7d7d663a3fd9f57efaed8348cd59edd4cdac6bb0
MATLAB
33,883
761
% This script is to help the analysis of photometry data by automatically % identifying the sections of data where % there has been a bleaching and writing files, one for each bleaching % experiment. The script also sleep scores and identifies the vigilance % states over the region selected for analysis and outputs...
275e9009cf92b0097a4a8e14869fc460ac89c081b841236184a506b60b8a39a0
MATLAB
33,902
828
function [pi_0_lsim , coupling_tetha_IM , transition_matrices_IM , gmm_para_lsim , AIC, log_likelyhood, BIC, pi_steady] = generic_em_lsim( channels_observations , channel_num_states , num_gmm_component , max_itration , extra, init_model) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SED inference ...
3aee2150c971d5263b52a3ae8834e1cf0d552c42ee70b3d28630a0e8a830d80c
MATLAB
33,998
771
function reconstructSiemensGREwithFatNavs_cluster_skipMoCo(rawDataFile, varargin) % _skipMoCo version strips out all MoCo to speedup getting through ASPIRE % pipeline for testing [reconPars.outRoot, reconPars.tempRoot, reconPars.bLinParSwap, reconPars.bGRAPPAinRAM, reconPars.bKeepGRAPPArecon, reconPars.bKeepReconInRA...
ca446121a88d9131cfaa5ba5165baf2f4f0f6182ef02c508b326ce39b3f287e1
MATLAB
34,157
736
%Authors: Simon Wadle, 2019-2023 % %% v2 adds: -deletion of sequences where the mouse moved % -the option to not overwrite existing complete_data_Fall.mat files % -to do batch processing of all animals (if you want to process % only one animal just change the first for-loop t...
c7cfeae6ee23453b6b1a471ecf41ef6a8a60f307613c6e6123540266eaa0ea9a
MATLAB
34,169
689
%% Classification of initial states of correct trials % Trial-by-trial analysis % For each session, all correct trials were used to calculate classification accuracy. % % load data array load('E:\Data_array\AllTrials_100bin_noSmooth\data_array.mat') % Import setting mainDir = 'E:\CM_NeuralActivity_Analysis\C...
10aaa9159461b88945bbbd29bdd1ce3b6c81555343e56bde8d3afcc16bb16938
MATLAB
34,184
807
function twix_obj = mapVBVD(filename,varargin) % Reads Siemens raw .dat file from VB/VD MRI raw data. % % Requires twix_map_obj.m % % Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de) % % % Philipp Ehses 11.02.07, original version % [..] % Philipp Ehses 22.03.11, port to VD11 % Felix Breuer...
03534d72ae0b8aa0dc182e09b588e4b8cd748e060b24179fd00a66252ddd12d9
MATLAB
34,282
1,082
% this script calculates corr bw FWF and SDMT in selected WM ROIs, without % the lesions (=NAWM ROIs) or with the lesions (WM ROIs) % normalized to the subject's space clearvars close all clc addpath(genpath('/storage/stella/MATLAB_toolboxes/')); addpath('/storage/stella/Analysis/matlab_scripts/'); addpath('/storage/...
7c8df3aac29c4913fcf51316477d3145b6970c8b568526a5037f5ba40354ce66
MATLAB
34,474
726
close all clc clear pth = 'G:\Sameni\Documents\Papers\Journal 40 (Spline ECG Filtering)\CODES\AllResultsRawFiles\'; % results_LPF = importdata([pth 'AllDataSmootherResultsNormal05_ComparisonWithLPF_Backup.txt']); % results_WAVELET = importdata([pth 'AllDataSmootherResultsNormal06_ComparisonWithWavelet2_Backup.txt']);...
6085ea0d1fe95412fe4ba54222c5f57c7b46677aff2e7f21f6a2c315f7f777b2
MATLAB
34,605
1,036
% grandAveragePLVs.m % % Re-creation of "Mean Actual Phase histograms.png" from SBIR % % Created 2022-09-22 scott.bressler@elemindtech.com % Adapted 2023-08-16 tylor.harlow@uconn.edu %% Housekeeping clear; close all; clc; % Grab the default color order co = [0.0000 0.4470 0.7410 0.8500 0.10 0.0980]; %% Load D...
6bffe6188c05eea030b1a9f180e64e3578caa941fe2d12494afd38b3898b14e6
MATLAB
34,759
728
% Similar to previous version; just changed the wavelet level calculations close all clc clear pth = 'G:\Sameni\Documents\Papers\Journal 40 (Spline ECG Filtering)\CODES\AllResultsRawFiles\'; results_LPF = importdata([pth 'AllDataSmootherResultsNormal05_ComparisonWithLPF_Backup.txt']); results_WAVELET = importdata([p...
30ccc39622a26f792d0a058ee200d343a1a118cee6bf4c867a423b4785a85ed0
MATLAB
34,806
957
function [mua, musPrime, refInd] = XDOTHUB_getTissueCoeffs(tissue_label,wavelength) % ####################### INPUTS ########################################## % tissue_label : A string specifying the requested tissue. Options % include 'scalp','skull','ECT','CSF','GM','WM' % wavelength : i...
fc2765d82821b8237fd14c98213ffb5a53b4cb095a0e2a2c85194faad65e0fb5
MATLAB
35,088
681
function Cov_analysis24ch(RLpegTouchCell,RpegMedian1,LpegMedian1,TurnMarkerTime1,RLpegName1,RLpegMedian1) %Turn‚²‚Ƃ̐ڐGŽžŠÔˆê——•\‚ðì¬ %1‰ñ“]‚Ɉê‚‚̒l‚̂݁Bˆê‚‚à‚È‚¢‚Æ‚«‚ÍNaN‚ð‚¢‚ê‚éB %TM‚©‚ç‚ÌPeg‚ÌMedian‚ðŠî€‚É1000msˆÈã—£‚ꂽƒ‚ƒm‚͏œ‚­ % Cell=RLpegTouchCell;TurnMarkerTime=TurnMarkerTime1;RLpegName=RLpegN...
cd7cf559c881cc53d2aaa074716b961e8ce14358b17eae862bd7cb89b3b050e2
MATLAB
35,429
1,004
%% Plot and analyse psth metrics sessionTags = {'M22027', '20220517';... 'M22029', '20220607';... 'M22031', '20220524'; 'M22032', '20220621'; 'M22033', '20220706'}; dataDir = 'C:\Users\edward.horrocks\Documents\Code\V1Dynamics\Data\basic_111022'; for isession = 1:size(sessionTags,1) fname = [se...
94cfd81649d25e0d582e5519d7c5193c44cc64dbe51dba5eae0aa62a0825e4a2
MATLAB
35,453
664
% To be run after Cluster_analysis_pipeline_between_days code, performs additional % analyses and statistics % Field 0 is not the combination of all FOVs in different subfields, but in % case no subfield parcelation was selected clearvars; animals_in_group_1 = {'animal_1','animal_2','...'}; animals_i...
8563a26e8085c0b2e26b33fbf4631a821d3d4d6166b753c63062d370c0f17c60
MATLAB
35,897
777
%% GFP PEAK IDENTIFICATION % This script automatically identifies the group-averaged GFP peak inside a % period of interest (POI) % Corentin Wicht % Laboratory for Neurorehabilitation Science, UNIFR, CH % 02.06.2020 % TO DO: % - Do not let possibility to load different "Chanlocs", the files should % always be avg. re...
74e1652181438e5cc2749fbe041e7855330482785e6d501c36c260db0d95c0b1
MATLAB
35,915
1,026
function [shape] = ft_read_headshape(filename, varargin) % FT_READ_HEADSHAPE reads the fiducials and/or the measured headshape from a variety % of files (like CTF and Polhemus). The headshape and fiducials can for example be % used for coregistration. % % Use as % [shape] = ft_read_headshape(filename, ...) % or % ...
decb76df9450f7015caa0f1f085b853b447b6278e74355e4d62e4ca427ca7624
MATLAB
36,161
961
function handles = distributionPlot(varargin) %DISTRIBUTIONPLOT creates violin plots for convenient visualization of multiple distributions % % SYNOPSIS: handles = distributionPlot(data,propertyName,propertyValue,...) % handles = distributionPlot(ah,...) % % INPUT data : m-by-nData array of values, or vector ...
ad1580a4ec48e5de8c8f1ed49035a57e76371f3670ce3ff116d02d4221e6bfae
MATLAB
36,487
619
function RtIntervalAverage5Touch global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 pegpatternum RtIntervalAverageTouchCount RtIntervalAverageSpikeFR_Bin RtSpike_TouchRate %SpikeArray‚ÅLPegTouchAllARpegTouchall‚ðƒAƒ‰ƒCƒ“‚µ‚½ƒNƒƒXƒRƒŠƒIƒOƒ‰ƒ€ ...
40074432d061eba057f2c3ca27d19474ad42e07d956f340905c3699228a5e1bb
MATLAB
36,545
967
%Fusion Detector % This script imports traces from putative fusions events and filters these % events by detecting peaks and analyzing the surrounding areas. The traces % for the remaining putative fusion events are plotted one at a time and % the user confirms or rejects each hit. The final hits are stored in a % var...
a79c28e39f776bd06f79fc111686cca06bfcc439ba0881b1b4fe81943a7e1d55
MATLAB
36,556
579
function [img, ser, mrprot] = parse_siemens_shadow(varargin) % [img, ser, mrprot] = parse_siemens_shadow(dcm, debugOutput=false) % function to parse siemens numaris 4 shadow data % returns three structs with image, series header, mrprot info % does not work with arrayed dcm() % dependencies: parse_mrprot.m % ...
13df1ed8e309f966db58f7425579c36a6ef86367de3d3f8606f88dad4da351b4
MATLAB
36,765
1,406
%% plot correlation analyses sessionTags = {'M22027', '20220517';... 'M22029', '20220607';... 'M22031', '20220524'; 'M22032', '20220621'; 'M22033', '20220706'}; dataDir = 'E:\V1Data\Data\basic_111022'; for isession = 1:size(sessionTags,1) isession fname = [sessionTags{isession,1},'_', sessio...
a505e648f6d13a4183a3b30659da85c043345db3c26d28a54cb837e3d9287ba8
MATLAB
36,779
626
function LtIntervalAverage5Touch %ƒs[ƒNŠÔ‚Ì4‚‚̃Cƒ“ƒ^[ƒoƒ‹‚Ì•½‹Ï‚ð‚Æ‚Á‚āA3‚–ڂ̃EƒCƒ“ƒhƒE‚ðŠî€‚É‚µ‚Ä•½‹Ï‚̃Cƒ“ƒ^[ƒoƒ‹‚ŃEƒCƒ“ƒhƒE‚ðÝ’è‚·‚é global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 W123rate TouchCount pegpatternum LtIntervalAverag...
6a224272d14308f65e4059a69eea909e93481c7243fc3e2c0de6b6d37e1c742d
MATLAB
36,863
768
function [BIDS,subjects] = spmup_BIDS_unpack(BIDS_dir,options) % routine to read and unpack BIDS fMRI data (and anat) % can also be used to list files to be preprocessed to pass to spmup_BIDS_preprocess % % FORMAT [BIDS,subjects] = spmup_BIDS_unpack % [BIDS,subjects] = spmup_BIDS_unpack(BIDS_dir) % [BIDS...
6d579bffc5a3b2d68d440609b4e825433566d29bdcf7385ff52f1e64fa415746
MATLAB
36,995
948
function [eprime_nruns,errcode,behav] = abcd_extract_eprime_nback(fname,varargin) %function [eprime_nruns,errcode,behav] = abcd_extract_eprime_nback(fname,[options]) % % Purpose: extract condition time courses % from eprime data files for NBACK task % % Required input: % fname: name of input eprime file % % Optiona...
2a5d2ec3104e6488603559f7729e31fc8a54c6882e6665f9022235a4e72d7d0a
MATLAB
37,006
812
% Cut together all the image analysis stuff Steph gave me into one thing % First find beads (ROI) make sure that this is acceptable before moving on % to the next step. Then fit all the beads to gaussians and make sure each % of these is acceptable. Loop through this routine for multiple images % if noise is being re...
12c7439e32a19fc92a1c8cfef289889bf1d583868216800e0974a00d4647442b
MATLAB
37,234
1,206
function RepeattouchWcombination global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 %SpikeArray‚ÅLPegTouchAllARpegTouchall‚ðƒAƒ‰ƒCƒ“‚µ‚½ƒNƒƒXƒRƒŠƒIƒOƒ‰ƒ€ %SpikeArray‚ÅLPegTouchAll‚ðƒAƒ‰ƒCƒ“‚·‚é duration=5000; CrossCoL=[]; CrossCoR=[]; %—¼...
48a6cb8b81dbd0dec25e4e9d15f2650be81017fa268feed78aea71e895c65714
MATLAB
37,388
1,161
clear all; close all; clc; hexB10 = ([ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 1 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0...
3ff143b457a6ceae70fc00ee6a58dc901f914a3f7d4b6510e59eb4e681204fb6
MATLAB
37,727
883
%% This script runs the GAM analysis described in methods, and replicates figure S5c % To install pyGAM, follow the instructions here (https://pygam.readthedocs.io/en/latest/) for pip installation % gz models correspond to view, pl to place and hd to head direction clear all close all rng shuffle load sample_data...
19c98b16b5f9e4b31d2f97a15e60f4a28ab15b23261a02d923c196b23e5ea011
MATLAB
37,741
815
function reconstructSiemensGREwithFatNavs_cluster(reconPars) %% Check SPM and Fessler's toolbox are on path if ~exist('spm.m','file') % could also check version, but that's more effort... disp('Error - SPM (ver 12) must be on the path') return end if ~exist('nufft_init.m','file') disp('Error - Fessler ...
b79573683981b212ee060c9584430d1667f69a52d030780a7cb3f4271d410a0e
MATLAB
37,839
853
% this script calculates the average value of Free Water fraction in % selected WM tracts and brain tissues in the pool of Healthy Control % subjects clearvars close all addpath(genpath('/storage/stella/MATLAB_toolboxes/')); addpath('/storage/stella/Analysis/matlab_scripts/'); run('/storage/stella/Analysis/DTI_FreeWat...
291b74d4034031ba1a519a15ca74ed7ae94852e30543574d32518063eb6387e3
MATLAB
37,885
897
function twix_obj = mapVBVD_fatnavs(filename,varargin) % % mapVBVD_fatnavs - Daniel Gallichan (daniel.gallichan@epfl.ch) - % Small modifications to original mapVBVD.m (from Philipp Ehses) to also % create output structures containing the data collected as % FatNavs/FIDNavs/TrackDOTs. % % Original header: %...
a9482edebb471069cff402d30cb4f01d994b04cdd1922361f56f78c6ad32c2f2
MATLAB
37,954
735
%% %% SPATIOTEMPORAL BRAIN HIERARCHIES OF AUDITORY MEMORY RECOGNITION AND PREDICTIVE CODING - SYSTEMATIC VARIATION OF AUDITORY SEQUENCES (AUDITORY PATTERN RECOGNITION 2020) - LEONARDO BONETTI %% %% LOCAL COMPUTER - REVISION I - NATURE COMMUNICATIONS %These codes were used locally to prepare plots with higher resolu...
765935e52996bf69a2df76c045ba1c278087c097c81e83f25a155d9805d07c42
MATLAB
38,185
813
function matsuda20190918 global RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 Spike_TouchRate IntervalCount FRvsIntervalTouchRate PhaseCountRate... TouchCount PeakInterval PeakPhaseCount pegpatternum RLRcount LRLcount ... LtTouchCount LtSpike_TouchRate Spike Spike_Bin SpikeFR...
249ff9cf07090da97a8632d3cbc272737ed068941f819793c3ab5be67fe0403c
MATLAB
38,235
841
function Repeat3touch_pre global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 Spike_TouchRate TouchCount pegpatternum RLRcount LRLcount Spike Spike_Bin SpikeFR_Bin %SpikeArray‚ÅLPegTouchAllARpegTouchall‚ðƒAƒ‰ƒCƒ“‚µ‚½ƒNƒƒXƒRƒŠƒIƒOƒ‰ƒ€ %SpikeA...
526894e93367e450ca34239823c0c7dc3a7959eea9406dcc25d4cd3e440e06eb
MATLAB
38,247
953
%---------------------------------------------------------------------- %BrainAmpConverter v1.7 % %Conversion of physiological data recorded during fMRI scanning using %Brainamp systems to HeRa (heart rate) and Autonomate (SCR) formatted %files. % %Requires Fieldtrip IO functions for reading the EEG file created by Bra...
d074dc16288061deb3dab7eba7c1713670557b8ae06eef9273b2f5b81bfa1801
MATLAB
38,385
854
spike_thres =0.7; thr = -10; window_length = 0.1; dt = 5e-5; datarange = 19:20; for i =datarange if isempty(data(i).EPSP_singleclust) continue end for n = 1:length(data(i).EPSP_singleclust) data(i).amp_single{n} = []; data(i).halfwidth_single{n} = []; data(i).maxdv_single{n}...
9ea6f868ff2f9d7d9b9a26a3f3f301d8301c140c3405f726f15db16b75a476b8
MATLAB
38,489
887
%% This script runs the GAM analysis described in methods, and replicates figure S5c % To install pyGAM, follow the instructions here (https://pygam.readthedocs.io/en/latest/) for pip installation % gz models correspond to view, pl to place and hd to head direction clear all close all rng shuffle load sample_data...
c029dd3c6c08c59efafc7781ada289d14a2a09881be642adeed6b70784148787
MATLAB
38,863
797
% Similar to previous version; just changed the wavelet level calculations close all clc clear pth = 'G:\Sameni\Documents\Papers\Journal 40 (Spline ECG Filtering)\CODES\AllResultsRawFiles\'; % results_LPF = importdata([pth 'AllDataSmootherResultsNormal05_ComparisonWithLPF_Backup.txt']); % results_WAVELET = importdat...
b1a2d34af739c2fc4ad47556c59293af315a61f646222759d49bb963655b2652
MATLAB
39,524
782
function [output] = Preproc_HCPData_PostMinPreproc_TaskRest_CanonicalHRFModel_v2(SUBJECTLIST) % This function runs preprocessing and GLM analysis, after the HCP minimal preproccessing pipeline has been run. % It is designed to parcellate a dataset into a set of regions, which are then preprocessed. % % Preprocessing s...
636e0e8eac1ba6e525be6fd70e78b41dd471e79abcc5f65c33c4f440086d5f8d
MATLAB
39,554
782
function [output] = Preproc_HCPData_PostMinPreproc_TaskRest_CanonicalHRFModel24reg(SUBJECTLIST) % This function runs preprocessing and GLM analysis, after the HCP minimal preproccessing pipeline has been run. % It is designed to parcellate a dataset into a set of regions, which are then preprocessed. % % Preprocessing...
58b8e6143178ca82da0060470f28cf87868aaab9689f0a60020566b89a64af15
MATLAB
39,658
783
function [output] = Preproc_HCPData_PostMinPreproc_TaskRest_NoTaskReg(SUBJECTLIST) % This function runs preprocessing and GLM analysis, after the HCP minimal preproccessing pipeline has been run. % It is designed to parcellate a dataset into a set of regions, which are then preprocessed. % % Preprocessing steps includ...
82855309c8722f473f7857fb624bede1d9c185c733864cd6e06fb886b879146f
MATLAB
39,689
786
% Author: Jan Hirtz - 2023 % based on concepts published in Beathellier et al. (2012): Discrete Neocortical Dynamics Predict Behavioral Categorization of Sounds. Neuron 76: 435–449 % allows for multiple sound cartegories to be stacked for analysis % performs analysis of two experimental days to allow for compa...
daae5dfe867532587dc8f3a7e84786934c0f921a879a886bdf0ee478dd983857
MATLAB
39,983
1,081
classdef twix_map_obj < matlab.mixin.Copyable %handle % class to hold information about raw data from siemens MRI scanners % (currently VB and VD software versions are supported and tested). % % Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de), Aug/19/2011 % % % Modified by Wolf Blecher (wolf.blecher@tuebingen.mp...
343899fa6cf3d7d06a88455938845f63da6944afd50e31bdfae823e817fa021a
MATLAB
40,009
913
function [pout, info] = spikeTimesPSTH(spikeTimes,intervalsCell,binWidth,options) %% Input vars % - spikeTimes is vector of spike times for the unit of interest % - intervalsCell is a cell array of arrays (size: nTrials x 2) where the % first column is the start time and 2nd column is end time of the period % of inte...
8070aa0609b078f05cad8cbf461485ce718ef6d9be15fdeda1483e87c1ac880a
MATLAB
40,077
1,133
classdef PreviewController < jrclust.interfaces.FigureController %PREVIEWCONTROLLER properties (SetAccess=private) figData; fileBounds; hCfg; hFigPreview; end properties (Dependent) blankPeriod; blankThresh; CARMode; channelMeansMAD; ...
b9a0cc045d70d70b0cfa1e59867bbcaecbeed7dcd272bcf09872967564af0da1
MATLAB
40,259
971
% Find location of clustered cells %%%%%% Analysis workflow: % cell_f_extraction_2P_doublecheckplanes_24012022a.m % ExportPreprocesseddata_2PGlusensstim08022022.m % Combine_2Pdata0802.m % Analysis_combined_data_2P.m % Locate2Pcells.m % Chech_running_per_gluClasses.m clear all close all clc % params.colour_...
c3b2b937b6cf7f3bdb18a56551988b631eedd608ef03cafb047f4a737d4e1e0f
MATLAB
40,771
1,052
function varargout = TopColture(varargin) % TOPCOLTURE M-file for TopColture.fig % TOPCOLTURE, by itself, creates a new TOPCOLTURE or raises the existing % singleton*. % % H = TOPCOLTURE returns the handle to a new TOPCOLTURE or the handle to % the existing singleton*. % % TOPCOLTURE('CALLBACK'...
d8d2444ba556da07c082e6632906069cd691aeeccd8dd2014c8e2b475d07b587
MATLAB
41,460
873
function PV_pavlovian_analysis_main(choosecells, preprocess, behavior, anatomy, recording, fiber_photometry, optogenetics, root_opto, root_FF, root_FF_shock, root_FF_SOM) %PV_PAVLOVIAN_ANALYSIS_MAIN main data analysis funtion of PV-pavlovian project. % PV_PAVLOVIAN_ANALYSIS_MAIN(CHOOSECELLS, RESDIR, PREPROCESS, BEH...
d2405a2d289bde6f65b43293dfc409a1fbeb2e7ba84ddbdb692379d07ed6f0fc
MATLAB
41,522
1,007
function [pi_0_lsim_approx , coupling_tetha_IM_approx , transition_matrices_IM_approx , gmm_para_lsim_approx , pi_0_lsim_exact, coupling_tetha_IM_exact, transition_matrices_IM_exact, gmm_para_lsim_exact, log_likelyhood,log2_likelyhood, log_likelyhood_exact, log2_likelyhood_exact] = em_lsim_exact( channels_observati...
ac38792ed64e4642a22125ac65fb3c8117c6f2f5a5d933a649889e0426ee8fc0
MATLAB
41,537
1,247
function [h,atab,ctab,outstats,aoc_fig] = aoctool1(x,y,g,alpha,xname,yname,gname,GRP_DIR, displayopt,model) %AOCTOOL Fits a one-way anocova model and displays an interactive graph. % AOCTOOL(X,Y,G,ALPHA) carries out a one-way analysis of covariance % (anocova) using X as the predictor, Y as the response, and G as t...
1c9256ecbbb5253770edcda8e28652308527ba6796f3f31454f94fc96a3537c9
MATLAB
41,735
3,778
function GaitAnalysis3(data) %ƒtƒŒ[ƒ€‰ðÍ@ƒf[ƒ^‚Ísize(num_frame,4)‚̍s—ñ@‰E‘OA¶‘OA‰EŒãA¶Œã data=GetData;%data‚ðƒRƒ}ƒ“ƒh‚Å—^‚¦‚éê‡‚ɂ̓Rƒƒ“ƒgƒAƒEƒg % data(1:3,:) RH=data(:,3); RF=data(:,1); LF=data(:,2); RLF3=data(:,1:3); % Lrh=length(RH) % StartRH‚ðŠî€‚É‚µ‚½ŠeCyclei1ƒgƒ‰ƒCƒAƒ‹j‚É‚¨‚¯‚éAswin...
a8963f7bca842ac5bb3ed8ba501bd57b6e6af73a794604f641680a4104272c2a
MATLAB
41,834
1,396
function out = uipickfiles(varargin) %uipickfiles: GUI program to select files and/or folders. % % Syntax: % files = uipickfiles('PropertyName',PropertyValue,...) % % The current folder can be changed by operating in the file navigator: % double-clicking on a folder in the list or pressing Enter to move further % dow...
bb6bc8eb64078031c4763de5271f7049823cfdeea08cc97f02b577e068bc1837
MATLAB
41,893
1,116
function [refpts_10_2p5,refpts_10_2p5_labels,refpts_10_5,refpts_10_5_labels,ten2p5_to_ten5] = getSolutionSpace(pathnameHeadModel,pathnameMSHS) % This function computes the 10-5 and 10-2.5 locations on the head surface and saves % them under /Utils/scalpSolutionSpace_10_2p5.txt and /Utils/scalpSolutionSpace_10_5.txt %...
4fbd5078cba0f551b9cec9a95f770a687c50da12f0b0948d00700bbbf2761ab3
MATLAB
42,086
970
function burst_report(app) %BURST_REPORT writes graphs and xls sheets with results of burst analysis % Detailed explanation goes here tmp = []; for i = 1 :length(app.stat_group) tmp = [tmp ,app.stat_group(i).signals]; end tmp = unique(tmp); name_str = {}; for i = 1 : length(tmp) if iscell(app.data(tmp(i)).na...
8831a33651c8fb02e79a71457a051e205c186ef13d67a16c8053c187a3aaba36
MATLAB
42,315
1,032
function stats=mes(X,Y,esm,varargin) % ** function stats=mes(X,Y,esm,varargin) % computes measures of effect size or related quantities between two % samples (2-sample analyses) or one sample and a null value (1-sample % analyses). The output consists of effect size measure(s), t statistics, % and 95% confidence interv...
7350d83628cd011475f087eec0b50a85ebae641b278bfbee19c957344c324170
MATLAB
42,685
969
%% SPRiNT (without Brainstorm) % Inputs F = xs; % Input time series % STFT opts opt.sfreq = 200; % Input sampling rate opt.WinLength = 1; % STFT window length opt.WinOverlap = 50; % Overlap between sliding windows (in %) opt.WinAverage = 5;...
5c429341b1bbdeb8f16da9f7694538fbb7375011b7807c2832eed1aef4fa5dab
MATLAB
42,767
629
function Repeat_Repeat20210107 global RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 pegpatternum ... LtPositiveFiringRate RtPositiveFiringRate LtPositiveFiringRateP1 RtPositiveFiringRateP1 Spikeposition Windowinterval ... intnum=21; phasenum=21; LtPositiveFiringRateArray_g...
867045ed1868d867b5f91a776fea03adbd2b8b4cf1d2f0e4ecddfa92c9989f30
MATLAB
43,241
639
function Repeat_Repeat20210107 global RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 pegpatternum ... LtPositiveFiringRate RtPositiveFiringRate LtPositiveFiringRateP1 RtPositiveFiringRateP1 Spikeposition Windowinterval ... intnum=21; phasenum=21; LtPositiveFiringRateArray_g...
e911c801151b2bd1e13209836081ba8c36c4c299827b4456a5ab2bc6737b7ca4
MATLAB
43,602
1,075
function Display_Reconstruction(P,Data,Label) % P is the handle class containing all project and gui data. % Data = P.Data(p), where p is the current selected project. It is passed separately as a struct for faster reading (reading a handle class property in a loop is very slow). Raw_Image_Func_2D = @(x) im2uint...
7cc1f7a3d8989dcebc194ecb45ccfc8152bc85e75d0166ebfa4e7f924647c49a
MATLAB
43,723
1,058
function Display_Reconstruction(P,Data,Label) % P is the handle class containing all project and gui data. % Data = P.Data(p), where p is the current selected project. It is passed separately as a struct for faster reading (reading a handle class property in a loop is very slow). Raw_Image_Func_2D = @(x) im2uint...
6846b5ee5b0d29386a6e36f97de864cda398d4a5e62746672a4c5ec1e4ea0ee4
MATLAB
43,973
814
%% Create a class classdef Analysis methods(Static) function spkRs = GetSpikeRate(se, bin, tStart, tEnd) % Inputs % bin size (sec), time window of interest (from tStart to tEnd) % % Outputs % spike rate (spkRs) ...
97df415ffcff1a09bc2b2766887d7490caaabe5b9834e2cf86b448363cf4b500
MATLAB
44,135
1,729
function varargout = Image_processing(varargin) % IMAGE_PROCESSING M-file for Image_processing.fig % IMAGE_PROCESSING, by itself, creates a new IMAGE_PROCESSING or raises the existing % singleton*. % % H = IMAGE_PROCESSING returns the handle to a new IMAGE_PROCESSING or the handle to % the existing ...
6bf94822c2062aff9dc4619b7bad33a641a5bd6f0fa19fbd23b373cfc1d2dcb6
MATLAB
44,276
759
%% plot OS tuning numbers %Table of contents % % 1-initial loading % 2-Tuning: just NR, all cells % 3-Tuning: EO vs NR vs DR vs B2KO, avgs per FOV % 4-Proportion of subtypes per FOV and across conditions % 5-Proportions: Specifically just Directions. % 6-Proportion: ON/OFF subtype prop comparisons against Gca...
9f33988aecf705b3e6eda2d7ee1676e7b186e8b2a56d4daf25f3528d9818e80b
MATLAB
45,077
424
function [RpegTouchCell,LpegTouchCell,RLpegTouchCell,RLpegName,RLpegMedian,RpegTouchTurn,LpegTouchTurn]=PegTouchAnalysis(PegTouchCell1,SliderTouch1,TurnMarkerTime,OneTurnTime1,RpegTimeArray2D,LpegTimeArray2D,FTselect) %'PegTouch'‚Ísensor‚̏î•ñ‚𓾂½‚¾‚¯B12ch‚·‚ׂĂªRpeg12–{‚ÉŠ„‚è“–‚Ä‚ç‚ê‚Ä‚¢‚邯‚«‚É‚ÍPegTouch‚¾‚¯‚Å‚à...
f9df48bd0f3dd9e765bac97ab88aecd4919fb285959ab04cfc381b3b023967d4
MATLAB
45,440
1,008
function index() % This is the root script for the GUI. % Project_H is a pointer to structure Project, defined as a class handle in Project_Class.m. close(findall(0,'type','figure')); % Close all figures. clear; % Clear workspace. cd(fileparts(which(mfilename))); % Change to the directory of this file. % ...
85248eb94b8a13e28d42c4dfe18835fd1e460f1aad87cfe993732a431ddfe30e
MATLAB
45,893
1,015
function index() % This is the root script for the GUI. % Project_H is a pointer to structure Project, defined as a class handle in Project_Class.m. close(findall(0,'type','figure')); % Close all figures. clear; % Clear workspace. cd(fileparts(which(mfilename))); % Change to the directory of this file. % ...
488de2756cd16ad1d18247779f7a2756b67a70bef611c02c74d3879244ca936b
MATLAB
46,342
862
function RtPeakTouch global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 pegpatternum RtTouchCount RtSpikeFR_Bin RtSpike_TouchRate... RtTouchCount1 RtTouchCount2 RtTouchCount3 RtTouchCount4 RtSpike1FR_Bin RtSpike2FR_Bin RtSpike3FR_Bin RtSpike4F...