sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
cf4b60dda09a3817a1e4db5d9e33c80b20ece971177e25c3ac047742f902470a | MATLAB | 12,087 | 364 | % f_findHFOxEnEnt.m [As a part of HFO Detection Project]
% Written by:
% Miguel G. Navarrete Mejia
% Electrical Engineering MS candidate
% UNIVERSIDAD DE LOS ANDES
% Colombia, 2012
% mnavarretem@gmail.com
function m_HFOEvents = f_findHFOxMNI(pstr_SignalPath,ps_SignalIdx,...
... |
03f6dbef4ce50f7ca27cd242cc8fa80f0b69475c07baf80893ee3df55a4eb8a1 | MATLAB | 12,090 | 315 | % Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024
% This makes Figure 6C.
%
% Note that the figures were post-processed in Adobe Illustator.
close all
clear all
clc
% Paths
run('../load_figure_config.m')
INPUT_FOLDER = CHENGS_TASK_2C_FIGURES_CONFIG.DATA_FOLDER;
OUTPUT_FOLDER = CHEN... |
50e146a7955100e3889bf8140b130bd0a0cea972a6330f7c8d3490d3eb28e9f8 | MATLAB | 12,102 | 338 | % Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024
% This version makes Figure S13B, which are the cell counts
% and their identities across days (using registered cells). It tracks
% which deciles the cells change to.
%
close all
clear all
clc
% Paths
run('../load_figure_config.m'... |
5fb9dc776465619477857913d32299a839def7288f82a463bf2fe62296c11cf3 | MATLAB | 12,109 | 244 | function [run] = load_events(run, events, ID)
%% LOAD_EVENTS
% Loads the (ELAN) events for the given participant and stores it in the run
% structure. It also redefines some of the motion events based on the
% motion data by using a better function (v2) than was used for the import events for
% ELAN.
%
% INPUT:
% - run... |
3ca32262475b3d4f36421aa23fbc7c9ca67d4ab61da31ac9c0952ebf75b9276b | MATLAB | 12,123 | 316 | classdef chanData
properties
excelFile = [];
expmt_table = [];
whoseData = [];
expmtDataFolder = [];
bFiles = [];
end
methods
function [self, bPath, expmtRow] = findBehavior(self, name, folder)
expmtRow = find(strcmp(self.expmt_table.... |
b24cd80f45e6f340b9daed74bdb59d4825ad808aee7abdf2f6d36e8167dc52d4 | MATLAB | 12,125 | 349 | % script that prompts user for mat, annotation, and movie files, parameters
% for computing suspicious frames, then computes suspicious frames, then
% brings up the fixerrors gui
RUN_UNTRACKED = 0; % run FixErrors with no Ctrax annotation
%% set all defaults
moviename = '';
moviepath = '';
setuppath;
%% read last... |
aa1860818856284fd4ab5f6b61f3983bfaf02d7a0792593147fc2ae4d918995e | MATLAB | 12,128 | 249 | function [] = PlotBehavioralMappingExperimentGroup (LNPStats, meanLEDPower, stdLEDPower, L, density, xx, parameters)
%Takes in structure LNPStats and plots them depending on the settings
% Detailed explanation goes here
fps = parameters.SampleRate;
BTA_seconds_before_and_after = 10;
BTA_seconds_before = B... |
d63654a28f2a6a56222b5e38ede4af219ead0c28ca644c598065755e0036f37b | MATLAB | 12,138 | 307 | classdef (Sealed) webConfig < handle
% Handles loading and parsing of the web preview config file.
%
% Purpose
% Reads the config file once, validates every field, and then holds the values as
% read-only properties, so an existing webConfig object is always valid. The secret
% token is kept ou... |
a23de39bbfa97b732c218a2847dd2974948f1670ff93db113db797c37da421dc | MATLAB | 12,144 | 247 | %% 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; ... |
73af4b59b4cfba4602fdef1ebaaecc218d08ad811d70d70e6e7a09458b3ab0c5 | MATLAB | 12,181 | 302 | % saveLegStepParamByCond_fly.m
%
% Function that takes in user selected pData files (for 1 fly) on which
% sortLegStepsByIInj or sortLegStepsByOpto has been run and saves mean,
% and std dev for specified legStep parameter for each condition for that
% fly
% Can condition on a different value of legStep params
%
%... |
174d36d3f5a9099e519151c2a6a32fff68794fd2062fbf175487e17b48f80135 | MATLAB | 12,186 | 189 | function [Vcell,Vnuc,Tri,a] = generateNeuralBody(neur_params)
% [Vcell,Vnuc,Tri,a] = generateNeuralBody(neur_params)
%
% This function samples a neural shape using an Isotropic Gaussian process
% on a sphere. The function basically draws a set of points whos
% covariance matrix depends on the geodescic distance along ... |
3b770ba3bc03c4feeeca8b4f66530fdf4d811a2f9ba5c4fa7e42373e92f23bc7 | MATLAB | 12,208 | 337 | % interactGetNotMovingInd.m
%
% Function for selecting not-moving times.
% Brings up GUI with plot of mid-leg positions, shaded regions of not
% moving & red dots on not-moving, and sliders to adjust all parameters
% that determine not-moving portions.
%
% INPUTS:
% legTrack - struct of leg tracking data, output... |
c08b7d380524960300ad7628284e58a6a3662f62c5951114f38999e73145c575 | MATLAB | 12,218 | 332 | function fH = plotVoxelpRFLocationDataAndModelTs(roiVoxelData, prfData, modelPredData, varargin)
% fH = plotVoxelpRFLocationAndTs(roiVoxelData, prfData, modelPredData, ...
% [TR], [conditionData], [roiName], [saveFigs], [savePth])
%
% Function to plot a single vertex or vertices pRF location next to it's time... |
fe62604096b64b1adc8b1a05dfba355f198cb19256b9f5735cd1f634f4df8c4f | MATLAB | 12,253 | 275 | function h_fig = plot_UFARSA(output_UFARSA,opt, true_spikes)
% h_fig = plot_UFARSA(output_UFARSA,opt, true_spikes)
%
% This function plots the UFARSA's reconstruction results as well as different versions
% of the processed fluorescence trace. For a complete list of plotting options, and saving
% them please s... |
fa0d3552374e5b8263102899fe10318bf71dee4b2f10112f897df57402ff2f29 | MATLAB | 12,254 | 343 | classdef Subject < types.core.NWBContainer & types.untyped.GroupClass
% SUBJECT Information about the animal or person from which the data was measured.
% OPTIONAL PROPERTIES
properties
age; % (char) Age of subject. Can be supplied instead of 'date_of_birth'.
age_reference; % (char) Age is with reference to... |
b7e4d2764911b8bc1fade47de5ae2750884c556f6546948d530a64cf95bd58d9 | MATLAB | 12,268 | 389 | classdef rmsobj < handle
properties (GetAccess = public, SetAccess = public)
sig0;
sig;
TD;
dtime;
Tstep;
NPar;
res;
dx2t;
dx4t;
NParbin;
bval;
bvec;
Nbvec;
iPoints;
Din;
Dex;
kappa;
T2in;
T2ex;
iFlag;
pgse;
gval;
D... |
6bd6577f043689e5785fde94521066717642f402890bb4a1c0678c24fd222dff | MATLAB | 12,277 | 389 | function [slice_ind,dir_ind,roilabel,copytype] = aedes_roi_copy_gui(ROI,roi_ind)
% AEDES_ROI_COPY_GUI -
%
%
% Synopsis:
%
% Description:
%
% Examples:
%
% See also:
%
% This function is a part of Aedes - A graphical tool for analyzing
% medical images
%
% Copyright (C) 2006 Juha-Pekka Niskanen <Juha-Pekka.Niskan... |
016390dac6c432d2397fda0b2c3b377bd0ba10ce903543ec9e050b89f7f82733 | MATLAB | 12,288 | 334 | %% averaging expert days
%load variables
close all
clearvars
clc
%give folder with matlab functions
folder_with_matlab_scripts = 'Y:\Chernysheva Maria\MATLAB\Matlab_scripts_AlloLight';
addpath (genpath(folder_with_matlab_scripts))
data_folder.Veh1 = 'Y:\Chernysheva Maria\Fiber_Photometry_data\data_for_a... |
fa567f8c670ce1ece6014f112e98d0ac2528526e103c49571bfd27b4397fc498 | MATLAB | 12,300 | 237 | %function update_unitsTable(Sesname, elec,unit,field, val)
clear all; close all;
globals; initglobals;
DATA_TYPE = 'OF';
%DATA_TYPE = 'EM';
FigType = 'final';
FigType = 'data';
an_baseFig = 100;
%globals;
unitsTableFilename = ['unitsTable' 'OF'];
%unitsTableFilename = ['unitsTable' 'EM'];
load(unitsTableF... |
ff103066d344efa3463d93f2a1418a3d438982471bd314dbcfead708e14e2515 | MATLAB | 12,300 | 278 | function [] = simseq_processTimeSeriesDataSeparateSquares(pths,hm, data, prfParams, ...
alignMe,bslCorrect,prepostBlankTRsForBslCorrection, dt, saveDataFolder,subFolderName, saveData)
%
% simseq_processTimeSeriesDataSeparateSquares
%
% Function to separate data of simseq experiment into separate stimulus
% square... |
c8dd463480ae85a5711460827ee035a73916a03e44f9f9305e9505fdbb1d32c8 | MATLAB | 12,334 | 298 | % cpoolrule
%
% usage: taskTemplateContrast10bit
% by: justin gardner
% date: 03/25/2010
% purpose: Template for using the gamma lookup table to get better luminance resolution.
% You still have 8 bits of color values that you can display at any given time,
% but you can se... |
0a0ba13894fe4b505c0ac747c3f6508c4194ada8c0e463472d2c98adc1d0b2df | MATLAB | 12,353 | 397 | %stochastic Lorenz system simulation
% for paper "Inferring stochastic dynamics of complex systems", T.-T. Gao,
% B. Barzel, and G. Yan
% equation from paper 'Learning stochastic dynamical systems with neural
% networks mimicking the euler-maruyama scheme'
% and 'Dynamics and transitions of the coupled Lorenz system'
... |
276489176a8bfcf824df9ec96dfbf0120f72b817e87d6624fe98b1a6921dc3b4 | MATLAB | 12,406 | 341 | function File = GetFullPath(File, Style)
% GetFullPath - Get absolute canonical path of a file or folder
% Absolute path names are safer than relative paths, when e.g. a GUI or TIMER
% callback changes the current directory. Only canonical paths without "." and
% ".." can be recognized uniquely.
% Long path names (>259... |
c5f46be7a3778ce456a2348333f51e6e4a38f8207d832c4d144c7a34267bccee | MATLAB | 12,418 | 402 | function editor(tree)
%XMLTREE/EDITOR A Graphical User Interface for an XML tree
% EDITOR(TREE) opens a new Matlab figure displaying the xmltree
% object TREE.
% H = EDITOR(TREE) also returns the figure handle H.
%
% This is a beta version of <xmltree/view> successor
%
% See also XMLTREE
%_________________________... |
04f8d5a8fb2c8c7f25ca80ad905f9e4ca372359ccd8fd53fbf9313ccd83868e1 | MATLAB | 12,439 | 213 | function success = save_individual_images(folder_name)
% tracks and saves individual worms for all the images in a directory
addpath(genpath(pwd))
parameters = load_parameters(folder_name); %load experiment parameters
%% STEP 1: initialize %%
number_of_images_for_median_projection = parameters.Post... |
8c10266b9437c5434e0ae5a151aeed0b28238a237f361b9a8fa164025d4749b7 | MATLAB | 12,446 | 303 | function [finalOutput,metaStruct] = TDMS_readTDMSFile(tdmsFileName,varargin)
%TDMS_readTDMSFile Reads TDMS file and does minimal processing to obtain output
%
% [finalOutput,metaStruct] = TDMS_readTDMSFile(tdmsFileName)
%
% [...] = TDMS_readTDMSFile(tdmsFileName,'Property1',PropertyValue1,...)
% allows for speci... |
ee397436f5be3d9f4ceb3d7139c5acfcff5efe9941c38cacc189d3b0dd47a903 | MATLAB | 12,450 | 424 | function [crit_p_value, adj_p_value] = p_crit_n30(alphav, p_obs)
% MATLAB implimentation of p.crit.n30 from Rand Wilcox's
% robust statistics functions.
% requires:
% https://github.com/CPernet/Robust_Statistical_Toolbox/blob/master/stats_functions/low_level_stats_functions/rst_hd.m)
p_table = [...
0.696 0.828 0.... |
d5484d3f19d7b8d50c2a5068a1e21f01cefe0ffff1ef91e9f55c9e7f0ca603cb | MATLAB | 12,452 | 247 |
function [Spikes,SpikesPerFrame,LFP,Theta,Nose,Fs,qualdata]=getSpikes_EMfields;
%
%Session_str, e.g.,'20150906Thalamus36\20150906Thalamus36_1to...'
%
%Spikes{Lelecs,Lunits}, cell holding spike times in ms from SessionStart
%LFP{Nchannels}, cell, holds LFP data in XXX units. Filtered (1,50)
%Theta[.L;.R], struct... |
90cda4e336c9bb6c7133b842bd33d9ba1d3b23e029d1e1541466320e7e8b9095 | MATLAB | 12,463 | 467 | function [filelist,rem_ind,add_ind,sort_ind] = aedes_editstack(DATA)
% AEDES_EDITSTACK - GUI for editing image stack
%
%
% Synopsis:
%
% Description:
%
% Examples:
%
% See also:
%
% This function is a part of Aedes - A graphical tool for analyzing
% medical images
%
% Copyright (C) 2006 Juha-Pekka Niskanen <Juha-... |
4f2545d3e4783f79229597d290c0c295d5178e636c91b5598ccb7e673b33a579 | MATLAB | 12,471 | 414 | %% Code Outline
% surf_schaef2 = cerebral cortex plot
% surf_cbm = cerebellum plot
% subcort_plot or plot_subcortical = subcortical plots
% The following script contains code for:
% - all GLMs created in the manuscript
% - comparisons against Neurosynth data
%% Peak TRs BOLD analysis
% L... |
3b138f5a8ad3b23faac0b8a3caf50b53ee14a36ee4f960af74570cde3828a705 | MATLAB | 12,473 | 329 |
% This MATLAB code illustrates the central method in:
% Luppi, Singleton, Hansen, Jamison, Bzdok, Kuceyeski, Betzel, Misic.
% "Transitions between cognitive topographies:contributions of network structure,
% chemoarchitecture, and diagnostic categories." Nature Biomedical Engineering (2024)
%
% It was devel... |
73e2d90cd517684340c88cd5783b780ba7f74b8741f56d3bfa04d043a0bef1fb | MATLAB | 12,481 | 321 | % Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024
% This makes Excel files needed for part 2 (Figure S9) (but used Excel + R for paper).
close all
clear all
clc
% Paths
run('../load_figure_config.m')
INPUT_FOLDER = CHENGS_TASK_2C_FIGURES_CONFIG.DATA_FOLDER; %'../figure_S13B/local_o... |
067e33a809272e79c27420dd92de5403d47b85e07adc73930f68922628f0801a | MATLAB | 12,488 | 410 | function [m, sx, units]=ReadDMFile(filename,logfile)
% function [m, sx, units]=ReadDMFile(filename,logfile) Read a Digital
% Micrograph file version 3 or 4 and return the first image in its native
% data format (e.g. int16), along with its pixel scale information
% (typically the units value = 'nm'). If a logfile name... |
928060397215892055813b6b0c869d035cdce579af3741e8408eadc13a8a0afc | MATLAB | 12,507 | 261 | close all
goodTracking=(sBehaviorAnalysis.goodFirst:sBehaviorAnalysis.goodLast);
offsetEPhysFrames=sBehaviorAnalysis.offsetEPhysFrames;
Movie_offset=sBehaviorAnalysis.Movie_offset;
windowSizeMin=0;
windowSizeMax=0;
%% Laser %%
open (sprintf('D:\\Tracking\\Thalamus\\%s\\%s%s\\%s%sMovie%s_laser.mat',sBehav... |
7175ee1e8248230e40555d976ddeec3451e54dc47e9d4342def12318740840cf | MATLAB | 12,530 | 334 | function [pnt, ori, lab] = channelposition(sens)
% CHANNELPOSITION computes the channel positions and orientations from the
% coils or electrodes
%
% Use as
% [pos, ori, lab] = channelposition(sens)
% where sens is an electrode or gradiometer array.
%
% See also FT_DATATYPE_SENS
% Copyright (C) 2009-2012, Robert Oo... |
63bd78b17c41cf39d6eb20691606c10ed198ef76ac5953f12e6f8e65622c9034 | MATLAB | 12,535 | 323 | %{
Copyright (C) Cambridge Electronic Design Limited 2014
Author: Greg P. Smith
Web: www.ced.co.uk email: greg@ced.co.uk
This file is part of CEDS64ML, an SON MATLAB interface.
CEDS64ML is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License... |
f7c369288ac248a829fe5d22de7cf9824c2d016d5e07b4dbe31adcd8aa8334f7 | MATLAB | 12,542 | 250 | % EYE TRACKING DATA INTERPRETATION
%% ________________________________
% This script collects information about gaze data and area's of interest
% for specific tasks recorded with a Tobii eyetracker device. An
% I2MC-filter is used to find the fixations is noisy data.
%% OPTIONS
%% Screen options
opt.xres = 1... |
f73c398eb85935f28b90262a2c9f798b7a82e55cbbd3c7359fb4d860a5fb78fc | MATLAB | 12,547 | 289 | clear all; close all;
% load data
data = readtable("Grating2AFC_TransProb_behav_history_clean_4fitting.csv");
mouseNames = unique(data.mouseName);
%parameters = [0.0944,0.9625,0.9674,0.3635,0.0668,0]; % BEST PARAMETERS - Multi-trial
parameters = [0.0951,0.4125,0.9998,0.3996,0,0]; % BEST PARAMETERS - Single-trial
val... |
00991b5dd1651ad3d329a3878cefbc5c0e3e117f74270a3a92e3c039c9b47dac | MATLAB | 12,557 | 328 | function [GREMag, GREPhase, Params, handles] = readerwrapper(PathName, FileName, handles)
% function [GREMag, GREPhase, Params] = readerwrapper(PathName, FileName, handles)
%% Authors: Jiri van Bergen and Xu Li
% Affiliation: Radiology @ JHU - Kirby Center
% Contact via xuli@mri.jhu.edu
%
% readfilewrapper.m is t... |
bcace24e45786165e4f53a31dd8dd2777784a25ad88fa9290946b0b5306411dc | MATLAB | 12,565 | 330 | % Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024
% This makes the Excel files required for Figure S13B
close all
clear all
clc
% Paths
run('../load_figure_config.m')
INPUT_FOLDER = CHENGS_TASK_2C_FIGURES_CONFIG.DATA_FOLDER;
OUTPUT_FOLDER = './local_output';
if ~exist(OUTPUT_FOLDER... |
d1ad19399d1a01c1cef6b1aa700683ee35ebaf77e9f2854af251bf12a1074239 | MATLAB | 12,566 | 317 | classdef (Sealed) DataPipe < handle
%DATAPIPE gives advanced write directions to HDF5 for a dataset for
%chunking, compression, and iterative write.
% DATAPIPE directs HDF5 to use chunking and GZIP compression when
% saving the dataset. The chunk size is automatically determined and
% the comp... |
dda15b970cae58887da8413e3447b815ef7acb0dc1947d8e34792dbdc9fa6611 | MATLAB | 12,569 | 290 | % moveCondPairData.m
%
% Function that takes in metaDat struct of selected trials and returns img
% and fictrac data from pData conditioned on whether the fly was moving or
% not. Has option to exclude data within specified time window of
% transition b/w moving and not moving. Interpolates data to specified
% fram... |
ee55c765fdd9241608d37e2b983046b895a01b77e792547e0728022cb1061157 | MATLAB | 12,577 | 380 | % extractMoveNotMoveFromPData.m
%
% Function that extracts moving and not moving time periods (using
% body velocities) and then computes leg step parameters from raw leg
% tracking data (output of loadFreeWalkTrk2PData())
% User selects single pData file through GUI. This pData file must contain
% the bodytraj st... |
af3f27c2e62fcf15a5385830970cae4d1e207496881be1985e0ef9f17493072b | MATLAB | 12,582 | 296 | function [out] = read_ced_son(datafile,varargin);
% READ_CED_SON
%
% [OUT] = read_ced_son(DATAFILE,VARARGIN);
%
% Reads a analog and event data from a CED SON file
% (SON files are created by Spike2 software). Currently, only
% analog channels and event data can be read.
%
% Optional parameter Default
% 'rea... |
c2319eb36e339535b0b4f67f7edc1f6d93889af17931ba4a91f53dca964bc46e | MATLAB | 12,600 | 322 | function anal = er_chopTSeries2_VaryTrialLength(tSeries,trials,params,varargin);
% anal = er_chopTSeries2(tSeries,trials,params,[options]);
%
% View-independent verson of er_chopTSeries.
% chops up entered tSeries according to the assigned parfiles.
%
% Inputs are tSeries (matrix where rows are time points, cols are
% ... |
1ef13b355634dc130d1a674daff267b71daec32e6d2cd88c73405dec3542ac6e | MATLAB | 12,610 | 386 | function [v, header] = readrec_V4_4(filename,dopermute)
%
% This will read in a rec file from the Philips scanner.
% It will read in REC files even with real and imaginary data
% as well as do the appropriate signal intensity adjustments
% as the REC file stores uint16, but the underlying data can be
% posit... |
b9552b7819f6a4670c88171c06ae91364a305244678e9071be6178c2a4c2b345 | MATLAB | 12,639 | 321 | function ButttonUpFcn(hObject, eventdata, handles)
clc
global passdata
if passdata.doubleclick==1
%% »ñÈ¡µ±Ç°µã
%% ±£´æÐ޸ĵÄÊý¾Ý
if passdata.currentmode==1 && isfield(passdata,'cue')
if ~isempty(passdata.cue)
cueindex=passdata.mode1_channel;
% interval=1/120;
e... |
647f4f72767ffb928802ab8538a70039564a6eaedeae5bce33b6aa6fc2d8ec6f | MATLAB | 12,728 | 321 |
function [Spikes,nose,Fs]=getSpikesEM(File, passNo);
%getSpikesOF, modified from getSpikes to read OpenField data. ehud, Oct
%2016
%
%1. parse the data according to gaps in Timestamps (> 1s)
%Session_str, e.g.,'20150906Thalamus36\20150906Thalamus36_1to...'
%
%Spikes{Nelecs,Nunits}, cell holding spike times i... |
e18e2928b3b62a423e2909f5d4cb2a854f85ff85cd1f086082d1436225478f84 | MATLAB | 12,736 | 243 | function [vol_out,vol_params,neur_params,vasc_params,dend_params,bg_params,...
axon_params] = simulate_neural_volume_lowram(vol_params, neur_params, ...
vasc_params, dend_params, bg_params, axon_params, psf_params, save_loc, varargin)
% [vol_out,vol_params,neur_params,vasc_params,dend_params,axon_params] ...
%... |
e3d670a2961a195f7cf5eea132ee1f4e0be133357f7371ecf24c245a73e06950 | MATLAB | 12,747 | 231 | classdef SSankey < handle
% Copyright (c) 2023, Zhaoxu Liu / slandarer
% =========================================================================
% @author : slandarer
% 公众号 : slandarer随笔
% 知乎 : slandarer
% -------------------------------------------------------------------------
properties
Source;Targ... |
9c6c9046a9f75c38195ca294473839b039f1a14f52669d196abe1f6c40988145 | MATLAB | 12,749 | 303 | function [finalOutput,metaStruct] = TDMS_readTDMSFile(tdmsFileName,varargin)
%TDMS_readTDMSFile Reads TDMS file and does minimal processing to obtain output
%
% [finalOutput,metaStruct] = TDMS_readTDMSFile(tdmsFileName)
%
% [...] = TDMS_readTDMSFile(tdmsFileName,'Property1',PropertyValue1,...)
% allows for... |
ee399137af548a0915b35bc3a77089804d999c570d3885e02aadd37e93c8db66 | MATLAB | 12,765 | 297 | function plotBandpowerPerStimulationLevel(obj, bounds, varargin)
% PLOTBANDPOWERPERSTIMULATIONLEVEL Computes and plots power in given band as a
% function of stimulation amplitude
%
% Syntax:
% PLOTBANDPOWERPERSTIMULATIONLEVEL( obj, bounds, varargin );
%
% Input parameters (mandatory):
% * obj DBScope obj... |
eddb266c0e2767d3fa8d785d62531ba0220b7318ed3e31e17839bc5e75fff8d7 | MATLAB | 12,778 | 330 | function [mask,psfs3,psfs,psfTS,psfBS,psf2p2] = genCorticalLightPathLite_1p(vol_params,psf_params,phzA,phzB,phzC,Uin)
% [mask,psfs3,psfs] = genCorticalLightPath(vol_params,psf_params,vol_out,Uin)
%
% This function generates a point-by-point map of obscuration for TPM
% imaging setting across a neural volume. The func... |
f289605542b1547b4ec8c7810915b185f8d64623c0bec9202e19f5a1112d1ede | MATLAB | 12,785 | 335 | %% Script for the analysis of behavioural data collected during recording of oxygen dynamics in the mouse barrel cortex
% One custom function needed to open the .abf file. This does not work properly if I have it at the end of the script.
% A few of the variable used here are coming from the OxygenDynamics_Master ... |
c5592039ac918546ca508553ed8b5797a77cf6965e8aab2007c5b77ae7367de5 | MATLAB | 12,787 | 329 | % plotAEPPEPmeans.m
%
% Function to plot mean and standard deviation of leg step AEPs or PEPs
% (user specified), colored by specified conditions (iInj or opto).
% Works on multiple pData files. Select through GUI. Should be for 1 fly.
%
% INPUTS:
% whichEP - which extreme position to plot (AEP or PEP), specified a... |
943702dd8353f8d61638f7fd5ad432fcb3c2df3bb46d7d654e3cdaec5988a887 | MATLAB | 12,815 | 339 | % f_GetData.m [As a part of HFO Detection Project]
% Written by:
% Miguel G. Navarrete Mejia
% Electrical Engineering MS candidate
% UNIVERSIDAD DE LOS ANDES
% Colombia, 2012
% mnavarretem@gmail.com
function st_Data = f_GetData(pst_Info,pv_TimeLims,pv_Selected)
% Reads channels data from eeg files
% INPU... |
fc7c175811154848c652229558b073c8fc1ae2a9b07fc59bbbda5d9b31314f2d | MATLAB | 12,820 | 157 | % Most Software Machine Data File
%% ScanImage
%Global microscope properties
objectiveResolution = 15; % Resolution of the objective in microns/degree of scan angle
%Scanner systems
scannerNames = {'LinScanner'}; % Cell array of string names for each scan path in the microscope
scannerTypes = {'Linear... |
871c0f928d9158c1d750861421e27be30f6b06ba39e3dc0f9588c7e70d139331 | MATLAB | 12,925 | 299 | % computeStepParameters.m
%
% Function that takes step indices [start, mid, end] and computes step
% parameters: step lengths, step directions, step durations, step speeds,
% step X velocities, step Y velocities
%
% INPUTS:
% legSteps - struct of leg step data, from processLegTrack() with fields:
% maxIndsAll... |
3953f8e85b5bec598110a52a614a791316abab834f65ef42e99e6810737513d8 | MATLAB | 12,938 | 286 | function [file_name_to_save, filename_raw, filename_reg] = min1pipe_h5_vary_nopar(...
path_name, folder, filename, Fsi, Fsi_new, spatialr, se, ismc, flag,...
pix_select_sigthres, pix_select_corrthres, merge_roi_corrthres, dt, kappa)
% main_processing
% need to decide whether to use parallel computing
% Fsi:... |
7c45721c5d6ced2c6b580c17a1bdfeae1b4c53ac9693d37f465fee595b4137a5 | MATLAB | 12,951 | 227 | classdef SSankey < handle
properties
Source;Target;Value;
SourceInd;TargetInd;
Layer;LayerPos;
AdjMat;BoolMat;
RenderingMethod='interp' % 'left'/'right'/'interp'/'map'/'simple'
LabelLocation='left' % 'left'/'right'/'top'/'center'/'bottom'/'outside'
... |
5de76f3c77395feec71cb87c746e519fe507bdf272c1f35e4e9bae180cdb774c | MATLAB | 12,952 | 181 | clear
add_ndt_paths_and_init_rand_generator
ds = basic_DS('stable-gonogo','stimulus_ID', 3);ds1 = basic_DS('uncertain1-gonogo','stimulus_ID', 3);
ds2 = basic_DS('uncertain2-gonogo','stimulus_ID', 3);ds3 = basic_DS('uncertain3-gonogo','stimulus_ID', 3);
ds.randomly_shuffle_labels_before_running=0;
cl =libsvm_CL;
f... |
80a65e7552b8cdd940925a4f2212549901c40925a0df9d4c47adba367539a1eb | MATLAB | 12,972 | 414 | % mglTestRenderPipeline.m
%
% usage: mglTestRenderPipeline()
% by: justin gardner
% date: 06/08/2022
% purpose: Function to test mgl rendering pipeline with progressively
% more in the pipeline to see when there is a failure.
% usage: mglTestRenderPipeline
%
% args: screenNu... |
ef1cf7142b2394e4bb41f21bb2bcb2cf93508626959f682be6504a5857893c37 | MATLAB | 12,985 | 288 |
%function [Spikes,nose,Fs]=getSpikesOF(File);
%getSpikesOF, modified from getSpikes to read OpenField data. ehud, Oct
%2016
%
%1. parse the data according to gaps in Timestamps (> 1s)
%Session_str, e.g.,'20150906Thalamus36\20150906Thalamus36_1to...'
%
%Spikes{Nelecs,Nunits}, cell holding spike times in ms fr... |
c3d32ad01f8e7716dda41e047571f1641b8746cb3e06340ccb98b162bd1dd524 | MATLAB | 12,996 | 381 | clc
clear
%% Loading the Data for Model Development
% This code develops steady-state ECNN models for the cases when no noise
% or a constant bias with / without Gaussian noise is added to true data to
% generate training data
% This code requires the MATLAB Neural Network Toolbox to train the
% unconstrai... |
48de94c144154bf072d01bb033c8a6864e4a1beffbaf7ce6bd9a39065551e4a2 | MATLAB | 13,050 | 360 | % determineMoveThresh.m
%
% Function that identifies times when the fly was locomoting vs. not
% locomoting using a threshold on a smoothed sum of velocities in all 3
% ball axes. Plots velocities, gives user option to shift threshold,
% displays threshold. Operates on individual trials'
% pData and saves back into... |
5e0856b492496147e61ee574c3d5f2ed6ca48eed7a08d2bacdb3cced78fd5178 | MATLAB | 13,053 | 340 | % Fig 3. Survey results of neuroimaging-based predictive models of pain
% 3a. Studies: Measurement tools
% 3b. Studies: Populations
% 3c. Models
% 3d. Sample size
%% Set up
clear; clc;
% Load Data
basedir = '/Users/donghee/Documents/project'; % set a path to local project directory
githubdir = '/Users/donghee... |
7bf60939da409a69f3ba985b6f1c30b33f09e861b5baadf41e9a753868da3e4f | MATLAB | 13,062 | 382 | clc
clear
%% Loading the Data for Model Development
% This code develops steady-state MCNN models for the case when a random
% bias with / without Gaussian noise is added to true data to generate
% training data. A linear noise model is considered.
% This code requires the MATLAB Neural Network Toolbox to ... |
0a4af46eef1d200c907970a18a056ddaa4a8c2fbc90d454aa12bcc1f802e239d | MATLAB | 13,086 | 316 | %Calculate F-observed and the empirical F-distribution for a
%within-subjects ANOVA with up to three factors. This function calculates a
%one-way ANOVA, two-way interaction, and three-way interaction.
%
%EXAMPLE USAGE
% >> [F_obs, F_dist, df_effect, df_res, exact_test] = perm_rbANOVA(data, [3, 4], 1e4)
%
%REQUIR... |
e3ccee1ae1fb040415fe5cdb510009648c780d2b1251e81b88f76490e1fc8f3c | MATLAB | 13,095 | 342 |
clear all; clc;
%% load data
data_path = '/Users/celia/Documents/two_context_data'; % change this
calout = load(fullfile(data_path, 'calcium_20220516_170618/analysis_results.mat'));
tetout = load(fullfile(data_path, 'tetrodes_20220316_100902/analysis_results.mat'));
calin = load(fullfile(data_path, 'calcium_20220516_... |
595738a6c79fdb9c15e3a37e8b1f8df186ad997e3dd98dd62a774153e745829f | MATLAB | 13,103 | 343 | clc
clear
%% Loading the Data for Model Development
% This code develops dynamic (hybrid series NLS - NLD) ECNN models for the
% case when a time-invariant bias with / without Gaussian noise is added to
% true data to generate training data. The other type of hybrid series ECNN
% i.e., NLD - NLS model can ... |
7d0039f7bbb89531a9de8693aa58a9b45bf7d53f5f9ace4ac64e7f39a40a78ba | MATLAB | 13,123 | 441 | function gui_adv(x, y)
%
% This file is needed by FASTICAG
% This is the advanced options -dialog
% @(#)$Id: gui_adv.m 8776 2013-11-14 09:04:48Z roboos $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Global variables
% Handle to the window
global hf_FastICA_AdvOpt;
% Handles to... |
e8914d717850a4eb366eb5749076589f427b462f6c3410272db35cd129d9e7ba | MATLAB | 13,133 | 344 | % binScatterMoveCondData.m
%
% Function to plot movement conditioned values of one y variable against 1
% x variable, like a scatterplot, but in x-value bins. For each x bin, 1
% box and whiskers plot
% Similar to scatterMoveCondData().
% Requires output from moveCondPairData()
% Has option to plot data from all flie... |
12f211703ab706276aaa669567e389f4602edb53fab447babaa066a7f14d4914 | MATLAB | 13,139 | 336 | %% fig.4 - Data Processing and Concatenation for All Animals
% Run config.m
% Process data for each animal using the processAnimalData function
[psth, response, visI] = processAnimalData(cell_activity_allday, stim_type_allday, trials, nanimals, nstim_type, win, threshold, ngratings);
%% Pick Up Significantly Facilit... |
4cfefeb857c9bd56c622fdeb60d63a49ff1e9b94c201fa224d0a9ba08f089f0b | MATLAB | 13,144 | 372 | function [change_explained_by_adap,FR_touch]=all_Tcurves(fig4,fig2)
do_extra_plot=0;
counter=0;
counter2=1;
av_unit=0;
percentile=0.95;
NpointsTcurve=4;
ff=dir('*.mat*');
nunits=33;
FR_touch=nan(nunits,4);
h_atte=nan(nunits,1);
coeff_first=nan(nunits,2);
coeff_later=nan(nunits,2);
hw=nan(nunits,1);
pval_atte=nan(nunit... |
b7227981585d8ba7da7304b9c1d7c5ba6d971c603145438e1331a6d32e806951 | MATLAB | 13,162 | 242 | function [neur_num,neur_vol,vol_params,gp_vals,neur_locs] = ...
generate_bgdendrites(vol_params, bg_params, dend_params, neur_vol, neur_num, gp_vals, gp_nuc, neur_locs,neur_vol_flag)
% [neur_num,neur_vol,vol_params] = generate_bgdendrites(vol_params, ...
% dend_params, neur_vol, neur_num, gp_vals, gp_nu... |
d9a0af07723ffd2a56beec78ee6f0974da64f5088c56fc17d1d9e8c69023be8e | MATLAB | 13,162 | 243 | %function update_unitsTable(Sesname, elec,unit,field, val)
clear all; close all;
DATA_TYPE = 'OF';
%DATA_TYPE = 'EM';
FigType = 'final';
an_baseFig = 100;
%globals;
unitsTableFilename = ['unitsTable' 'OF'];
%unitsTableFilename = ['unitsTable' 'EM'];
load(unitsTableFilename);
Titles = unitsTable(1,:);
%rem... |
3e5f552dc7b021f40882b7bdfdfccd72655a8c4d49989ac1dd12fba3c5db1bde | MATLAB | 13,177 | 341 | % extractLegStepsFromPData.m
%
% Function that computes leg step parameters from raw leg tracking data
% User selects single pData file through GUI. This pData file must contain
% the legTrack struct (output of loadTrk2PData()), the fictrac_proc struct
% (output of filtFictrac_all().
% Calls two interactive figures, ... |
723a6c6d36d562e189f3335f4839d0dfb790b439027798917ae6e3f3912a6e32 | MATLAB | 13,218 | 380 | % plotOptomotorBoutsStepParam_allFlies.m
%
% Function that plots the output of
% extractOptomotorBoutsLegStepParams_fly() for one, user specified step
% parameter. User can select subset of bouts based on peak velocity or
% change in velocity.
%
% INPUTS:
% condPeakVel - struct of parameters for selecting bouts ba... |
000414bf06b7a28f20166944d4dabd1f7b369243c38d91f02f6a837d779e6db2 | MATLAB | 13,221 | 355 | % Performs permutation or randomization tests for regression coefficients.
%
% -- Function File: PVAL = randtest (X, Y)
% -- Function File: PVAL = randtest (X, Y, NREPS)
% -- Function File: PVAL = randtest (X, Y, NREPS, FUNC)
% -- Function File: PVAL = randtest (X, Y, NREPS, FUNC, SEED)
% -- Function File: [PVAL, STAT]... |
c58a96ca1d941dab74bd78a52f92ab8f6d95160a20cbbec3a4b4ef72a79d799c | MATLAB | 13,225 | 377 | close all
clear all
clc
OUTPUT_FOLDER = uigetdir([],'Select output folder');
USE_REAL_BEHAVIOUR_DATA = false;
%SIM_TYPE = 'tetrode';
SIM_TYPE = 'calcium';
% Settings
video_width_px = 720;
video_height_px = 480;
arena_width_cm = 20;
arena_height_cm = 30;
prob_180_rots = 0.5; % This should be between 0 and 1.
show_fie... |
11c58af69454b11041194c69fc79ea318b9346464002f94536672d1379ced662 | MATLAB | 13,229 | 233 | function out = dfa_plotripcontent(index, excludeperiods, ripdecodes, trials, marks, tetinfo, varargin)
% define defaults
appendindex = 0;
box_thresh = .9; % proportion of posterior density in box to be considered box ripple
armthresh = .5;
v=1;
posterior = 0;
tet=[];
span = 'full'; % vs rips
% process varargin if pre... |
8628db99b8faeb2290459c07f8ed92f6f1ee6d88ef0522643b2757c2937da63f | MATLAB | 13,229 | 364 | % determineMoveThresh.m
%
% Function that identifies times when the fly was locomoting vs. not
% locomoting using a threshold on a smoothed sum of velocities in all 3
% ball axes. Plots velocities, gives user option to shift threshold,
% displays threshold. Operates on individual trials'
% pData and saves back into... |
0d988245d338abebcfe25c14a23116456cacbe0a367d1c9e3fbccb855de46f8a | MATLAB | 13,230 | 279 | close all
globals;
OPEN_FIGURES=1;
%base_folder = '20150906Thalamus36';
movie_num=63;
movie_num_str=num2str(movie_num);
keystr = {base_folder;movie_num_str;'Frames'}; % AND function of all items (need all to include)
keystrnot = {}; % OR function on all items (enough one to exclude)
trailstr =... |
3d0bb227cef540533c057986124b801e3588177fd46d5623658133a16fbe5107 | MATLAB | 13,256 | 397 | function icaplot(mode, varargin);
%ICAPLOT - plot signals in various ways
%
% ICAPLOT is mainly for plottinf and comparing the mixed signals and
% separated ica-signals.
%
% ICAPLOT has many different modes. The first parameter of the function
% defines the mode. Other parameters and their order depends on the
% mode. ... |
9605cceb1d5b8531285feb49a8d9c63d52634e3ab94461402749fa8812b51208 | MATLAB | 13,270 | 321 | % legFictracvidEphys.m
%
% Experimental Function
% For simultaneous acquisition of leg video, FicTrac video, and
% electrophysiology recording.
% Uses background acquisition on DAQ
% No current injection; use legFictracvidEphysIInj() instead
%
% INPUTS:
% settings - struct of ephys setup settings, from ephysSetting... |
ccac9627030b6daf605cfb7bd8e943df7b08ab5d3944607fb49a7d357d53be77 | MATLAB | 13,277 | 331 | % heatmapMoveCondData.m
%
% Function to generate heat map of movement conditioned data generated by
% moveCondPairData(). Similar to scatterMoveCondData() but as heat map,
% plots the value of the dependent variable z against two independent
% variables, x and y. Each value in heatmap is a mean of the values that
% ... |
fa8341306454a31bcce8430ee3c784bb152ace9ec5cff5710cf21ab80a2ef37a | MATLAB | 13,285 | 320 | % flt2GND() - Create a Mass Univariate ERP Toolbox GND struct from a set of
% .flt files created by Phil Holcomb's ERP software
%
% EXAMPLE USAGE:
% >> GND = flt2GND(infiles, 'bsln', -100, 'sampling_rate', 200, 'use_bins', 1:6)
%
% REQUIRED INPUTS:
% infiles - Either a cell array of strings... |
a49d942e9fe0a5a73b855e4de8c361a46d1fdbddac6f49c1ef9dcfd02c3d21b7 | MATLAB | 13,286 | 315 | function params = spm_normalise(VG,VF,matname,VWG,VWF,flags)
% Spatial (stereotactic) normalization
%
% FORMAT params = spm_normalise(VG,VF,matname,VWG,VWF,flags)
% VG - template handle(s)
% VF - handle of image to estimate params from
% matname - name of file to store deformation definitions
% VWG ... |
43bfacba2f45e383599cdf9d78d962e52b25095e8e55aad71092c7de3618b0a2 | MATLAB | 13,290 | 348 | function wKerns=parseKernels(wsk,parametrizationParams,modelToPlot,plotFlag)
doneO=0;
doneI=0;
% PLOT KERNELS
if ismember('H',modelToPlot)
wKerns.hist.axis=wsk.hist.tr;
wKerns.hist.gain=exp(wsk.hist.data);
if plotFlag(1)
if ~plotFlag(2)
figure; plot(wKerns.hist.axis,wKerns.hist.gain,'lin... |
f92db255b25a534c394acd6a1264769eaed57b9e7bba82529088bef029730954 | MATLAB | 13,302 | 315 |
function [Spikes,nose,Fs]=getSpikesOF(File, passNo);
%getSpikesOF, modified from getSpikes to read OpenField data. ehud, Oct
%2016
%
%1. parse the data according to gaps in Timestamps (> 1s)
%Session_str, e.g.,'20150906Thalamus36\20150906Thalamus36_1to...'
%
%Spikes{Nelecs,Nunits}, cell holding spike times i... |
837320042d5a59763091d3b04cbb9897c691189cb4d55099484b5b8e21f69ea4 | MATLAB | 13,323 | 358 | function [grad] = ctf2grad(hdr, dewar)
% CTF2GRAD converts a CTF header to a gradiometer structure that can be
% understood by FieldTrip and Robert Oostenveld's low-level forward and
% inverse routines. The fieldtrip/fileio read_header function can use three
% different implementations of the low-level code for CTF da... |
d720da4b14f299891dcab75fa205895f4982fe6a2c8c7bd7e0746de5c873f6e1 | MATLAB | 13,339 | 384 | function [imag, dicom] = dicomeread(dfile, varargin)
% dicomeread - Read MR enhanced DICOM files with correct order & dimensions
%
% Uses the Frame Content Sequence, Dimension Index Values to correctly
% read in MR Enhanced DICOM images with correct n-dimensions.
% - Adds field MatlabNames to the returned DICOM... |
86fb8fbac213db0093996d63bf8c553f25b3a8af13bdabb2ca5f06ad3a7a7ad7 | MATLAB | 13,346 | 457 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 492 2015-06-... |
57b38f374a7ad98a786aa6efeb63a327310c29be536d4d21862360c42a6193aa | MATLAB | 13,354 | 372 | %% multiplanar slicing
% original script: Jordan DeKraker 2023
% modified for BigMac: Nicole Eichert 2024
%
% fsl_sub -q veryshort.q matlab -singleCompThread -nodisplay -nosplash \< $myCode/RS/hipmac/anatomy.m
% rsync -uvr neichert@jalapeno.fmrib.ox.ac.uk:/vols/Scratch/neichert/hipmac/pngs/old/anatomy.gif /Users/ne... |
7d23538b701148d39c2068db976e568a0f3eceae0376ee092bab3a747c2c1708 | MATLAB | 13,377 | 350 | clear all;clc
Fidx{1}=dir('DATA_C*.mat');
Fidx{2}=dir('DATA_T*.mat');
GroupName={'C','T'};
Num=7;
NPlusMinus=4;
thAP=1;
Binwidth=50;
BinL=0:Binwidth:900-Binwidth;
BinR=BinL+Binwidth;
BinsFIcurve{1}=[BinL(:),BinR(:)];%
BinsFIcurve{2}=[BinL(:),BinR(:)];%
colormap=[0.5,0.54,0.53;0.12,0.56,1];
%Éî»ÒÉ«[... |
040d63faba8ecfb6ca6cf120075a9f15e95ff13359be3b67bdbbec1ef1c834fc | MATLAB | 13,388 | 373 | % DNg13DNa02FlyWireAnalysisScript.m
%
% Script for performing analyses on DNg13 and DNa02 connectivity in FlyWire
% Based on DNg13DNa02FancAnalysisScript.m
%
% Digraph properties:
% Nodes:
% Name - [required by digraph]
% Whimsy
% Neurotransmitter
% Edges:
% EndNodes - [required by digraph]
% ... |
2baf2c27ed50c11c27d3fcbaf80dbaea23f0ff41ef4343b3e06dd3e64795cd3c | MATLAB | 13,413 | 257 | % getTuning -
%%
globals;
switch SHOW_UNITS
case 'all',
tuneFilename = sprintf('Tuning\\%s %s[all] %s.mat',strRmv,Sesname,tuneVarName); % keep the xy00 because old Sufflings were saved with it
case 'named',
strShowU = ''; for ii=1:length(NamedUnitNames), strShowU = [strShowU num2str(Named... |
4537b7fb0fa0dd59c46b881d748d6954ea89d464d7137cb9a5996be077b3b3d5 | MATLAB | 13,422 | 250 | %% s_selectBestGridFitExp.m
% Main script to select best exponent parameters based on R2 of each
% simulated prediction (ranging from [0.1:0.1:1].
%
% Main experiment subject numbers = [1,2,3,7,9,10,11,12]
%
% Written by Eline R Kupers, Stanford U 2021
projectDir = simseqRootPath;
subjnrs = [1,2,3,7,8,9,10... |
04265bb83166c37f1f057dc884bbe9c722b09ca0b3d783c6c73abe60021b009b | MATLAB | 13,470 | 448 | function [] = Fig07_AveTimeCourse_OptStim_SongProb
% Code for plotting the time courses of song transition probabilities in Fig. 7d,e.
% GT = 'pIP10_Chr';
GT = 'dPR1_Chr';
% GT = 'TN1_Chr';
% GT = 'pMP2_Chr';
switch GT
case 'pIP10_Chr'
Target = [3,4];
TargetStim = 2;
ylim1 = [0,0.014];
... |
f26fa2729bfbdddae89d1cb4d5a2b19b9dc890168fab68a059a23f7092750166 | MATLAB | 13,474 | 442 | %% GET PREFERNCE
[outcomes] = get_pop_sparseness(ds_events,2,60)
[pref]= get_event_preference(outcomes,ds_events,1000);
%% COUNT PREFERENCE
somcount=0;
pvcount=0;
nullcount=0;
for d = 1:12
for n=1:length(pref(d).sompv_sig)
if pref(d).sompv_sig(1,n)==1
if pref(d).sompv_sig(2,n)>0
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.