sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
7a084c3773571ab85c1e6fe5b20986b29610b4e8a334683d2f551d1da6e6e07d | MATLAB | 14,521 | 377 | % This script extracts synapse metrics (tile-level “Summary_metrics_*.csv”) that fall within ROIs,
% and exports ROI-wise aggregated CSV files.
%
% [Inputs / referenced files]
% - Config : config/fret_proximity_ratio.json
% The script reads sample_id, down_sampling_factor, and pixel_size from this file.
... |
1ba1e6f1f258fa0e134ff745765f3423f02a16510fd47d0dbf86c95ce356ca1d | MATLAB | 14,524 | 310 | % INPUTGUI - A comprehensive gui automatic builder. This function helps
% to create GUI very quickly without bothering about the
% positions of the elements. After creating a geometry,
% elements just place themselves in the predefined
% locations. It is especially... |
a34b50533df28630fd8d8513fc493ce96dfe5582ad5b2c8350e94c667ffbbf54 | MATLAB | 14,525 | 323 | function SelectStrategy
% Function defines options to evaluate the statistical significance of a
% candidate solution (performance result of a vector) that has been
% tested.
global replicate numComb numFact filename run sheetname
global expMaximum interVarAlgo SelectedSums SelectedSumsSel minNumGoodVect... |
6e8a07a3b88a830cbbd3cb8ecb591afcc2e002be427e7f89008e12b19146df9b | MATLAB | 14,531 | 404 | function HCP_neurosynth_model_perm(task,numperm,yourhcppath,yourpath)
%% do permuataions on CF models
load([yourhcppath '/HCP_CIFTI_INDS.mat'])
% load indices because we saved data in the same order it came in
% vertices and subcortical stored together, this just tells us what is what
load([yourpath '/APARCco... |
d1a2ae135ac812734000b1f83311568547bb3e4c32ac81cfa9865ea428548aa9 | MATLAB | 14,534 | 429 | function data = eventLockKinematics(R, M, eventName, tPts, varargin)
% data = eventLockKinematics(R, eventName, tPts, ...)
%
% Smooth, and time-lock video tracking data from DeepLabCut (3D
% version) from an R struct produced by mergeDLC3R.
%
% Smooth: Use either Savitsky-Golay (default) or Gaussian smoothing.
%
% Time... |
ea68a8e92c69ebe8d0ae560df49391001c16ed25a145e11c0b0e0f0167a24ac9 | MATLAB | 14,534 | 313 |
%% this is for periodic analysis (actual direction)
% training part
clear;
mypath = '/Users/bo/Documents/data_liujia_lab/analysis_liuP1_greeble';
output_key_word = '';
for sub = 1:35
for sess = 1:2:8
% access raw table
mypath_time_record = [mypath, '/sub', num2str(sub), '_mri_record_sinusoid_s... |
4f117b4693a14d20643b5e5fef153e3f5ccde0ab5c0c320b8ea77f1b25db28b4 | MATLAB | 14,536 | 508 | function generateFigure2()
% GENERATEFIGURE2_REVISED Generate Figure 2 for the normalization paper
%
% Purpose:
% Creates a multi-panel figure comparing model and experimental data:
% - Normalization index correlation heat maps
% - Diagonal and anti-diagonal correlation analyses
% - Tuning similarity controls... |
c5aca9eab2149817a1f9b769bc28bf65f946acfccf7d5609583e83b51b7f1ac6 | MATLAB | 14,536 | 345 | function SuppFigure_DynamicalRegime_GaussianNoise(varargin)
%SUPPFIGURE_DYNAMICALREGIME_GAUSSIANNOISE Generate supplementary figure for Gaussian noise regime
%
% Purpose:
% Creates a figure similar to the wave regime but for Gaussian noise conditions,
% comparing normalization distributions, correlations, and curre... |
5aae793e877a86cb08fb2a94341f122586b7e296d0dbe3fa1cedf60192542015 | MATLAB | 14,553 | 346 | %% RIFT cross-correlation analysis
clear
ft_defaults
% load xcorr data
folder = 'Q:/MEG_data/';
filelistL = dir(fullfile(folder, '**', 'xcorL3.mat'));
filelistR = dir(fullfile(folder, '**', 'xcorR3.mat'));
filelistHiL = filelistL([1 5 8 9 13 12 16 17 20 21 24 25 29 27 34 32 36 37 40]); %HIGH-LOW condition (sbj3 exc... |
97f29363bddd9191b57a687d7fef9d3860aea8bb3f544d067ad236cea2f592ac | MATLAB | 14,559 | 333 | function [rho,sigma,Delta_rho,CI95] = fitCARAmodelToRiskyChoices2conds(valRiskyHigh,valRiskyLow,valSafe,chooseRisky,cond,plotFlag,figNameStr)
% function [rho,sigma,CI95] = fitCARAmodelToRiskyChoices2conds(valRiskyHigh,valRiskyLow,valSafe,chooseRisky,cond,plotFlag,figNameStr)
%
% This function fits an economic model of ... |
c16e4ed13c62349b2316ffd25088516b2aa678e5492d8d8f85b3188e66424cf3 | MATLAB | 14,574 | 445 | % all OFC decoding. very long runtime
%location of analysis codebase
codepath = '~/projects/constantinoplelab/Analysis/';
% add code paths
addpath(genpath(codepath))
addpath(genpath(codepath + "david"))
addpath(genpath(codepath + "maggie"))
%%
Etable = load('/Users/dhocker/projects/dynamics/data/maggie/EphysTable.ma... |
e11b908e000b81a1f30192b80e818980dcdca8e516918dcc08d31a04fe675ca0 | MATLAB | 14,578 | 358 | % summarize_metrics_for_paper.m
% Single script: driver + generate_numeric_latex_tables + generate_supp_tables
% Edit CONFIG section below and run.
clearvars; close all; clc;
warning('off');
% ================= CONFIG =================
% Paths and filenames (edit)
fullpath = mfilename('fullpath');
if isempty(fullpath... |
a93e7a8e03b476a7d272e61649ebfd10201c74d11928fd2ff794046d458c9275 | MATLAB | 14,592 | 409 | function Class_rankAndRemove(GenPlots,IT_Fam_VE,HC_Fam_VE,IT_Fam_FR,HC_Fam_FR)
%Class_rankAndRemove
rng(24601)
%{
This function computes classifier performance for groups of units to
observe how the performance changes as a function of population size.
See helper subfunction for additional comments.
Arguments:
GenP... |
ee0f82b369e4f40a1a9baf1e455d919bf2672e003182873b06d068f43ab54451 | MATLAB | 14,613 | 385 | % EEG_MERGECHANNELS - merge the channels of two EEG structure based on
% common event types latencies. This is useful for
% aligning the data from 2 subjects recorded
% simultaneously or from 2 modalities in the same
% subject or to merge... |
a4f91f08614b63cc6b3663ebb4906c7a0752a041066661f8d942c6ac999bea90 | MATLAB | 14,617 | 535 | function coactPaper_figure03()
labelWeight=true;
labelCase=false;
labelSize=9;
letGapX=5;
letGapY=6;
fontsize=6;
close all
fh=initFig('width',8.9,'height',16+1.5,'font','Arial','fontsize',fontsize);
x=11;y=7;
panel_01(x,y,fontsize);
panelLetter2(x-letGapX+2,y-letGapY+2,alphabet(1,labelCase),'fontSize',labelSize,'isBo... |
f1024758f6227067d6e7a794e05eb34fb9ce8a1bdd059fb6c850936c178458c9 | MATLAB | 14,632 | 462 | function generateFigure4()
% GENERATEFIGURE4_REVISED Generate Figure 4 for the normalization paper
%
% Purpose:
% Creates a multi-panel figure showing:
% - Firing rate surfaces for different selectivity/normalization conditions
% - Relative rate change distributions
% - Standard deviation analysis across normal... |
ba113136d0f85d6a23a3f1eace469c6419f0bff7bd9644ed5a28cd557acc227f | MATLAB | 14,635 | 195 | function osp_updateQuantifyWindow(gui)
%% osp_updateQuantifyWindow
% This function updates the quantify tab.
%
%
% USAGE:
% osp_updateQuantifyWindow(gui);
%
% INPUT:
% gui = gui class containing all handles and the MRSCont
%
%
% AUTHORS:
% Dr. Helge Zoellner (Johns Hopk... |
544115c304eb3eacd6eb6b3683b5efec85ec3d605753a89c20df440a98f9687e | MATLAB | 14,636 | 304 | %% miniscope data processing pipeline
% ZZ 2022
% 1. prepare_raw_data
% 2. motion_correction
% 3. cnmfe_large_data_1p
% next step:
% - manual quality control (done in Inscopix_ROIcuration)
% to do:
% - match FOV across days
clear all
close all
%% add matlab paths
addpath(genpath('C:\Program Files\Inscopix\Data Proces... |
f25b1b4f4ded6e3cdc3d37b543a457451553c53de6f38a82674c5f23492991e5 | MATLAB | 14,656 | 349 | % STD_READLIMOFILE- Read limo file into eeglab structure
%
% Usage:
% >> [MeasureData, parameters, MeasureRange1, MeasureRange2] = std_readfilelimo(filestruct,'key', val)
%
% Inputs:
% filestrcuct - Structure with the following fields:
% datasets : Index of he datasets in datasetinfo (real)
% ... |
e3646f7265aee48e4467fbf88099ba225c23a7f8d45ee609889afccf854414a1 | MATLAB | 14,658 | 431 | function [ all_subjects ] = nmri_compare_patient( all_subjects, opt, params )
%[ subject ] = nmri_compare_patient( subject )
% will compare a single patient against the available controls
% will automatically match by exam_id and headmodel
% opt = struct array of options
% .report_regional = includ... |
35c6f6543c0146e04da78d4a5e419af4fa1a4084afe9f5344974456cef7dcb96 | MATLAB | 14,672 | 399 | function [] = JSAnalysis(MouseName)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This function takes in mouse name as the primary argument and will find data saved using SavemicroSDData.m
% This funtion will generate a MouseName_... |
b24be7f1ce3eef0ca08d28ddd2619ce4982d0c04a63d222718cc4e628b67e6a0 | MATLAB | 14,703 | 492 | function [varargout] = ft_notification(varargin)
% FT_NOTIFICATION works mostly like the WARNING and ERROR commands in MATLAB and
% is called by FT_ERROR, FT_WARNING, FT_NOTICE, FT_INFO and FT_DEBUG. Please note
% that you should not call this function directly.
%
% Some examples:
% ft_info on
% ft_info on msgId
% ... |
29c878375b1aecf9cb3bcf3c1de521ad8104a34777e0cd9c0efef2061ea4510b | MATLAB | 14,704 | 231 | function PseudoTransmit_OptimizeSmoothing(OriginalMyelin, ScaledPseudoTransmit, LeftPial, LeftMidthick, LeftWhite, RightPial, RightMidthick, RightWhite, ThreshLower, ThreshUpper, SmoothLower, SmoothUpper, L_ROI, R_ROI, OutlierSmoothing, Dilation, GroupUncorrectedMyelin, MyelinTemplate, OutputTextFile)
%to unify th... |
df2f87e448464b2300062fba20f0263fba0f6c167776e4f209d6a4b8ef1ed095 | MATLAB | 14,709 | 422 |
%{
LEADING EIGENVECTOR DYNAMICS ANALYSIS (LEiDA)
This function processes, clusters and analyses BOLD data using LEiDA in the following order:
1. Read the BOLD data from the folders and computes the BOLD phase
- Calculate the instantaneous BOLD synchronization matrix
- Compute the Leading Eigenvector at each fra... |
e26cd590bd4b3487285c2649a24598ef26325709c141600587eb2bdf92095b42 | MATLAB | 14,734 | 318 | function [EC,F,T]=MVAR_v2(signal, time, labels, setting)
% INPUTS===================================================================
% signal... EEG (time X channel X trials)
% time... time vector in seconds (time X 1 X 1)
% labels... (1 x trials) defines trials to avaraging
% setting... structure of individual setting... |
53fc610da3989cfc1811f294b24c0306616a71b5e7ffd9be0aac4b6dfbdbe0f5 | MATLAB | 14,736 | 268 | function bids_T1B1correct(BIDSroot, NrShots, EchoSpacing, Expression, subjects, InvEff, B1Scaling, Realign, ...
FWHM, Target, Correct, Fingerprint, B1correctM0, Cluster)
% FUNCTION bids_T1B1correct(BIDSroot, [NrShots], [EchoSpacing], [Expression], [subjects], [InvEff], [B1Scaling], ...
% [Realign], [FWHM], [Tar... |
6028a09786e0eb9bccc705d02a6436b5cc31fd75b7ea5da8e859f8048de0c84a | MATLAB | 14,744 | 429 |
function hh = ploterr(x, y, xerr, yerr, varargin)
%PLOTERR General error bar plot.
%
%
% Usage for the impatient
% =======================
%
% X, Y: x and y axis values
% xerr, yerr: if matrix relative error
% if cell array lower and upper bound
% LineSpec as in plot. If passed it must be be... |
a303e7e5d9483fe16583b09b81b86b0a400c242ef53a23005f1765a3dfa00488 | MATLAB | 14,747 | 401 | function PlotFigure2(datadir, codedir)
%PlotFigure2 - Plots Figure 2.
% INPUTS:
% datadir - Local directory where ProcessData_Figure2.mat was saved after running ProcessData_Figure2
% codedir - Local directory where code (e.g., published/EstrousRPE/) was saved
%% Set up paths
s = pathsep;
pathStr = [s, path, s];
... |
c3c63b5bcd20bdb3b78625546af544df1d37acb1d1668f179ff5386646718d54 | MATLAB | 14,760 | 407 | function PlotFigure3(datadir, codedir)
%PlotFigure3 - Plots Figure 3.
% INPUTS:
% datadir - Local directory where ProcessData_Figure3.mat was saved after running ProcessData_Figure3
% codedir - Local directory where code (e.g., published/EstrousRPE/) was saved
%% Set up paths
s = pathsep;
pathStr = [s, path, s];
... |
073a1383cd24c810a6c368b7080d4d5a60a605a23831b8852c5ba8ef188e1055 | MATLAB | 14,762 | 445 | function [Q_k,T_k,r,anorm,ierr,work] = lanpro(A,nin,kmax,r,options,...
Q_k,T_k,anorm)
%LANPRO Lanczos tridiagonalization with partial reorthogonalization
% LANPRO computes the Lanczos tridiagonalization of a real symmetric
% matrix using the symmetric Lanczos algorithm with partial
% reorthogonalization... |
97e2bacc34b023fa28bfb176c25d0457d8b582d62c2297a3790c5d2efcdd6ecb | MATLAB | 14,763 | 297 | % BIDS_WRITEEVENTFILE - write events.tsv and (if toggled) events.json for individual dataset
% from EEG dataset
%
% Usage:
% bids_writeeventfile(EEG, fileOut, varargin)
%
% Inputs:
% 'EEG' - [struct] the EEG structure
%
% 'fileOut' - [string] filepath of the desired output location wi... |
7b280a065d79a3429280bd4945c8545f1a3d98c48534c6e5a092e2b7c14c2f86 | MATLAB | 14,771 | 294 | function varargout = hlp_microcache(dom, f, varargin)
% Cache results of functions for repeated calls with the same arguments.
% Results... = hlp_microcache(Domain, Function, Arguments...)
%
% This is a lightweight mechanism to memoize results of functions that are often repeatedly called
% with the same arguments. It ... |
e8941dbd58414e1d53d65fefeca618d476e96540fe496d25ccd4b5fa6f9ea434 | MATLAB | 14,771 | 401 | function batchDetectSpikes(dataPath, savePath, option, files, Params, MEANAPapp)
% Performs spike detection
% Runs spike detection through recordings, cost parameters, electrodes, and wavelets.
%
% Parameters:
% -----------
% dataPath : str or character
% path to the folder containing data to be analyzed
% savePa... |
10b6334ac7a26f366ab32eef4e2b14eae0469e174eedbcb166f5633a0d877248 | MATLAB | 14,772 | 341 | % [Generalized Eigenvalue De-Artifacting Intrument (GEDAI)]
% PolyForm Noncommercial License 1.0.0
% https://polyformproject.org/licenses/noncommercial/1.0.0
%
% Copyright (C) [2025] Tomas Ros & Abele Michela
% NeuroTuning Lab [ https://github.com/neurotuning ]
% Center for Biomedical Imaging
% ... |
e68afefb488c42a86c0a67669d0ce252e0aa4845934ab5b2e316e471e60a81a7 | MATLAB | 14,778 | 489 | function varargout=notBoxPlotRF(y,x,ColCode,MarkerSize,varargin)
% notBoxPlot - Doesn't plot box plots!
%
% function notBoxPlot(y,x,'Param1',val1,'Param2',val2,...)
%
%
% Purpose
% An alternative to a box plot, where the focus is on showing raw
% data. Plots columns of y as different groups located at points
% along th... |
ee4acffbac5952a7b3bf40bafb2bacb9bba56a8d7cda5bcf983ee612e679afe9 | MATLAB | 14,779 | 408 | %% Figure2
datpath = 'C:\Users\mld9131\Documents\GitHub\Papers\MLD\Figure1\Data';
load(fullfile(datpath,'ratList.mat'));
%% Optogenetics
% M: schematic of injection site and task event
load(fullfile(datpath,'CPi_opto.mat'))
% N example OFC-CPi rat
nexttile
a = 2;
rat = ConA{a}.RatName;
[hic, loc, mc] = blocks(ConA{a}... |
281b8d026fe0c26281b30f1c36f9705981c95688129eace3c9db928620bd3cb4 | MATLAB | 14,781 | 438 | function smoothed = smooth(data,smooth,varargin)
%Smooth - Smooth using a Gaussian kernel.
%
% USAGE
%
% smoothed = Smooth(data,smooth,<options>)
%
% data data to smooth
% smooth vertical and horizontal kernel size:
% - gaussian: standard deviations [Sv Sh]
% ... |
763441bb17430ce75720c0d7573fe57e72b16bc4b0d808506465a3b7054ce80e | MATLAB | 14,813 | 400 | function [stat,p,ci,stats,dist] = permuttest2(x,y,varargin)
%PERMUTTEST2 Permutation-based two-sample t-test and Wilcoxon rank-sum test.
% STAT = PERMUTTEST2(X,Y) performs a two-sample permutation test based on
% the t-statistic of the hypothesis that the data in X and Y come from
% distributions with equal mean... |
c7085cf820ab7aae1e67a9a37e602cdc7b576c1b4feb1c11eb9ec470f428d7d7 | MATLAB | 14,831 | 400 | %CALC_LZ_COMPLEXITY Lempel-Ziv measure of binary sequence complexity.
% This function calculates the complexity of a finite binary sequence,
% according to the algorithm published by Abraham Lempel and Jacob Ziv in
% the paper "On the Complexity of Finite Sequences", published in
% "IEEE Transactions on I... |
fe1a47cd912f17b2e7df3ad4371a1bfe46f2d9a072c27bc2f5604361f13cfa0a | MATLAB | 14,832 | 473 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% computes and displays microstructure diffusion parameters
%
% browse_micro(data,wm,varargin)
%
% data - contains the signal as a struct as defined in baydiff.m
% wm - a mask (optional)
% varargin - passed to baydiff
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
26fe9fdb7088ae70eb815d6d235cf01f0eb9a1eeff664eb365bccbdadc0cf8f1 | MATLAB | 14,839 | 341 | function [NBSPredict] = run_NBSPredict_cli(varargin)
% run_NBSPredict_cli runs NBS-Predict from terminal, cluster, or command line.
%
% This function provides a pure key-value command-line interface (CLI) to
% run NBS-Predict without requiring the GUI. It builds the configuration
% structure completely from the provide... |
7fb85592e32d193d338e01ad8c5809852fca2555e350fc8e276e926ffcf7e5a8 | MATLAB | 14,853 | 122 | %EEGLAB graphic interface functions (popfunc folder):
% <a href="matlab:helpwin eeg_addnewevents">eeg_addnewevents</a> - EEG_ADDNEWEVENTS Add new events to EEG structure. Both EEG.event and...
% <a href="matlab:helpwin eeg_amplitudearea">eeg_amplitudearea</a> - Resamples an ERP average using spline interpolati... |
903c8ceabf6596aee92f1041fe82b1862ba2afd46fc2a08d34044657720cb60d | MATLAB | 14,854 | 330 | % STD_CENTROID - compute cluster centroid in EEGLAB dataset STUDY.
% Compute and store the centroid(s) (i.e., mean(s))
% for some combination of six measures on specified
% clusters in a STUDY. Possible measures include: scalp
% maps, ERPs, spectra, E... |
2a8f4df27f4b60ec8cbdf3db612a72334f6703e98e242aaca4c3ec0bfd163ce7 | MATLAB | 14,857 | 349 | function [d_nts, dataStruct] = loadPooledData(dataStruct)
% loads data (eg. SNR or DA), typically as 2D matrix = [lag x chnl]
% from different:
% - neuronal features (data_info.neurVars)
% - kinematic variables (data_info.trajVars)
% - subjects (subjList)
% returns 'd_nts' = 3D cell: neur x traj x subj
% where: d_nts{n... |
581babca0db623d555d1268959893cdd68bc01172afadd0b0ba97515afff2e58 | MATLAB | 14,872 | 351 | function preprocess_nsd_secondstage(sessix)
nsdsetup;
datadir = datadirs{sessix};
% start parallel MATLAB to speed up execution.
numworkers = 6; % keep low to prevent memory swapping!?
if isempty(gcp('nocreate'))
parpool(numworkers);
end
% *** EDIT ME ***
% what directory do the data live in?
%%%%%datadir = '/h... |
c6e481312fbb9c978fdcf2ec4aacf3cb112ab5237cb0b7c6b8d8bc60319f773f | MATLAB | 14,883 | 299 | % STD_TOPOPLOT - Command line function to plot cluster component and mean scalp maps.
% Displays either mean cluster/s scalp map/s, or all cluster/s components
% scalp maps with the mean cluster/s scsalp map in one figure.
% The scalp maps can be visualized only if co... |
b26373e0786aa991a42e52601489e1520d0bf31e4888cb73b5958b056244d1c0 | MATLAB | 14,884 | 375 | % STD_PLODTMAT - plot design matrix and info associated with the study for
% each subject. Designed to be used directly (as a callback
% function of button plot) from pop_studydesign
% Usage:
% >> std_plotdmat(STUDY.design(1),STUDY.datasetinfo)
%
% Inputs:
% datasetinfo - data... |
c94c3ca90ad9c2a02835de4c5c8bcdb18c445e57c48f7210bca0c6a63f06b3e4 | MATLAB | 14,887 | 285 | %% extract the beta parameters from ROIS
% spherical functional roi
% use subkect masks - lS1, lPC, rPC, lMTt, rMTt, lhMT, rhMT
% TACTILE MOTION LOCALIZER
% take the avg of beta values from the roi
% example (1)lPC- motion_beta and (2) rPC -static_beta
% across two runs
clear
roiType = 'subjectSphere';
radiusNb='8... |
a0f9ac64bd897cbd080f16113d26df1f2c27c15f636d1719cc49e0901273ff6e | MATLAB | 14,890 | 443 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Setup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This gives you ROI-Num network key, to identify which networks ROIs are
% in, the empty arrays to count number of results. It counts all subcor
% regions as SubCor
load UseToCo... |
e99cf6f7df3be63a8abc9d7d8d5819d988f2d9ff223ca8542a470a5a78de15ea | MATLAB | 14,894 | 330 | % STD_FIGTITLE - Generate plotting figure titles in a cell array
%
% Usage:
% >> celltxt = std_figtitle(key1, val1, key2, val2);
%
% Inputs:
% 'subject' - [string] Subject name
% 'datatype' - [string] data type (For example 'erp')
% 'chanlabels' - [cell array or string] channel names
% 'compnames' ... |
77779eba12922af0305ced0661c05a4e74734b949a54c4829beb445f79aa92d9 | MATLAB | 14,898 | 369 | %analysis parameter definitions, to be used for all subjects in this stream
% This is a unified configuaration file for EEG (EGI 256) und MEG (Tübingen CTF)
params=[];
% Directory that has the mapping functions for dataset detection
params.dataset_mapping_dir='conf/dataset-mapping';
% -----------------------------... |
2dbd7e34db20bff2fc97a0560fd7245a0fdb8fd76c02a63383707645aec3f0ee | MATLAB | 14,900 | 525 | clear
close all
clc
exp_root = 'C:\Users\User\Documents\fMRI_EXP\';
root = 'C:\Users\User\Documents\fMRI_EXP\Alon\';
% where to get the data from - only one should be true
peakFlag = false;
avgEffectT2_EC_Mask = true;
OFC_T = false;
visual_effect = false;
%avgEffect0p01Mask = false;
%avgEffect0p05Mask = true;
alon_ma... |
5196d765e2486bec8a5799072a3c9843891637f4c1cc37471747dc46128fe18a | MATLAB | 14,903 | 449 | function [d,ci,stats,dist] = booteffectsize(x,m,varargin)
%BOOTEFFECTSIZE Effect size with bootstrapped confidence intervals.
% D = BOOTEFFECTSIZE(X) returns the effect size measure for a single
% sample X based on Cohen's d. By default, Cohen's d is bias-corrected
% for sample size, also known as Hedges' g. For... |
af53630ca6acde3d5c0f99199a6de8b44f727e1f56684e73e858362d24f6c006 | MATLAB | 14,912 | 342 | % POP_EDITOPTIONS - Edit memory-saving EEGLAB options. These are stored in
% a file 'eeg_options.m'. With no argument, pop up a window
% to allow the user to set/unset these options. Store
% user choices in a new 'eeg_options.m' file in the
% ... |
f4b0ab9ff0ac5100d65f65c1ceb6f2f0aa20988b163d4eb342d8c6b1d2a31ac9 | MATLAB | 14,954 | 367 | function plot_FMT_PSTH(GenPlots,IT_Fam_VE,IT_Fam_FR,HC_Fam_VE,HC_Fam_FR,IT_Lure_VE,IT_Lure_FR,HC_Lure_VE,HC_Lure_FR)
%{
PURPOSE: Plots the PSTH vs Time plots for
each condition given an aligned pseudopopulation.
Arguments:
GenPlots = a flag if you want to regenerate plots from scratch(0) or plot
previously plot... |
ed082825b39835d21f6cf3af74fe016a50bfbed6c041fc9b9ccfee6c03ae31dd | MATLAB | 14,977 | 490 | function plotFigure1_expertBeh(processedBehaviorPath)
%Plot figure 1 - expert rat behavior and inference model predictions
% YOU MUST RUN processBehaviorData BEFORE RUNNING THIS FUNCTION
%INPUTS:
% processedBehaviorPath = path to where you have saved the outputs from
% running processBehaviorData
%load proces... |
61bf2ab6b95ac380829fc82174a28af43e365f30ed339b7f753b46e26deb1980 | MATLAB | 14,979 | 369 | function ft_fmri_preprocessing(img_input, slice_params, field_params, ...
realign_params, outlier_params)
% FMRI preprocessing
%
% ft_fmri_preprocessing(img_input, slice_params, field_params, ...
% realign_params, outlier_params)
%
% Inputs:
% input - cell array of filenames of input time series.
% ... |
a572eca9c9aca4a11e7a74910c5b94240ef9331f1d32534357b8c84967f3bce1 | MATLAB | 15,022 | 372 | % PLOTCURVE - plot curve(s) with optional significance highlighting.
%
% Usage: >> plotcurve(times, data, 'key1', 'val1', 'key2', val2' ...);
%
% Required inputs:
% times - [float] vector of time indices
% data - [float] data array, size of [n x times]. If n>1 several
% curves are plotted (unless 'plotme... |
e9c605ce6a5e70641a929b08e971a0856e0f5a4c58751a88a6023daa465f8b10 | MATLAB | 15,032 | 460 | function str = print(obj, inputSizes, varargin)
%PRINT Print information about the DagNN object
% PRINT(OBJ) displays a summary of the functions and parameters in the network.
% STR = PRINT(OBJ) returns the summary as a string instead of printing it.
%
% PRINT(OBJ, INPUTSIZES) where INPUTSIZES is a cell array of ... |
c505a27b731feb03464c8234dc9ab20203a7df64db2efe04a052e30ebcb7fd3c | MATLAB | 15,036 | 355 | function preprocess_nsd_secondstageLOW(sessix)
nsdsetup;
datadir = datadirs{sessix};
% start parallel MATLAB to speed up execution.
numworkers = 6; % keep low to prevent memory swapping!?
if isempty(gcp('nocreate'))
parpool(numworkers);
end
% *** EDIT ME ***
% what directory do the data live in?
%%%%%datadir = ... |
1bdbd5fe348fae77a85125243dda6bde78b5418c92c009c0aef710ae868cea77 | MATLAB | 15,041 | 355 | function preprocess_nsd_secondstageLOW(sessix)
nsdsetup;
datadir = datadirs{sessix};
% start parallel MATLAB to speed up execution.
numworkers = 6; % keep low to prevent memory swapping!?
if isempty(gcp('nocreate'))
parpool(numworkers);
end
% *** EDIT ME ***
% what directory do the data live in?
%%%%%datadir = ... |
df49d2f56f8d8a596d9710b5a503e52ba2d11d3f80245606df06b043d081b1a4 | MATLAB | 15,043 | 410 | function [MapMPM, MapML, aur] = CA_EZ_Prep_genx()
% A function to process a new Eickhoff, Amunts and Zilles CA toolbox
% create NIML files that describe "atlas point lists" for each
% of the atlases included
% DRG/ZSS SSCC MAY 2011
FuncName = 'CA_EZ_Prep_genx';
MapMPM = [];
MapML = [];
% version 1.8
CA_EZ_Version = '... |
1a108edfd0e278932c9a5082060ee8ef448e9f793ac887d08f6d107c8075aa3e | MATLAB | 15,051 | 350 | %{
map.OptImageBar (imported) #
-> experiment.Scan
axis : enum('vertical', 'horizontal')# the direction of bar movement
---
amp : longblob # amplitude of the fft phase spectrum
ang : longblob # angle of the ... |
88b70a4e74be135ed450016ddb305a390fe4543c8d9869ecfae16379eff49962 | MATLAB | 15,055 | 388 | % METAPLOTTOPO - plot concatenated multichannel data epochs in a topographic or
% rectangular array. Uses a channel location file with the same
% format as TOPOPLOT, or else plots data on a rectangular grid.
%
% Usage:
% >> axes = metaplottopo(data, 'key1', 'val1', 'key2', 'val2')
%
% Inp... |
dca600b8ab19d86a121ae6888d0a7fdcce749f414c7b1a337938da48a8a75404 | MATLAB | 15,064 | 381 | function [r,p,st,sp,rShuffled,aShuffled,bShuffled,c,cShuffled,jump,jumpShuffled,maxJump,maxJumpShuffled,quadrantScore,qShuffled] = FindReplayScore(matrix,varargin)
% FindReplayScore
%
%
% USAGE
%
% [r,p,a,b,rShuffled,c,cShuffled,jump,jumpShuffled,maxJump, maxJumpShuffled,quadrantScore] = FindReplayScore(matrix,thre... |
bf8ffdbae13f710c06df09d7d335c4037ed4c9f667c3a6e7f4e36839e48d3a65 | MATLAB | 15,079 | 189 | function result = para_dataflow(varargin)
% Generic Signal Processing -> Feature Extraction -> Machine Learning BCI framework.
% Result = para_dataflow(FilterSetup, FeatureExtractionArguments, FeatureExtractionSetup, MachineLearningSetup, DialogSetup, ForwardedParameters...)
%
% Most BCI paradigms are implemented as a ... |
50ee5b4ed1cbb59cca5f0ac19757d4a0e2e65023c73dea5a1e8e100ecc0c6219 | MATLAB | 15,124 | 349 | function [meanAcc,nullStats,jointClassifier] = TS_Classify(whatData,cfnParams,numNulls,varargin)
% TS_Classify Classify class labels assigned to the data using all features
%
% Requires the time-series data to have been labeled using TS_LabelGroups, which
% stores in the Group column of the TimeSeries table.
%
%---US... |
e4abbd148fe5f7544c3e278fefe129dca28ffcdd9fe9c305adc17cd242e3c9cb | MATLAB | 15,153 | 311 | %% h = sepia_handle_panel_utility_get_header(hParent,hFig,h,position)
%
% Input
% --------------
% hParent : parent handle of this panel
% hFig : handle of the GUI
% h : global structure contains all handles
% position : position of this panel
%
% Output
% --------------
% h ... |
55a626d639ec06e9c1fe6caf42c29855fdb4f570c487968999c50b2a18554f96 | MATLAB | 15,160 | 445 | function [d,ci,stats,dist] = booteffectsize(x,m,varargin)
%BOOTEFFECTSIZE Effect size with bootstrapped confidence intervals.
% D = BOOTEFFECTSIZE(X) returns the effect size measure for a single
% sample X based on Cohen's d. By default, Cohen's d is bias-corrected
% for sample size, also known as Hedges' g. For... |
a6e8b1aaa85c4cb7dd1eb587fd0ea9832f24d2571be39ba948121c1562122713 | MATLAB | 15,162 | 328 | % POP_REJSPEC - rejection of artifact in a dataset using
% thresholding of frequencies in the data.
% Usage:
% >> pop_rejspec(INEEG, typerej); % pop-up interactive window mode
% >> [OUTEEG, Indices] = pop_rejspec( INEEG, typerej, 'key', val, ...);
%
% Pop-up window options:
% "Electrode|Component"... |
ace2c986df55eaae2b4eecd468639601f5fea54f0ccf0ff52d5c17e5b8d577a0 | MATLAB | 15,184 | 351 | function typeMask = SetCurveType(rowNum, colNum)
% Set the type of each dose-response curve
% 1: saturated curves
% 2: highest DF/F value >> 1, and the 2nd highest concentration reach the half maximum
% 3: weak responses, not 1 nor 2, and non-zero.
typeMask = zeros(rowNum, colNum);
typeMask(1, 1) = 3; %1-pentanol... |
efa7a1ef0624b887e11636089dfd13a961960409a6893db5787eada73e37325e | MATLAB | 15,210 | 344 | %% Compile Osprey
function CompileOspreyStandalone(OutputDir,SPM12Dir,CreateHBCD, CreateCMD, CreateGUI, PackageInstaller, WidgetsDir,GUILayoutDir)
%% CompileOspreyStandalone(OutputDir,SPM12Dir,CreateHBCD, CreateCMD, CreateGUI, PackageInstaller, WidgetsDir,GUILayoutDir)
% This function compiles Osprey including a comm... |
e4f6e9a346bf5d0c8eb73603a208f86465dfae24ea17bb154982719e3d4de747 | MATLAB | 15,221 | 357 | function [L,exclMask] = defineSearchlight_surface(Surf,Mask,varargin)
% function L = rsa_defineSearchlight_surface(Surf,Mask,varargin)
% Defines a surface-based searchlight for the input surfaces and
% functional mask for a subject. It is suggested to use the
% rsa_defineSearchlight function instead of calling this f... |
aa1d7d39fcf793802b5f10ad073c69b443ccdb58a57e9ce93a92aada23e2ad7e | MATLAB | 15,225 | 468 | % SIGNALSTAT - Computes and plots statistical characteristics of a signal,
% including the data histogram, a fitted normal distribution,
% a normal distribution fitted on trimmed data, a boxplot, and
% the QQ-diagram. The estimates value are printed in a panel and
% ... |
b4ea5ac05ebc24d91538275b78c42e9440095a338ce013061836ee2a9a4adae8 | MATLAB | 15,228 | 407 | function [pnt, ori, lab] = channelposition(sens)
% CHANNELPOSITION computes the channel positions and orientations from the
% MEG coils, EEG electrodes or NIRS optodes
%
% Use as
% [pos, ori, lab] = channelposition(sens)
% where sens is an gradiometer, electrode, or optode array.
%
% See also FT_DATATYPE_SENS
% Cop... |
bf2a4ccfd1195be2be0206d0a0d7a8703a5d8f9687c7f931c4b8870ba3ae2512 | MATLAB | 15,230 | 352 | %% |legendflex.m|: a more flexible, customizable legend
% Author: Kelly Kearney
%
% This repository includes the code for the |legendflex.m| Matlab function,
% along with all dependent functions required to run it.
%
% This function offers a more flexible version of the legend command. It
% offers a different method ... |
23769a159f48dd4ff9b5b6b42e3189c6685580f997dacf0956409d711a1b3721 | MATLAB | 15,279 | 400 | function net = cnn_imagenet_init(varargin)
% CNN_IMAGENET_INIT Initialize a standard CNN for ImageNet
opts.scale = 1 ;
opts.initBias = 0 ;
opts.weightDecay = 1 ;
%opts.weightInitMethod = 'xavierimproved' ;
opts.weightInitMethod = 'gaussian' ;
opts.model = 'alexnet' ;
opts.batchNormalization = false ;
opts.networkType... |
0ed360175a437d014c5e6550b640a521bd6d805f47ef5ba38d1a492d5e0f79e8 | MATLAB | 15,298 | 522 | function [info] = h5save(fname, data, varargin)
% Save a Matlab struct/array into an HDF5 file
% adapted from the EasyH5 Toolbox: https://github.com/fangq/easyh5
%
% SYNTAX:
% h5save(fname, data);
% h5save(fname, data, datasetpath);
% h5save(fname, data, datasetpath, 'Parameter',Value,...);
%
% INPUTS:
% - fname - h5... |
98615b309579cade432b27393417576be1e28f89a9cef92bd5c32d8d929bfb25 | MATLAB | 15,309 | 353 | function out = MF_GP_Hyperparameters(y, covFunc, squishorsquash, maxN, resampleHow, randomSeed)
% MF_GP_Hyperparameters Gaussian Process time-series model parameters and goodness of fit
%
% Uses GP fitting code from the gpml toolbox, which is available here:
% http://gaussianprocess.org/gpml/code.
%
% The code can a... |
29e6c68a9607ac31ed0cd30ef88d403b6be8eca6757ba1398fe9414daa555c2d | MATLAB | 15,337 | 312 | function res = arg_subtoggle(varargin)
% Specify an argument of a function which is a struct of sub-arguments that can be disabled.
% Spec = arg_subtoggle(Names,Default,Source,Help,Options...)
%
% Accessible to the function as a struct, and visible in the GUI as a an expandable sub-list of
% arguments (with a checkbox ... |
fcf5d7572aec5cc459ddd54e9fe2311ea9f6ccafaf709898937041e1209a96d1 | MATLAB | 15,341 | 375 | function varargout = BrainNet_EdgCostumColor(varargin)
% BrainNet_EdgCostumColor MATLAB code for BrainNet_EdgCostumColor.fig
% BrainNet_EdgCostumColor, by itself, creates a new BrainNet_EdgCostumColor or raises the existing
% singleton*.
%
% H = BrainNet_EdgCostumColor returns the handle to a new BrainNe... |
0172c4b0ec9c1b88abc9ae3a7b96eb31c204b1bb8b933e1991a67ef89c1228d0 | MATLAB | 15,364 | 249 | function LFP_Analysis_XChannel(PhaseLocking,SpikeFieldCoherence,OffsetPhaseLocking,AmplitudeXCorr,FileName,Parameters)
%% Runs the requested analyses with the supplied parameters as LFP_Analysis
% except runs phase locking & SFC for all spikes with all LFP channels
% Inputs
% PhaseLocking -- wheth... |
202f8991f1ea81adc4925c27405b1d2dbd0da28362087af3f294c5ec143e2fae | MATLAB | 15,366 | 269 | % TIMEFDETAILS - details of the TIMEF function for time/frequency analysis
% of multiple epochs of single-channel event-related data.
%
% Global Description:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TIMEF performs normalized time/frequency averaging using either
% F... |
8202894803fa6bacf20e8082fcc006a400b8399aeb52f111448835171214baaa | MATLAB | 15,372 | 433 | %% %%%%%%%% Manual data transfer, organization, and naming
% - check log entries on the google sheets
% - make official data directory with official name
% - rsync -av the files from naxos into "dicom"
% - stick extra scans into "extra_scans"
% - remember to check file/dir sizes
% - rsync -av .mat files and "data"... |
6bbaf06e7ed1ccf4bc2c466c79defd83dd1d213be9f2984718c9c17d7537ef40 | MATLAB | 15,388 | 450 | function [imData,sizx,sizy]=smod_bigread2(varargin)
%reads tiff files in Matlab bigger than 4GB, allows reading from sframe to sframe+num2read-1 frames of the tiff - in other words, you can read page 200-300 without rading in from page 1.
%based on a partial solution posted on Matlab Central (http://www.mathworks.com/m... |
2ad7d720079285d0c8f2967192f49531043e1de96f272b7ec68a21186ef5b8a9 | MATLAB | 15,410 | 368 | function this = set_dims(this, iDim, varargin)
% Sets dimension properties for specific dimension(s)...
%
% Y = MrDimInfo()
% Y.set_dims(inputs)
%
% This is a method of class MrDimInfo.
%
% set_dims is versatile in guessing missing values, e.g. by estimating
% actual sampling points from altered nSamples and resolu... |
5e331f118d4cd7e01f4b6ee47985fe3f29165d70fa9b064efc21bf3bebf8d73a | MATLAB | 15,415 | 297 | % POP_ICATHRESH - main menu for choosing threshold for component
% rejection in EEGLAB.
%
% Usage:
% >> [OUTEEG rej] = pop_icathresh(INEEG, threshval, rejmethod,
% rejvalue, interact);
%
% Inputs:
% INEEG - input dataset
% threshval - values of thr... |
bc76319a50420b2cb5ee639af225d352246a8328840217105d11bb5d4bd13822 | MATLAB | 15,429 | 378 | function out = SC_FluctAnal(x, q, wtf, tauStep, k, lag, logInc)
% SC_FluctAnal Implements fluctuation analysis by a variety of methods.
%
% Much of our implementation is based on the well-explained discussion of
% scaling methods in:
% "Power spectrum and detrended fluctuation analysis: Application to daily
% tempera... |
84444a70bcbf7de3d644048b154a4a4f2b1ae356b4afa31e791858288a3a8ef4 | MATLAB | 15,430 | 319 | % POP_CHANEVENT - import event latencies from the rising and/or falling 'edge'
% latencies of a specified event-marker channel in EEG.data
% Usage:
% >> OUTEEG = pop_chanevent( INEEG ); % select parameters via a pop-up window
% >> OUTEEG = pop_chanevent( INEEG, chanindices, 'key', 'val' ... ); %... |
26be53dc6fdbccca81ffd4e93b44499bac3c68d2969718d097a8cdebd14a11a6 | MATLAB | 15,436 | 349 | %% ms SEI - switching times as x-over time (XT) points on channels (avg over trials)
% low-pass filteres trials data
% determines "switching times" as cross-over points = t_switch
% plots histogram of t_switch
% (c) Jiri, Sep23
% based on: msSEI_switchingTimes_xover.m
%% ============================ settings ========... |
d3e34dfa7bd01b2731b9898d987367f7423030914f78f591fa6187c2590c6d65 | MATLAB | 15,442 | 455 | function [ all_subjects ] = nmri_export_metrics( all_subjects, opt, params )
%[ all_subjects ] = nmri_export_metrics( all_subjects, opt, params )
% Will save any number of metrics / frequency bands (after scaling /
% dim_reduction/ abs) in a 4D .mgh file. The order will be as in the
% all_subject cell-array of struct... |
3c2aae717c1334976c77907114521f42a8cbd527a77be7826b8d00e058342a4e | MATLAB | 15,448 | 310 | function defineTriggers(params)
% defines 'triggers' = times and classLabels from trials (pred_raw) based on params.triggering
% saves them into session cache files as 'triggers'
% in more complex cases (emoReco, localizers), for each session:
% - fill in 'trials_events' (tr x ctg) table of 1/0
% - apply (sequentia... |
7fd429c2aaba3cf5c5eb963aa557c7e6e95d1edf71618d31b5684ad7620777ae | MATLAB | 15,471 | 354 | function functionhighpassandvariancenormalize(TR, hp, fmri, WBC, varargin)
%
% FUNCTIONHIGHPASSANDVARIANCENORMALIZE(TR, HP, FMRI, WBC, [REGSTRING], [VOLWISHARTOVERRIDE], [CIFTIWISHARTOVERRIDE], [ICADIMMODE])
%
% This function:
% (1) Detrends / high-pass filters motion confounds, NIFTI (volume) and CIFTI files
% (2) Ca... |
53f969d7648190531cc9222ce3a41c39321feb772dfc0df403fc47f94f9973fa | MATLAB | 15,473 | 498 | function [net,stats] = cnn_train_dag(net, imdb, getBatch, varargin)
%CNN_TRAIN_DAG Demonstrates training a CNN using the DagNN wrapper
% CNN_TRAIN_DAG() is similar to CNN_TRAIN(), but works with
% the DagNN wrapper instead of the SimpleNN wrapper.
% Copyright (C) 2014-16 Andrea Vedaldi.
% All rights reserved.
%
... |
723ab372b85f1b9c1755be00c39c534715d6bbc9cad1469d9a48f21a888eeccd | MATLAB | 15,486 | 438 | function [featureVectorAP, featureVectorContr] = extractBiomarkers1(window, stimFlag, showPlots)
% AP and contractile biomarker calculator
% All biomarkers are returned as the MEAN OF THE LAST 5 BEATS.
% The figure (if requested) annotates only the last beat.
%
% AP method for all APDxx:
% - beat windowing (see below... |
560c09bd8392ccc1c61abdf58191fe844a892d9342f39e163cec80bc44e3b124 | MATLAB | 15,559 | 393 | function varargout = BrainNet_ModuleColor(varargin)
% BrainNet_ModuleColor MATLAB code for BrainNet_ModuleColor.fig
% BrainNet_ModuleColor, by itself, creates a new BrainNet_ModuleColor or raises the existing
% singleton*.
%
% H = BrainNet_ModuleColor returns the handle to a new BrainNet_ModuleColor or t... |
d1d65e1d58f62809fd9e8cde5a67f2f5b30a201e2086b3cd9b1477cc989edbac | MATLAB | 15,563 | 483 | //========================================================================
// GLFW 3.4 Cocoa - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
// Copyright (c) 2012 Torsten Walluhn <tw@mad-cad.net>
//
// This software ... |
2c41b840b7236785fe48de412430711669f558bfd0bcd4776ee115b5d5627c49 | MATLAB | 15,569 | 462 | function nii_hdr = osp_generate_nii_hdr(in,nii_hdr,outfile)
%% nii_hdr = osp_generate_nii_hdr(in,nii_hdr,outfile)
% This function creates the NIfTI header extension for NIfTI-MRS
% following the standard described in "Clarke WT, Bell TK, Emir UE,
% Mikkelsen M, Oeltzschner G, Shamaei A, Soher BJ, Wilson M.
% ... |
f403759587acc693e23e1782602c52e46c615fde0f14ac5ca7eb357cecae307f | MATLAB | 15,578 | 312 | %{
preprocess.ExtractRaw (imported) # pre-processing of a twp-photon scan
-> preprocess.Prepare
-> preprocess.Method
---
%}
classdef ExtractRaw < dj.Relvar & dj.AutoPopulate
properties
popRel = preprocess.Prepare*preprocess.Method ...
& ((preprocess.PrepareGalvo*preprocess.MethodGalvo - '... |
4340b8acda8d2bb267d3002a3c65c0f506a429fe21438cca1a827a614caca629 | MATLAB | 15,592 | 479 | function generateFigure5()
% GENERATEFIGURE5_REVISED Generate Figure 5 for the normalization paper
%
% Purpose:
% Creates a multi-panel figure showing Fisher Information analysis:
% - FI per spike for contrast discrimination
% - FI per spike for orientation discrimination
% - Grouped by normalization index rang... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.