sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
b2eda13cf5a6fbbb42256f43bc6945fe28395482f026b3c2b33c9608a9ca901b | MATLAB | 22,661 | 517 | classdef settings_tests < matlab.unittest.TestCase
% Tests of the updater pipeline
%
% Purpose
% We wish to ensure that settings values entered by the user into the YAML are valid.
% To make sure this is the case, all entered values are tested upon load. This testing
% class ensures this is bei... |
c30811dd81f67d4324346891a99b6e7933b2ce9ed7af4959a2ea0c0fd2fc7a70 | MATLAB | 22,958 | 443 | function EEGfMRIPav_GLM1()
% EEGfMRIPav_GLM1
%
% Create regressors for block-level GLM.
% Cue x action conditions, response, error, outcome onset, update and
% difference to biased update, invalid responses.
% Use three-column (onset, duration, factor level) format.
% Saves each regressor as separate .txt file in res... |
1421762f05d4192b4f95bd1a5cb67631a46a22b50d8f3387a434fcb32b327bdd | MATLAB | 22,977 | 620 | % run_specialproc_auto.m
% Jamie Near, McGill University 2014.
%
% USAGE:
% [out,out_w,out_noproc,out_w_noproc]=run_specialproc_auto(filestring,aaDomain,tmaxin,iterin);
%
% DESCRIPTION:
% Processing script for Siemens SPECIAL MRS data in .dat format (twix raw
% data). Includes combination of reciever channels, remo... |
dd24681a6a7068d5367eb777e273279e650232f826c6eeb7ef457940973af3c6 | MATLAB | 23,020 | 403 | function [waveSpeed, latencyModel, columnGroup, rowGroup, planeGroup ] = GetWaveSpeed(expt, catInfo, periBout, voxInd, varargin) % , waveSpeedPval
% Track how fast a CSD wave washes across a set of specific volumes (ROIs, axons or neuropil)
IP = inputParser;
addRequired( IP, 'expt', @isstruct )
addRequired( IP, 'ca... |
85a7195ad7a4897899350fb82f7e750944cf7967663a0e05df08c59dbf49d54c | MATLAB | 23,061 | 537 | %% In the main analysis, we computed fisher information for each neuron
% assuming Poisson statistics, then summed them up because we assumed
% statistical independence. In this control analysis, we'll test how the
% results might change if the neurons has statistical dependences, using
% the simplified uniform Gaussia... |
33edd09b37a2391ca1aff3bdc2149e773c72c70b82087c17c269bc8527b925e3 | MATLAB | 23,193 | 459 | function EEGfMRIPav_GLM2()
% EEGfMRIPav_GLM2
%
% Create regressors for subject-level GLM.
% Outcome x action conditions (time of outcome),
% (hand of) response and error (time of response),
% outcome onset, invalid responses.
% Mind to select respective EEG regressor & GLM number below.
% Use three-column (onset, d... |
9c1f14b84654a4c74fc1cde22e9201a84e3edc4733941acf3bd5f8296255baf9 | MATLAB | 23,356 | 541 | %==========================================================================
% This script analyzes conjunctive object-place cells using a procedure
% that involves cluster-based permutation testing.
%
% Lukas Kunz, 2022
%==========================================================================
% start
clear; close al... |
f968f3bcec19db334afa603dbbf80dc27db887ea81a8fa1551cf4d5d98f072b5 | MATLAB | 23,490 | 452 | function EEGfMRIPav_GLM1B()
% EEGfMRIPav_GLM1B
%
% Create regressors for block-level GLM.
% Cue x action conditions, response, error, outcome onset, update and
% difference to biased update, invalid responses.
% Use three-column (onset, duration, factor level) format.
% Saves each regressor as separate .txt file in r... |
a95bed5a5d82c1717f9e935f4788ec76a017333f9aacd9ddae0f617c4cd2f6c8 | MATLAB | 23,696 | 460 | function EEGfMRIPav_GLM1C()
% EEGfMRIPav_GLM1C
%
% Create regressors for block-level GLM.
% Cue x action conditions, response, error, outcome onset, update and
% difference to biased update, invalid responses.
% Use three-column (onset, duration, factor level) format.
% Saves each regressor as separate .txt file in r... |
034e1a31814af88a533cd1f14810dd0f267a20ab40dbccc4924d9f1a44f5eadc | MATLAB | 23,701 | 675 |
clear;
%%
addpath './Tools';
%%
X = 50:1:500;
Y = 100:1:500;
load('./RawRecon/cond3_recon.mat')
ReconData_condition1 = Xt_Stacku8(Y,X,:);
clearvars Xt_Stacku8
load('./RawRecon/cond4_recon.mat')
ReconData_condition2 = Xt_Stacku8(Y,X,:);
clearvars Xt_Stacku8
load('./RawRecon/cond5_recon.mat')
ReconData... |
0b452eef59dcabc0c54fd2b045370d75df7df594950b378dc9372de75d45bcf1 | MATLAB | 23,764 | 370 | respStruct = struct('Nbout',[], 'meanEffect',[], 'exc',[], 'Nexc',NaN, 'excFrac',NaN, 'excEffect',[], 'neut',[], 'Nneut',NaN, 'neutFrac',NaN, 'neutEffect',[], 'inh',[], 'Ninh',NaN, 'inhFrac',NaN, 'inhEffect',[]); % 'normMean',[], 'valence',[],
boutRespStruct = struct('pre',respStruct, 'post',respStruct, 'change',struc... |
773ed7f7e8ce7d3943ffff58b4cc7eddf1270a23cd40062c674548cc89bf5ecb | MATLAB | 23,983 | 608 | % loadcnt() - Load a Neuroscan continuous signal file.
%
% Usage:
% >> cnt = loadcnt(file, varargin)
%
% Inputs:
% filename - name of the file with extension
%
% Optional inputs:
% 't1' - start at time t1, default 0. Warning, events latency
% might be innacurate (this is an open issue).
% ... |
c3cf186868d5630617297e7428dd758014b2d827e76116fdb5f0bd2592e4d396 | MATLAB | 24,034 | 551 | %==========================================================================
% This script identifies object cells during the cue period.
%
% Lukas Kunz, 2022
%==========================================================================
% start
clear; close all; clc;
addpath(genpath('E:\OpenField\Functions\'));
% settin... |
71354c588e7d472b83d792c7f8dcb5f19b756676f20ba8f60d8b829ae4376e0b | MATLAB | 24,179 | 588 | % MST_TREE Minimum spanning tree based tree constructor.
% (trees package)
%
% [tree indx] = MST_tree (msttrees, X, Y, Z, bf, thr, mplen, DIST, options)
% -------------------------------------------------------------------------
%
% Creates trees corresponding to the minimum spanning tree keeping the path
% length to... |
ef7b495928409dab748fa37dda3d62054ad185a8e4439eb85954932300c4ff17 | MATLAB | 24,458 | 536 | function [perf, result, testlabel] = mv_classify(cfg, X, clabel)
% Classification of multi-dimensional data.
%
% mv_classify allows for the classification of data of arbitrary number and
% order of dimensions. It can perform searchlight analysis and
% generalization.
%
% Note: For data that has the dimensions [samples... |
a8cf1e99c8908075876876aaa020e453534af1603d6a0774d437d4a93b694614 | MATLAB | 24,576 | 633 | classdef SynapseAPI < handle
% Available SynapseAPI methods:
% --------------------------------------------------------
% Legend:
% b = bool, s = string, c = cell, i = int, f = float,
% d = double, t = struct
% --------------------------------------------------------
% return value function call... |
5418de6035e1ca2f98cf2988158076bfb04b7ae414a8a422d44f8effdad6c54f | MATLAB | 24,712 | 532 | % Neuron Harmonic Analysis given extracted neuron morphological file (.swc)
% and corresponding fluoresence images for individual neurons.
% Contact zhuang.xu@unsw.edu.au for further details
close all
set(0,'DefaultFigureVisible','on'); % turn 'on' or 'off' figure display
% coverslipID = "0759"; % coverslip nu... |
26d6c4b9c3ee163f1d5e019f7f028c19d225281956140252559b25ebc672bf0e | MATLAB | 24,714 | 391 | %% Use GLM to assess contribution of different variables
locoDeform_vol_pred = cell(1,Nexpt); locoDeform_vol_resp = cell(1,Nexpt); locoDeform_vol_opts = cell(1,Nexpt); locoDeform_vol_result = cell(1,Nexpt); locoDeform_vol_summary = cell(1,Nexpt);
figDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( figDir )
%rLocoPr... |
f5257e2684f1e1d7059da13a8d55baaad3099b45b60c2171bec4dc8a6bff1834 | MATLAB | 24,800 | 543 | function [perf, result, testlabel,cfs,testidxs] = mv_classify_BOB(cfg, X, clabel)
% Classification of multi-dimensional data.
%
% mv_classify allows for the classification of data of arbitrary number and
% order of dimensions. It can perform searchlight analysis and
% generalization.
%
% Note: For data that has the di... |
7e2d584fc1a5884f2b87730ca90821f078f8f847cc897291271b714dd68e6a6c | MATLAB | 24,925 | 427 | function SpecificModStimuliMovementPiezo_16032020(AllDataFiles,AllParameters,app)
%TRACKMICEPOPULATIONSUMMARY Summary of this function goes here
% The aim of this function is to summarize the results of several rodents extracted by the software TrackRodent.
NumOfFiles=[ length(AllDataFiles.TimeStampsfileList) ...
... |
2906b70c5936e9dbda83d9809db586136faefe5bc649f7a0fd3b45931eb39c33 | MATLAB | 24,940 | 685 | function [SPM,xSPM] = tfce_getSPM(varargin)
% Compute a specified and thresholded SPM/PPM following estimation
% FORMAT [SPM,xSPM] = tfce_getSPM;
% Query SPM in interactive mode.
%
% FORMAT [SPM,xSPM] = tfce_getSPM(xSPM);
% Query SPM in batch mode. See below for a description of fields that may
% be present in xSPM inp... |
eb9ec5509a520c4231fcb1e9e93c04286eef687c1cff500b6b439bf9fbeb3660 | MATLAB | 24,993 | 547 | %% *T2N simulations*
% Let's load first the trees to be simulated
wttrees = load_tree('../data/mtrs/wt_aligned.mtr');%{sample_tree}; % load sample tree
tgtrees = load_tree('../data/mtrs/tg_aligned.mtr');
% tree{1}.R(1:2) = 3; % make the first two nodes a new region
% tree{1}.rnames{3} = 'soma'; % name the regi... |
bce99adc797f44e722dd16b3499d376210c39e8ecdfa99ea063a8773143ed91e | MATLAB | 25,012 | 644 | classdef SynapseAPI < handle
% Available SynapseAPI methods:
% --------------------------------------------------------
% Legend:
% b = bool, s = string, c = cell, i = int, f = float,
% d = double, t = struct
% --------------------------------------------------------
% return value function call... |
8b8238faf023a9dc36ef99891c9da11b2f9588a7adba08fac8d5c7bc858cd8a0 | MATLAB | 25,086 | 502 | function SpecificModVideoSimBA_28052023(AllDataFiles,AllParameters,app)
%TRACKMICEPOPULATIONSUMMARY Summary of this function goes here
% The aim of this function is to summarize the results of several rodents extracted by the software TrackRodent.
NumOfFiles=[ length(AllDataFiles.TimeStampsfileList) ...
... |
6114befb5649b9a7a9773a580472b7070e46913bdf7d73a3917496219d74b1a9 | MATLAB | 25,096 | 550 | %% *T2N simulations*
% Let's load first the trees to be simulated
wttrees = load_tree('../data/mtrs/wt_aligned.mtr');%{sample_tree}; % load sample tree
tgtrees = load_tree('../data/mtrs/tg_aligned.mtr');
% tree{1}.R(1:2) = 3; % make the first two nodes a new region
% tree{1}.rnames{3} = 'soma'; % name the reg... |
43d249c0509dc724133cb5725c6e5be59c4ab08f594c4801911a9d5edfc37065 | MATLAB | 25,146 | 535 | function SpecificModUltraSonicVocalization_17032020(AllDataFiles,AllParameters,app)
%TRACKMICEPOPULATIONSUMMARY Summary of this function goes here
% The aim of this function is to summarize the results of several rodents extracted by the software TrackRodent.
NumOfFiles=[ length(AllDataFiles.TimeStampsfileList) ..... |
52b4937011e7dc63317d0e332dcb88dc962432ee5fa235147de9a2ada6666bf7 | MATLAB | 25,742 | 756 | function view = stSearchFit(view, params, doDecimate, varargin)
% stSearchFit - find minimum for retinotopic model per voxel
%
%-----------------------------------
%--- input handling
%-----------------------------------
if ~exist('view','var') || isempty(view)
error('Need view struct');
end;
if ~exist('params','... |
674d1425e4605ed2b494684acaf77da0fa8b29a490f11405a499d93ac435531a | MATLAB | 25,903 | 724 | function [lastTS , info] = TDTduration(BLOCK_PATH, varargin)
%TDTBIN2MAT TDT tank data extraction.
% data = TDTbin2mat(BLOCK_PATH), where BLOCK_PATH is a string, retrieves
% all data from specified block directory in struct format. This reads
% the binary tank data and requires no Windows-based software.
%
% ... |
0e16443e96b11cc043290f2bd08fb9a7fdf7b450eb5ab307e1e437fd3654d384 | MATLAB | 25,980 | 760 | %% Electrophysiology Data Analysis
% Written by Rita Gil
% Last modified 15.12.2023
% PDS calculation per animal:
% Load Data
% Notch filter to remove power line noise (and harmonics)
% PSD calculation per animal per recording
% Combine animals and calculate final Power spectrum for LFP and MUA frequency ranges.
% Ca... |
b90dc145a5ddfced8eae827c3b1c6b5a3854abe98bcfed0d5ccb1abab3f51146 | MATLAB | 26,031 | 385 | function [fiber, pooledFit] = GetFiberWaveSpeed(expt, ROI, fiber, periBout, varargin) % , waveType
checkBout = @(x)(isstruct(x) || iscell(x));
IP = inputParser;
addRequired( IP, 'expt', @isstruct )
addRequired( IP, 'ROI', @isstruct )
addRequired( IP, 'fiber', @isstruct )
addRequired( IP, 'periBout', checkBout ) %... |
1cda573e91d95cc3c9c79614c69ec77846b1d1de7a444c82fe6bfbf51afa543f | MATLAB | 26,078 | 519 | function EEGfMRIPav_GLM3()
% EEGfMRIPav_GLM3
%
% Create regressors for block-level GLM.
% Cue x action conditions, response, error, outcome onset, update and
% difference to biased update, invalid responses, trial-by-trial EEG power.
% Mind to select respective EEG regressor & GLM number below.
% Use three-column (on... |
7d777083bbbe7c3f29832df1cc02b2ee827209ac6593c7066719942ceafb705a | MATLAB | 26,187 | 673 | classdef Metadata
%Metadata - Class containing metadata about a raw image
%
% The Metadata class is a data class that is designed to contain all the
% extra information (i.e. metadata) about a given raw image. It also
% implements related helper/convenience functions.
%
% Please see the <a href="matlab:web(ful... |
a14f354391bea1aa2dc67a6b6061bd21c62ac3d75c30f65303d3ebbe2b453676 | MATLAB | 27,120 | 705 | %io_loadspec_twix.m
%Jamie Near, McGill University 2014.
%Edits from Franck Lamberton, 2017.
%
% USAGE:
% [out,out_w]=io_loadspec_twix(filename);
%
% DESCRIPTION:
% Reads in siemens twix raw data (.dat file) using the mapVBVD.m and
% twix_map_obj.m functions from Philipp Ehses (philipp.ehses@tuebingen.mpg.de).
%
% o... |
0f18e12a383d832c802c8b9ecb7ffe39955783c7d9497521a07797bfd53debab | MATLAB | 27,216 | 807 | function dimord = getdimord(data, field, varargin)
% GETDIMORD determine the dimensions and order of a data field in a FieldTrip
% structure.
%
% Use as
% dimord = getdimord(data, field)
%
% See also GETDIMSIZ, GETDATFIELD, FIXDIMORD
% Copyright (C) 2014-2019, Robert Oostenveld
%
% This file is part of FieldTrip, s... |
d8d4c03019ece507aaa980643bcf29d74775f95fc1a10aa0c1f47f7d9bba9a54 | MATLAB | 27,770 | 470 | % POV_PATCH POV-Ray rendering of a Matlab patch element.
% (trees package)
%
% [name path] = pov_patch (p, name, v, options)
% -------------------------------------------------
%
% writes POV-ray files using the data contained in a patch structure p.
%
% Input
% -----
% - p::structure:patch structure including a vert... |
56070342d9213dbe69d64c27dd643aba1a8f6c5f12423bc9570a9a23ae804d74 | MATLAB | 27,873 | 891 | %% fMRI Data analysis
% Written by Rita Gil
% Modified last in 15.12.2023
% ROI Analysis:
% Load Data
% Delineate ROIs
% Detrend runs
% Average run
% Separate individual cycles
% Mean adn s.e.m. of averaged cycle
% Quantification:
% Join conditions
% Calculate the averaged cycle per run
% Interpolation of averaged cy... |
86e479da606348f3f51295e7fac7854fd63732f2069aa9eb0dab3249c19d0f02 | MATLAB | 27,955 | 577 | function stat = mv_statistics(cfg, result, X, y)
% Performs statistical analysis on classification or regression results of
% the high-level functions such as mv_classify_across time and mv_regress.
%
% mv_statistics implements both Level 1 (subject-level) and Level 2 (group
% level) statistical analysis of MVPA result... |
64350daed6dfabcb0552bb2155c5a55c8ae1a4ea7333f3d07d461fbf421ec8fe | MATLAB | 27,956 | 527 | function SpecificModVideoFree_12032020(AllDataFiles,AllParameters,app)
%TRACKMICEPOPULATIONSUMMARY Summary of this function goes here
% The aim of this function is to summarize the results of several rodents extracted by the software TrackRodent.
NumOfFiles=[ length(AllDataFiles.TimeStampsfileList) ...
... |
a61fb84c3495f257d49b80d42c3d497d1ffc0d5d28a4fda667c8f0a9d880acea | MATLAB | 28,072 | 727 | % FigureS20.m
% Plots for Supplementary Figure S20.
%
% EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN.
% J. Algermissen, 2018-2023.
% Should work in Matlab 2018b.
% we are here:
% cd /project/3017042.02/Analyses/FiguresOutcomeLocked
% clear all; close all; clc
% Set root directory:
cd(fileparts(which('figures_set_roo... |
be315720e7b209016cc758c1465cc202cae5d5ad804342d20f950b1c21494003 | MATLAB | 28,096 | 839 | function [z,s,exitflag] = smoothn(varargin)
%SMOOTHN Robust spline smoothing for 1-D to N-D data.
% SMOOTHN provides a fast, automatized and robust discretized spline
% smoothing for data of arbitrary dimension.
%
% Z = SMOOTHN(Y) automatically smoothes the uniformly-sampled array Y. Y
% can be any N-D ... |
41ccbfb809411082d5afe46daf80a015541514ec005f0c792d8b8dfac16a432e | MATLAB | 28,396 | 506 | function [neuron,tree,usestreesof,nocell,exchfolder, tag2Node, legacyOutput] = t2n_checkinput(neuron,tree)
% This function checks the neuron structure for correct definition of the
% used morphologies and returns info about it
%
% INPUTS
% neuron t2n neuron structure with already defined mechanisms (see docu... |
4d9ba03a5f72abb0dedc343dd1986f0dc4312dfe7517bac1d693f487a6784695 | MATLAB | 28,426 | 1,137 | %compareing good and bad in different aspects
%% compare run by run consistency: use sig: run by run to mean
%compare grid and all in genera
load('E:\learningAnalysis\summaryManyMice_includingOldEnvGoodMoreMice\gridCellsNewCueThresh\corrAllGrid.mat');
G=corrAllGrid;
load('E:\learningAnalysis\summaryManyMice_... |
8fbc4765e433749f21e7bc11b10b2f3ccbfd399b6d05df9f8964f10ed886df39 | MATLAB | 28,541 | 564 | function [perf, perf_std] = mv_calculate_performance(metric, output_type, model_output, y, dim)
%Calculates a classifier performance metric such as classification accuracy
%based on the classifier output (e.g. labels or decision values). In
%cross-validation, the metric needs to be calculated on each test fold
%separat... |
7b767004b83e028b21697fb3931704f089076f105fba85c53d6ba8671653cad5 | MATLAB | 28,809 | 650 | % ----------------------------------------------------------------------------------------------
% -- Title : VocalMat Identifier
% -- Project : VocalMat - A Tool for Automated Mouse Vocalization Detection and Classification
% -----------------------------------------------------------------------------------... |
8f4899a8f634478f7f5e6f8a4403cd09f4e7d38cab4ad348be18b10811339d53 | MATLAB | 28,952 | 568 | %==========================================================================
% This script examines the coactivity of object cells and place cells
% during hippocampal ripples.
%
% Coactivity is quantified via a z-score (Sosa et al., Neuron, 2020) or a
% Pearson correlation.
%
% The coactivity maps of associative cell p... |
32ac8019bc80a0d4a63f06c4d855aa5cba78eb3fb014ccb5c91bbb7722b54eca | MATLAB | 29,008 | 575 | %==========================================================================
% This script examines the relationship between coactivity scores, firing
% rates, and brain regions.
%
% Lukas Kunz, 2023
%==========================================================================
% start
clear; close all hidden; clc;
addpat... |
e466ced8146b894a379fc2ca7a1d21762ed003b19140814372f0da3eb0d6d58b | MATLAB | 29,089 | 838 | % Figure04.m
% Plots for Figure 4 in manuscript.
% The same approach is used for Supplementary Figures S03 and S13.
%
% EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN.
% J. Algermissen, 2018-2023.
% Should work in Matlab 2018b.
% we are here:
% cd /project/3017042.02/Analyses/FiguresOutcomeLocked
% clear all; close all... |
3fae818cf9cea79dbc1b24d4569348fe864e3d37a383f90fc00f0a40caabe70e | MATLAB | 29,096 | 657 | % ----------------------------------------------------------------------------------------------
% -- Title : VocalMat Identifier
% -- Project : VocalMat - Automated Tool for Mice Vocalization Detection and Classification
% --------------------------------------------------------------------------------------... |
a104da88880aa641e880c39f308c8d73696c1f108447d18a877abd1c1c730980 | MATLAB | 29,118 | 836 | clear all
close all
clc
%%
[pathstr,name,ext] = fileparts(pwd)
usedir = pathstr;
%[pathstr2,name,ext] = fileparts(usedir)
maindir = [usedir '/bids/sourcedata/UGDG/'];
% This is the final bids converter used.
% 11-18-21 | This is the code I am using for the bids converter.
% Plan now is to use the BIDs c... |
777c334dafb00d1bbcccfd445ed96cc02c212a8c3af6968265a6c81d7f60ee36 | MATLAB | 29,214 | 843 | clear all
close all
clc
%%
[pathstr,name,ext] = fileparts(pwd)
usedir = pathstr;
%[pathstr2,name,ext] = fileparts(usedir)
maindir = [usedir '/bids/sourcedata/UGDG/'];
% This is the final bids converter used.
% 11-18-21 | This is the code I am using for the bids converter.
% Plan now is to use the BIDs c... |
950603d2c8023986cb65816928e85fd1ccbfa2d5ab0dda83579587c926c50cdc | MATLAB | 29,267 | 863 | classdef SubaxisGrid < handle
%% SUBAXISGRID
% gx = SubaxisGrid(nrows, ncols, ...)
% Creates figure with a nrows x ncols grid of plots. Spacing and margin
% are specified uses the subaxis() syntax.
%
% Additional methods are provided for figure, row, and column titles.
properties (SetAccess = protected... |
f969e7acbb388c9410d875e4ea7c0c9e457a0ef677fd6aff1729750eff58ab68 | MATLAB | 29,406 | 840 | % FigureS03.m
% Plots for Supplementary Figure S03.
% The same approach is used for Figure 4 and Supplementary Figure S13.
%
% EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN.
% J. Algermissen, 2018-2023.
% Should work in Matlab 2018b.
% we are here:
% cd /project/3017042.02/Analyses/FiguresOutcomeLocked
% clear all; cl... |
23a32cbf6ae6fc21a794d80d71059348d20ebf9007fa5c5f78fcb6f26f0864d3 | MATLAB | 29,484 | 706 | % UNDERSTANDING STATISTICS
%
% In the introductory tutorials, various metrics are calculated for
% classification and regression problems. In many neuroimaging applications,
% we also want to quantify the statistical significance of these metrics.
%
% To this end, we look into how to perform statistical testing of MVP... |
e14d7468cc6787bdceb6843a88a61e210e92aab2ad7657bc7753bdb5c09f5796 | MATLAB | 29,492 | 658 | % ----------------------------------------------------------------------------------------------
% -- Title : VocalMat Identifier
% -- Project : VocalMat - Automated Tool for Mice Vocalization Detection and Classification
% --------------------------------------------------------------------------------------... |
8eb365bb54e60b7bb4de0ec514fd51055e36f5f6aa54e600bb451840956fe08f | MATLAB | 29,539 | 774 | %% Compare periCSD ROI-level fluor signals
% Identify ROI within an axon that are suited for measuring conduction velocity. Order from left to right
% Construct axon fibers
fiber = cell(1,Nexpt);
%DL102 180426
fiber{1}(1).ROI = [48,46,42];
fiber{1}(2).ROI = [17,31,36,45,41];
fiber{1}(3).ROI = [16,25,23,26,14,... |
ad9629a18d27d87916a8efdfa72e7f76d562ee979bba31e365f0d33dd873b525 | MATLAB | 29,656 | 853 | % FigureS13.m
% Plots for Supplementary Figure S13.
% Same approach as used for Figure 4 and Supplementary Figure S03.
%
% EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN.
% J. Algermissen, 2018-2023.
% Should work in Matlab 2018b.
% we are here:
% cd /project/3017042.02/Analyses/FiguresOutcomeLocked
% clear all; close ... |
15b078c137f2d218fa5b82a265304e370e58f0989448611cddf032a9e4947202 | MATLAB | 29,881 | 715 | %==========================================================================
% This script analyzes place cells using a procedure that involves
% cluster-based permutation testing.
%
% Lukas Kunz, 2021
%==========================================================================
% start
clear; close all; clc;
addpath(gen... |
f0e583a393128a8b8d20ace3ced1ac18fd95d8c20e9fdb23b20143bcdbc582fa | MATLAB | 29,909 | 505 | function [ROI, preROI] = MakeROI3D(expt, varargin) % , run exptDir, exptName %ROIlabel,
IP = inputParser;
addRequired( IP, 'expt', @isstruct )
addParameter( IP, 'corrPrct', 90, @isnumeric) % 68
addParameter( IP, 'minVol', 50, @isnumeric)
addParameter( IP, 'minFoot', 50, @isnumeric)
addParameter( IP, 'neuropil... |
1e5735eb2c09e85c527701a94b09e45f2bcb337928c39a2ad907856db8bca8ea | MATLAB | 30,008 | 867 | function vistaCalibrateMonitor(firstcalib,do10bittest)
% vistaCalibrateMonitor(firstcalib,do10bittest)
%
% this is a derivation of CalibrateMonSpd.m customized for the vista lab
% local use on a Mac OSX machines.
%
% this function:
% (1) performs some basics tests to check the serial-port communication
% with the ... |
7e6a087589891092fcd2d34f7180d9b81a3369fed9083b7c1acd8d2dd2b11e46 | MATLAB | 30,236 | 769 | classdef CellScan < ProcessedImg
%CellScan - Class to analyse cellular signals
%
% The CellScan class analyses cellular signals, including identifying
% regions of interest (ROIs) either manually or automatically, measuring
% the levels and/or changes in signals, and classifying the signals.
% Typically, the si... |
cce08a730880427674fba89ae45d1bb573f18014db0ef1ffd570632bf39ec339 | MATLAB | 30,279 | 649 | % this script loads in pre-processed data to generate behaviour validation
% figures in the manuscript. Raw data files can be provided if required.
clearvars
% point to ~/Code/fig9_behaviour directory;
data_dir = uigetdir();%
addpath(genpath(data_dir));
load_existing_data = 1;% load in the previous generated data t... |
45f91d898437d522b97953e4e0dee53e1de9791664768c3313dd0266c4b4c3fd | MATLAB | 30,573 | 783 | % FigureS07.m
% Plots for Supplementary Figure S07.
% The same approach is used for Figure 2 and Supplementary Figures S01, S06.
%
% EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN.
% J. Algermissen, 2018-2023.
% Should work in Matlab 2018b.
% we are here:
% cd /project/3017042.02/Analyses/FiguresOutcomeLocked
% clear ... |
f6bc478cc053d91e41b364e3e00ccebc3768515fa852646e42ccc0afeb415a50 | MATLAB | 30,694 | 785 | % FigureS06.m
% Plots for Figure S06A-H in manuscript.
% The same approach is used for Figure 2 and Supplementary Figures 1, 7.
% Note that no data is plotted, only simulations.
% Select model 5 for S06A-C and model 6 for S06E-G.
%
% EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN.
% J. Algermissen, 2018-2023.
% Should w... |
04a0e4e1d2a6866e75645e6504cddf9962faaafe1924d1bda543874941e8b88a | MATLAB | 31,214 | 706 | classdef Violin < handle
% Violin creates violin plots for some data
% A violin plot is an easy to read substitute for a box plot
% that replaces the box shape with a kernel density estimate of
% the data, and optionally overlays the data points itself.
% It is also possible to provide two s... |
203799383ad031ee525c79e46542e8ebfd39de506aa480816f290f70d20edb41 | MATLAB | 31,226 | 806 | % Figure02.m
% Plots for Figure 2A-H in manuscript.
% The same approach is used for Supplementary Figures S01, S06, S07.
%
% EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN.
% J. Algermissen, 2018-2023.
% Should work in Matlab 2018b.
% we are here:
% cd /project/3017042.02/Analyses/FiguresOutcomeLocked
clear all; close... |
a1b0654247ce7dc92eacf777d268885d7f72a050578a49a94c4d492da7c6bee0 | MATLAB | 31,315 | 804 | % FigureS01.m
% Plots for Supplementary Figure S01.
% The same approach is used for Figure 2 and Supplementary Figures S06, S07.
%
% EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN.
% J. Algermissen, 2018-2023.
% Should work in Matlab 2018b.
% we are here:
% cd /project/3017042.02/Analyses/FiguresOutcomeLocked
% clear ... |
b410598a40dc1a6f18e8b188833d3bcda4820c4819df77bcfdbefe9d789f7b01 | MATLAB | 31,354 | 480 | function [deformResultStruct, deformSubStruct, regParams, badInd] = GetDeformCat3D( infoStruct, varargin) % mouse, exptDate, runs
% Get data from registered 3D calcium imaging experiments
IP = inputParser;
addRequired( IP, 'infoStruct', @isstruct)
addOptional( IP, 'deformLim', [], @isstruct)
addParameter( IP, 'zoo... |
467ff1de340811983a499668517833a9155c8c9ab1ab32f0ee84088c1ebbf316 | MATLAB | 31,816 | 689 | function [job, data] = time_prepare_contrast_data(job, data)
% [job, data] = time_prepare_generic_data(job, data)
%
% Add aggregated time-domain data sets for selected contrast, channels
% to job object previously set up via time_update_job.m
% Preliminary data sets created via time_prepare_contrast_data.m
%
% INPUT... |
2d5f9bb3516afb8408e57e5505d6e16d6c493cf539465c539b779bd37e4200a6 | MATLAB | 32,701 | 566 | function SpecificMod_EMG_29032020(AllDataFiles,AllParameters,app)
%TRACKMICEPOPULATIONSUMMARY Summary of this function goes here
% The aim of this function is to summarize the results of several rodents extracted by the software TrackRodent.
NumOfFiles=[ length(AllDataFiles.TimeStampsfileList) ...
... |
2e4dc2db16941d529438336276423853bcab9d969c4139e9df0e0808e6e2578c | MATLAB | 32,835 | 514 | function [ROI, preROI] = MakeROI3D(expt, varargin) % , run exptDir, exptName %ROIlabel,
IP = inputParser;
addRequired( IP, 'expt', @isstruct )
addParameter( IP, 'corrPrct', 90, @isnumeric) % 68
addParameter( IP, 'minVol', 50, @isnumeric)
addParameter( IP, 'minFoot', 50, @isnumeric)
addParameter( IP, 'neuropil... |
72ec97982666185f98f4cfaa0c57929980e3f1fd5c16e21e973e2cc8496f226a | MATLAB | 32,916 | 682 | %==========================================================================
% This script examines single-neuron activity during hippocampal ripples.
%
% Lukas Kunz, 2022
%==========================================================================
% start
clear; close all; clc;
% settings
param ... |
237435945b999766775c7f11bfcbcd46bead53ae8710b5ffed9cf802b51b616a | MATLAB | 33,224 | 914 | 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, ..... |
47f9d99084601588d0381b5130581529f99a7f9e68048e7f3ae60a04f9bf0268 | MATLAB | 33,255 | 612 | %% Use GLM to assess contribution of different variables
preCSD_2D_pred = cell(1,Nexpt); preCSD_2D_resp = cell(1,Nexpt); preCSD_2D_opts = cell(1,Nexpt); preCSD_2D_result = cell(1,Nexpt); preCSD_2D_summary = cell(1,Nexpt);
%figDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( figDir )
exptColor = distinguishable_colo... |
bb80d7fa5be17145866a201a7f02ab22606755d82b205bbc239fd9378af82f26 | MATLAB | 33,400 | 519 | %% *T2N Tutorial*
% *This script is to show you some applications of t2n. Tutorial A and B initialize
% the morphology and standard parameters (and need thus be run at least once before
% starting one of the other tutorials), whereas the other sections define the
% different simulations.*
%
% Note: T2N requires NEU... |
91a83151da19a46cc253115674d59f3cf04fc9071f0f37bdc6992a54c8a17d5f | MATLAB | 33,430 | 628 | minIso = 10;
for x = xPrePost
figure('WindowState','maximized')
for runs = find([periBout{x}.Nbout] > 0) % 1:expt{x}.Nruns
goodBouts = find(periBout{x}(runs).iso(:,1) > minIso)';
%for bout = 1:periBout{x}(runs).Nbout
%end
subplot(2,1,1);
plot( periBout{x}(runs... |
9164a0e561c1087584d6ce45beaffada4a8e70242484f6fe4e8f53ea6de6a869 | MATLAB | 33,677 | 1,337 | %plotting days tracked togethr
p=pwd;
load('E:\learningAnalysis\summaryManyMice_includingOldEnvGoodMoreMice\commonUniqueCells\daysAll.mat');
G=daysAll;
daysMeanG=[];
daysSEMG=[];
daysSTDG=[];
for n=1:length(daysAll);
daysMeanG(n)=mean(daysAll{n});
daysSEMG(n)=std(daysAll{n})/sqrt(length(daysAll{n}));... |
29b783e5d9948df53afd1bf7cbea9e6499e35b2a8f1e5aad33d24c94d917708c | MATLAB | 33,834 | 572 | function SpecificMod_DLC_Alone_17082023(AllDataFiles,AllParameters,app)
NumOfFiles=[ length(AllDataFiles.TimeStampsfileList) ...
length(AllDataFiles.ManuallyDefinedEventsfileList) ...
length(AllDataFiles.Video1BehavioralfileList) ...
length(AllDataFiles.Video2Be... |
05c6c45e1abafce178705b95a31077f9bb0797b67f5f0827ca41708c8789bdf5 | MATLAB | 33,842 | 981 | %SC Display/output truecolor images with a range of colormaps
%
% Examples:
% sc(image)
% sc(image, limits)
% sc(image, map)
% sc(image, limits, map)
% sc(image, map, limits)
% sc(..., col1, mask1, col2, mask2,...)
% out = sc(...)
% [out, clim map] = sc(...)
% sc
%
% Generates a truecolor RGB image b... |
d276f5945c3849b8bd9ea36b86981230bd0e5b2449090ed3798015602598f82a | MATLAB | 34,163 | 652 | %% Show sensitized units before/after CSD
opt = {[0.06,0.04], [0.07,0.05], [0.07,0.07]}; % {[vert, horz], [bottom, top], [left, right] }
figure('WindowState','maximized');
clearvars sp;
for p = flip(1:4), sp(p) = subtightplot(2,2,p, opt{:}); end %#ok<SAGROW>
for roi = rSensitized{x}
for runs = 1:expt(x).csd-... |
e0a907efc9abaaf78a440b3b85780259f600e572e935ef28baa9cab458154b6e | MATLAB | 34,184 | 932 | function [SPM,xSPM] = spm_getSPM(varargin)
% Compute a specified and thresholded SPM/PPM following estimation
% FORMAT [SPM,xSPM] = spm_getSPM;
% Query SPM in interactive mode.
%
% FORMAT [SPM,xSPM] = spm_getSPM(xSPM);
% Query SPM in batch mode. See below for a description of fields that may
% be present in xSPM input.... |
689cf6bc03f1ad7703ec14bc5433f29b33e6c8494f77007d6cf73f9f3d3bc9a4 | MATLAB | 34,426 | 1,479 |
clc;clear;
format compact;
%% Data import
cd C:\Users\WORM-05\Documents\MATLAB\excel\
data1 = readmatrix('total_connection_arranged_new.xlsx','Sheet','dataset1','Range','C3:HP224');
data2 = readmatrix('total_connection_arranged_new.xlsx','Sheet','dataset2','Range','C3:HP224');
data3 = readmatrix('total_co... |
caf9389b9bf984eff5ec29d286cca3afa0bf5da043ce25764e35fa4361425270 | MATLAB | 34,970 | 833 | function twix_obj = mapVBVD(filename,varargin)
% Reads Siemens raw .dat file from VB/VD MRI raw data.
% requires twix_map_obj.m & read_twix_hdr.m
%
%
% Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de)
%
%
% Philipp Ehses 11.02.07, original version
% [..]
% Philipp Ehses 22.03.11, port to VD11... |
63ffe3e84fe3068da5bf45edb47fd694b5725243f1a1f655155b846383cc0cf6 | MATLAB | 35,758 | 905 | % run_hd_specialproc_auto.m
% Jamie Near, Sunnybrook Research Institute 2021.
%
% USAGE:
% [out1,out2,out1_w,out2_w]=run_hd_specialproc_auto(filestring,VoxIDs,aaDomain,tmaxin,iterin);
%
% DESCRIPTION:
% Processing script for Siemens Hadamard-encoded SPECIAL (HD-SPECIAL) MRS
% data in .dat format (twix raw data). In... |
35f80a835bff86451dd3e07fda92da87bb7d997186dd00a0f1b8927bce3c8fa8 | MATLAB | 36,016 | 1,532 | % cd ..\
% load('foldersAll.mat');
%% Since some of the above FOVs are different from foldersAll, remake the folder
foldersAllN={};
foldersAllN{1}='E:\ID20210207\findCells\loc1\subsetFOVOldNO11';
foldersAllN{2}='E:\ID20210207\findCells\loc2\subsetFOVWithOldNo11';
foldersAllN{3}='E:\ID20210519_1\findCells\loc1\subsetF... |
908c3ea645b525dcbfa502ff6f4d17379a6e695296af5afde62048c48df34bc0 | MATLAB | 36,139 | 745 | function [] = read_intanRHD_All_data_29122021_fun(app,IntanFileNames,IntanFilesPathName)
app.StatusEditField.Value='Starting analysis';
pause(0.1);
amplifier_data=[];
DataForStartTriggerTime=[];
StartTriggerTimeInSec=[];
DataForFramesTimes=[];
DataForFramesTimes_2=[];
DataForFramesTimes_3=[];
DataForFr... |
8090abeab441972e5d1cde969215d2fafd93840f0d958f80b32fb146db7d545d | MATLAB | 36,330 | 801 | function data = TDT2mat(tank, block, varargin)
%TDT2MAT TDT tank data extraction.
% data = TDT2mat(TANK, BLOCK), where TANK and BLOCK are strings, retrieve
% all data from specified block in struct format.
%
% data = TDT2mat(BLOCKPATH), where BLOCKPATH is the folder location of
% the block
%
% data.... |
72ebcdd1c74ae0f833c99a0824eb2292637918ec906fe081bfa4c70a1abc2908 | MATLAB | 36,636 | 805 | function data = TDT2mat(tank, block, varargin)
%TDT2MAT TDT tank data extraction.
% data = TDT2mat(TANK, BLOCK), where TANK and BLOCK are strings, retrieve
% all data from specified block in struct format.
%
% data = TDT2mat(BLOCKPATH), where BLOCKPATH is the folder location of
% the block
%
% data.... |
8036a78054fce1a59c1907a0b23020e80337962cb5caecdb7ce16e0d937e51ee | MATLAB | 36,761 | 600 | function SpecificMod_FPandVideoChambersOrManualEvents_18102020(AllDataFiles,AllParameters,app)
NumOfFiles=[ length(AllDataFiles.TimeStampsfileList) ...
length(AllDataFiles.ManuallyDefinedEventsfileList) ...
length(AllDataFiles.Video1BehavioralfileList) ...
lengt... |
c619859a3908dfbb513e9667424f94f86abff0c199d9691dc7a027155918abfe | MATLAB | 36,852 | 884 | % GETTING STARTED WITH CLASSIFICATION
%
% This is the go-to tutorial if you are new to the toolbox and want to
% get started with classifying data. It covers the following topics:
%
% (1) Loading example data
% (2) Cross-validation and explanation of the cfg struct
% (3) Classification of data with a time dimension
% ... |
73299d3595ce1fac6481dee188ce08646a8831c6351adc116175a9a2db6d1024 | MATLAB | 37,002 | 956 | 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 v... |
4f9a9abc43f7806adecbdd538f44637ca3f5c585bd3fb5764d6741ee271d8fd5 | MATLAB | 37,237 | 829 | %==========================================================================
% This script identifies ripples in local field potentials (recorded on
% iEEG macro-electrodes).
%
% Lukas Kunz, 2022
%==========================================================================
% start
clear; clc; close all;
% settings
param... |
39084240ab1f0b2f100ef6c2cf9a65b50be435027a41469ba5a92617c073185c | MATLAB | 37,970 | 732 | %% Use GLM to assess contribution of different variables
preCSD_3D_pred = cell(1,Nexpt); preCSD_3D_resp = cell(1,Nexpt); preCSD_3D_opts = cell(1,Nexpt); preCSD_3D_result = cell(1,Nexpt); preCSD_3D_summary = cell(1,Nexpt);
figDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( figDir )
GLMname = 'preCSD_3D_GLM_TScShDtS... |
c3494ff70130a94500423dcc931b20280abe1bbc08590a119d78fcdbf438590f | MATLAB | 40,576 | 1,738 |
clc;clear;
format compact;
%% Data import
cd C:\Users\WORM-05\Documents\MATLAB\excel\
data1 = readmatrix('total_connection_arranged_new.xlsx','Sheet','dataset1','Range','C3:HP224');
data2 = readmatrix('total_connection_arranged_new.xlsx','Sheet','dataset2','Range','C3:HP224');
data3 = readmatrix('tota... |
d7d9bd0661d110b7adc1183ec813bb38d8ff57b1092b8baaaeeda75fa110b61c | MATLAB | 40,990 | 1,002 | function varargout = tfce_list(varargin)
% Display an analysis of SPM{.}
% FORMAT TabDat = tfce_list('List',xSPM,hReg,[Num,Dis,Str])
% Summary list of local maxima for entire volume of interest
% FORMAT TabDat = tfce_list('ListCluster',xSPM,hReg,[Num,Dis,Str])
% List of local maxima for a single suprathreshold cluster... |
336bc6270a66cfe9675f9415c7a23ed5ee4920185b7e26b5ee9869b322fda0ea | MATLAB | 42,502 | 875 | function [job, data] = TF_prepare_contrast_data(job, data)
% [job, data] = TF_prepare_generic_data(job, data)
%
% Add aggregated TF-domain data sets for selected contrast, channels,
% frequency bands to job object previously set up via TF_update_job.m
% Preliminary data sets created via TF_prepare_contrast_data.m
%
... |
108607940ef747e6156ff0514437ae182c76e1512ffdd16a78cc7e4f9177bbe1 | MATLAB | 44,784 | 1,082 | %% Open ephys data analysis
% First run "load_open_ephys_binary.m" to extract data for each recording,
% then modify and run "Extract_and_save_20211021.m" to organize the data format
% then load the data and stimulus timestmaps
clear;clc;
[fileName pathName]=uigetfile('*.mat','Select .mat file',...
'Z:\SNM\l... |
5f3c6aae0038fe4dff27d4de195397d8602cab8d1c0e75ce28811dc71f5374e9 | MATLAB | 44,924 | 1,088 | classdef network_simulation_beluga
properties
tmax
branchNo
neurons
outputPath
postNetwork
preNetwork
spikingFile
savePath
parameters
end
properties (Constant)
resourceFolder = 'E:\Research_Projects\004_Propofol\manuscript\Nat... |
969705b119be8d80343dd08185d7114448ef46df6be7f07c6a5a7ef151b01c88 | MATLAB | 45,053 | 1,082 | function varargout = spm_list(varargin)
% Display an analysis of SPM{.}
% FORMAT TabDat = spm_list('List',xSPM,hReg,[Num,Dis,Str])
% Summary list of local maxima for entire volume of interest
% FORMAT TabDat = spm_list('ListCluster',xSPM,hReg,[Num,Dis,Str])
% List of local maxima for a single suprathreshold cluster
%
%... |
15c55905f2155a18ccd0642aa6b713c96a8f92885b723a8706373a234323918c | MATLAB | 45,095 | 1,090 | %% Open ephys data analysis
% First run "load_open_ephys_binary.m" to extract data for each recording,
% then modify and run "Extract_and_save_20211021.m" to organize the data format
% then load the data and stimulus timestmaps
clear;clc;
[fileName pathName]=uigetfile('*.mat','Select .mat file',...
'D:\Data\... |
8d00e765b17fc994a95127c6aad0cd41bd44ed1233e054cbed6b1bdd4b041228 | MATLAB | 46,305 | 1,109 | % POV_TREE POV-Ray rendering of trees.
% (trees package)
%
% [name path, rpot] = pov_tree (intree, name, v, ipart, options)
% --------------------------------------------------------------
%
% writes POV-ray files using the anatomy-data contained in intree.
%
% Input
% -----
% - intree ::integer: index of tre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.