sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
175fae56ccf94f3d443e2a85dcc8fed4ab71a313961f7f4f3fe92693125bf919 | MATLAB | 5,635 | 143 | classdef MultiChImg < CompositeImg
%MultiChImg - Class to contain images from an multi-channel raw image
%
% The MultiChImg class implements most functionality related to groups of
% ProcessedImg objects that are derived from the same RawImg object,
% which should contain multiple channels. This allows efficient ... |
46b7dec27aa6165d1f0fce34db151d29bd273199c99a3254804f9666a941166d | MATLAB | 5,635 | 176 | % CAT_TREE Concatenates two trees.
% (trees package)
%
% tree = cat_tree (intree1, intree2, inode1, inode2, options)
% -----------------------------------------------------------
%
% Concatenates two trees (the second onto the first) at respective
% positions within the branching structure. Sorts the indices accordin... |
5b1d9a4c009469b66b0ee7ff4a459aba1c115776f6811a10f60a28a3fad7e0e4 | MATLAB | 5,644 | 172 | % MORPH_TREE Morph a tree's metrics without changing angles or topology
% (trees package)
%
% tree = morph_tree (intree, v, options)
% --------------------------------------
%
% Morphs a tree's metrics without changing angles or topology. Attributes
% length values from v to the individual segments but keeps the bran... |
3009701c8221009ae4e9d5f3b2c780c5e45e6aff73f689063816ba41581f9aa0 | MATLAB | 5,648 | 135 | classdef ConfigMeasureROIsDummy < ConfigMeasureROIs
%ConfigMeasureROIsDummy - Parameters for basic measuring of signals
%
% The ConfigMeasureROIsDummy class is a dummy configuration class that is
% used when only taking basic measurements from ROIs.
%
% ConfigMeasureROIsDummy is a subclass of matlab.mixin.Copyabl... |
721f5b33aa3fcbf5500dd5a35b74da0bf4ed8ebc81f734a2aa9ecc5ccc431d8c | MATLAB | 5,650 | 157 | function varargout = split1(self, dim, dimDist)
%split1 - Split the image data along a given dimension
%
% [OBJA, OBJB, ...] = split1(OBJ, DIM, DIMDIST) splits a raw image object
% into smaller RawImgDummy objects along the dimension DIM, based on the
% distance vector DIMDIST. The number of output arguments is ... |
c256c9697c16adeedff3cc3916341493b350df0d9e1a9293ecec56db25dd7f39 | MATLAB | 5,650 | 114 | function [W1,Wp,Clist_GT, case_mtx, ctrl_mtx, threshold_GT] = sampling_ind_ttest(ctrl_num, case_num, N, sigma0, theta, cluster_size, rho_in, rho_out, L, Reliability)
% sampling_ind_ttest - Simulates independent t-tests on data with specified reliability and effects
%
% Syntax: [W1, Wp, Clist_GT, case_mtx, ctrl_mtx,... |
927dfc3f01fd0d15e23245196e149b514d0d8a6c3ff81a9d7bc6ae7dde603fa9 | MATLAB | 5,660 | 169 | function [out] = EEGfMRIPav_cbm_mod07_modSim(parameters, subj)
% Standard Q-learning model with delta learning rule and Go bias and
% Pavlovian response bias and Pavlovian learning bias and single
% perseveration parameter.
% 1) Feedback sensitivity:
nd_rho = parameters(1); % normally-distributed rho
rho ... |
2051969547b4dff45c550e20e1c1cecb54dd8f14e705a40df7d5d93518a862de | MATLAB | 5,663 | 114 | function [W1,Wp,Clist_GT, case_mtx, ctrl_mtx, threshold_GT] = sampling_ind_ttest(ctrl_num, case_num, N, sigma0, theta, cluster_size, rho_in, rho_out, L, Reliability)
% sampling_ind_ttest - Simulates independent t-tests on data with specified reliability and effects
%
% Syntax: [W1, Wp, Clist_GT, case_mtx, ctrl_mtx,... |
d6d93f4129416af38a3b9552a336f4bba8e5b1d71dd78b63db961ae1e29f58e9 | MATLAB | 5,664 | 309 | %first column = channel number on probe. Convention is ch. 1 is at top left of PCB
%and number wrap around in counter-clockwise fashion.
%second column = x coordinate, horizontal distance to reference electrode in microns. Convention is
%for reference electrode to be at bottom left corner of array when array
%points... |
261e1ecd309134bb771430c4ffe9c820e21b29aa9cd0313358c572a204885702 | MATLAB | 5,666 | 308 | %first column = channel number on probe. Convention is ch. 1 is at top left of PCB
%and number wrap around in counter-clockwise fashion.
%second column = x coordinate, horizontal distance to reference electrode in microns. Convention is
%for reference electrode to be at bottom left corner of array when array
%points... |
e6189c423e78584927174b0648c5808ae1f837e84b587f60f6eac4291deaba38 | MATLAB | 5,667 | 166 | %% RawImgDummy
% Store 'dummy' raw image data
%% Usage
% OBJ = RawImgDummy(FILENAME, CHS, CAL, ACQ)
% OBJ = RawImgDummy(NAME, RAWDATA, CHS, CAL, ACQ)
%% Arguments
% * |FILENAME| is the original filename (including the path) of this
% |RawImgDummy| object.
% * |CHS| is a scalar structure that contains information ... |
55ff0cc41594165adb88bcac92286674ee0530fa507969d75953dbb0e47a54c0 | MATLAB | 5,673 | 128 | function fluor = GetAxonFluor(expt, sbxInfo, axon, fluor, deform, varargin)
%
IP = inputParser;
addRequired( IP, 'expt', @isstruct )
addRequired( IP, 'sbxInfo', @isstruct )
addRequired( IP, 'axon', @isstruct )
addRequired( IP, 'fluor', @isstruct )
addRequired( IP, 'deform', @isstruct )
addParameter( IP, 'windo... |
ca82065af965129ff4b6ad65dc07d294f7fd251fb05b7ed4597653c6381bee69 | MATLAB | 5,676 | 222 | % This code solves mean field (MF) and linear stability (LS) equations to
% compute state diagrams.
%
% The code reproduces Fig.2A,B, the state diagrams shown in Fig.5A,B,
% and saves computed synaptic conductance parameters for the steady and
% critical state primary networks in the "Parameters" subdirecto... |
666faf5a78847b52c07f7f26c41afa5a10da08ac7e47d8e75b9a10b56e43113b | MATLAB | 5,677 | 142 | function power = covariate_net_reg(subject_num, N, sigma0,...
f2, DF, rho_in, rho_out, cluster_size, Covariance, ...
FWER_threshold, M_rep, M_perm, Reliability, Useparallel, Method)
%COVARIATE_NET_REG Estimates power of network based on covariate regression.
%
% This function estimates the statistical po... |
34e3e9d8dda045059cc592db835b76571e39c668a6820dbc9ec27499d3ac4b26 | MATLAB | 5,684 | 135 | function TF_save_mask(job, data, stat)
% TF_save_mask(job, data, stat)
%
% Save mask (T-values above threshold) for given contrast as yielded by
% cluster-based permutation test in Fieldtrip.
% DO NOT average over channels or frequencies;
% run permutation test with cfg.avgoverchan = 'no'; cfg.avgoverfreq = 'no';
% on... |
83b1072f16993a25e11ae1dca83768aecf482cfbe4f7a9f2f16bde90327342ea | MATLAB | 5,697 | 126 | loadParameters;
filename_centroids = fullfile(params.punctaSubvolumeDir,sprintf('%s_centroids+pixels.mat',params.FILE_BASENAME));
load(filename_centroids,'puncta_centroids','puncta_voxels')
%% Collect the subvolumes we started this with, but now only with the pixels from the puncta!
num_insitu_transcripts = size(punct... |
b55090a5d028198791b7da88a718c02057a1ef11d91caa1b0eefdf2359c8c048 | MATLAB | 5,701 | 147 | function power = covariate_net_ttest(n1, n2, N, sigma0, ...
Cohensd, rho_in, rho_out, cluster_size, Covariance,...
FWER_threshold, M_rep, M_perm, Reliability, Useparallel, Method)
%COVARIATE_NET_TTEST Estimates power of data-driven network anlaysis based
% on a two-sample t-test.
%
% This function est... |
be27032fc1fe3efa4ef1adc315867bc32f9fd7311e2bab20ad115bb844ebe21d | MATLAB | 5,711 | 131 | % sim_megapress_shaped.m
% Jamie Near, McGill University 2014.
%
% USAGE:
% sim_megapress_shaped(n,sw,Bfield,linewidth,taus,sys,editPulse,editTp,editPh1,editPh2,refPulse,refTp,Gx,Gy,dx,dy,refPh1,refPh2)
%
% DESCRIPTION:
% This function simulates the MEGA-PRESS sequence with shaped
% localization pulses and shaped edit... |
8fae697f7b2664f47a2e47ff0a4f478faca05fbcd98769d3f3766f210b50a972 | MATLAB | 5,719 | 142 |
puncta_present = ones(N,readlength);
%Get the total number of voxels involved for the puncta
%used to initialize data_cols
total_voxels = 0;
for n = 1:N
total_voxels = total_voxels + length(puncta_set_cell_filtered{1}{n});
end
puncta_set_normalized = puncta_set_cell_filtered;
%Create a clims object for each rou... |
b1b52826fcf1ca537fee37d448c23e476d8dc10caaa2c38ee423107255c1a271 | MATLAB | 5,722 | 146 | function BLKHeader = blkGetHeader(fnBLK)
%% Get the header from a BLK imaging file
% Appendix A in VDaqTasks3001.pdf
% fnBLK is the BLK filename incliding pathname.
%
%
% YC at ES lab
% Created on Apr. 13, 2008
% Last modified on Apr. 14, 2008
%% Open file
fid = fopen(fnBLK,'r','l');
if fid==-1
error(['Invalid filen... |
c53bbd50076f5b108faa4a41432587b761cc3eef509f6907cf15b42a7a9cec1a | MATLAB | 5,724 | 141 | function [placesupercell,pFR] = placefieldidentifierrRH(pc_ID,inX,...
idX,idXX,numoT,spktimes,spkpos,rawTC,spaBin,mazepart)
%Place field identification in each trial in stem
%input variables: ihmtx2Scorr (inX), clusteredPCS (idX), ihavePF (idXX),
%constrialnum (numoT), spatbins2 (spaBin), unitPTP_arm (spktime... |
f23dcd2d2f952505e1c2f42811c5416aca775854ea21d068342ddebc93f7f4eb | MATLAB | 5,729 | 191 | % INSERTP_TREE Insert nodes along a path in a tree.
% (trees package)
%
% [tree, indx] = insertp_tree (intree, inode, plens, options)
% -----------------------------------------------------------
%
% Inserts nodes at path-lengths plens on the path from the root to point
% inode. All Nx1 vectors are interpolated linea... |
03dea7175376f8cacd846fa87d2045d614a10f5cd0135b6205de55aea5d6c275 | MATLAB | 5,735 | 170 | % Classifier unit test
%
% Classifier: libsvm
% Note: the classifier itself is not being tested since it's external but
% rather the MVPA-Light interface.
rng(42) %% do not change - might affect the results
tol = 10e-10;
mf = mfilename;
%% first check whether LIBSVM is available
check = which('svmtrain','-all');... |
ca230a6469f76b664f0aca316380d844ca13813becbdf7cdb8b6105d60f30c93 | MATLAB | 5,736 | 156 | % op_alignAverages_fd.m
% Jamie Near, McGill University 2014.
%
% USAGE:
% [out,fs,phs]=op_alignAverages_fd(in,minppm,maxppm,tmax,med,ref);
%
% DESCRIPTION:
% Perform time-domain spectral registration using a limited range of
% frequencies to correct frequency and phase drifts. As described in Near
% et al. Frequen... |
58b6e1c7e7e9044a5a8aa0058da8ba7d8b06b565e5b05b3a8dea36f2818a1dfd | MATLAB | 5,746 | 252 |
close all force
%
clear
load('a0_0_bhv2trialStrct.mat');
load('a19_2_distWithinAndBetweenEachTrial.mat', 'distToMeanSameCondition', 'distToGrandMean')
load("a22_1_NewVarDistance.mat",'distT','distW')
distToMeanSameCondition = distW'.^2;
distToGrandMean = distT'.^2;
load("a22_2_NewVarDistancePermute.mat", "distT", ... |
d0413e6a5eee83b6073a11b2a10ae021867554b805c28baacf2122b42fc0028a | MATLAB | 5,747 | 120 | function [nuMF,mf] = mfa(sp)
% Computes MF population firing rates, synaptic currents, and
% dimensionless slope of current-frequency response function
%
% Input:
% sp - structure providing neuron and synaptic parameters
% Output:
% nuMF - population firing rates for E and I neurons... |
cf8c0db18af74575cfbbea2abc9ca0d2917709ec1d64c41d63e4d8b149d25a29 | MATLAB | 5,751 | 150 | function hardwareContinuousVoltage(fname)
% A simple example showing hardware-timed continuous analog input using the Vidrio dabs.ni.daqmx wrapper
%
% function vidrio.AI.hardwareContinuousVoltage
%
% Purpose
% Demonstrates how to do hardware-timed continuous analog input using Vidrio's dabs.ni.d... |
b34f1996a6612edeb163229e87fa0dcd525f79da800ced2de3bba8175c4d8a0c | MATLAB | 5,765 | 154 | function rawImg = cat_data(varargin)
%cat_data - Concatenate the data from RawImg objects
%
% OBJ = RawImg.cat_data(RAWIMG1, RAWIMG2, RAWIMG3, ...) concatenates the
% data from the RawImg objects into a new RawImgDummy object. By default,
% the images frames are appended; see below for more options. The RawImg
%... |
62ec1792d0b60eba245da2d690dcb555bc8f2e7d3e328db80ab87fd1f87567f0 | MATLAB | 5,780 | 171 | classdef SynapseLive < handle
%SynapseLive TDT online data streamer.
% obj = SynapseLive() connects to TTank server and opens currently
% recording block in Synapse
%
% obj.data reference to all available data from block
% obj.update get latest data from current block
% ... |
d975e440ceabb29c72844d4a9cd683cc1b0837abf76bab052e6b3bac9d826a4a | MATLAB | 5,780 | 181 | % LEGO_TREE Lego density plot of a tree.
% (trees package)
%
% [HP, M] = lego_tree (intree, sr, thr, options)
% ----------------------------------------------
%
% Uses "gdens_tree" to plot the density matrix of points in a tree.
% Opacity and colors increase with density.
%
% Input
% -----
% - intree ::integer: ... |
d94847719023d38d9dedd92c7d4051b440207069931291ccc3b879fdac7f4475 | MATLAB | 5,791 | 171 | classdef SynapseLive < handle
%SynapseLive TDT online data streamer.
% obj = SynapseLive() connects to TTank server and opens currently
% recording block in Synapse
%
% obj.data reference to all available data from block
% obj.update get latest data from current block
% ... |
66302f1f9bdc08f2952773c195892a05f7e53b2d76e324c484c0500290a6cb47 | MATLAB | 5,803 | 213 | function hgfTC = DisplayTimeCourseWCortex(fnRoot,AvgCondDisp,iCondDisp,iCondMinus,lCondDispComb,CORTEX)
%% function hgfTC = DisplayTimeCourseWCortex(fnRoot,AvgCondDisp,iCondDisp,iCondMinus,lCondDispComb,CORTEX)
%
% Display time course
%
% Input:
% - fnRoot: identifier of the data run
% - AvgCondDisp: average respo... |
d26e5a2310eb23d7ba3faf3534adf68a0285015b617c2b27b32532f057353511 | MATLAB | 5,803 | 142 | function taft_postprocess_TF_topoplot(job, dirs, Tvalues, iROI, startFreq, endFreq, startTime, endTime, steps, zlim, isSave)
% taft_postprocess_TF_topoplot(job, dirs, Tvalues, iROI, startFreq, endFreq, startTime, endTime, steps, zlim, isSave)
%
% For fMRI-EEG regression weights for selected ROI, looping over frequenc... |
88f15f07459e95d52dcf17bc00808801a7d3ed138615b2f384a74e82ed67ac8f | MATLAB | 5,810 | 94 | %% How to distribute ion channels on morphologies with T2N
% Note: "channel" and "distributed mechanism" are used analogous here. All distributed
% mechanism specifications are set in the 'mech' field of the neuron structure,
% where each cell/morphology has its own cell entry (e.g. {1} is the entry for
% the first ... |
b1d1d56e8e1d5f9c2a9d6bcc3c772ab999e7973a0eae386a3d58ac62a85966c2 | MATLAB | 5,816 | 173 | function [out] = EEGfMRIPav_cbm_mod08_modSim(parameters, subj)
% Standard Q-learning model with delta learning rule and Go bias and
% Pavlovian response bias and Pavlovian learning bias and separate
% perseveration parameters for Win and Avoid cues.
% 1) Feedback sensitivity:
nd_rho = parameters(1); % normally-d... |
d2bfd3fd461a590a3797757258e7e6ef1d21ad10cd0aab646370327f6ff62741 | MATLAB | 5,821 | 126 | function EEGfMRIPav_sliceDisplay_cope(dirs, job)
% EEGfMRIPav_sliceDisplay_cope(dirs, job)
%
% Plots slice of given contrast for given GLM using slice display toolbox.
% Encode PEs with color and zstat with opacity.
%
% Before using: mind to set directories/paths in slice_display_set_dirs to respective toolboxes neede... |
4f09b5af2c6733da296def5c02d52df3f938ba401e542e5d2df7565312770801 | MATLAB | 5,828 | 164 | classdef Test_MultiChImg < matlab.unittest.TestCase
%TEST_MULTICHIMG Summary of this class goes here
% Detailed explanation goes here
% ================================================================== %
methods (Test)
function testConstructor(self)
% ... |
23086ddc41053a9565147a2e75a7b79fd645ec24d1a8bd02646a7c6d1a807559 | MATLAB | 5,834 | 163 | % overlay.m
% Used as a callback function in sim_CSIoverlayMRI to overaly CSI data onto
% MRI. The overlay is done with spm_image first, so spm needs to be installed.
% Coordinates are in RAS or neurological coordinates (ie, right = x, anterior = y, superior = z.
%
% USAGE:
% overlay((optional) plot_type, (optional) in... |
9d45d33c5d92b22e41809c93b1ba72b0517b1eff6fac166813209a87a68f6064 | MATLAB | 5,837 | 211 | function data = st_plot_EccSigma(df,binsize)
% rmPlotEccSigma - plot sigma versus eccentricity in selected ROI
%
% data = rmPlotEccSigma(v, lr, [fwhm=0], [plot_position_variance], [plotFlag=1]);
%
% INPUT
% v: view
% lr: left (1) or right (2) if FLAT view is used
% fwhm: plot sigma (0) or fwhm (1)
% plot_pv: p... |
1760fac9fcc5070594ecc41d5cc6cb4728f236f4d7aac49febc98930e7556085 | MATLAB | 5,849 | 254 | do not use this, instead use
close all force
%
clear
load('a0_0_bhv2trialStrct.mat');
load('a19_2_distWithinAndBetweenEachTrial.mat', 'distToMeanSameCondition', 'distToGrandMean')
load("a22_3_NewVarDistanceBootStrp.mat",'distT','distW')
distToMeanSameConditionBt = distW.^2;
distToGrandMeanBt = distT.^2;
%load("a22... |
68f090671d5a1d575ef65f6c75811d3371e17558332a17768031097ddb2fbc3a | MATLAB | 5,851 | 124 | function [csdBout, csdStat, csdParam] = PeriCSD(expt, T, loco, deform, fluor, defVars, varargin) % , periParam
IP = inputParser;
addRequired( IP, 'expt', @isstruct ) %addRequired( IP, 'infoStruct', @isstruct )
addRequired( IP, 'T', @isnumeric )
addRequired( IP, 'loco', @isstruct )
addRequired( IP, 'deform', @isstr... |
c05c5991e8bca9dbca658b9b9d252e73a1e430e481d679ff341cd271e7bb2932 | MATLAB | 5,854 | 147 | classdef (Abstract) CalcDetectSigs < Calc
%CalcDetectSigs - Superclass for CalcDetectSigs classes
%
% CalcDetectSigs is an abstract superclass that implements (or requires
% implementation in its subclasses via abstract methods or properties)
% most functionality related to CalcDetectSigs objects. Typically ther... |
5b6f397393d4d016bb5639153f73cf185245e64fc30ce2c1068d82df4daaf415 | MATLAB | 5,857 | 183 | function options = ml_options(varargin)
% ML_OPTIONS - Generate/alter options structure for training classifiers
% ----------------------------------------------------------------------------------------%
% options = ml_options('PARAM1',VALUE1,'PARAM2',VALUE2,...)
%
% Creates an options structure "options" in whi... |
75d1efdb76843b8c3eb8beb0633144c25c9549cc46f7e4f20e62c4071b54faac | MATLAB | 5,857 | 192 | load(fullfile(dataFolder,'EEG_data','data_time_information.mat'));
t0 = timeInfo.infusion_onset-timeInfo.object_drop;
fits = load(fullfile(dataFolder,'EEG_data','Eq6_fits','electrode2_Cz.mat'));
[t,p,pum,tauFold,pBins,M,tau] = marsh_model(timeInfo,fits);
tauOrser = [19.4,29.6,44.5]/19.4;
pOrser = [0,0.5,2];
tauKita ... |
7d3118d3eceb39306667aa5b96847926d700482d7ef005541c6055bb2ae8b8f9 | MATLAB | 5,863 | 188 | load(fullfile(dataFolder,'EEG_data','data_time_information.mat'));
t0 = timeInfo.infusion_onset-timeInfo.object_drop;
rescaled = load(fullfile(dataFolder,'EEG_data','electrode2_Cz_rescaled_time.mat'));
freq = rescaled.freq;
load(fullfile(dataFolder,'EEG_data','Eq6_fits','electrode2_Cz_baseline_and_preLOC.mat'),'pars_b... |
986c343c26da91129d919a0addaf8ad81681737b50b33c08aa8b6dde82432ca8 | MATLAB | 5,863 | 169 | function couple_script(paramfile)
%% Import parameters
fid = fopen(paramfile);
tline = fgetl(fid);
while ischar(tline)
eval(tline);
tline = fgetl(fid);
end
fclose(fid);
%% Load mesh
mesh = mesh_load_gmsh4([meshpath meshfile]);
gm_surf = mesh_extract_regions(mesh,'elemtype','tri','region_idx',1002);
%% Load neur... |
2a00dcd20d34f7cd2d52588d3137d63ad05ade10b172ecd6f1d8fda3216a0976 | MATLAB | 5,864 | 155 | function meanAbsValue = taft_postprocess_TF_allSubjects(job, dirs, sortBetas, iROI, selChans, zlim, nCol, isSave)
% meanAbsValue = taft_postprocess_TF_allSubjects(job, dirs, sortBetas, iROI, selChans, zlim, nCol, isSave)
%
% Plot 2D (frequency x time) t-values given selected channels for each
% subject in one grid of ... |
23b28bca13642011f579e7122dd3876b974f944e15e68f3f60f451355f5e731c | MATLAB | 5,876 | 101 | % 'start_pattern_separation' Script to check if pattern separation
% dependencies are installed on this system and add necessary folders to
% the path.
%
% (pattern separation toolbox)
%
% Example
% -------
% start_pattern_separation % Check dependencies are installed and add necessary subfolders to the path
%
% the p... |
c3ab542546cfe6943b32797fb31ccc7ebbdfd215ecafdc4f80fb8c7ca77dc093 | MATLAB | 5,879 | 171 | clear all
%close all
rng(0)
%dataFileName = 'C:\David\Phd2020\ElectordesClassification\imputedDataThetaEmptyColumnsRemovedMouseID.xlsx';
%dataFileName = 'C:\David\Phd2020\ElectordesClassification\imputedDataThetaEmptyColumnsRemovedMouseIDJustTheta.xlsx';
%dataFileName =
%'C:\David\Phd2020\ElectordesClassification... |
25deb4f2237555224a1dfbee58f023f8a57b230c8c10911d06aae0148ea3245f | MATLAB | 5,884 | 125 | function [csdBout, csdStat, csdParam] = PeriCSD(expt, T, loco, deform, fluor, defVars, varargin) % , periParam
IP = inputParser;
addRequired( IP, 'expt', @isstruct ) %addRequired( IP, 'infoStruct', @isstruct )
addRequired( IP, 'T', @isnumeric )
addRequired( IP, 'loco', @isstruct )
addRequired( IP, 'deform', @isstr... |
bbc99f06965f17a1e3399e9fd30e50b8f72f8e58f53012ce043c0feb4d6f2881 | MATLAB | 5,893 | 167 | classdef Test_SCIM_Tif < matlab.unittest.TestCase
%TEST_SCIM_TIF Summary of this class goes here
% Detailed explanation goes here
properties (Constant)
fnSCIMLineScanVel = 'linescanvel_scim.tif';
fnSCIMFrameScan = 'framescan_scim.tif';
fnSCIMLineScanDiam = 'linescandiam_scim.t... |
6312faa797e97bc2af76d8009c5e435eb4311a28f16c83416b01e7a2511ae43a | MATLAB | 5,900 | 214 |
clear
close all force
warning on
hWB = waitbar(0,'checking the trials ...');
hWB1 = waitbar(0,'checking the trials ...');
%load tirals info
load('a0_0_bhv2trialStrct.mat');
%%
for iFaceAll = 1:2
if iFaceAll == 1
NIImage_Individual = [22];
else
NIImage_Individual = [...
7
9
11
2... |
34b38569d3ea4b9f1d281f0bb892a777dd297bf4f3b1d44e1e4f2f3d1950c521 | MATLAB | 5,915 | 137 | classdef simpleOOexample < handle
% Simple example of defining a class in MATLAB
%
% simpleOOexample.m
%
%
% INTRODUCTION
% This class definition file shows how to define a simple example class called "simpleOOexample".
% The class has a single "property". Properties are variables withi... |
2e8881d33112e5c8b39a3afa26865df31498f651579b373e7ab625d06cba1236 | MATLAB | 5,916 | 181 | function EEGfMRIPav_0_excludeChannels(rootDir, iSub)
% EEGfMRIPav_o_excludeChannels(rootDir, iSub)
%
% Interactive script.
% Load complete data of one subject, inspect with
% EEGlab, manually note down channels to be rejected.
%
% INPUTS:
% rootDir = string, root directory of project
% iSub = ... |
cc81b2ac08a491f8cf6c0b082475f821fb1973dc848c07327a2c63f783582f5f | MATLAB | 5,916 | 130 | % Reads simulation results, computes correlation between empirical and
% simulated time series and functional connectivities
%
% USAGE:
% sim_res = postprocess_simulation_results(simulated_fMRI, empirical_fMRI)
%
% INPUTS:
% simulated_fMRI - string that contains filename of hybrid model
% fMRI s... |
5a6f36b0cbc8b6338d0017636759852e473556d7ccf3cbac7d27f2f426573b4b | MATLAB | 5,918 | 174 | %% Description
% The following script performs the cluster permutation statistical analysis
% for comparing condition-specific EEG data as desribed in
% https://doi.org/10.1101/2022.03.03.482861
%
% %
% Requires modification of data paths according to user
%
% %
% Dependencies
% Fieldtrip toolbox (https://ww... |
63b5c5a3a8cf38eba6921dd56896c6227729ddbf5310ce4609f5c3a14663e535 | MATLAB | 5,923 | 143 | % sim_steam_shaped.m
% Jamie Near, Sunnybrook Research Institute 2022.
%
% USAGE:
% out = sim_steam_shaped(n,sw,Bfield,linewidth,sys,TE,TM,RF,tp,dx,dy,Gx,Gy,flipAngle,centreFreq)
%
% DESCRIPTION:
% This function simulates the STEAM experiment. The initial excitation is
% simulated as an instantaneous rotation, and t... |
b833c63bbb48eec311308689bf5ee672b874c24f4c5d7558e9b4195b3d37c612 | MATLAB | 5,934 | 178 | function [out] = EEGfMRIPav_cbm_mod09_modSim(parameters, subj)
% Standard Q-learning model with delta learning rule and Go bias and
% Pavlovian response bias and Pavlovian learning bias and single
% perseveration parameter and neutral outcomes reinterpretation parameter.
% 1) Feedback sensitivity:
nd_rho = param... |
69c07e068e02f338fb76a9487efb369db770c42207e449471997cd2fb48c0516 | MATLAB | 5,943 | 141 | classdef (Abstract) ConfigMeasureROIs < Config
%ConfigMeasureROIs - Superclass for ConfigMeasureROIs classes
%
% The ConfigMeasureROIs class is an abstract superclass that implements
% (or requires implementation in its subclasses via abstract methods or
% properties) all basic functionality related to the config... |
ed0d9d6d9b9a557d99df263cc5278e61c67c47548e0c5fe90b56764d00f0ed21 | MATLAB | 5,946 | 191 | function self = find_ROIs(self, objPI)
%find_ROIs - Identify regions of interest
%
% function self = find_ROIs(self, imgSeq, frameRate, pixelSize)
%
% OBJ = find_ROIs(OBJ, IMG, FRAMERATE, PIXELSIZE) requires passing of a
% CalcFindROIsCellSort object (OBJ), the image sequence (IMG), the frame
% rate of the reco... |
0a9a4022c5cafc74d4eab33fb318044496108fc583ee18588bdd53123da7735e | MATLAB | 5,949 | 144 | % sim_semiLASER_shaped.m
% Dana Goerzen (McGill University, 2019).
%
% USAGE:
% out = sim_semiLASER_shaped(n,sw,Bfield,linewidth,sys,te,RF,tp,dx,dy,Gx,Gy,flipAngle,centreFreq)
%
% DESCRIPTION:
% This function simulates the semi-LASER experiment as described by Oz et al. (2018).
% The excitation is simulated as an in... |
d53e6189bc4709f149247c8360bf43b5f9eec6101710cae3bba2c18ea1ec735f | MATLAB | 5,957 | 152 | function tree = t2n_writeTrees(tree,tname,savepath,server)
% This function transforms the tree file into hoc code and also saves a
% interface file for correct node-section assignment
%
% INPUTS
% tree tree cell array with morphologies (see documentation)
% tname (optional) name after which al... |
9a746725e12f0e6a04bf659c05c7877fa34c0abe5ad309d649944257cd716a74 | MATLAB | 5,967 | 207 | clear
clc
close all
%%
subs=30;
condition=2;
frequency=60;
blocknum = 12;
channum=9;
home_path=[pwd,'\temporary data\figure8_data\'];
Amplitude_hs=[];Ampspec_hs=[];Snr_hs=[];snrspec_hs=[];
for subnum=1:subs
filename=[home_path,'amp_',num2str(subnum),'.mat'];
load(filename)
Amplitude_hs(subnu... |
e5f5c21e88c36a8ac7116b924692274a8a44a6bfc556d4fd2109153885dd5241 | MATLAB | 5,967 | 166 |
ROUNDS = 1:params.NUM_ROUNDS;
for roundnum = ROUNDS
summed_norm = load3DImage_uint16(fullfile(params.registeredImagesDir,sprintf('%s_round%.03i_%s_%s.%s',params.FILE_BASENAME,roundnum,params.PUNCTA_CHANNEL_SEG,regparams.REGISTRATION_TYPE,params.IMAGE_EXT)));
if ~exist('total_summed_norm','var')
... |
0688b593cf545197b9170a4b83b2cccaed6b3556658f3cf24a11d95ceed70105 | MATLAB | 5,972 | 152 | classdef (Abstract) CalcVelocityStreaks < CalcVelocity
%CalcVelocityStreaks - Superclass for CalcVelocityStreaks classes
%
% CalcVelocityStreaks is an abstract superclass that implements (or
% requires implementation in its subclasses via abstract methods or
% properties) most functionality related to calculating... |
1342ac4db2ac427f1648cb814b1b6004be10c64c8b8f4107cfe63e4a43108a16 | MATLAB | 5,983 | 182 | function [ica_sig, ica_filters, ica_A, numiter] = CellsortICA(mixedsig, ...
mixedfilters, CovEvals, PCuse, mu, nIC, ica_A_guess, termTol, maxrounds, ...
strMsg)
% [ica_sig, ica_filters, ica_A, numiter] =
% CellsortICA(mixedsig, mixedfilters, CovEvals, PCuse, mu, nIC,...
% ica_A_guess, termTol, maxrounds)
%
%CE... |
71e446a0b5f38f163c0ebc46f7bb9cbe489c7c9ce0ca184656e9db57de0f6122 | MATLAB | 5,998 | 132 | function EEGfMRIPav_sliceDisplay_conjunction(dirs, job)
% EEGfMRIPav_sliceDisplay_conjunction(dirs, job)
%
% Plots conjunction of 2 contrasts at multiple cluster-forming thresholds
% using slice display (load files into layers using different file name
% format). Code zstat with both color and opacity.
%
% Before usin... |
3f11dd87ebefb10bb5016a8d5ac459d48317cd1f155119adcc3bdceeaa6aa9c9 | MATLAB | 6,007 | 206 | %% XSectScan
% Analyse cross section images of vessel diameters
%% Usage
% OBJ = XSectScan(NAME, RAWIMG, CONFIG, CH, ISDP)
%% Arguments
% * |NAME| is the name for this |LineScanVel| object.
% * |RAWIMG| is the |RawImg| object that will be used to create the
% |LineScanVel| object.
% * |CONFIG| contains the configur... |
95f8f3b522722e34727e26b1ab2c562266c256fdaf2314241ef6d86c5c75c95e | MATLAB | 6,008 | 162 | function ac=savefor_Figure10(subnum)
load([pwd,'\temporary data\ccabp_m.mat']);
ccabp_m;
load([pwd,'\temporary data\fbcca_abn.mat']);
fbcca_abn; %2*3*3(a b n)
freq_band=3;
frequency=[2 3 4 5 ;12 13 14 15; 40 41 42 43];
blocknum=12;
channum = 9;
condition=2;
category=4;
stimtime=5;
fs = 1000;
downsampler... |
467a3b7eca2b3c07f3da091dfd3fa602249bbffe370dd6c0b50129d2e2e64fad | MATLAB | 6,020 | 156 | % op_B0Correction.m
% Jamie Near, McGill University 2021.
%E dits from Brenden Kadota, 2021.
%
% USAGE:
% [out, phaseMap, freqMap]=op_B0Correction(in, (optional) phaseMap);
%
% DESCRIPTION:
% Corrects for slight B0 shifts by aligning all voxels to the voxel with
% the highest water peak. (Possibly not correct output as... |
602cdf25f0047220fdf246ad758bf8e44b46159f7346d43208d35984402f6bfa | MATLAB | 6,032 | 147 | classdef updater_tests < matlab.unittest.TestCase
% Simple tests of the updater pipeline
properties
vStruct % version structure
end %properties
methods(TestClassSetup)
function getVersion(obj)
obj.vStruct = zapit.version;
end
end
methods (Test)
f... |
7dcc6e2d825b2683348fbb969811602baebe65674a974c474e9ac531d8b70825 | MATLAB | 6,034 | 160 | classdef sine_AO_AI < handle
% Demonstration of simultaneous analog input and output with the dabs.ni.daqmx wrapper
%
% vidrio.sync.sine_AO_AI
%
%
% Description:
% This class does continuous data acquisition (AI) and signal generation (AO).
% See the vidrio.mixed package for detai... |
df657b54107979111e89ada77f71ff3a2e8c9471e8dfc031a1adfdf9f70d9299 | MATLAB | 6,034 | 181 | function [X,ndx,dbg] = natsortfiles(X,rgx,varargin)
% Alphanumeric / Natural-Order sort of a cell array of filename/filepath strings (1xN char).
%
% (c) 2014-2019 Stephen Cobeldick
%
% Alphanumeric sort of a cell array of filenames or filepaths: sorts by
% character order and also by the values of any numbers tha... |
ce5116d4c31860066fe39ec4d66e8886a6d919a29813d3dd26dc759b3d539f86 | MATLAB | 6,040 | 143 | function mesh_save_gmsh(m,filename)
% Write the mesh struct m to a Gmsh mesh file of.
% USAGE:
% MESH_SAVE_GMSH(mesh_struct, filename)
% mesh_struct can contain fields:
% - points (np x 3)
% - lines (nl x 2)
% - line_regions (nl x 1)
% - triangles (ntr x 3)
% - triangle_regions (ntr x 1)
%... |
d5e9b3668816ad5cc2b315225c4de4c2b355e440cd4eadbe010c475b2662a983 | MATLAB | 6,043 | 148 | classdef ConfigDiameterFWHM < Config
%ConfigDiameterFWHM - Parameters for FWHM-based diameter calculation
%
% The ConfigDiameterFWHM class is a configuration class that contains the
% parameters necessary for calculating diameters based on the full width
% at half maximum (FWHM) approach.
%
% ConfigDiameterFWHM p... |
1a082e985b215d8962ab1b5128d85fea51377057c91f963ffa02ae26d1df87eb | MATLAB | 6,053 | 188 | classdef rcvrOp
% Calibrate receivers from low res data, and apply either forward or
% adjoint receiver operation
%
% Usage: Define rcvr object using R = rcvrOp(input,isCalDat,{apN, kalph}).
% Inputs in {} are optional.
% Use R*im to apply receiver sensitivities to an image and use R'*rcvrIm to
% apply adjoint operatio... |
0d4b964d5582adc473f5648fdeba14d41c80fb3432597ed7fdbf2d005c2992a6 | MATLAB | 6,054 | 172 | % op_plotfid.m
% Jamie Near, McGill University 2015.
%
% USAGE:
% out=op_plotfid(in,tmax,xlab,ylab,tit);
%
% DESCRIPTION:
% Plot the spectrum in the time domain.
%
% INPUTS:
% in = input data in matlab structure format. This argument can be a
% MATLAB structure (formatted according to the FID-A structu... |
3e35d1e02669fd6ccf2dac5de4a5a5099f9a9eee483ee317ea97744a10f95d7e | MATLAB | 6,061 | 180 | function R = slidefun (FUN, W, V, windowmode, varargin)
% SLIDEFUN - apply function to a moving window over a vector
%
% R = SLIDEFUN(FUN, W, V) evaluates the function FUN to a moving window
% of W consecutive elements of the vector V. The function FUN is
% specified by a function handle or a function name and s... |
cc7f1c2078d4844d2aae2934ae54b5e613f5871dfa0bb977cfe1e30016fb4c0c | MATLAB | 6,061 | 204 | function varargout = plot_traces(self, ~, hAxTraces, varargin)
% Copyright (C) 2017 Matthew J.P. Barrett, Kim David Ferrari et al.
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, eit... |
0684a72903ea4cc3a302b9263c21ecacf62e5592eea386173f9e9d351795ecae | MATLAB | 6,066 | 150 | function [volData, binLims, volPaths] = WriteSbxVolumeTif(sbxPath, sbxInfo, varargin)
checkInfo = @(x)(isstruct(x) || isempty(x));
IP = inputParser;
addRequired( IP, 'sbxPath', @ischar )
addRequired( IP, 'sbxInfo', checkInfo)
if isempty(sbxInfo)
[pathDir, pathName, ~] = fileparts(sbxPath); % pathExt
[~,i... |
e6601d557b96b79120d912f5494fa9579923772845bd6441e90b6960b7a65574 | MATLAB | 6,077 | 144 | %% Figure 3C: Seizure heatmap
clear all; close all; clc;
load('Fig3C_AllEEGPower1.mat');
Data=[]; n = a;
for ii = 1:size(EEG1Mat,1)
for jj = 1:size(EEG1Mat,2)
Data(ii,jj).config = config{ii,jj}; Data(ii,jj).eeg1data = EEG1Mat{ii,jj}; Data(ii,jj).eeg2data = EEG2Mat{ii,jj}; Data(ii,jj).emgdata = EMGMat... |
1549a45a41597cac800d5ef6d5a891cd0fdec8c0239e8e4c78289a6bc14a9b92 | MATLAB | 6,086 | 227 | function [respvol,timeVector, zero_ord_vol, other_comps] = getRespComp(inputImage,s,TR,interpolationFactor,doPlot)
imSize = s(1:3);
% Decompose the Image using the SVD
p = reshape(inputImage,prod(imSize),s(4));
[U,S,V] = svd(double(p),"econ");
% Take the first 5 components of the SVD
% first component
componentVecto... |
dfe1859e2d013467fba320afb1a67072b7a05b3f046d139c26b1f57f86aab883 | MATLAB | 6,086 | 119 | load('Fig4_CoSimilarity')
Ntp = size(rw_rsa_temporal_AMY,1) ;
joint_psth = []; coact = [];
for nripple = 1:size(rw_rsa_temporal_HPC,2)
x1 = rw_rsa_temporal_HPC(:,nripple) ;
x2 = rw_rsa_temporal_AMY(:,nripple);
x1_nan= find(isnan(x1)) ; x2_nan = find(isnan(x2));
x1(x1_nan)=nan; x2(x2_nan)=na... |
98f0558d84602fc360573129d0809bc1ea7cc639e8bf4a73301e34fbd4e49954 | MATLAB | 6,088 | 150 | function AO_retriggerable
% Example showing analog output of a finite number of samples, repeatedly triggered by an external TTL signal using the Vidrio dabs.ni.daqmx wrapper
%
% function vidrio.mixed.AO_retriggerable
%
% Purpose
% Shows how to repeatedly trigger an analog waveform using an inco... |
c5a5703895ee851dd035db5ad6d31d68f4fb372a8bc7475eccf8d5e088047b95 | MATLAB | 6,088 | 152 | function zproj_mean = MakeSbxDFT(sbxPath, sbxInfo, shiftPath, varargin)
IP = inputParser;
addRequired(IP, 'sbxPath', @ischar )
addRequired(IP, 'sbxInfo', @isstruct )
addRequired(IP, 'shiftPath', @ischar )
addOptional(IP, 'refChan', 'green', @ischar ) % for scanbox, PMT1 = green, 2 = red. -1 = both
addParameter(IP... |
01d974417c4ac522104244a14345cd5821bf55efa21cb60ba5d0004122881092 | MATLAB | 6,100 | 155 | function taft_postprocess_time_main()
% taft_postprocess_time_main()
%
% Interactive script.
% Main script to load a previously created TAfT object, align data
% (channels) across subjects, do one-sample-t-test across subjects and plot
% as ER (line-) plot and as topoplot.
% Use this script to select fMRI and behavi... |
205e4ea228664e9d38a0496436876d882728d7b7ab6eb72b63b67fb98ff5c801 | MATLAB | 6,103 | 170 |
%Load the set of all pixels of all puncta across all rounds from the
filename_pixels = sprintf(fullfile(params.punctaSubvolumeDir,sprintf('%s_punctavoxels.mat',params.FILE_BASENAME)));
load(filename_pixels)
fprintf('Loaded.\n');
%This is the size of the cropped images, corresponding to ~15um pre-ExM
filename_punct... |
4e3651a44c7107cebb4263b75d444ec3aff210ab7f5d09b20f901c0be86f47da | MATLAB | 6,105 | 154 | classdef ArbLineScan < CompositeImg
%ArbLineScan - Class to contain images from an arbitrary linescan raw image
%
% The ArbLineScan class implements most functionality related to groups
% of ProcessedImg objects that are derived from the same RawImg object,
% which should be an arbitrary linescan. This allows eff... |
7b6ea6f5586d3c4274e224f49d70074bacf204d6085dbf13c7da70453c67299f | MATLAB | 6,109 | 158 | classdef CalcDetectSigsDummy < CalcDetectSigs
%CalcDetectSigsDummy - Class for dummy signal detection
%
% CalcDetectSigsDummy is a CalcDetectSigs class that performs dummy
% signal detection. That is, it simply acts as a placeholder for cases
% where signal detection is not required.
%
% CalcDetectSigsDummy is... |
d5a34f011a15361d63b801de92d4fd16b312222c31b0421f8f303e2d7e96a4be | MATLAB | 6,111 | 167 | function LocoAnalysis2a(inputname, timepoint, timewin)
%inputname='Gi10852';
inputname2=strcat(inputname, '_stimtb.mat');
load(inputname2)
%desired time precision in ms
precision2=10
precision=precision2/1000;
nbbin=floor((timewin)/precision)
%time window for response evaluation in ms
twin=50;
twin=floor(twin... |
fcd9a70223143dd717fedd07fbd8e66aa027bca0efa634b34ea8d0da42abcccf | MATLAB | 6,114 | 139 | function out = LK_PermutationTest_OneSampleAgainstZero_20200708(cfg)
%
% LK_PermutationTest_OneSampleAgainstZero_20200708 performs cluster-based
% permutation testing against zero for two-dimensional data (e.g., n x p).
%
% Note that the statistic is calculated across the first dimension of the
% input data matrix.
%
%... |
6f228eb507e215aa52d5e23594685a150ee2ad39047258c252127cfed885c8ed | MATLAB | 6,116 | 177 | % op_plotspec.m
% Jamie Near, McGill University 2015.
%
% USAGE:
% out=op_plotspec(in,ppmmin,ppmmax,xlab,ylab,tit);
%
% DESCRIPTION:
% Plot the MR spectrum in the frequency domain.
%
% INPUTS:
% in = input data in matlab structure format. This argument can be a
% MATLAB structure (formatted according... |
2d2317eaf14335946454b140ae47b610d96e568da60071d9d55f26e2df56e4f3 | MATLAB | 6,127 | 119 | function tree = CA1pyramidalcell_sort_Jmodel_len (tree, options)
if nargin < 2 || isempty (options)
% DEFAULT
options = '-j';
end
% first sorts the tree into basal and apical. It also saves now the nodes from the axon, if there is one
if any(strcmp(tree.rnames,'soma')) % Only if there is already ... |
726e6b8b50ba7b17cb20ea17dffaf2c6577decba1209f028202b652719f8455c | MATLAB | 6,127 | 225 | function [x,w,info]=nnls(C,d,opts)
% nnls Non negative least squares Cx=d x>=0 w=C'(d-Cx)<=0
% 2012-08-21 Matlab8 W.Whiten
% 2013-02-17 Line 52 added
% Copyright (C) 2012, W.Whiten (personal W.Whiten@uq.edu.au) BSD license
% (http://opensource.org/licenses/BSD-3-Clause)
%
% [x,w,info]=nnls(C,d,opts)
% C Coe... |
087d4a6623e16ea81c22fc4e35b4003985705c297b960204d952782d0db7d4bc | MATLAB | 6,133 | 156 | load(fullfile(dataFolder,'EEG_data','data_time_information.mat'));
t0 = timeInfo.infusion_onset-timeInfo.object_drop;
rescaled = load(fullfile(dataFolder,'EEG_data','electrode2_Cz_rescaled_time.mat'));
rescaled.psd = log10(rescaled.psd);
aligned = load(fullfile(dataFolder,'EEG_data','electrode2_Cz.mat'));
load(fullf... |
f171202c6c4831f8ae3eb07eae0f1567cecd9e7fb93afaae6a3ea99bdd676c1e | MATLAB | 6,136 | 190 | function varargout = tfce_update(update)
% check for new updates
%
% FORMAT [sts, msg] = tfce_update(update)
% sts - status code:
% NaN - server not accessible
% Inf - no updates available
% 0 - TFCE installation up-to-date
% str - new version string (e.g. '1.3.1') available for downloa... |
de4a4717221c14e98cbe55a6c26f41f1254a9c345c14022489fe2f9fbd71ca11 | MATLAB | 6,141 | 189 | function publishreadme(folder, xmlflag, batchflag, outFolder)
%PUBLISHREADME Publish a README.m file to HTML and GitHub-flavored markdown
%
% publishreadme(folder, xmlflag)
%
% This function is designed to publish a README.m documentation and
% examples script to both HTML and GitHub-flavored markdown, making it
% easi... |
96a4b43029a6b4acd3b855dd7a9f111d4bec1170fdfac587641f9f8d1ac2d399 | MATLAB | 6,160 | 160 | classdef ConfigFindROIsDummy < Config
%ConfigFindROIsDummy - Parameters for basic ROI identification
%
% The ConfigFindROIsDummy class is a configuration class that contains
% the parameters necessary for dummy ROI finding.
%
% ConfigFindROIsDummy is a subclass of matlab.mixin.Copyable, which is
% itself a subc... |
ee50b619f2187f84eb7798332d22d10c57950abea24cf58355ecaf59a18774af | MATLAB | 6,160 | 312 | %first column = channel number on probe. Convention is ch. 1 is at top left of PCB
%and number wrap around in counter-clockwise fashion.
%second column = x coordinate, horizontal distance to reference electrode in microns. Convention is
%for reference electrode to be at bottom left corner of array when array
%points... |
b1aa3496d6588daf5de86503128644a10bfe6834ccd3e375120d517309647e98 | MATLAB | 6,163 | 312 | %first column = channel number on probe. Convention is ch. 1 is at top left of PCB
%and number wrap around in counter-clockwise fashion.
%second column = x coordinate, horizontal distance to reference electrode in microns. Convention is
%for reference electrode to be at bottom left corner of array when array
%points... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.