sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
5181e81d485eece541bb296fbda00d3c4983d3d5060e3762949cf7af569d458e | MATLAB | 22,460 | 482 | % ChemoSLA_PooledGraphs_2023
% Marie Labouesse, marie.labouesse@gmail.com - Sep 2023
% Cohort: NAc dLight1.3b weekly DETQ or food rest
% 1- POOLED DATA
% load matlab spaces generated in: WeeklyDETQ_SLA_DataExtraction
% puts individual trials into one big matrix (all mice together): PooledINDIV
% calculates the ... |
436e799d461114d21e37528911cf8023091388de29b9360f2bb5a8a4a10f6bf5 | MATLAB | 22,570 | 476 | classdef BackgroundUploadTest < matlab.unittest.TestCase
% Tests for the 'Background' option: webupload.backgroundCommand, webupload.curlConfigText,
% and postZip / zipAndPost with an injected launcher, so no process is started. The last
% test starts a real curl against a local listener (tests/background_l... |
e9fab39e4166dabe7a4e008cfcf91399e3243c84f654a5f302f5f87ff1047c95 | MATLAB | 22,631 | 539 | %% VORsineFit.m
% Input:
% data - dat structure with channels
% 'htvel'
% 'hhvel'
% 'hepos'
% 'vepos'
% 'stim pul'
% tstart - time window start times
% tstop - time wndow stop times
% sinefreq - frequency of stimulus for each segment
% labels - label for each segment
% timepts - time label ... |
4bfc45103b73040fffe86ccae4fe953049ed2f95febb54da8c64482e35ace20b | MATLAB | 22,648 | 548 | % preprocessVisstimVInj.m
%
% Function for processing voltage signals indicating what visual stimulus
% was presented on the G3 visual arena. Operates specifically on visual
% stimuli controlled in closed-loop through voltage injection from the DAQ
% Reads in stimulus name and voltage injection protocol names to inte... |
bc7f01af0272f7fad0082075f745b23139df00b246711efeb1732552338df347 | MATLAB | 22,651 | 572 | %% VOR_SineFit.m
% Input:
% data - dat structure with channels
% 'htvel'
% 'hhvel'
% 'hepos'
% 'vepos'
% 'stim pul'
% params.segStarts - time window start times
% params.segEnds - time wndow stop times
% sinefreq - frequency of stimulus for each segment
% labels - label for each segment
% time... |
8b5acf439ead268e8b750ccda9109aac66dd193accdf93079c82575d3cdb71c4 | MATLAB | 22,695 | 192 | function [methodinfo,structs,enuminfo]=son32;
% SON32 Prototype file. Create structures to define interfaces found in 'matlab'.
%This function was generated by the perl file prototypes.pl called from loadlibary.m on Tue Mar 22 18:35:30 2005
%perl options:'matlab.i -outfile=son32.m'
%
% This file is required by the MATL... |
6a1ff2f8d99cf57f1ff90bc9d84eeb58124e3cc36d181f5fdd962fc72cfa75f3 | MATLAB | 22,710 | 432 | % DATA ANALYSIS PIPELINE FOR FIBER PHOTOMETRY EXPERIMENT
% Name: Shock_PooledGraphs
% First creation Sept 2020; Updates for Zurich May 2021, August 2021, March
% 2023, March 2024
% Marie Labouesse, marie.labouesse@gmail.com
% Cohort: GCAMP or dLight1.3b with shock
% 1- POOLED DATA
% loads FP data previously an... |
03e4e6b281853ca4a709bccce5847c92f4f8fac908821102b09fafd34dee227b | MATLAB | 22,836 | 619 | classdef LinePlotExplorer < handle
% LinePlotExplorer
%
% This tool allows users to move around quickly within a 2D plot by panning
% (left clicking and dragging) or zoom (scrolling with a scroll wheel).
% When instantiated, it will provide this ability for all axes in the
% provided figure (or current figure by ... |
83d537c04a689763da7e93da2d4ed3b8ebb9e7f237fa21f2b38727647b5792fd | MATLAB | 22,836 | 505 | % extractKernels.m
%
% Function that takes in metaDat struct of selected trials and returns
% linear filters and autocorrelations, 1 per fly. Also returns mean and
% standard error of the mean.
%
% INPUT:
% selMetaDat - metaDat struct with only trials that will be incorporated
% in this analysis
% pdPath -... |
a4939e093b2b6a096a20ddb51130c08bdbf067918cf8fa1f9f24d6cb8fd49490 | MATLAB | 22,853 | 463 | function [] = simseq_processTimeSeriesData(subjnr,projectDir,varargin)
% simseq_processTimeSeriesData(subjnr, projectDir, spatialModel, temporalModel)
%
% Function to align and chop measured fMRI data of simseq experiment
%
% INPUTS
% subjnr : (int) subject to analyze
% projectDir ... |
4f282adba3f43b77a8690c490d1bcd50c2fdf457db0496536734ecf34b3af681 | MATLAB | 22,883 | 547 | %% VORsineFit.m
% Input:
% data - dat structure with channels
% 'htvel'
% 'hhvel'
% 'hepos'
% 'vepos'
% 'stim pul'
% tstart - time window start times
% tstop - time wndow stop times
% sinefreq - frequency of stimulus for each segment
% labels - label for each segment
% timepts - time label ... |
b577860f273ebad807431eb6f57f40e7944a34006693629225779db9a21a5389 | MATLAB | 22,886 | 192 | function [methodinfo,structs,enuminfo]=son32;
% SON32 Prototype file. Create structures to define interfaces found in 'matlab'.
%This function was generated by the perl file prototypes.pl called from loadlibary.m on Tue Mar 22 18:35:30 2005
%perl options:'matlab.i -outfile=son32.m'
%
% This file is required by the... |
e5795eae4caccae65be6c4c753dc689c0ef237d2494188e2055d366e73d247a4 | MATLAB | 22,891 | 598 | function [HDR,H1,h2]=opendicom(arg1,arg2,arg3,arg4,arg5,arg6)
% OPENDICOM is an auxillary function to SOPEN for
% opening of DICOM files for reading ECG waveform data
%
% Use SOPEN instead of OPENDICOM
%
% See also: fopen, SOPEN,
%
% References:
% [1] http://www.dclunie.com/dicom-status/status.html#BaseStandard2... |
812f87392e9d2bf51c56390a1eb50e113d7542abe92a77d36531624a4771897a | MATLAB | 22,973 | 688 | function spm_eeg_inv_vbecd_disp(action,varargin)
% Display the dipoles as obtained from VB-ECD
%
% FORMAT spm_eeg_inv_vbecd_disp('Init',D)
% Display the latest VB-ECD solution saved in the .inv{} field of the
% data structure D.
%
% FORMAT spm_eeg_inv_vbecd_disp('Init',D, ind)
% Display the ind^th .inv{} cell element, ... |
e1005982119e8abd4fffece50063133bf841e57892d291ddff8ac0510f660f8e | MATLAB | 23,082 | 552 | function PlotTheseUnits_UM(Pairs,MatchTable,UniqueIDConversion,WaveformInfo,AllSessionCorrelations,param)
% Plot UM results for groups of units
if ~isfield(param,'TakeChannelRadius')
param.TakeChannelRadius = 200;
param.waveidx = 41-7:41+15;
end
%% Extracting all relevant data/parameters
if ~isdir(fullfile(par... |
99c6b55ef724b8dc59cd99f852d6f264d3cf2a9652660161ab7b43263651dbb4 | MATLAB | 23,102 | 318 | function [hdr] = read_ns_hdr(filename)
% READ_NS_HDR read the header from a NeuroScan 3.x or 4.x AVG/EEG/CNT File
%
% [hdr] = read_ns_hdr(filename)
%
% The output data structure hdr has the fields:
% hdr.label - electrode labels
% hdr.nchan - number of channels
% hdr.npnt - number of samplepoi... |
93a051efdeb3ddb7aa548b811f067b56b31ff2aac2058549cbf96c83b27912e4 | MATLAB | 23,125 | 553 | % updateTask - update the task in running in stimulus programs
%
% $Id$
% usage: [task, myscreen, tnum] = updateTask(task,myscreen,tnum)
% by: justin gardner, eric dewitt
% date: 2006-04-27
% copyright: (c) 2006 Justin Gardner (GPL see mgl/COPYING)
% inputs: stimulus,task,myscreen,tnum
% ... |
f53004384e533fab00bea4a71ec5a3461c2e1d7d4b5eaddd7c60792447f476e2 | MATLAB | 23,192 | 509 | classdef StageFilesTest < matlab.unittest.TestCase
% Tests for webupload.stageFiles and webupload.stageSpec.
% Run: runtests(fullfile(<repo>, 'upload_core', 'tests')). All inputs are synthetic
% temp files; the package folder is put on the path by a fixture so tests run from
% anywhere.
properties
... |
2c1e5797f0b065a1b12f1d962d9ccc7004f74dba2ea271bdea88c72a0f8bd2cb | MATLAB | 23,312 | 409 | function [] = getStimROIsFromSTRetResultsMatchingVoxels(projectDir, subjnr, varargin)
% Function to get pRFs with center falling within stimulus corner and
% within 4 individual squares.
%
% Run this function, save only large ROIS (saveLargeROIs=true, saveSmallROIs=false).
% Check ROIs on indiv subject surface, and ma... |
4498606d2fa7d603f594ae4a721187e17cf69554e2426197c9b66aff50cc5ede | MATLAB | 23,318 | 293 | %%% this script runs the additional models (with demographic covariates,
%%% correlations with expectations, correlations between modalities, effect
%%% sizes of NPS etc.)
%%% written by Rotem Botvinik-Nezer
%% CHANGE PATHS TO YOUR LOCAL PATHS
% add canlab tools to path
addpath(genpath('change to the local path of you... |
e3ff4b12ce42e7663675e18a0d06a5c4be6632baa226e45332a8e4ad7b50d87b | MATLAB | 23,322 | 470 | %% s_analyzeEyetrackingFixation.m
% EDF files need to be convert to ascii files, using the EDF2ASC software
% provided by SR-Research for Eyelink1000:
% https://www.sr-research.com/support/thread-13.html
% You need to make an account to access this support page!
%
% This analysis requires the I2MC toolbox: https://gith... |
c47938f1d6cb49da8c7a122f20d257302f6f8f5d141d4e3a02caef5db8c030e8 | MATLAB | 23,393 | 456 | %% clear the workspace and select data
warning off;
gcp;
addpath(genpath('.'))
addpath(genpath('../ANE'))
clear; clc; close all;
%%
scale_lowBG = 5e3;
scale_noise = 1;
data_name = sprintf('lowBG=%.0e,poisson=%g',scale_lowBG,scale_noise);
patch_dims = [253,316];
num_Exp = 10;
rate_hz = 10; % frame rate of each vi... |
a5281f97a4a8ab0b60f66d818ed1a7ff125add55b6225fcf95db680e8e80a937 | MATLAB | 23,409 | 452 | %% clear the workspace and select data
warning off;
gcp;
addpath(genpath('.'))
addpath(genpath('../ANE'))
clear; clc; close all;
%%
patch_dims = [160,160];
list_Exp_ID={'Mouse_1K', 'Mouse_2K', 'Mouse_3K', 'Mouse_4K', ...
'Mouse_1M', 'Mouse_2M', 'Mouse_3M', 'Mouse_4M'};
num_Exp = length(list_Exp_ID);
... |
2cbce06d3eb7f0ca5ffa91912fbdcf4da414ae86582cead3895d23384710ccaa | MATLAB | 23,502 | 653 | function result=adjustedboxplot(x,varargin)
%
%ADJUSTEDBOXPLOT produces an adjusted box and whisker plot with one box for each column
% of X.
% Typical for this boxplot are its skewness-adjusted whiskers, which are based on
% the medcouple, a robust measure of skewness (see mc.m). At skewed data, the original boxplot... |
5c817893ee38d94f465e5aa96537726c5dbe52803b59fb92b7523076382034f5 | MATLAB | 23,524 | 495 | %Function to conduct an cluster based permutation test for one-way and
%factorial within-subjects ANOVA
%
%EXAMPLE USAGE
% >> GND = FclustGND(GND, 'bins', 1:6, 'factor_names', {'probability', 'emotion'}, ...
% 'factor_levels', [3, 2], 'time_wind', [500, 800], ...
% 'include_chans',... |
65cc66876b64222438a71478f5687000d9f4c9930817a22fa44ba2c31a2346c8 | MATLAB | 23,610 | 456 | %% clear the workspace and select data
warning off;
gcp;
addpath(genpath('.'))
addpath(genpath('../ANE'))
clear; clc; close all;
%%
patch_dims = [50,50];
list_Exp_ID = { 'c25_59_228','c27_12_326','c28_83_210',...
'c25_163_267','c27_114_176','c28_161_149',...
'c25_123_348','c27_122_... |
bdcd451020a8dcce4176ba2fb4eb7d064c092e88350a453a7659b982d482bc58 | MATLAB | 23,654 | 607 | % Performs a permutation or randomization test to compare the distributions of
% two independent or paired data samples.
%
% -- Function File: PVAL = randtest2 (A, B)
% -- Function File: PVAL = randtest2 (A, B, PAIRED)
% -- Function File: PVAL = randtest2 (A, B, PAIRED, NREPS)
% -- Function File: PVAL = randtest2 (A,... |
5a8f2b2e699ca6ff12b14f161d482507dcf3f52dfbc7543caa65797ce44e74d2 | MATLAB | 23,702 | 795 | % Class analysis of the bursting parameters
clear
close all
clc
font_name = 'Arial'; % Specify the font name
font_size = 8; % Specify the font size
rng(2)
do_plots=0;
do_frequency=0;
do_kmeans_among=0;
do_kmeans_within=0;
do_svm=1;
%% Data load (brutto e manuale)
try
load('BDmatrix_Beads_DIV18_All.mat'... |
a78ddc7e4cd94f2c646a0ae66587cd242f872215ecac5579c674d02bfbe5a99b | MATLAB | 23,730 | 603 | % 26 September 2023
%% Initial parameters
smooth = 10; % This is used to define how big the convolution frame will be. This value shows the number of pixels around each pixel.
if exist('PiSz','var')
PixelSize = PiSz; %this is taken from the wrapper. Change to specific number if running the script alone
el... |
e5138576e3507de6d1d6ba0734f7b17e1c33d55455b9c7e8f12c0973ebe00572 | MATLAB | 23,809 | 462 | %% clear the workspace and select data
warning off;
gcp;
addpath(genpath('.'))
addpath(genpath('../ANE'))
clear; clc; close all;
%%
list_data_names={'blood_vessel_10Hz','PFC4_15Hz','bma22_epm','CaMKII_120_TMT Exposure_5fps'};
list_ID_part = {'_part11', '_part12', '_part21', '_part22'};
list_patch_dims = [120,120; ... |
bc8e96d0ea4991a6b01180d1ffb93b025e94ef577d3cf06e7dd4e4e60ac7c1d0 | MATLAB | 23,816 | 475 | %RNAscopeAnalysis
%Code to load excel data exported from QuPath and analyze in Matlab for
%automated quantification and summary.
%Written by Michael B. Ryan - October 16th, 2023
%% Load QuPath data into struct
%Set path for folder with all animal data - each animal should be its own
%folder. Inside that folder,... |
fd23e3845268f14ef03f9d5277a39145af2eb3081867322c9cc464ea37ae774b | MATLAB | 23,903 | 705 | function getSMImaps(pathIn,pathScheme,pathSigma,pathMask,folderOut,Basename,smioptions)
% Fit and get Standard Model parameter maps using the SMI toolbox (fixed TE )
%
% pathIn: path to dwi (.nii) file
% pathScheme: path to protocol (.txt) file (MRtrix style)
% pathSigma: sigma noise map (.nii), such as obtained f... |
3ee2681457d9109f2f366191535d5938d3be0e0c5f24a09f1257ed352666643f | MATLAB | 23,958 | 608 | % interactGetNotMovingIndWFt.m
%
% Function for selecting not-moving times.
% Brings up GUI with plot of mid-leg positions and FicTrac total speed (as
% plot over time and as histogram)
% Shaded regions of not moving & red dots on not-moving (for leg position)
% and sliders to adjust all not moving parameters that ... |
3db1e63493a4da29e64e35aa137fb7bc4183647df3bcca5e7eac2ec556cc7a6a | MATLAB | 24,013 | 585 | % getStimvolFromVarname.m
%
% usage: [stimvol stimNames] = getStimvolFromVarname(varnameIn,myscreen,task,[taskNum],[phaseNum],[segmentNum],[verbose])
% by: justin gardner
% date: 03/15/07
% purpose: returns the volume numbers for the stimulus variable in stimvol and also
% a string whi... |
a8668b060c2f3f48e06c9a987b3ada86e8d486dc636c0c95ed317b8c511bd3f3 | MATLAB | 24,019 | 463 | %% clear the workspace and select data
warning off;
parpool(4);
gcp;
addpath(genpath('.'))
addpath(genpath('../ANE'))
clear; clc; close all;
%%
patch_dims = [160,160];
list_Exp_ID={'Mouse_1K', 'Mouse_2K', 'Mouse_3K', 'Mouse_4K', ...
'Mouse_1M', 'Mouse_2M', 'Mouse_3M', 'Mouse_4M'};
num_Exp = length(li... |
c24a7c4b0d61fb7ce3eb3fc64025d9cafe6a0a5297742e6b9789584f68a312de | MATLAB | 24,056 | 765 | function [DATA,msg] = aedes_read_nifti(filename,varargin)
% AEDES_READ_NIFTI - Read NIfTI (*.nii) and Analyze 7.5 (*.hdr,*.img) files
%
%
% Synopsis:
% [DATA,msg]=aedes_read_nifti(filename,opt)
% [DATA,msg]=aedes_read_nifti(DATA.HDR)
%
% Description:
% The function reads the NIfTI and Analyze 7.5 ... |
bfacee536af59d958a566d9619b8af350dc79b5c5ffc8a2b06b0a63d056c0b3e | MATLAB | 24,098 | 501 | % ChemoSLA_PooledGraphs_2023
% Marie Labouesse, marie.labouesse@gmail.com - Sep 2023
% Cohort: NAc dLight1.3b with chemogenetic inhibition and temporal window
% 1- POOLED DATA
% load matlab spaces generated in: ChemoSLA_DataExtraction
% puts individual trials into one big matrix (all mice together): PooledINDIV
... |
43fa38907a5e829a7e294b8f9684df9d6cd16afbf56156ca54aeca75887c1c9e | MATLAB | 24,164 | 584 | function script07_compute_axon_morph_props()
% This script computes axons morphology properties
%
% This script needs the results from scripts:
% script06_axon_diam_skel_props.m
% It also needs the functions in:
% RefineSeg.m
% and the information in the .mat files in the folder
% cc_cg_labels/
% The results of this... |
e3bab2fc551cae1b1ea4c63c6fe3d0fb09aa69ea496a54233edd30aa82913e1c | MATLAB | 24,173 | 601 | function [r,t,h,outid,hboot,CI]=skipped_correlation(x,y,fig_flag)
% performs a robust correlation using pearson/spearman correlation on
% data cleaned up for bivariate outliers - that is after finding the
% central point in the distribution using the mid covariance determinant,
% orthogonal distances are computed to t... |
d847057bd0fc46e82a445619349fc66914969cadd46ebff5b75eacb4384ecbc9 | MATLAB | 24,178 | 463 | function [HDR]=mwfopen(HDR,PERMISSION,arg3,arg4,arg5,arg6)
% MWFOPEN reads MFER files
%
% HDR = mwfopen(Filename,PERMISSION);
%
% HDR contains the Headerinformation and internal data
%
% see also: SOPEN, SREAD, SSEEK, STELL, SCLOSE, SWRITE, SEOF
% This program is free software; you can redistribute it and/or
% modif... |
d729a85944b84af501187ae1be3daea714a80b5500e26fff3859111b30e73ff7 | MATLAB | 24,226 | 475 | function params = getStimParams(trialType, varargin)
% Function to generate stimulus parameters and sequence for a variety of
% sim-seq experiments.
% params = getStimParams(trialType, varargin)
%
% INPUTS
% trialType : (str) what kind of trial sequence do you want? Choose:
% 'Kastner98ori... |
9edfc8ceddf4f635da6c9cade2aa7a9e7324120998ed59a5e6c5f8f434f3916e | MATLAB | 24,282 | 576 | % updateTask - update the task in running in stimulus programs
%
% $Id$
% usage: [task, myscreen, tnum] = updateTask(task,myscreen,tnum)
% by: justin gardner, eric dewitt
% date: 2006-04-27
% copyright: (c) 2006 Justin Gardner (GPL see mgl/COPYING)
% inputs: stimulus,task,myscreen,tnum
% ... |
6f4265ffe2cb55bcd9ed3c26ddeacd051dc2d004c8f8e11c15b1198cf632f70d | MATLAB | 24,421 | 648 | function [accum, varargout] = CircularHough_Grd(img, radrange, varargin)
%Detect circular shapes in a grayscale image. Resolve their center
%positions and radii.
%
% [accum, circen, cirrad, dbg_LMmask] = CircularHough_Grd(
% img, radrange, grdthres, fltr4LM_R, multirad, fltr4accum)
% Circular Hough transform bas... |
32187c101a3513d1a0472d5645aa3ecac1f92f767617e93e43c0a69224aa5116 | MATLAB | 24,454 | 664 | function ft_write_data(filename, dat, varargin)
% FT_WRITE_DATA exports electrophysiological data such as EEG to a file.
%
% Use as
% ft_write_data(filename, dat, ...)
%
% The specified filename can contain the filename extension. If it has no filename
% extension not, it will be added automatically.
%
% Additional... |
1bbc7586a2c40e974989686f0d09f40295f19b698ea2f12b0b0041cb6b64ea3a | MATLAB | 24,505 | 448 | function h = copyUIAxes(varargin)
% The use of Matlab's copyobj() is not supported with UI axes.
% use COPYUIAXES to copy the content of a UI axis to a new figure.
% COPYUIAXES receives the handle to a UI axes and copies all of its
% children and most of its properties to a new axis. If the UI axis
% has a legend, th... |
6c449e5e160d4a1886595e5eae6ed1b3b0664d2e45b09d50aadf9718bae355f8 | MATLAB | 24,508 | 474 | function []=D1_ModulationIndex_RFT(subj,system,ev_ind,grp_indiv,append,plot)
%[]=B1_ModulationIndex_RFT(subj,system,ev_ind,grp_indiv,append,plot)
%Calculates modulation index for rapid frequency tagging power
%inputs:
% subj: code of subject you want to analyse
% system: code of system you want to run the program on (1... |
34b2b7f70050af475418b084b543925a58033e2299651cd1d77aa58b06cc8f8b | MATLAB | 24,511 | 619 | % 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).
% ... |
13cebec89b3e22c94ad9f45f9e4ad81826a91cb2c67f4883dc2949f889a52477 | MATLAB | 24,513 | 492 | function [neur_num,dendnumAD,dend_params,gp_soma] = growNeuronDendrites(vol_params, dend_params, neur_soma, neur_ves, neur_locs, gp_nuc, gp_soma, rotAng)
% [neur_num,cellVolumeAD,dend_params] = growNeuronDendrites(vol_params, dend_params, neur_soma, neur_ves, neur_locs, gp_nuc, gp_soma, rotAng)
%
% Function to grow d... |
5b399bf70cc00a2086f87610a58a575b5b55715930d5cf8633bb2765f27cb51c | MATLAB | 24,576 | 560 | %% s_test3DSpatiotemporalmodel.m
% Script to test different stages of 3ch spatio temporal model
tic
projectDir = '/oak/stanford/groups/kalanit/biac2/kgs/projects/spatiotemporal/';
% projectDir = '/Volumes/kalanit/biac2/kgs/projects/spatiotemporal/';
subjnr = 1;
pilotNr = 8;
if ismember(pilotNr,[6,7,8,9])
ses =... |
780483ab7a1ac4744350da275eaf0587bfc014b8819ec13dec9a4a0cc06681b2 | MATLAB | 24,579 | 619 | %% This is a small script that takes motion corrected oxygen dynamics recordings in the mouse barrel cortex...
% and returns tiffs with detrended, df/f data
%% Initial parameters
smooth = 10; % This is used to define how big the convolution frame will be. This value shows the number of pixels around each pixe... |
b447232c7462ab9a4d38c119efcc55a846861dcd631e91f3781fcb938ab4ade9 | MATLAB | 24,599 | 978 | function map_struct = aedes_fitmaps(DATA,maptype,fit_vals,varargin)
% AEDES_FITMAPS - Calculate various parameter maps (T1, T2, T1rho, B1,
% Perfusion, etc.)
%
%
% Synopsis:
% MapStruct = aedes_fitmaps(data,maptype,fit_vals,...
% 'property1',value1,'property2',val... |
96d9b35b93294222e1392a89b3f710b2a8c8326feda84ddf8e70aadbee4d558b | MATLAB | 24,622 | 1,048 | clear all
close all
clc
% This code imports subject earnings (across conditions) and their
% individual difference measures and analyzes the data.
% Daniel Sazhin
% 12/09/21
% DVS Lab
% Temple University
%% Rejection analysis
%values = 1002:4000;
values = [1002, 1004, 1006, 1007, 1009, 1011, 1012, 1013, 1015, 1016... |
e2c26df0acb35fd49367b561c8d1d29dce0c9c96ab89dd5efbd49bb669214e0b | MATLAB | 24,763 | 550 | % extractFicTracOptoCond_fly.m
%
% Function to extract FicTrac values with optogenetic
% stimulation.
% Adaptation of extractFicTracOpto_fly with more flexible conditioning on
% FicTrac behavior (specify parameter, condition, time relative to opto
% stim). Note that conditioning on minimum forward walking speed
% ... |
2b8c0c7c0fee2ff55ce5d278a8c77f9c2c9ca16c9d42b9ebc7adfa349663a531 | MATLAB | 24,793 | 629 | % f_ConvertMatFile [As a part of HFO Detection Project]
% Written by:
% Miguel G. Navarrete Mejia
% Electrical Engineering MS
% UNIVERSIDAD DE LOS ANDES
% Colombia, 2016
% mnavarretem@gmail.com
function st_Info = f_ConvertMatFile(pst_SigPath)
% Converts unsupported mat files to customized Ripplelab mat... |
d64a059439087a8ebeb78e0f099b954886a50b7be7914315065b18c66c5f3f1f | MATLAB | 24,807 | 553 | % extractLegStepParamsOpto_fly.m
%
% Function to extract leg step parameters with optogenetic stimulation.
% This is an updated variant of sortLegStepsByOpto() and
% saveLegStepParamByCond_fly(), that does basically the same as those two
% functions together, except that it allows for filtering valid opto
% trials ... |
0e8ba642ebd5484ebfdc34b5bc2b4a80d846162eaa9095ce57b722b34b0f6ec9 | MATLAB | 24,974 | 632 | function exp_SIFI_EEG
% exp_SIFI_EEG is the experimental paradigm to present audiovisual stimuli
% from the paper Rohe, Hesse, Ehlis, Noppeney (2024) Multisensory perceptual and causal inference
%is largely preserved in medicated post-acute individuals with schizophrenia.
% The code requires Psychtoolbox (http://ps... |
e4c75c52f0628c3b18e1679485c6a133ec94911f6086c8a7c060a1ac76b662e4 | MATLAB | 24,989 | 790 | % editStimfile.m
%
% $Id:$
% usage: editStimfile(stimFilename)
% by: justin gardner
% date: 07/27/12
% purpose: GUI to view and edit stimfiles
%
% usage: To view all stimfiles in the Raw group
% v = newView;
% editStimfile(v,'group=Raw');
%
% Or a s... |
ab64ba4183510672236e0d63e93b6b4fca0596e36e3869cbe72932f6f61d08a0 | MATLAB | 25,000 | 170 | function [methodinfo,structs,enuminfo,ThunkLibName]=ceds64Prot
%CEDS64PROT Create structures to define interfaces found in 'ceds64int'.
%This function was generated by loadlibrary.m parser version 1.1.6.34 on Fri Aug 26 18:44:50 2016
%perl options:'ceds64int.i -outfile=ceds64Prot.m -thunkfile=ceds64Thunk.c -header=ced... |
1372b03757e4124aeeb9c28141c5ef93ad8fccccd6b290f2f6e6aaa01398668d | MATLAB | 25,054 | 510 | function fH = plotDataModelFitDoG_singleVoxel_StimulusConditionBlocks(projectDir,subjnrs,varargin)
% Parse inputs
p = inputParser;
p.addRequired('projectDir', @ischar); %
p.addRequired('subjnrs', @isnumeric); % Subject nrs are: [1,2,3,7,8,9,10,11,12,13]
p.addParameter('plotModelFlag',true, @islogical);
p.addParameter(... |
a82aa1687767c5b845f45e3678195690c9ad069720a009a84ead1b13d8058cc7 | MATLAB | 25,082 | 538 | function res = summaryFunctionalPlots(UMFiles, whichMetric, groupVector, UseKSLabels, pltDayPairFig)
%% Will plot summary plots: distribution, ROC and AUC.
% UMFiles: list cells contains path to UnitMatch.m files
% whichMetric: will compute distributions/ROC/AUC on either 'Corr', 'Rank', or 'Sig'.
% g... |
f889a85edf389b83b0def47a9ce6952f4764eeaf071e611ab864b52379f6472a | MATLAB | 25,082 | 570 | % saveBallLegStepParamCond_bouts.m
%
% Function that saves legStep parameters for turning bouts, defined by yaw
% velocity peaks. User can specify FicTrac conditions that yaw
% velocity peaks must meet.
% Extracts bouts that meet FicTrac conditions and accounts for timing of
% step relative to yaw velocity peak
% E... |
20385e59dd05319648bb448a22fefd1a047103eb9e66e58efcbddc0fbf212ff4 | MATLAB | 25,120 | 189 | % This script outputs Figure 2 of Anderson et al. (2024) representing
% the optimal regimen for an average virtual mouse with glioblastoma.
% Uses: GBMFuncoptimal.m (and output from OCHiPerGator.m + GBMoptimalcontrol.m)
%% Parameter set for an average virtual mouse
param = [0.431; % 1 - lambdaC
3.04e6... |
cfbc065615a69c1d278ad82d44bed736551e36db9c0a462fa6b2413a7156fb06 | MATLAB | 25,193 | 466 | %% clear the workspace and select data
warning off;
gcp;
addpath(genpath('.'))
addpath(genpath('../ANE'))
clear; clc; close all;
%%
scale_lowBG = 5e3;
scale_noise = 1;
data_name = sprintf('lowBG=%.0e,poisson=%g',scale_lowBG,scale_noise);
patch_dims = [253,316];
rate_hz = 10; % frame rate of each video
radius = 6;... |
3b7abf2ab4978dcf89302e31eb49569fe9b867a6465bf352252e4d559d165e73 | MATLAB | 25,206 | 528 | %Function to conduct an ANOVA with FDR correction across electrodes and
%time points for ANOVA with a between-subjects factor
%
%EXAMPLE USAGE
%
% GRP = FfdrGRP(GRP, 'bins', 1:6, 'bg_factor_name', 'mood', ...
% 'wg_factor_names', {'probability', 'emotion'}, ...
% 'wg_factor_levels', ... |
d4cab4c61bac250077d7a123bd8a782844979cc0611f4a6bdc8af5540364788a | MATLAB | 25,208 | 592 | function metaStruct = TDMS_preprocessFile(fid,tdmsFileName,params)
%TDMS_preprocessFile Populates props and gets segment information
%
% NOTE: This file shouldn't be called directly by the user
%
% metaStruct = TDMS_preprocessFile(fid,tdmsFileName,params)
%
% INPUTS
% ==========================================... |
a253c08251b355db4d319b20e0a7b5fcb6d11e94979e912fb717271272da0937 | MATLAB | 25,407 | 463 | %% clear the workspace and select data
warning off;
gcp;
addpath(genpath('.'))
addpath(genpath('../ANE'))
clear; clc; close all;
%%
patch_dims = [160,160];
list_Exp_ID={'Mouse_1K', 'Mouse_2K', 'Mouse_3K', 'Mouse_4K', ...
'Mouse_1M', 'Mouse_2M', 'Mouse_3M', 'Mouse_4M'};
num_Exp = length(list_Exp_ID);
... |
a6c789e9c953d5c4c9ee4a8a027a209d7d10b3543b24ee22be330901e098b8be | MATLAB | 25,422 | 294 | function im_hdr = GE_readHeaderImage(fid, byte_align)
%
% im_hdr = GE_readHeaderImage(fid, byte_align)
%
% Loads the image header from a file with filed id fid
% and returns it as a structure.
% if byte_align = 1 then 32-bit alignment (SGI, LX2 format)
% if byte_align = 0 then 16-bit alignment (Sun, 5.X format)
%
%
% ... |
a239dfb1453e168143a326589542b15179e3e9bac1df0a0f7edbff66f0cd979c | MATLAB | 25,456 | 719 | % legTracking_testScript.m
%
% Script for testing leg tracking processing
% TEMPORARY
%
% CREATED: 10/12/20 - HHY
%
% UPDATED:
% 10/12/20 - HHY
%
%% load in data
% file paths
trialPath = ...
['/Users/hyang/Documents/LegTrackAnalysis-Helen/TestFiles/' ...
'190507_fly01_fov02_trial01'];
legTrackPath = ...
... |
1c837b500bcd79c6f2d715e9aba84fa50a21232e2be85eec821b96fe5a750ce1 | MATLAB | 25,473 | 464 | %% clear the workspace and select data
warning off;
gcp;
addpath(genpath('.'))
addpath(genpath('../ANE'))
clear; clc; close all;
%%
patch_dims = [50,50];
list_Exp_ID = { 'c25_59_228','c27_12_326','c28_83_210',...
'c25_163_267','c27_114_176','c28_161_149',...
'c25_123_348','c27_122_... |
7ac018279361a5f2790bbd61f2448fb9bfbe13763c8aa5727ade81ec42dbd702 | MATLAB | 25,779 | 705 | function [dt, b0, mkpred, list] = RobustDKIFitting(dwi, grad, mask)
% RobustDKIFitting provides a novel strategy "Voxel Quality Transfer" for the robust estimation of the diffusion kurtosis tensor.
% The technique is build upon the fact that (1) the powder kurtosis is a good proxy of the mean kurtosis and
... |
cd6410f56a19afc15f2eacf10877da9d87640e278a26c399df94017dca66c72f | MATLAB | 25,797 | 545 | %Function to conduct an Fmax permutation test for ANOVA designs with a between
%subjects factor
%
%EXAMPLE USAGE
% GRP = FmaxGRP(GRP, 'bins', 1:6, 'bg_factor_name', 'mood', ...
% 'wg_factor_names', {'probability', 'emotion'}, ...
% 'wg_factor_levels', [3, 2], 'time_wind', [500, 800], .... |
6416310875818857217a0e2788be6a2fd3ee48acfa8e4fd09d4e069962a3c474 | MATLAB | 25,800 | 592 | function metaStruct = TDMS_preprocessFile(fid,tdmsFileName,params)
%TDMS_preprocessFile Populates props and gets segment information
%
% NOTE: This file shouldn't be called directly by the user
%
% metaStruct = TDMS_preprocessFile(fid,tdmsFileName,params)
%
% INPUTS
% ==================================... |
c89e3b081ce12a658945d4c871043c70743293a9116c49cb9c7ca83f7ae6a85b | MATLAB | 25,820 | 731 | %% Set up for cameras: Just execute this section.
%%%%%%%% Create the webcam object %%%%%%%%
% Please check if the parameters are correct
% for the camera in your environment.
cam = videoinput('gentl', 2, 'Mono8');
cam2 = videoinput('gentl',3,'Mono8');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
triggerconf... |
7f7170ca11dba6e94923b0c68d7f9e46d0294a41639f162cefd105c52cd7276f | MATLAB | 25,822 | 476 | %% clear the workspace and select data
warning off;
gcp;
addpath(genpath('.'))
addpath(genpath('../ANE'))
clear; clc; close all;
%%
list_data_names={'blood_vessel_10Hz','PFC4_15Hz','bma22_epm','CaMKII_120_TMT Exposure_5fps'};
list_ID_part = {'_part11', '_part12', '_part21', '_part22'};
list_patch_dims = [120,120; ... |
f344cd90508fe11a4d9e9abe159e06f3d6d48c5566a7036579b5fd4761c64c65 | MATLAB | 25,942 | 560 | % saveBallLegStepParamCond_indpt.m
%
% Function that saves legStep parameters for all steps that meet the user
% specified conditions on FicTrac
% Treats all steps as independent, as long as FictracSmo condition(s) are
% met, unlike saveBallLegStepParamCond_bouts.m
% Steps are included if at least for half their dur... |
905042fcd87deba616d9720955e9bc523edda27cd1347a994938ef4eb916931e | MATLAB | 25,944 | 513 | function output = resamplePRFParams_wReplacement(ds, roisToPlot, useSTRetParams, temporalModel, spatialModel, subjnrs)
% Function to resample pRF parameters
% For example, effective size, CSS exponent, CST exponent, cv-R2, etc.
%
% Title: Rethinking simultaneous suppression in visual cortex via
% compressi... |
e7f673b11e0a538b74d1fb01bb3a9d80d766a78644f136440d3f0636876ce2bc | MATLAB | 26,071 | 715 | %Program to simulate new two-signal Kang/Quax model
%The original plan was to implement as described below - but it was decided to
%implement a simpler version because of the limitations described in the
%PLOS CB paper.
% New model: There are two cortical layers and two regions (say H- and V-tuned)
% within each layer... |
71f0f40aeb64dcc4bab3f90d9697bfab6bb3270b16f647d3c42cc4585045b87a | MATLAB | 26,091 | 526 | clear
close all
% DirData = 'Y:\niels\Jianfeng\EEGDataScored\Matlab\';
% DirSave = 'Y:\niels\Jianfeng\Results\PerHour\';
DirData = '/gpfs01/born/animal/niels/LunAMPAScaling/NewDataSet/MatlabEEGData/';
DirSave = '/gpfs01/born/animal/niels/LunAMPAScaling/NewDataSet/Results/PerHour/';
Files = dir(DirData);
for iF... |
66bd010dee89a20162fd5cb482c0f6ea17acdf59422285495b262257349fcf24 | MATLAB | 26,164 | 548 | function [status] = ft_hastoolbox(toolbox, autoadd, silent)
% FT_HASTOOLBOX tests whether an external toolbox is installed. Optionally
% it will try to determine the path to the toolbox and install it
% automatically.
%
% Use as
% [status] = ft_hastoolbox(toolbox, autoadd, silent)
%
% autoadd = 0 means that it will ... |
d7a44f166bb6cd99d8fd6d337c48361dae8abc138add939492451bef876d8523 | MATLAB | 26,232 | 674 | function type = ft_chantype(input, desired)
% FT_CHANTYPE determines for each individual channel what type of data it
% represents, e.g. a planar gradiometer, axial gradiometer, magnetometer,
% trigger channel, etc. If you want to know what the acquisition system is
% (e.g. ctf151 or neuromag306), you should not use t... |
884f6a397bbf9145604bf02604de3430fd92ec8fd8252e6cea82b43c854829dc | MATLAB | 26,293 | 518 | function [frechetDist, couplingSequence, frechetMatrix, distanceMatrix] = frechetDistance(curve1, curve2, distanceMatrixFunction, endpointFlexibilityFlag)
% Calculates the discrete Frechet distance between curve1 and curve2.
%
% Simple usage:
% frechetDist = frechetDistance(curve1, curve2)
%
% Returned in frechetDi... |
56f76afcee21fd697a8a321b80106e7d1a0b73164079eeb7201488b7c99ed803 | MATLAB | 26,366 | 502 | % DATA ANALYSIS PIPELINE FOR FIBER PHOTOMETRY EXPERIMENT
% Name: Shock_PooledGraphs
% First creation Sept 2020; Updates for Zurich May 2021, August 2021, March 2023
% Marie Labouesse, marie.labouesse@gmail.com
% Cohort: PFC dLight1.3b with shock
% 1- POOLED DATA
% loads FP data previously analyzed (with: Shock_... |
f0ae10521439fb356381100deb6efea40de45bd39d9b2f8e9d5ee027dd917e1e | MATLAB | 26,432 | 910 | function [A, W] = fpica(X, whiteningMatrix, dewhiteningMatrix, approach, ...
numOfIC, g, finetune, a1, a2, myy, stabilization, ...
epsilon, maxNumIterations, maxFinetune, initState, ...
guess, sampleSize, displayMode, displayInterval, ...
s_verbose);
%FPICA - Fixed point ICA. Main algorithm of FASTICA.
%
% ... |
eab2dd3704939da0f7c8b0c6b064569f28d6b23451132fe7efacf6d694b85e43 | MATLAB | 26,446 | 611 | % saveBallLegStepParamCond_bouts.m
%
% Function that saves legStep parameters for turning bouts, defined by yaw
% velocity peaks. User can specify FicTrac conditions that yaw
% velocity peaks must meet.
% Extracts bouts that meet FicTrac conditions and accounts for timing of
% step relative to yaw velocity peak
% E... |
d91a8a3cd3492cc9e6f2dbf16a94adf60ae3212c8c94fa1f504e7a3f66b000c8 | MATLAB | 26,484 | 531 | function [M_final,shifts,template,options,col_shift] = normcorre(Y,options,template)
% online motion correction through DFT subpixel registration
% Based on the dftregistration.m function from Manuel Guizar and Jim Fienup
% INPUTS
% Y: Input data, can be already loaded in memory as a 3D
% ... |
72cf83df070073f8938ae6fdfa0a1913a6cd3076afc2a2a0d26d09fb315c8945 | MATLAB | 26,491 | 592 | % extractOptomotorLegStepParamsOptoCond_fly.m
%
% Function to extract leg step parameters with optomotor visual stimuli
% presented and optogenetic stimulation, with conditioning.
% This is a variant of extractLegStepParamsOptoCond_fly() with the addition
% of optomotor visual stimuli. Works like conditioning
% in e... |
ab9c8923d467ad78b4aae6faf0378a9e4ae1515358c50fa70127010a46bd8642 | MATLAB | 26,503 | 829 | %% PB-related codes
% The code follows the figures order
% Task difficulty modulation of neuronal activity in the auditory cortex
% Haimson B, Gilday OD, Lavi-Rudel A, Sagi H and Mizrahi A1*
%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Figure 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
716beb74cd86a63091da59e3b4151d5b8def41c730fdf7d4921129d8439f5a00 | MATLAB | 26,578 | 541 | function [header] = read_4d_hdr(datafile, configfile)
% hdr=READ_4D_HDR(datafile, configfile)
% Collects the required Fieldtrip header data from the data file 'filename'
% and the associated 'config' file for that data.
%
% Adapted from the MSI>>Matlab code written by Eugene Kronberg
% Copyright (C) 2008-2009, Centre... |
7754ec47ab3056babdcd11cc7ad51c38dea8a59ac8cd311ed2d146b15b176a2f | MATLAB | 26,650 | 594 | % extractLegStepParamsIInj_fly.m
%
% Function to extract leg step parameters with current injection.
% This is an updated variant of sortLegStepsByIInj() and
% saveLegStepParamByCond_fly(), that does basically the same as those two
% functions together, except that it allows for filtering valid I inj
% trials by th... |
5782d7b787031a1ad5c8ba37fe713fc2b1181b3bfe9087f1f9303adacbe2e2bf | MATLAB | 26,767 | 619 | % saveLegStepParamCond_bouts.m
%
% Function that saves legStep parameters for turning bouts, defined by yaw
% velocity peaks. User can specify conditions in bodytraj that yaw
% velocity peaks must meet.
% Unlike, saveLegStepParamCond_indpt, extracts bouts that meet bodytraj
% conditions and accounts for timing of st... |
4a68d35861ded1285414ba84e7f63c912d36d8fc937ee75b354c6cff4f0a36d1 | MATLAB | 26,820 | 567 | function [output_UFARSA opt_out] = reoncstruction_UFARSA(fluors,opt)
% [output_UFARSA opt_out] = reoncstruction_UFARSA(fluors,opt)
%
% Reconstruction of spiking activities from the smoothed fluorescence trace.
% The main steps included in this function are used for: Setting the leading threshold, Reconstruction,
... |
ec7411b895b49071b55e8ed84eff4a0c05f7357fc8037d3f03e5179da07d4fd2 | MATLAB | 26,903 | 599 | % extractLegStepParamsOptoCond_fly.m
%
% Function to extract leg step parameters with optogenetic stimulation.
% This is a variant of extractLegStepParamsOpto_fly() in which conditioning
% on forward walking before/during/after the stimulation has been replaced
% with a general user-specified set of conditions. Works... |
a1e1dd24815c8c61b973af8c71167736a3841f03caa4ec26663bd46d176ef4c3 | MATLAB | 26,920 | 712 | % Performs Bayesian nonparametric bootstrap and calculates posterior statistics
% for the mean(s) or regression coefficients of univariate or multivariate data.
%
%
% -- Function File: bootbayes (Y)
% -- Function File: bootbayes (Y, X)
% -- Function File: bootbayes (Y, X, CLUSTID)
% -- Function File: bootbayes (Y, X, ... |
145ed280fbe9ce63027e56a79ed15425c74e4cbebfb9d206ae93a4d1a5e316ae | MATLAB | 26,940 | 550 | %Function to conduct an cluster based permutation test for ANOVA with a
%between subjects factor
%
%EXAMPLE USAGE
% GRP = FclustGRP(GRP, 'bins', 1:6, 'bg_factor_name', 'mood', ...
% 'wg_factor_names', {'probability', 'emotion'}, ...
% 'wg_factor_levels', [3, 2], 'time_wind', [500, ... |
1b0efd8a3ec4a4d17c7463226139b51f003a338e4ff5567d001b57fb0c245cb9 | MATLAB | 27,053 | 372 | % OptoDoseResponse_PooledQuantification_2023
% DATA ANALYSIS PIPELINE FOR FIBER PHOTOMETRY EXPERIMENT
% Name: OptoDoseResponse_PooledQuantification_2023
% Cohort: PFC dLight1.3b with opto
% May 2023 - Marie Labouesse, marie.labouesse@gmail.com
% 1- POOLED QUANTIFICATION
% loads FP data previously analyzed ... |
473e9bc429f4dcfc2e362140022431638763e1f6e4ebd884ed1b67201ccb73e8 | MATLAB | 27,153 | 760 | % legTrackEphysAnalysisScript.m
%
% Quick and dirty script for starting to look at leg tracking and ephys
% responses together
%% analysis constants
% indicies for specific body parts
% fit line to head and 3 pts defining midpt b/w legs
refPts.lineFitInd = 7:10;
refPts.midPtInd = 9;
refPts.headPtInd = 7;
refPts.abdP... |
2fdd2f095a6819d9745d2bc95855ae67e9904fde998351a9faea83a4c8cafba8 | MATLAB | 27,314 | 528 | function Track = initial_sweep(image_stack, Track, parameters, plot_index)
% given a sequence of worm images, this function finds the centerlines
%% STEP 1: define parameters %%
nPoints = 20; % Numbers of points in the contour
gamma = 15; %Iteration time step
% ConCrit = .1; %Convergence cr... |
0acadcd1062363fdb914625a86eb0e9b540d8c3ac77cd0e435c093c16a223f59 | MATLAB | 27,515 | 662 | classdef analyzeseg_modified < handle
% This is a slighly modified version of the class analyzeseg()
% The original class, created by Hongh-Hsi Lee, can be downloaded from:
% https://github.com/NYU-DiffusionMRI/RaW-seg
% this class needs the files: TR_high.mat, TR_low.mat, TR_medium.mat
properties (Constant =... |
ca04f7099712cdcb6d036bee1fd2e0915716e7968e55cd4776aa97b3aa3ae75a | MATLAB | 27,608 | 811 | function cancel = multiWaitbar( label, varargin )
%multiWaitbar: add, remove or update an entry on the multi waitbar
%
% multiWaitbar(LABEL,VALUE) adds a waitbar for the specified label, or
% if it already exists updates the value. LABEL must be a string and
% VALUE a number between zero and one or the string 'Cl... |
99633b7503df8e707cba74175377b46d05d2e327d5c669fc301ced52787bb7e0 | MATLAB | 27,695 | 976 | % DNg13DNa02FancAnalysisScript.m
%
% Script for performing analyses on DNg13 and DNa02 connectivity in FANC
% Newer version of genDNg13DNa02digraphScript.m
%
% Digraph properties:
% Nodes:
% Name - [required by digraph]
% Whimsy
% Location
% Hemilineage
% Neurotransmitter
% Edges:
% EndNo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.