sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
34fdfc9e41a699c86164a7fa1ac14ccaad3e28aadf375ee554ae3ce2075207d0 | MATLAB | 13,481 | 310 | clear all; close all;
% load data
data = readtable("Grating2AFC_TransProb_behav_history_clean_4fitting.csv");
mouseNames = unique(data.mouseName);
% single and dual state
%parameters = [0.11,0.9,0.75,0.34,0.05];
%parameters = [0.11,0.9,0.75,0.5,0,0];
%parameters = [0.11,0.9,0.75,0.34,0.05,0]; % BEST PARAME... |
2e5e1cce4719e40ec3bf43af80c869a03a6dcba4abf4f09fcff3a34c61445cff | MATLAB | 13,490 | 449 | function [] = ExtDataFig09_AveTimeCourse_OptStim_SongProb
% Code for plotting the time courses of song transition probabilities in Extended Data Fig. 9d.
% GT = 'pIP10_Chr';
GT = 'dPR1_Chr';
% GT = 'TN1_Chr';
% GT = 'pMP2_Chr';
switch GT
case 'pIP10_Chr'
Target = [3,4];
TargetStim = 2;
yli... |
2dcec6af70582d47bfb44db0dbea9885151144552fc948ffc795d3cfc0f4be31 | MATLAB | 13,546 | 309 | function plotAutoCorrVar( obj, varargin )
% PLOTAUTOCORRVAR Plot autocorrelation and autocovariance for LFP online streaming mode
% recording
%
% Syntax:
% PLOTAUTOCORRVAR( obj, varargin );
%
% Input parameters:
% * obj - object containg data
% * ax (optional) - axis where you want to plot
% * data_type (op... |
6b6f46dd329c56ed32a24f3a54865949efdd29fef01419b198a1b5cf01afedea | MATLAB | 13,568 | 441 | function [im,snrP,imS] = textureSynthesis(params, im0, Niter, cmask, imask)
% [res,snrP,imS] = textureSynthesis(params, initialIm, Niter, cmask, imask)
%
% Synthesize texture applying Portilla-Simoncelli model/algorithm.
%
% params: structure containing texture parameters (as returned by textureAnalysis).
%
% im0: in... |
b54b187101bedcc1a4aef60e844746a594aafbd05d79940b40cf2c903738afb5 | MATLAB | 13,595 | 259 | %Summarize results of F-test at the command window
%
%EXAMPLE USAGE
% >> report_results(GND, 1)
%
%REQUIRED INPUTS
% GND - A GND or GRP variable with F-test results
% test_id - The test number of the results to report within the GND or
% GRP variable
%
%VERSION DATE: 14 July 2017
%AUT... |
4c02d2f306b3a4fe195a6899bd19073b947891a83e42d598e4317229564c0a08 | MATLAB | 13,610 | 334 | function script08_3D_aligned_axons()
% Plot a few representative 3D axons for each sample
%
% This script needs the results from scripts:
% script06_axon_diam_skel_props.m
% script07_compute_axon_morph_props.m
% It also needs the functions:
% SaveFigurePNG.m
% SaveFigureSVG.m
% and the information in the .mat... |
3468cf095659f3d8ee1958558d8991041bc30818a1d335118ec4e4244f8fd59f | MATLAB | 13,614 | 254 | %function update_unitsTable(Sesname, elec,unit,field, val)
clear all; close all;
DATA_TYPE = 'OF';
%DATA_TYPE = 'EM';
FigType = 'final';
FigType = 'data';
an_baseFig = 100;
%globals;
%load('unitsTableOF-old');
load('unitsTableOF08-16-2017');
%load('Versions\ver23\unitsTableOF');
% unitsTable=unitsTableOF;... |
569b00e729eb54943e7e278d2e41fa3fe79982b27605e7d88bf243c696842a7f | MATLAB | 13,654 | 355 | function varargout = Thresholder(varargin)
% Thresholder MATLAB code for Thresholder.fig
% Thresholder, by itself, creates a new Thresholder or raises the existing
% singleton*.
%
% H = Thresholder returns the handle to a new Thresholder or the handle to
% the existing singleton*.
%
% T... |
a06e22f106ede3a15141cc31e9d507cb62e16c82c9331026804559cd0b3cc898 | MATLAB | 13,659 | 290 | function plotMeanFFTProfile ( obj, varargin )
% Plot mean FFT profile for the selected event types
%
% Syntax:
% PLOTMEANFFTPROFILE( obj, event_type, date_range, ax );
%
% Input parameters:
% * obj - object containg data
% * event_type ( optional ) - type of event to plot
% * date_range (optional ) - period ... |
c25b302d6542b62908f15131829aeadfda835e000b925ef5603a168ef92d2e2e | MATLAB | 13,663 | 314 | function [probe] = tessellateModule( probe )
%TESSELATEMODULE Summary of this function goes here
% Detailed explanation goes here
optexist = true; % flag to determine if optodes were defined.
if( isfield(probe.module, 'srcposns') == false )
optexist = false;
end
% SQUARE MODULES, or not defined
if (strcmp(p... |
8a7925185392bcf0812b36ee8f6bf2813cf61df31a020cd2c580b1dfc442f51d | MATLAB | 13,682 | 554 | function [DATA,msg] = aedes_readctdata(filename,varargin)
% AEDES_READCTDATA - Read Gamma Medica CT/SPECT data format
%
%
% Synopsis:
% [DATA,msg] = aedes_readctdata(filename,varargin)
%
% Description:
%
% Examples:
%
% See also:
% AEDES
% This function is a part of Aedes - A graphical tool for anal... |
21ac01a2baea72b62a87d221d643bcf6dcc930be85f6e7bafc99d07991da7911 | MATLAB | 13,705 | 250 | function [BH, H, FFN] = readIBWheaders(FFN);
% readIBWheaders - read BinHeader & WaveHeader segments of Igor IBW file
% [BH, WH, FFN] = readIBWheaders('foo') reads BinHeader & WaveHeader of
% file Foo.ibw - Versions 2 and 5 only. FFN is full filename.
% % 1 byte char
% % 2 bytes short
% % 4 bytes int, long, float, ... |
9e8826278229cdcac081f6ed1f5b405e271a6c643b93a871e18858838e656a16 | MATLAB | 13,743 | 338 | % saveContLegStepParamCond_bouts.m
%
% Function that saves continuous leg step parameters, aligned to yaw
% velocity peak. User specifies conditions that bodytraj parameters must
% meet.
% Adaptation of saveLegStepParamCond_bouts(), except it uses legStepsCont
% instead of legSteps step parameters. I.e. it uses the... |
b7981f993dc9e8015c4670876deb90f06a0b8d86e3b1a94db7773e7443ddf7f6 | MATLAB | 13,782 | 450 | function [fa, md, rd, ad, fe, mw, rw, aw] = dwi_parameters(dt, mask,inputOrder)
% diffusion and kurtosis tensor parameter calculation
%
% -----------------------------------------------------------------------------------
% please cite: Veraart et al.
% More Accurate Estimation of Di... |
a1cca14333746f1c174ff99b73f891cd9fb5e8e7c19e376301c36a5a1316cca9 | MATLAB | 13,806 | 348 | function MS_BMS_group_fams(job, method, family, EPs)
% _
% Bayesian Model Selection for General Linear Models (family inference)
% FORMAT MS_BMS_group(job, method, family, EPs)
% job - SPM batch editor "MS: perform BMS (manually)"
% method - a string indicating which methods to use
% family - a structure... |
42aa763d0cf894db6568f373dfcf28fadd72fa939d38900e214a45b2b6327c80 | MATLAB | 13,814 | 239 | function [vol_out,vol_params,neur_params,vasc_params,dend_params,bg_params,...
axon_params] = simulate_neural_volume(vol_params, neur_params, ...
vasc_params, dend_params, bg_params, axon_params, psf_params, varargin)
% [vol_out,vol_params,neur_params,vasc_params,dend_params,axon_params] ...
% = simulate_neur... |
d67978775d688c635a1ef9448dbeaf956aa984ec25ef7302ecee059d4b514bcd | MATLAB | 13,845 | 511 | function [] = ExtDataFig03_AveTimeCourseSongTransPrePostDur()
% Code for plotting calcium signals and song probabilities during song type transitions separately for short and long song bouts in Extended Data Fig. 3f,m.
GT = 'dPR1NP'; % Extended Data Fig. 3f
% GT = 'TN1SGNP'; % Extended Data Fig. 3m
DurThre_sine = 5;
... |
dca85f1263debcf068b59acbc1aaa5541aa0c9f497b19221c5cbf7384395ce21 | MATLAB | 13,855 | 204 | function [warped] = ft_warp_apply(M, input, method, tol)
% FT_WARP_APPLY performs a 3D linear or nonlinear transformation on the input
% coordinates, similar to those in AIR 3.08. You can find technical
% documentation on warping in general at http://bishopw.loni.ucla.edu/AIR3
%
% Use as
% [warped] = ft_warp_apply(M... |
ad94340bb05c8c40bf2de60ef30eb8537c31bd40a5cec3548ea84f3bb33648cd | MATLAB | 13,917 | 452 |
function reading_with_DAF_v7_Sentences(subject, block)
% Task runs word reading with delayed auditory feedback
% subjCode = subject identifier (number only)
% blkn = block number
% flog = text file identifier
% AudPnt = psychtoolbox audio
% VidPtr = psychtoolbox window
% pathnameR = pathname of task
% stim_name = na... |
289eb5a4cadcb61d724ae98a7d0073628b4b5b484f9fff82f8bbbd33237128d3 | MATLAB | 13,940 | 296 | function [HDR]=openxml(arg1,CHAN,arg4,arg5,arg6)
% OPENXML reads XML files and tries to extract biosignal data
%
% This is an auxilary function to SOPEN.
% Use SOPEN instead of OPENXML.
%
%
% HDR = openxml(HDR);
%
% HDR contains the Headerinformation and internal data
%
% see also: SOPEN, SREAD, SSEEK, STELL, SCLOSE,... |
050da75082b2d9f3a77ff1e0572099c0b21da03eac21f30839268aa33f30d18d | MATLAB | 13,953 | 351 | % plotAEPPEPbyMultiFictrac.m
%
% Function to plot mean and standard deviation of leg AEPs or PEPs (user
% specified), colored by values of two FicTrac variables (yaw, forward, or
% lateral velocity; user specified).
% User specifies number of bins in which to divide the FicTrac variables or
% the edges of the bin... |
3d9d6b052cdd794a302568f92bcfe921c6100b33bb074fff66a2b87b632f3532 | MATLAB | 13,957 | 454 |
function reading_with_DAF_v7(subject, block)
% Task runs word reading with delayed auditory feedback
% subjCode = subject identifier (number only)
% blkn = block number
% flog = text file identifier
% AudPnt = psychtoolbox audio
% VidPtr = psychtoolbox window
% pathnameR = pathname of task
% stim_name = name of fold... |
d15c6cac2d052dd7eb8dedb55b9d71c2b53c6f6de76fabcbf9be2ca0c5f4addc | MATLAB | 13,960 | 352 | function output_bg_info = update_background_parallel_save(obj, use_parallel)
% function update_background_parallel_save(obj, use_parallel)
%% update the background related variables in CNMF framework
% input:
% use_parallel: boolean, do initialization in patch mode or not.
% default(true); we recommend you to s... |
3087ce3cead7f60a7b8ef4970fb103121219d25c58782166aa16805aa10ff6c5 | MATLAB | 13,989 | 352 | % legFictracOpto.m
%
% Experimental Function
% For simultaneous acquisition of leg video and FicTrac behavior data while
% providing optogenetic stimulation by controlling the shutter in front of
% the mercury lamp for the scope (light through objective)
% Uses background acquisition on DAQ
%
% INPUTS:
% settings -... |
37e6c852742ed48a7717dbb05fcf9537af34d45d5387675f7846c2d64d03c9ec | MATLAB | 14,005 | 363 | clear all;clc
Fidx{1}=dir('DATA_C*.mat');
Fidx{2}=dir('DATA_T*.mat');
GroupName={'CTRL','Tet'};
Num=1;
NPlusMinus=0;
thAP=1;
Binwidth=50;
BinL=0:Binwidth:950-Binwidth;%ÕâÀïÐèÒª¸ù¾Ýprotocol step·¶Î§¸ÄÒ»ÏÂ
BinR=BinL+Binwidth;
BinsFIcurve{1}=[BinL(:),BinR(:)];%
BinsFIcurve{2}=[BinL(:),BinR(:)];%
colorm... |
4b3cd63f399927ea59847f9b3dc7f1d2f087cd6eaadb4abf858071a1cf3abe8e | MATLAB | 14,007 | 368 | %% TRACKER INTERFACE
function tracker_interface()
videos.dir_in = '';
videos.dir_out = '';
videos.filter = '*';
options = [];
f_calib = '';
% specify valid extensions
videoReaderFmts = VideoReader.getFileFormats();
commonFmts = {'avi','mov','mp4','wmv','m4v','mpg'};
specialFmt... |
dff52cbf4aecef843c1cb15db23216fadf6252e4d194042a6420861ce47533c8 | MATLAB | 14,013 | 297 | %% This script runs UFARSA_OGB1
% ----------------------------------------------------------------------
% Purpose:
% The algorithm applies UFARSA (Rahmati et al. J Neurophysiol (2018)).
% ======================================================================
% Use:
% (1) Set parameters in section "Specify parame... |
77c80b0a34a0edd171d79db201718d9520436f2e6c9d99d6962797ff63e59621 | MATLAB | 14,017 | 253 | function [BH, H, FFN] = readIBWheaders(FFN,pos);
% readIBWheaders - read BinHeader & WaveHeader segments of Igor IBW file
% [BH, WH, FFN] = readIBWheaders('foo') reads BinHeader & WaveHeader of
% file Foo.ibw - Versions 2 and 5 only. FFN is full filename.
% % 1 byte char
% % 2 bytes short
% % 4 bytes int, lo... |
51cea3724481ebe41f91895b9b22d4754cfc2a7847e9ef0bbee89fd040862bbf | MATLAB | 14,019 | 429 | function varargout = colorspace(Conversion,varargin)
%COLORSPACE Convert a color image between color representations.
% B = COLORSPACE(S,A) converts the color representation of image A
% where S is a string specifying the conversion. S tells the
% source and destination color spaces, S = 'dest<-src', or
% ... |
08d03526a5ed9fca29f6423884bef7982eedfc1eb8152d5c92dd34a942793398 | MATLAB | 14,037 | 354 | % legFictracEphysOpto.m
%
% Experimental Function
% For simultaneous acquisition of leg video, FicTrac, and electrophysiology
% recording while providing optogenetic stimulation by controlling the
% shutter in front of the mercury lamp for the scope (light through
% objective)
% Uses background acquisition on DAQ
%... |
1d28dc79e4cf2bcf410c819cc7e30e45e0404c7e2878639e4a5d55a9ef97bf59 | MATLAB | 14,126 | 389 | %% Fig. 2
% 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);
%% Fig. 2ab
baseline_faci = 12:20; % Used only for cell selection
n_plot_cell = 0;... |
6122acfd898751da59a4dec6d3903b8bafe0d57af7b5974a772cee6dbca3b433 | MATLAB | 14,132 | 485 | %% Class analysis of the bursting parameters
clear
close all
clc
font_name = 'Arial'; % Specify the font name
font_size = 8; % Specify the font size
az_el = [-37.50, 30];
rng(2)
do_plots=0;
do_kmeans_among=0;
do_svm=1;
%% Data load (brutto e manuale)
try
load('Propagation_ECM_DIV18_All.mat')
load('... |
1a5fbf8623992192aeff22fc342f4a2dec5cc75e01d89fb8ca1344d432269ea8 | MATLAB | 14,137 | 379 | function [sens] = ft_read_sens(filename, varargin)
% FT_READ_SENS read sensor positions from various manufacturer
% specific files. The following acsuisition system and analysis
% platform EEG and MEG file formats are currently supported:
%
% asa_elc besa_elp besa_pos besa_sfp yokogawa_ave yokogawa_con
% yokogawa_... |
53f005404f005c317c00bb37d51fb90a179a41a3e35da36b289d818a1b295bf5 | MATLAB | 14,200 | 356 | % legFictracEphysIInj.m
%
% Experimental Function
% For simultaneous acquisition of leg video, FicTrac, and electrophysiology
% recording.
% Also does current injection
% Uses background acquisition on DAQ
%
% INPUTS:
% settings - struct of ephys setup settings, from ephysSettings()
% duration - duration of trial,... |
c7ecb52e3c0e335526bd91cc8da8a9f255982b05fc646a1c19be44a1eaebc6be | MATLAB | 14,220 | 397 | % savePCAinterpStepParamEphys.m
%
% Function that takes in one or two sets of step parameters, performs PCA
% on each, and compares the two against each other.
% Unlike pcaCompStepParams(), this function does not operate on turn bouts.
% Instead, it works on step parameters interpolated to the specified frame
% rat... |
0f81e06775990e1b97927feeb45a1fe8110bd8bb3216d6b7b0ffb3d9e479a7c1 | MATLAB | 14,227 | 363 | % visstimLegFictracEphysIInj.m
%
% Experimental Function
% For simultaneous presentation of visual stimuli on G3 panels and
% acquisition of leg video, FicTrac, and electrophysiology recording.
% Uses background acquisition on DAQ
% Does current injection
%
% INPUTS:
% settings - struct of ephys setup settings, fro... |
2659cfe6ac36fc876ef10946102b01bee19ed8cdd1d9efa3d20ecc6b618ccb07 | MATLAB | 14,264 | 247 | % This script evaluates brain scores for a-priori (mostly pre-registered)
% brain signatures and ROIs, and saves the data
% note that you need:
% 1) canlab tools (see https://canlab.github.io/)
% 2) The merged pain-evoked beta files, which are openly available on
% OpenNeuro, in the 'derivatives' directory of the pain... |
d61f091cb925e5f3ab66b1db2f6c83d3dd1f06e7a33bfc338b813465eb6eb750 | MATLAB | 14,291 | 314 | clear all
close all
%%
M = 50; % number of ESNs to be tested
SEEDS = randi(100000, [1, M]);
Options.Tau = 0.1; %seconds
Options.EqualizeJinter = 0;
Options.NoiseForLearning = 0.05;
InputOptions.Wait = 30*Options.Tau; % wait time from one couple to the next one
InputOptions.Emission = 15*Options.Tau; % input signal w... |
81270bb72f99f61506e1dfcfb8a7b3dcda44b0047a8cd84a7974b2e6fc66131d | MATLAB | 14,297 | 303 |
%% scan and show the statistics of tagged units
% the tagging thresholds are determined in "getSpikesEM.m" or getSpikesOF. the code is:
% for elec = 1:Lelecs
% for unit = 1:Lunits
% % if exist('Tagging','var') && ~isempty(Tagging),
% if strcmp(DATA_TYPE,'OF') || 1,
% ... |
bfbbc9e56a62fc5f2ab8b1d8159e239d528efac4ac9e232f6c76985678763213 | MATLAB | 14,298 | 402 | %function [pval, t_orig, crit_t, est_alpha, seed_state]=mult_comp_perm_t1(data,n_perm,tail,alpha_level,mu,reports,seed_state)
%
% mult_comp_perm_t1-One sample/paired sample permutation test based on a
% t-statistic. This function can perform the test on one variable or
% simultaneously on multiple variables. When a... |
9ddffe3092ee51b801e914a3e723cda807b86d09fcff877dd15f75c5783bdca0 | MATLAB | 14,308 | 441 | clear all
close all
tic
rng(040522)
% Supplementary Figure 8A - Single myosin
% setting up the initial configuration
P.y0 = 180;
P.x0 = sqrt(P.y0^2 - (P.y0/2)^2);
P.max_y0 = 17*P.y0/2;
P.max_x0 = P.x0*15;
[r_s,T_s,edges_s,edge_type] = create_mesh(P);
[r_s,edges_s,edge_type,P] = stress_fibers(r_s,edges_s,edge_type,... |
932ffb48d5b4f8d612c631dda600f7ae3896fb9975051f8aa70cec6db17e69ab | MATLAB | 14,320 | 342 | function plotFiltDataSurvey( obj, varargin )
% Plots previously filtered data from Survey recordings.
%
% Syntax:
% PLOTFILTDATASURVEY( obj );
% PLOTFILTDATASURVEY( obj, rec );
% PLOTFILTDATASURVEY( obj, rec, channel );
% PLOTFILTDATASURVEY( obj, ax, rec, channel );
%
% Input parameters:
% * obj - object... |
d3bb6c508b6f88eb2769283e32aed42d521aabb74267945a822acbb8267aa815 | MATLAB | 14,330 | 512 | function aedes_readfidprefs()
% AEDES_READFIDPREFS - GUI for editing preferences for AEDES and
% AEDES_DATA_READ for VNMR format files
%
%
% Synopsis:
% aedes_readfidprefs;
%
% Description:
%
% Examples:
%
% See also:
% AEDES, AEDES_DATA_READ
% This function is a part of Aedes - A graphical tool for ... |
4d29ea2edcb3d222ec51e90921484d813d3035ee8fd794c3013650bc01e1fd2a | MATLAB | 14,356 | 343 | %averaging Open field data. Similar to dLight, just arrange to pic up data
%for AlloLightCtrl
%this function allows to read photometry data collected during Open Field
%Test, detrend and calculate dFF, as well as detect peack and quantify
%AUC
%Author: Maria Wilhelm
%Clean the previous matlab sesion:
close... |
138b6bec1e09f58291d9220e1f6d394c1368cea7130e9ae426b97821c6b09e04 | MATLAB | 14,379 | 335 | % computeLegFictracOpto_1Fly.m
%
% Function that extracts the individual leg traces, FicTrac, and leg step
% parameters in response to optogenetic stimulation of different durations
% and intensities (ND filters) for a single fly.
% Filtered for moving/not moving
% User selects all pData for that fly through the fil... |
105f241015b61f2ededf2187f8e7823a2ad34a5bf2194cd596254ba97fe2a531 | MATLAB | 14,388 | 454 | %% Script for creating 3D plots of oxygen sinks and surges
% All subsequent scripts from Antonis Asiminas, PhD
% Center for Translational Neuromedicine
% University of Copenhagen, August 2023
Last update 30 Jan 2024
%%
close all;
clear;
%% Choose the data and colour
uiwait(msgbox("Select a tif file with ... |
ee950e1cfe23636998e8ea3145e51f302bbbed1093ef3e4dd3b588441733a3f7 | MATLAB | 14,390 | 255 | function [results] = caliVali(data, participant, opt)
%CALIVALI Return the most important parameters for the calibration
% An unfiltered, complete calivali dataset in structure form is
% expected as input aswell as an option list. The output will be a
% table containing the accuracy and average error angle ... |
e31aebc6b11ad5b8f55680c547e91aace20723a2a23938d40e49c300580e97fa | MATLAB | 14,419 | 344 | % Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024
function compute_popvectors_correlations_across_contexts(analysisSettings, CellRegTable, BestAligned, BESTALIGNED_STABILITY_THRESHOLD_CRITERIA, STABILITY_CLASSIFICATION_GROUP_LABEL)
%%
% Add the group labels (day names) to the data
... |
bc3558a2da14c7ce09156ff474fae55f8b030f55f6add4ca6e33b91ebbab3aad | MATLAB | 14,453 | 324 | classdef AOI
% General code to provide information about area's of interest.
properties
all_AOIs;
nb_AOIs;
allowed_angle;
trail;
end
methods
function aoi_table = AOIGazeData(self, data, opt)
if opt.raw
aoi_table =... |
f0ab9e536d9f373342654d8bb914e062c4d1aa1687add6819b0141eaab5be7a3 | MATLAB | 14,462 | 397 | clc
clear
%% Loading the Data for Model Development followed by Partitioning
% This code develops dynamic (hybrid parallel) ECNN models for the case
% when a time-invariant bias with / without Gaussian noise is added to
% true data to generate training data
% This code requires the MATLAB Neural Network T... |
c22a66c091a7cf8ddd65ace1db356b524dc827372d6dce47500ef8cfcf04a573 | MATLAB | 14,494 | 261 | function [HDR] = sclose(HDR)
% SCLOSE closes the file with the handle HDR
% [HDR] = sclose(HDR)
% HDR.FILE.status = -1 if file could not be closed.
% HDR.FILE.status = 0 indicates the file has been closed.
%
% see also: SOPEN, SREAD, SSEEK, STELL, SCLOSE, SWRITE
% This program is free software; you can redistrib... |
d866eccda1804bb117019037d091bf6f740ae1b16ed9a4802eba5b72825472bd | MATLAB | 14,503 | 309 | function []=D2_ALI_HLMPlots(badSubs,signal,grp_indiv,append)
% correlation plot + average
%badSubs: the code of bad subjects ([23,28] for now)
%which signal you want to run the code on? 1-> alpha 2-> RFT
%signal = alpha or RFT
%grp_indiv: do you want to run on grp ROI -> 1 or individual ROI -> 2
%append: 1-> if append ... |
890db35c4ba62c269a25d3fe457522933b9d12921d19e0b1ed95053fc7731298 | MATLAB | 14,520 | 303 | % Fig 5. Survey results 2: Model performance across different data levels, spatial scales, model levels, and sample sizes.
% 5a. Train Data Levels
% 5b. Spatial Scales
% 5c. Model Levels
% 5d. Sample size
%% Set up
clear; clc;
% Load Data
basedir = '/Users/donghee/Documents/project'; % set a path to local proj... |
a57e4318b02f03b2b8404da0a7ef8f11215910002fe4b37191409d441c68c3b0 | MATLAB | 14,537 | 224 | function gui_help(which_help)
%
% Used by FASTICAG
% All the help texts and title used by GUI are stored here.
% Make changes here.
% Also displays the helpwindow with the selected text
% @(#)$Id: gui_help.m 8776 2013-11-14 09:04:48Z roboos $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
35b389602b64f16f8e5e74060577f193c163451f6aab9277547dbe01cf41ab43 | MATLAB | 14,556 | 336 | function SleepState = SleepScoreMaster(basePath,varargin)
%SleepScoreMaster(basePath,<options>)
%This is the master function for sleep state scoring.
%
%It's strongly recommended that you
% 1) indicate bad (noisy) channels using bz_getSessionInfo(basePath,'editGUI',true)
% before running SleepScoreMaster.
% 2... |
b064d521ce792fcefc9cbe48b0cb06808473afa514e36dcc99a441e506b7a09e | MATLAB | 14,568 | 400 | function obj = subsasgn(obj,subs,varargin)
% Subscript assignment
% See subsref for meaning of fields.
% _______________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
%
% $Id: subsasgn.m 8776 2013-11-14 09:04:48Z roboos $
switch subs(1).type,
case... |
3e1c266b0ae3ccc69f898042bf7231e9c42f233b7af8d93eefa9d4467755b019 | MATLAB | 14,575 | 447 | clear all
close all
tic
rng(040522)
% Supplementary Figure 8B - Dynamic myosin
% setting up the initial configuration
P.y0 = 180;
P.x0 = sqrt(P.y0^2 - (P.y0/2)^2);
P.max_y0 = 17*P.y0/2;
P.max_x0 = P.x0*15;
[r_s,T_s,edges_s,edge_type] = create_mesh(P);
[r_s,edges_s,edge_type,P] = stress_fibers(r_s,edges_s,edge_type... |
8a443e2c2b8aed7d7fe1d6b25a5e800896e1e82dacfb09604f57381219bd371d | MATLAB | 14,575 | 395 | %{
TODO
- Go back and look for wierdness
- light on off
- movement artifacts
- investigate HUGE transients
NOTES
- All ephys data is DEBLEACHED
Mouse 1
Recording 1
2 Segments (1,2)
Recording 2
3 Segments (3,4,5)
Mouse 2
Recording 1
... |
7afd520d4bbd4f6f407f097d908e5b3475558db51a23bc24d714cab8191eaafe | MATLAB | 14,586 | 321 | % extractMoveCondKernels.m
%
% Function that takes in data conditioned on whether the fly was moving or
% not (from the function moveCondPairData() and returns the kernels and
% autocorrelations only during the time period where the fly was moving.
% Similar to extractKernels() but starts with trials already selecte... |
057fffa2cacc1a0991d68d21583e416746c05d4d552c303e671abfcecfad87af | MATLAB | 14,597 | 350 | % Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024
%
function compute_popvectors_across_contexts(analysisSettings, CellRegTable, BestAligned, BESTALIGNED_STABILITY_THRESHOLD_CRITERIA, STABILITY_CLASSIFICATION_GROUP_LABEL)
%%
% Add the group labels (day names) to the data
SessionsToG... |
d02bac810101443b098d4c03ac8965956c5d1662f62cd989dd7d629353eeb0ec | MATLAB | 14,600 | 542 | function aedes_createmosaic(DATA,ROI,overlay,varargin)
% AEDES_CREATEMOSAIC - Create a figure containing mosaic of MR images
%
%
% Synopsis:
%
% Description:
%
% Examples:
%
% See also:
% AEDES, AEDES_EXPORT_GUI
% This function is a part of Aedes - A graphical tool for analyzing
% medical images
%
% Copyright (C... |
fc1556801f41b16da3ad97c54bf3c6d596a4ccbd18f45bbf64678c327c30a987 | MATLAB | 14,602 | 380 | clc
close all
clear variables
%delete(gcp('nocreate'));
fclose('all');
warning('on', 'all')
warning('off', 'MATLAB:mir_warning_maybe_uninitialized_temporary');
warning('off', 'MATLAB:dispatcher:nameConflict');
warning('off', 'MATLAB:plot:IgnoreImaginaryXYPart');
addpath(genpath('./functions_DBProc'));
addpath(genpath('... |
b3fd3bb118b45a53d82414157bb66c695df69f0879255690722ffe8e1a7264cf | MATLAB | 14,620 | 306 | classdef VoltageClampSeries < types.core.PatchClampSeries & types.untyped.GroupClass
% VOLTAGECLAMPSERIES Current data from an intracellular voltage-clamp recording. A corresponding VoltageClampStimulusSeries (stored separately as a stimulus) is used to store the voltage injected.
% READONLY PROPERTIES
properties(Set... |
2e1b42504fe0959ded5a0155ade4e07309de373ad661f212d719ddad4fbc73d6 | MATLAB | 14,622 | 314 | classdef PostZipTest < matlab.unittest.TestCase
% Tests for postZip, zipAndPost and interpretResponse.
% The real upload path needs a live server and is not covered here. Validation of the
% config and scrubbing of the token are tested in WebConfigTest.
properties
Dir
CfgDir % holds t... |
7370850a51e3565ee65cc045be657b03413df1d0d8038d231a8c47047918b73f | MATLAB | 14,646 | 346 | % f_ReadInfo.m [As a part of HFO Detection Project]
% Written by:
% Miguel G. Navarrete Mejia
% Electrical Engineering MS
% UNIVERSIDAD DE LOS ANDES
% Colombia, 2012
% mnavarretem@gmail.com
function st_Info = f_GetHeader(pst_SigPath)
% Reads header information from header or eeg files
% INPUT:
% pst_Sig... |
5d7eb6facda675cfeba863d244542561a1f8570027beafb54e0e894a9e7729bb | MATLAB | 14,755 | 315 | classdef MLBehaviourTrack < handle
properties
% Pixel positions of the LEDs in pixel coordinates
ledColours = {};
ledPos = [];
numColours = [];
numPoints = [];
timestamp_ms = [];
timestamp_s;
pos = [];
dirRad = [];
... |
dc5ea4c1fd6293e5d4d174b7b094847fe92ce10cfb8a6205fa6ab83bcae24df0 | MATLAB | 14,759 | 542 | %
% Perform sanity checks on a network. This does exit(0) even when the
% tests fail -- the test results are only stored in the output files.
%
% PARAMETERS
% $network The network to check
%
% INPUT FILES
% uni/out.$network
%
% OUTPUT FILES
% dat/check.$network '1' or '0' depending on test result
% dat/check_error... |
428dd5dee4c080c0624713300a3b89dbb3317269b4e5faa7e792bb7c811afd7c | MATLAB | 14,766 | 384 | % getCorrCoeffBehContParam_cond_fly.m
%
% Function to get Pierson's correlation coefficient between two specified
% behavioral parameters, while conditioning on others, for a single fly.
% Modification of getCorrelationEphysContParam_cond_fly()
%
% INPUTS:
% behParams1 - struct of parameters for first behavioral p... |
b23ff716a9ab2ae887daafde31683582e6f8073d81fd746315f5c005f00302d5 | MATLAB | 14,769 | 204 | % DATA ANALYSIS PIPELINE FOR FIBER PHOTOMETRY EXPERIMENT
% Name: Shock_PooledQuantification
% Cohort: PFC dLight1.3b with shock
% Feb 2023 - Marie Labouesse, marie.labouesse@gmail.com
% 1- POOLED QUANTIFICATION
% loads FP data previously analyzed (with: Shock_DataExtraction then Shock_PooledGraphs) in matlab s... |
2bc8b0b71b718c9959782c405b28b106f9b4773fc6b55b2874c79140e3606e46 | MATLAB | 14,856 | 352 | % Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024
function compute_popvectors_within_contexts(analysisSettings, CellRegTable, BestAligned, BESTALIGNED_STABILITY_THRESHOLD_CRITERIA, STABILITY_CLASSIFICATION_GROUP_LABEL)
%%
% Add the group labels (day names) to the data
SessionsToGro... |
017a491abc18bc1778ff57e283dba6ddb0f03c71540d624545c7cc9588516ba4 | MATLAB | 14,941 | 352 | % Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024
function compute_popvectors_correlations_within_contexts(analysisSettings, CellRegTable, BestAligned, BESTALIGNED_STABILITY_THRESHOLD_CRITERIA, STABILITY_CLASSIFICATION_GROUP_LABEL)
%%
% Add the group labels (day names) to the data
... |
57f25fdae764cd22b0a77e43858ca8bd30a4d76b5d389fd193cbaea9b6a616fc | MATLAB | 14,957 | 339 | %% Author: Jiri van Bergen and Xu Li
% Affiliation: Radiology @ JHU - Kirby Center
% Contact via xuli@mri.jhu.edu
% Updated by Xu Li, 2019-07-09
% Updated by Xu Li, 2021-02-09, added phase offset removal for Echo Averaging
% Updated by Xu Li, 2021-05-25, optimized weighting for Echo Averaging
% Updated 2021-06-... |
935c94397ec9016a7e72f787a064aff4f2887e58ef2370d17dc61990ed5d66d7 | MATLAB | 14,963 | 323 | % extractAllkernels.m
%
% Function to calculate, plot, and save kernels relating responses of ROIs
% to FicTrac variables. Also, uses kernels to predict responses (in both
% directions, Ca->FicTrac and FicTrac->Ca) and saves predicted responses
% and variance explained.
% Calls computeWienerKernel(), computeLinearPr... |
335d6857e6e857f782da9b36489ae5d0a5254d0d1e0b53948b027830cfbbb5a4 | MATLAB | 14,970 | 240 | %% Simulate trials with matched duration & large trigger event from pooled wait data
animals = {'remy','gus','bernard','fievel'};
%epochfilter{1} = ['$ripthresh>0 & (isequal($environment,''goal'') | isequal($environment,''hybrid2'') | isequal($environment,''hybrid3''))'];
%epochfilter{1} = ['$ripthresh>=16 & (isequal(... |
55c59ba04b072d7ed092399ccdeab29e2169cf44f3b1a4a21acbe09e31bb065c | MATLAB | 14,975 | 354 | %averaging Open field data
%this function allows to read photometry data collected during Open Field
%Test, detrend and calculate dFF, as well as detect peack and quantify
%AUC
%Author: Maria Wilhelm
%Clean the previous matlab sesion:
close all
clearvars
clc
%give folder with matlab functions
folder_wit... |
ebe9d7e213ac28436ea8666474d2a17532e815e06fc58a039a59f8088c994e7d | MATLAB | 14,978 | 353 | % preprocessBodyTraj.m
%
% Function that takes in one or more pData files (generated by
% preprocessBigRigFlyData.m) and extracts a bodytraj data structure, which
% contains information about the fly's body trajectory. Saves struct back
% into same pData file
%
% INPUTS:
% pDataPath - full path to pData directory
... |
24d578eb5ded550660692d41ca224e4505d5c4434f3bb18821810e6db6f55858 | MATLAB | 14,994 | 360 | function dataFileAsStruct = loadDataFile(filename, formatString, tMin, tMax, minSweepIndex, maxSweepIndex)
% loadDataFile Loads WaveSurfer data into Matlab.
%
% loadDataFile(filename)
% Loads the indicated WaveSurfer .h5 file. The returned data is a
% structure array with one el... |
7f1ea7e66fdfe29e15ebc506edd2ed86e6013cd4134d1644b21477a719e4ebae | MATLAB | 15,016 | 479 | function aedes_maptool()
% AEDES_MAPTOOL - A GUI for calculating various parameter maps
%
%
% 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.Niskanen@uku.fi>
%
% D... |
c379a5c85e5c93f71d6d24fd3d6566b0348f87eca604e0c49b1333ee20c7942c | MATLAB | 15,029 | 373 |
% Detect flies in video frames.
%
% To detect flies, use:
%
% detections = feat_compute(vinfo, bg, calib, [frame_range], [imgs], [calibrating])
%
% where [] denotes an optional parameter and:
%
% vinfo - video structure, obtained from video_open
% bg - bg structure, obtained from calib_bg_estim... |
c7db2d389e5f7280323383d6e910def1ef6118e4609aaafc857856c909739e24 | MATLAB | 15,074 | 250 |
%%%THIS CODE IDENTIFIES RIPPLES IN HIPPOCAMPUS CA1 LFP DATA ACCORDING TO GAVA ET AL (doi:10.1038/s41593-021-00804-w) PROTOCOLS
%%%TAKES THE PEAK TIMES OF RIPPLES AND PRODUCES PETHs SIMILARLY TO FOLLOWING
%%%PROTOCOLS by NITZAN ET AL (doi:10.1073/pnas.220093111960 and doi:10.1038/s41467-020-15787-8)
ListAnimals... |
0bb7243ffaaffef0d7e92537c22bb12b2fb4fd8358985b19ae80bb1f92cda0e2 | MATLAB | 15,092 | 489 | function [fa, md, rd, ad, fe, mk, rk, ak, l1, l2, l3] = dki_parameters(dt, mask)
% diffusion and kurtosis tensor parameter calculation
%
% -----------------------------------------------------------------------------------
% please cite: Veraart et al.
% More Accurate Estimation... |
c14f9a5668b914c41f7a313b7506261cb846d9f873d3c211d18a1c6b20327066 | MATLAB | 15,131 | 452 | %function create_FD_report(group, basedir, need_sublist,need_demo,cutoff,fd_thresh)
%function create_FD_report(group, basedir, need_sublist,need_demo,cutoff,fd_thresh,view_plots)
function create_FD_report(group, fd_thresh, cutoff)
%% Instructions - Expand to view:
% This script creates movement reports (FD numbers,... |
a357ff0413fbb397449d828196d21192ab97017ab1f00684691efbe7127264fe | MATLAB | 15,135 | 474 | % mglMake.m
%
% $Id$
% usage: mglMake(rebuild)
% by: justin gardner
% date: 05/04/06
% copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING)
% purpose: rebuilds mex file, with no arguments checks
% dates to see whether it should rebuild. With
% reb... |
ae954dede02f8d1b135faedc065b9002b152d5d4e28c78a2a82614f73785d787 | MATLAB | 15,217 | 245 | %% Neurofeedback: comparisons between conditioned and control animals
animals = {'jaq','roquefort','despereaux','montague','remy','gus','bernard','fievel'};
epochfilter{1} = ['isequal($cond_phase,''plateau'') & isequal($environment,''goal'') ']; %cond rats
epochfilter{2} = ['$ripthresh==0 & (isequal($environment,''... |
c3906ee78d251444e59b8fdadecdc42ca386c8ff30449ec9c5eeb5d1f27dbc15 | MATLAB | 15,289 | 384 | %
% Please cite this paper if you use any component of this software:
% S. Soltanian-Zadeh, K. Sahingur, S. Blau, Y. Gong, and S. Farsiu, "Fast
% and robust active neuron segmentation in two-photon calcium imaging using
% spatio-temporal deep learning," Submitted to PNAS.
%
% Released under a GPL v2 license.
functio... |
95b903beec8de5dd74d185d31789527bf4a079fb7f95f102a1367bff4f262dd4 | MATLAB | 15,320 | 446 | 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... |
05a82a12280b19668ea5a0467fe1aedb4c2f7bd8b466a63afa9cc1f5281020f1 | MATLAB | 15,336 | 495 | function [fa, md, rd, ad, fe, mk, rk, ak, l1, l2, l3] = dki_parameters(dt, mask)
% diffusion and kurtosis tensor parameter calculation
%
% -----------------------------------------------------------------------------------
% please cite: Veraart et al.
% More Accurate Estimation... |
0e3ca898b1b8969e1745264ad3976463d596be29486f733a20c60c85b79b6ff9 | MATLAB | 15,342 | 467 | function[data,h]=SONGetRealWaveChannel(fid, chan, varargin)
% SONGETREALWAVECHANNEL reads an ADC (waveform) channel from a SON file.
%
% [DATA {, HEADER}]=SONGETREALWAVECHANNEL(FID,...
% CHAN{, START{, STOP{, OPTIONS}}})
% FID is the matlab file handle, CHAN is the channel number (1=max)
%
% [DATA... |
348415af210da19efde4de9ad67489b1136d6acb62169d655b5cad9941dc2987 | MATLAB | 15,347 | 357 | function varargout = QSM(varargin)
% QSM Toolbox
% QSM Toolbox
% Authors: Jiri van Bergen and Xu Li
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help QSM
% Last Modified by GUIDE v2.5 11-Oct-2023 12:22:26
% Begin initialization code - DO NOT EDIT
gui_Singleton = ... |
61be0272386ce0675473eaec8a2e75629edf14add2f66b5a037cb3bce6dcbc43 | MATLAB | 15,374 | 321 | %% 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);
... |
a59f943d899e056a2f96219c96dc547e5efadb6b0afa05dfef28cfdf3554293c | MATLAB | 15,378 | 401 | % getTaskParameters.m
%
% usage: exp = getTaskParameters(myscreen,task)
% by: justin gardner
% date: 01/27/07
% purpose: get the task parameters, reaction times etc,
% out of the screen and task variables
%
% Note that all volume numbers represent the beginning of a trial o... |
9d3c8dc6b70427401de91f04ad8aec8cd5ed9efac1f9cc4f4567bbf9391f2b37 | MATLAB | 15,379 | 383 | % getCorrelationEphysFwdAccYawVel_cond_fly.m
%
% Function to extract correlation between spike rate or median filtered
% membrane potential and forward acceleration and yaw velocity.
% Adaptation of getCorrelationEphysContParam_cond_fly()
%
% User-specified filtering parameters to compute forward acceleration
% Normal... |
beab60fae60a5b83353a1ae806921ffe2a65fea2b027b88351b1cedf3d7f4d04 | MATLAB | 15,385 | 321 | %% 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);
... |
2191557322c14b8033260dfa5df9926f4cf58a43992f26d487f6738df060b016 | MATLAB | 15,440 | 323 | %% 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;... |
42742deb4415aa8007de14b231e6de04a919f3469b576a3221709879f0d78baf | MATLAB | 15,450 | 343 | function [] = fitBayesianCausalInferenceModel()
% fitting Kording et al. (2007)'s model with maximum likelihood estimation to
% auditory and visual numeric reports which were published in Rohe, Hesse,
% Ehlis, Noppeney (2024) "Multisensory perceptual and causal inference is largely preserved in medicated post-acute ... |
a9369f6e98541b3f61bc4cafceea1ea2c8e246d8d4174458dc315af56de5f9a3 | MATLAB | 15,450 | 497 | function [AnchorAcc, SymDist, MonkEffect, PCheck, Distr] = ESN_TI_Multi_MonoF_Stoch(Options, InputOptions)
% ESN in TI task
%input parameters
n_inputs = InputOptions.NInputs; % #images
waitT = InputOptions.Wait;
emissionT = InputOptions.Emission; % input signal width
emissionTR = InputOptions.EmissionR; % response sig... |
45c466d3f47704099c8a4d8833d7ed55fae99c51d5023643151b4142d512ffc2 | MATLAB | 15,478 | 322 | %% 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);
... |
fcbe3f6573c4186f0353a373c60fb9b0d6bd08a9de758ec6e1658ce069c8ef57 | MATLAB | 15,480 | 323 | %% 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_... |
657b58f731e12e472593b5740aa93127d2bc8298aa6d109daf7cd45f2a1fa6a5 | MATLAB | 15,492 | 323 | %% 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_... |
f4618ec886b0ae635bf2232e1c4722349f9a9e018794c83de19d1e56631ec2cd | MATLAB | 15,502 | 375 | %% Do network metrics for birth data
datadir=fullfile('~/data/smyser/smyser1/wunder/eLABe/gordon_pconns_plus_atlas_subcortical/full_mats/')
outdir='~/Box/projects/in_progress/within_between_network_longitudinal/data/birth/'
subjlistdir='~/Box/projects/in_progress/within_between_network_longitudinal/data/subjLists/'
su... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.