sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
036a5f9c3896b8b05c1581500c2a8890f5b89a17cfef6200a63800bf3a705c12 | MATLAB | 37,468 | 1,034 | function varargout = AccuSleep_GUI(varargin)
% AccuSleep_GUI A GUI for classifying rodent sleep stages
% Zeke Barger, 081120
% To see the user manual, run this code and press the user manual button, or run:
% doc AccuSleep_instructions
% First, check that all required toolboxes are installed, and that MATLAB
% is at ... |
15fefedb759af3139e0d6fd2f3d5df598fbb3a3618d89fd819b64a5ddd563f7a | MATLAB | 37,841 | 769 | function [perf, result, testlabel] = mv_classify(cfg, X, clabel, varargin)
% Classification of multi-dimensional data.
%
% mv_classify allows for the classification of data of arbitrary number and
% order of dimensions. It can perform searchlight analysis and
% generalization.
%
% Note: For data that has the dimension... |
e4725dcfee45ef307cf50a15088affc76a6c6ea9154524d6144247ab1ee5489f | MATLAB | 37,899 | 699 | function [] = runCardDrawInstructions(taskStruct, dispStruct)
% initialize the instruction display
dispStruct = initInstDisplay(dispStruct);
% list of instructions to show
instructions = 1:15;
% init the current instruction
currentInst = 1;
% loop until done signal
doneInst = false... |
2d4201281dfc6dfddb735c37e93c839990f8c1efbef2355ba4cb7fd4b2063263 | MATLAB | 38,573 | 888 | % STATUS: active
%
% SYNTAX:
% preprocessFNIRS06_FInteraction_MultiOnly(s,numClasses,rejTrOp,...
% rejChnOp,fefOnlyOp,rerunOp,plotOp)
%
% DESCRIPTION:
% 3 features (channels) left out. Channels left out are determined from
% leave-one-feature-out classification and are manually specified here.
% Otherwise ident... |
f3a417cd08d44de5eba93e6b7cbad00e89963a97a10d5399bdc9c6723913de26 | MATLAB | 38,806 | 1,103 | classdef ProcResultClass < handle
properties
dod;
dc;
dodAvg;
dcAvg;
dodAvgStd;
dcAvgStd;
dodSum2;
dcSum2;
tHRF;
nTrials;
ch;
grpAvgPass;
misc;
end
properties (Access=private)
filena... |
bb3e0df8129dc6c5142dc0d9db1cbdad8ba08f07ccefc5184196664cb1cb30a0 | MATLAB | 38,919 | 1,110 | function tracks = track(xyzs,maxdisp,param)
%;
% ; see http://glinda.lrsm.upenn.edu/~weeks/idl
% ; for more information
% ;
% ;+
% ; NAME:
% ; track
% ; PURPOSE:
% ; Constructs n-dimensional trajectories from a scrambled list of
% ; particle coordinates determined at discrete times (e.g. in
% ; consecutive video fra... |
3db708ca88d80cc958a14e935ec499e754db5e44eb25cc4e5d104d1306768196 | MATLAB | 38,922 | 1,110 | function tracks = track(xyzs,maxdisp,param)
%;
% ; see http://glinda.lrsm.upenn.edu/~weeks/idl
% ; for more information
% ;
% ;+
% ; NAME:
% ; track
% ; PURPOSE:
% ; Constructs n-dimensional trajectories from a scrambled list of
% ; particle coordinates determined at discrete times (e.g. in
% ; consecutive video fra... |
c34f99e23d0950f96100214d830b89302e7a04e7ffaa6b5df788c5d7a91ba41c | MATLAB | 39,007 | 789 | function imageData = screencapture(varargin)
% screencapture - get a screen-capture of a figure frame, component handle, or screen area rectangle
%
% ScreenCapture gets a screen-capture of any Matlab GUI handle (including desktop,
% figure, axes, image or uicontrol), or a specified area rectangle located relative to
%... |
ae4c4ae0ec2fac390bea47cc6cfc5c0fec2ce753a19e0d854164f8ca50c5c9b9 | MATLAB | 39,018 | 770 | % Status: Inactive
%
% For sbj 08 and after.
%
% After running all sbjs, run grpPlotPerfVsDiffTLen.m
%
% Add repts and CI. Used for publication
% Also test different "islands", subset of probe for portability
%
% Update to use trials from GLM CV SSBeta pipeline
function calcCumSum_MultiOnly_DiffTLength_AllChn(sbjNum,... |
9cfd190183d8a803886c8452f60a931d406c4a54141c79d35ed3eb4cdeb36694 | MATLAB | 39,238 | 907 | % STATUS: active
%
% SYNTAX:
% preprocessFNIRS06_FInteraction(s,numClasses,rejTrOp,rejChnOp,...
% fefOnlyOp,rerunOp,plotOp)
%
% DESCRIPTION:
% 3 features (channels) left out. Channels left out are determined from
% leave-one-feature-out classification and are manually specified here.
% Otherwise identical. Repe... |
6d254ff594fdb092902c98d257ce8d8e42e04df26ea5a953b4bcb25986b248a2 | MATLAB | 39,475 | 929 | % 4/4/2022: Updated to calculate GLM fitting to HbT data
% Never tested for glmSolveMethod == 2, but should work
%
% Note: only work with idxBasis==1
%
% Both y_CI and beta_CI can be derived from yavgstd and beta, respectively.
%
% Add support for F-Test for joint significance test. You can also use
% t-test by using ... |
78a23e9eaa2ad3e577c1db590502ece9a24c19336abbedda2b035f5767b2603d | MATLAB | 39,565 | 572 | %% Extended Data Fig. 2b, Ext. Data Fig. 3g-h & Ext. Data Fig. 7d:
% Change in event number/30s in the chosen cells/regions following uncaging.
% Comparing the event frequency change to shuffled data in each post-stim
% time bin to determine which time bins are siginifcantly different from chance.
%
% Modif... |
c338521c7e3c81e0944079ba8b4934be5d45fa8a6c07b7a35daa67ddd27684be | MATLAB | 39,565 | 699 | classdef Spike2Section < Sharedpaths & Spike2Setupsettings
% Spike2Section: A Matlab class for loading in only a section of a
% Spike2 generated .mat file. Since these files are generally very
% large and contain lots of useless information, this class is used
% to extract data that only be... |
f3328d50ebe5bbc706dbefa6640b62e0e3ba1535c0bcc85705519d9c99fd00d0 | MATLAB | 40,026 | 960 | %% 8 pt graph analysis average
%% Load parameters
clear
clc
close all
%Loading prerequisites
nostim_datatable=(load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim\dataInfo.mat"));
nostim_datatable=nostim_datatable.dataInfo;
nostim_allreg=(load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim\full_idx_allregion_un... |
98150ea3c4a8f52d4652f1b2795cae37db34bcd532e95fc6bec039d8c41d4801 | MATLAB | 40,219 | 940 | % Matthew Ning's note: modified to accept any vector as basis, used for CV
% To use that option, set idxBasis = 5 and paramsBasis to the vector
% glmSolveMethod= 1 is the only option supported for the above parameters.
% flagNuisanceRMethod does not depend on above options
%
% Make sure that the calcDWTMatrix.m or oth... |
d149ad5fd28ca294c00860e8a76e1691ca4e896c35df95012f13232bbf3bae33 | MATLAB | 40,256 | 934 | % SYNTAX:
% [data_yavg, data_yavgstd, nTrials, data_ynew, data_yresid, data_ysum2, beta_blks, yR_blks, bvar, hmrstats, betaSS_blks, dof_blks, sse_blks] = hmrR_GLM_HbT_V02(data_y, stim, probe, mlActAuto, Aaux, tIncAuto, rcMap, trange, glmSolveMethod, idxBasis, paramsBasis, rhoSD_ssThresh, flagNuisanceRMethod, driftOrder... |
7a185162fa9fcbd4685b29f88173b71671d819368ef456726eb215de38fbe1f0 | MATLAB | 40,778 | 1,213 | classdef NirsClass < AcqDataClass & FileLoadSaveClass
properties
SD
t
s
d
aux
CondNames
end
% Properties not part of the NIRS format. These parameters aren't loaded or saved to nirs files
properties (Access = private)
errmargin
end
... |
b20b494652e9347d2599753d5ce9bd0a94ecb6caab7e2d231e560178111cfc77 | MATLAB | 41,278 | 962 | % Matthew Ning's note: modified to accept any vector as basis, used for CV
% To use that option, set idxBasis = 5 and paramsBasis to the vector
% glmSolveMethod= 1 is the only option supported for the above parameters.
% SYNTAX:
% [yavg, yavgstd, tHRF, nTrials, ynew, yresid, ysum2, beta, R, hmrstats] = hmrR_GLM(data, ... |
b64d7d859e10aa0aecab9c9ac22d2c79a395725cd239ad8200ff3043fa6e3795 | MATLAB | 41,613 | 962 | % SYNTAX:
% [data_yavg, data_yavgstd, nTrials, data_ynew, data_yresid, data_ysum2, beta_blks, yR_blks, hmrstats,bvar, betaSS_blks, dof_blks, sse_blks] = ...
% hmrR_GLM(data_y, stim, probe, mlActAuto, Aaux, tIncAuto, rcMap, trange, glmSolveMethod, idxBasis, paramsBasis, rhoSD_ssThresh, flagNuisanceRMethod, driftOrder, c... |
c143909cfec969d09a3649bcd6025e9a4708f776e1221f464689053bb6170c45 | MATLAB | 41,906 | 863 | %% Analysis script
close all, clear all
%% Make a batch with gui
% The Abfbatch object allows you to handle a collection of Abffiles.
bb = Abfbatch('gui');
%% inspect
bb = bb.inspectbatch;
%% analyse all files from batch
bb = bb.analysebatch;
%% save bb
%and load in AnalyseCCstepsABFBatch script
%% Set path to loa... |
e4c6d769fe720097e294039e876b1da3aeaab59340d6fa64a6ca2a3869f0d89e | MATLAB | 42,095 | 988 | % 4/11/2022: replace nB/nCond loop with totNumCoeffs loop
%
% 4/4/2022: Updated to calculate GLM fitting to HbT data
% Never tested for glmSolveMethod == 2, but should work
%
% Note: only work with idxBasis==1
%
% Both y_CI and beta_CI can be derived from yavgstd and beta, respectively.
%
% Add support for F-Test for ... |
89950e6c52582d7a19a2ef6d553fac34d90e3b55ce17b6ddde99c3705a24c149 | MATLAB | 42,450 | 970 | classdef MouSee < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
MouSeeUIFigure matlab.ui.Figure
StimuliPanel matlab.ui.container.Panel
RunButton matlab.ui.control.StateButton
... |
ba88b022ecf1e12446baea785771da9d5d21b53c3485337545992e5c4a227b84 | MATLAB | 42,511 | 1,625 | function Duszkiewicz2024_Figure_Optogenetics
% This script reporoduces panels from:
% Figure 5, Extended Data Figures 7 and 8
% Dependencies:
% TStoolbox
%TODO: script dependencies, links to external functions
% Copyright (C) 2023 by Adrian Duszkiewicz and Adrien Peyrache
%
% This program is free software; you can... |
531f1261b80b31b0cf584d1c3e03f10feaa77de8813c249473eb0c905acb0f26 | MATLAB | 42,588 | 1,129 | % Author : Andreas Seas
% Descr : Generate figure 5 for SCC DBS DEP Manuscript
% - Adapted from M2_Code_raters_V2_seastrytomakethebox
%% clear slate
close all;clear;clc
%% Inputs
% colors
CBcolor = [0.8, 0.6, 0.1];%[0.4000 0.3647 0.1059];
FMcolor = "r";
TCcolor = "b";
% alphas... |
050c9960c381553ccf511f36f0a7bfed1e51435f51d7be7ee60954f3b53064b9 | MATLAB | 42,663 | 911 | %% Semi-automatic 3D morphology analysis: 3DMorph
%First run script in interactive mode to generate a parameters file. It may
%then be run in automatic mode (with or without figure outputs) to batch
%process a series of images. *Note: these images must have the same scaling
%factor and use the same user-defined val... |
73414035f078a043f07c8d695f44c06f3b27a0f4269a0d82efc5d2f392242638 | MATLAB | 42,821 | 730 | classdef Abffile < Sharedpaths & Setupsettings
% ABFFILE: A Matlab class for the axon binary file (ABF)
% The axon binary file is the standard data format storing electrophysiological recordings obtained using pClamp, the
% Axon Instruments data acquisition software.
%
% Notes:
... |
98cbfc1174ec738e45a051c9a3e36fed03f8452568b61ae9066b6a1c23ec9a18 | MATLAB | 42,841 | 1,181 | function [x,f,exitflag,output] = minFunc(funObj,x0,options,varargin)
% [x,f,exitflag,output] = minFunc(funObj,x0,options,varargin)
%
% Unconstrained optimizer using a line search strategy
%
% Uses an interface very similar to fminunc
% (it doesn't support all of the optimization toolbox options,
% but supports ... |
7059a90383ed567c4639d8822103ae874a1b92545b907e45aae065e515fbff79 | MATLAB | 42,861 | 730 | classdef Abffile < Sharedpaths & Setupsettings
% ABFFILE: A Matlab class for the axon binary file (ABF)
% The axon binary file is the standard data format storing electrophysiological recordings obtained using pClamp, the
% Axon Instruments data acquisition software.
%
% Notes:
... |
9409fd8b6da7b711d0222499f4d970b2d312ca3754d32b92b50eedbf3d0c13d7 | MATLAB | 43,139 | 701 | %% Fig. 3h & Extended Data Fig. 3i: Change in event number / 30s in the
% local astrocyte network binned into 50um bands radiating out from the
% uncaging site (Fig. 3h), including permutation testing to see which time
% windows have event frequency changes significantly different from
% chance.
% Ext. Data ... |
7d7d0ff5030b1cf32e5087e48fffd109bf84f5b23fd33af336ed60a487b3f62b | MATLAB | 43,153 | 747 | function cifti_conn_matrix_exaversion(wb_command, dt_or_ptseries_conc_file,series,motion_file, FD_threshold, TR, minutes_limit, smoothing_kernal,left_surface_file, right_surface_file, bit8,output_directory)
%dt_or_ptseries_conc_file = dense timeseries or parcellated timeseries conc file (i.e. text file with paths to e... |
b3d479bde3b2f212344bd04d93f5144f739936b5d87ac99942bf10a8e9754e9a | MATLAB | 43,295 | 920 | %% Analysis script
close all, clear all
%%
folder = uigetdir
cd (folder);
%make a list with all nwbsephys
list = dir();
list = struct2table(list);
list = list(list.bytes>10000,:); %only files with actual data
%% USE THIS nwb2:
for i = 1:numel(list.name)
fn =cell2mat(list.name(i));
nwb = NWBfile(fn,[{'LP'} {'hr... |
6c059691373175aedfeb9f4ee1daa02c24306f5e732723b8c8b1c174ce3b66fe | MATLAB | 43,319 | 1,508 | function varargout = StimEditGUI(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @StimEditGUI_OpeningFcn, ...
'gui_OutputFcn', @StimEditGUI_OutputFcn, ...
... |
e3e1f10568d8610ad2b0927ae9520a8d171c0ab1608f893c846d88602c48be61 | MATLAB | 43,577 | 1,082 | % 1. Add the path of the current script to the search path
% 2. Change the current folder to "Fig4 and Supp Fig4 PFstimulation_spatial pattern"
% 3. ctrl+enter to run each section
%% Section 1: Open files
% Select all file in the subfolders WT, L7SK2, and then CaMKII
% within the folder of "Fig4 and Supp Fig4 PF... |
9f33632326c66ff881fea20a1b2bae10f75eba710b81d853d80cfc482882afef | MATLAB | 44,291 | 1,103 | classdef DataClass < FileLoadSaveClass
properties
dataTimeSeries
time
measurementList
end
properties
cache
diagnostic
end
methods
% -------------------------------------------------------
function obj = DataClass(varargi... |
4b5a84746660e344ce8d253b89b90141a6bf7c81fd7fac8c9cc93f45ee216a35 | MATLAB | 44,331 | 1,003 | % STATUS: incompleted & experimental
% Not for publication.
%
% SYNTAX:
% preprocessFNIRS06_LOFO_Subset_MultiOnly(s,numClasses,rejTrOp,rejChnOp,...
% fefOnlyOp,deltaOp,rerunOp,plotOp)
%
% DESCRIPTION:
% Performs leave-one-feature-out classification on entire dataset (using
% Markov Blanket).
% Otherwise identic... |
c9d16d1e6a248c412d7f6e8f39dc4487be6b1770c24356ac76cc25ef565faa86 | MATLAB | 44,428 | 1,005 | % STATUS: incompleted & experimental
% Not for publication.
%
% SYNTAX:
% preprocessFNIRS06_LOFO_Subset(s,numClasses,rejTrOp,rejChnOp,fefOnlyOp,...
% deltaOp,rerunOp,plotOp)
%
% DESCRIPTION:
% Performs leave-one-feature-out classification on entire dataset (using
% Markov Blanket).
% Otherwise identical. Repeat... |
d6d86e08273b4e899f070319f6a63e9d584bd31e280c25a7a831ebd9641e6a04 | MATLAB | 44,703 | 1,103 | %% IBI comparison bar graphs and anova
clear
clc
ff_colors=["#3869EE","#FF2303","#EE9B00"];
fb_colors=["#4fb7ff","#FF9B9B","#FFDA49"];
%% Feedforward lower
nostim=load('IBI_no_stim_ff_ancova_vars_1.mat');
theta=load('IBI_theta_stim_ff_ancova_vars_1.mat');
hfs=load('IBI_HFS_ff_ancova_vars_1.mat');
subregio... |
bd905ce919378c9e7976c288a9bc6aec0306508bbbc2d434eaf4be073c16fd00 | MATLAB | 45,652 | 1,148 | classdef GroupClass < TreeNodeClass
properties % (Access = private)
version;
versionStr;
subjs;
end
properties % (Access = private)
outputFilename
oldDerivedPaths
derivedPathBidsCompliant
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
6337983c3c7ece34a759e635d74ab24fa99c846e7e5c0b00b44f0d48daa92392 | MATLAB | 45,816 | 993 | % STATUS: inactive.
%
% SYNTAX:
% preprocessFNIRS06_CV_GLM_ssBeta_DiffTLen(s,numClasses,rejTrOp,rejChnOp,...
% rerunOp,plotOp)
%
% DESCRIPTION:
% Preprocess raw data (light intensities) and perform cross validation
% where SS beta coefficients from training fold is passed to test fold.
% Perform all-channel cl... |
2544681dbe9e94e2400aa247e1225f0f84deb270bd957989cd1eda19a5fc3595 | MATLAB | 45,830 | 988 | % STATUS: active.
%
% SYNTAX:
% preprocessFNIRS06_CV_GLM_ssBeta_DiffTLen_MultiOnly(s,numClasses,rejTrOp,...
% rejChnOp,rerunOp,plotOp,opIsLocal)
%
% DESCRIPTION:
% Preprocess raw data (light intensities) and perform cross Validation
% where SS beta coefficients from training fold is passed to test fold.
% Perform ... |
503702dacac4bdf57b073c80cecd3f56250a77c16f97e39450b7194cf7dea9ad | MATLAB | 45,932 | 666 | %% Preparing data structs with AQuA res files from 2P uncaging experiments
% Figure 2 & 3: 2P uncaging of GABA and gluamate and 2P imaging of CytoGCaMP6f
%
% Michelle Cahill 20240110
%% Section A: preparing mydata struct
% Modified from Aggregate_MC_ftsFilter_uncMod_MultCond_20210302.m
% 1. Record the frame the ... |
05ea6a83474943eb0aca6bbc7c015de303e6c2f38c773e324816a68c5e081517 | MATLAB | 47,129 | 935 | % For figure 5 in Draft 3
% figure 5a: compare HbO, HbR and HbT for grand average
% figure 5b: compare high-performing and low-performing for HbT
%
% OLD
% 6 subplots (2,3). HbO, HbR, HbT. Show grand avg, high and low performing group on
% same figure, only show LDA classifier. So 3 lines per fig.
% 2-class classificat... |
aedc74e8a59cd100d479a388aa828851e6a4a7c93e7b6d075c302591db98e540 | MATLAB | 47,238 | 1,456 | %% Consolidate fits - SF
% res_str = consolidateAlphaTauFits(x_reps_sf1, eps_trace(1), eta_trace(1), 'alpha');
cmap_nan = [1 1 1 ; parula];
time_cmap_nan = [0.5*ones(1,3); parula(50)];
N_sf1 = 128;
%% LOAD: 1-field Ultra Small-Network Fine sweep with replicates (1USR): plotting firing rate, avalanche counts, and field... |
f4f54f2e1b55c84966cdae6aeb0e744d7228feeeb4938e9d5be482a09a141003 | MATLAB | 47,382 | 1,349 | % Information calculation for model across phi, epsilon values.
% QUESTION for size scaling: can I calculate the probability of silence for
% populations of size N? and does this help interpret the finite size
% effects of the eta-epsilon plane?
n_neur = 1000;
J_i = randn(n_neur, 1);
prob_s_fun = @(h, J1, eta1, ep... |
50cea4a0960e415648ca2f0976c19dd62574f9e88e582118748e1e2f384c574c | MATLAB | 47,776 | 964 | classdef RegistrationViewer_Parameter_exported < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
RegistrationViewerUIFigure matlab.ui.Figure
ResetSelectionButton matlab.ui.control.Button
EndSlicesNotationTextArea matl... |
3e1bb48d479520c7fa8ebbfeeceff57c6b57658ff8a60abc223e8ed937691913 | MATLAB | 48,001 | 950 | % For figure 5 in Draft 3
% figure 5a: compare HbO, HbR and HbT for grand average
% figure 5b: compare high-performing and low-performing for HbT
%
% OLD
% 6 subplots (2,3). HbO, HbR, HbT. Show grand avg, high and low performing group on
% same figure, only show LDA classifier. So 3 lines per fig.
% 2-class classificat... |
e667e947cc39c8821c92a3e54e904e60200c1ceaf523c9feabe902e7bb9870a3 | MATLAB | 48,103 | 1,482 | %% Consolidate fits - SF
% res_str = consolidateAlphaTauFits(x_reps_sf1, eps_trace(1), eta_trace(1), 'alpha');
cmap_nan = [1 1 1 ; parula];
time_cmap_nan = [0.5*ones(1,3); parula(50)];
N_sf1 = 128;
%% LOAD: 1-field Small-Network Fine sweep with replicates (5USR): plotting firing rate, avalanche counts, and field value... |
b946586b28d52b2e011be8d0fcdfa947a925538ed20b75212f74faecbcc98499 | MATLAB | 48,416 | 1,196 | %% Create Graphs with strength of connections varying with time representing slopes of AFR between nodes
clear
clc
close all
%Loading prerequisites
% load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim\dataInfo.mat")
% load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim\full_idx_allregion_unit_matched_stim.mat")
... |
d691f1496b233ba72247ee8be145f8754d1cd81bac42d2b2cc6299bfc8a8c8ca | MATLAB | 49,009 | 794 | %
%2024/02/26
%define directories
root_dir=define_flicker_root_dir;
source_data=[root_dir '/stg-analyses/NatureComm2024-figures/Source Data']; %where source data for figures is stored
figures_dir=[root_dir '/stg-analyses/NatureComm2024-figures'];
%fetch data:
all_subjects=fetch_flicker_subjectIDs(root_dir,'flickerfre... |
18a8f6c0b3822b7e48d3727b06f1423dbb2b2cf0f02c3282222dd8c6da2536a0 | MATLAB | 49,407 | 1,411 | %load hits20210730_noprewhiten.mat
% get the intersection of all approaches that were successful
% allHits = Hits&HitsC&HitsOrig;
% sumHits = sum(allHits(:,:),2);
% [~,ix] = max(sumHits);
% executive decision:
% indx = 15 (ix);
% snr = 0.6;
% phs = 8/17 pi
% amp = 0.6
extra_figs = 0; % should extra figures beyond ... |
b53a5f0aa87cf55f33c906fd37897b23db91082a194884c74dc58791fddaa57c | MATLAB | 50,170 | 1,194 | % Script for fitting power law models to the avalanche data generated by
% simulation
% 1. use MLE estimate to get slope parameters for discrete distributions
% 2. use KS statistic between empirical and model distribution to determine
% x_min.
% 3. goodness of fit: using the best-fit parameters, generate simulated
% ... |
17371dbe0bc5a27154ff4f53a7a5f30caee10b3871ecbab02f34ca3195d3e5c4 | MATLAB | 51,590 | 1,006 | function CheckEegStates_aux(action)
% Developped by Anton Sirota (?)
% Modified by Adrien Peyrache (2012)
%%% TO DO
%%% use the functionality by setting 'KeyPressFunc',{@CheckEegStates_aux,
%%% action} . this way the first two arguments matlab feeds into callback handling function is src and evt, which is a structur... |
e5741bcd14e40bfcb46ee94c83d191c8d019100f6ab988631ce73c5817065be0 | MATLAB | 52,245 | 1,154 | classdef MouSee < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
MouSeeUIFigure matlab.ui.Figure
StimuliPanel matlab.ui.container.Panel
RunButton matlab.ui.control.StateButton
... |
3f227610065dfd1d44599258fe35561478e4648b99b3a9dfbf3d34b91f856a85 | MATLAB | 52,840 | 1,073 | % STATUS: active
%
% SYNTAX:
% grpPlotPerfVsTime_Fig5_BarPlot(numClasses,saveOp,ciOp)
%
% DESCRIPTION:
% Plot barchart of decoding performance.
%
% RESTRICTION:
% None.
%
% INPUTS:
% numClasses - int: number of classes to classify
% 2 - classify between left & right
% 3 - classify between left, right & ... |
f7b9c92d12ae1ac27678936d6f4b5e1330b131b36afb7146f872f795b9466502 | MATLAB | 53,845 | 1,518 | %% Orimask Paper Figure: 4 S2
BeDAT = load('Data/20220828_Behavior_signedOri');
BeDAT.Behavior = fitBehaviorGau(BeDAT.Behavior);
BeDAT.Behavior_Homer = fitBehaviorGau(BeDAT.Behavior_Homer);
BeDAT.Behavior_Thor = fitBehaviorGau(BeDAT.Behavior_Thor);
DxDAT = load('Data/20220915_OrimaskNorm_rtmasked');
DxDAT = ... |
6b6c8298d7ad03aa187b557d385585b5f1497bad220bdc1e31780ff47fd0e681 | MATLAB | 53,877 | 1,455 | function varargout = drtool(varargin)
% DRTOOL M-file for drtool.fig
% DRTOOL, by itself, creates a new DRTOOL or raises the existing
% singleton*.
%
% H = DRTOOL returns the handle to a new DRTOOL or the handle to
% the existing singleton*.
%
% DRTOOL('CALLBACK',hObject,eventData,handl... |
23f7ea53b01e2ed938159a349112382ef6a2f0e828cc66cabdfc1dfc28153b34 | MATLAB | 54,433 | 1,021 | classdef Trace < timeseries
%TRACE Ephys trace
% A trace is a piece of a recorded signal. Used as a superclass to define methods to be inherited by both the the Sweep
% and Epoch classes.
%
% -------------------------------------------------------------------------------------------------... |
90eb1cd0f310a0a8c194c3b0c669aa25d61931884e5a7f7f294fa7827aa99576 | MATLAB | 54,716 | 1,029 | classdef Trace < timeseries
%TRACE Ephys trace
% A trace is a piece of a recorded signal. Used as a superclass to define methods to be inherited by both the the Sweep
% and Epoch classes.
%
% -------------------------------------------------------------------------------------------------... |
4895dc92ce6ab63b8053bb2ad80ac3b5c698f6ca2e1067d74c3d3cc747ffe183 | MATLAB | 54,869 | 1,502 | function [d,si,h]=abfload_pro(fn,varargin)
% ** function [d,si,h]=abfload(fn,varargin)
% loads and returns data in ABF (Axon Binary File) format.
% Data may have been acquired in the following modes:
% (1) event-driven variable-length (currently only abf versions < 2.0)
% (2) event-driven fixed-length or waveform-fixed... |
72d02179a19d6b093a981ae0c488514ec2a712060cc02a128f4d9fb424393920 | MATLAB | 54,947 | 1,379 | %% Orimask Paper Figures 2, 4, 4s1, 5, 5s1
BeDAT = load('Data/20220828_Behavior_signedOri');
BeDAT.Behavior = fitBehaviorGau(BeDAT.Behavior);
BeDAT.Behavior_Homer = fitBehaviorGau(BeDAT.Behavior_Homer);
BeDAT.Behavior_Thor = fitBehaviorGau(BeDAT.Behavior_Thor);
DxDAT = load('Data/20220915_OrimaskNorm_rtmasked... |
46b646be7811ea5a570810cac33fd74a5ab78967b0a74f07495fa62669cba0e3 | MATLAB | 55,491 | 1,242 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Hold period analysis for Mosberger et al. 2024
% written by James N Ingram, 2023
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FilePath = '***EnterFilePath***';
% Raw data file (analysed once, then sav... |
6905be3ce66ab85a9578b7cba3dde5e7caa25cd51feb3b1f4b9e036301612677 | MATLAB | 55,825 | 1,191 | % Import Wizard 2
%
% Descriptions tba
%
% $Author: Peng Li, Ph.D.
% $Date: Dec 23, 2019
% $Modif.: Dec 02, 2021
% version 2
% interface major reorders
% add time parser here and remove module from main
% interface
% ... |
5a7d12cdaf73e2a50175e7f0393024619964105b7b1b5bfef7e6d78896a8943e | MATLAB | 55,976 | 1,195 | % Import Wizard 2
%
% Descriptions tba
%
% $Author: Peng Li, Ph.D.
% $Date: Dec 23, 2019
% $Modif.: Dec 02, 2021
% version 2
% interface major reorders
% add time parser here and remove module from main
% interface
% ... |
75fc60be4c7ae823c19f356260282cbbe088755db09de16e11a180be06f529b0 | MATLAB | 56,163 | 424 | %ied_gen_figs.m
%
%generate figures made in lou_stats_v3 using saved estimates and p-values
%in data structure IED_results.mat
%2024/02/26
%% load data and define outputs:
root_dir=define_flicker_root_dir;
results_folder=[root_dir '/stg-analyses/ied-analysis'];
ied_results=importdata([results_folder '/IED_struct.mat'... |
1a89a3da1dbf40f4d40daaede94cda6475ab53ae96fa27d6f3fa56a10dc805f3 | MATLAB | 57,406 | 1,557 | function [d,si,h]=abfload_github(fn,varargin)
% ** function [d,si,h]=abfload(fn,varargin)
% loads and returns data in ABF (Axon Binary File) format.
% Data may have been acquired in the following modes:
% (1) event-driven variable-length (currently only abf versions < 2.0)
% (2) event-driven fixed-length or waveform-fi... |
6ad550fb4e1d912dc8ec85e5a2d85778f8b81b66cd86af5a63ebeedf24ada7b0 | MATLAB | 57,518 | 1,561 | function [X,Y,T,auc,optrocpt,subY,subYnames] = ...
perfcurve(cls,scores,posClass,NVPairs)
%PERFCURVE Compute Receiver Operating Characteristic (ROC) curve or other
% performance curve for classifier output.
%
% [X,Y] = PERFCURVE(LABELS,SCORES,POSCLASS) computes a ROC curve for a
% vector of classifier... |
b7249dc2b5bc87e0cf9e5830058b6c8d3e6112bcd9f941dac607d190ad583112 | MATLAB | 57,758 | 1,514 | clear
clc
%load('D:\Brewer lab data\HFS\HFS Stim\24-Nov-2021_A\spike_burst_dyn_table_stim.mat') % 11 SD
load('D:\Brewer lab data\HFS\HFS Stim\03-Oct-2022_A\spike_burst_dyn_table_stim.mat') % 5 SD
cd 'D:\Brewer lab data\HFS'
tunnel_spike_burst_dyn_table = spike_burst_dyn_table_stim;
clear spike_burst_dyn_table
ff... |
8e52735d05f681a8dabb3ef6fe34d350b15af6d9669e25341cc7a6d2fa01b52a | MATLAB | 58,514 | 1,402 | %% Create Graphs with strength of connections varying with time representing slopes of AFR between nodes
% Reduction of degrees to generate summary figure
clear
clc
close all
%Loading prerequisites
nostim_datatable=(load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim\dataInfo.mat"));
nostim_datatable=nostim_datatab... |
df1bb9d081242e40d380db4bcf18b388e721ac56f4d5617af4d673f43d2f9f54 | MATLAB | 59,168 | 1,078 | function MSO_post = Sierksma_MSO_STDP_model(varargin)
%% Code by MC Sierksma, 2022
% This code runs a simulation for MSO neurons that change their ITD tuning
% due to a spike timing-dependent plasticity rule.
%
% Basic parameters are defined in mcs_return_standard_params().
% For each neuron we define n number o... |
2015af3b684ebbe4a81cdeb2b0d3bb213a37540828423f2c8e88e182cad6a2f4 | MATLAB | 60,943 | 1,614 | clear
clc
% load('D:\Brewer lab data\HFS\Theta stim\23-Nov-2021_A\spike_burst_dyn_table_stim.mat')
% load('D:\Brewer lab data\HFS\Theta stim\03-Mar-2022_B\spike_burst_dyn_table_stim.mat')
% load('D:\Brewer lab data\HFS\Theta stim\10-May-2022_A\spike_burst_dyn_table_stim.mat') % 11 SD
load('D:\Brewer lab data\HFS\T... |
e678eb43cf7d80d889f617d59e22d3ebb9180e4dcb3c867b45b0cd91fe36172a | MATLAB | 62,294 | 1,626 | classdef TreeNodeClass < handle
properties % (Access = private)
name;
type;
iGroup;
iSubj;
iSess;
iRun;
iFile;
children;
acquired;
procStream;
err;
CondNames;
updateParentGui;
end
properties
... |
e45b4312a2bcfd1a15e1856e1c19e46cc3f92f80d508f1183d61e8dc1617f5d3 | MATLAB | 62,297 | 1,625 | clear
clc
% load('D:\Brewer lab data\HFS\No Stim\23-Nov-2021_A\spike_burst_dyn_table_stim.mat') % 11 SD
%load('D:\Brewer lab data\HFS\No Stim\08-Dec-2021_A\spike_burst_dyn_table_stim.mat')
load('D:\Brewer lab data\HFS\No Stim\02-Oct-2022_A\spike_burst_dyn_table_stim.mat') % 5 SD
cd 'D:\Brewer lab data\HFS'
tunnel... |
4f43db33c2d9ba354f7a286bca06bf4a312e97f8e607660825deedf4ca3beef5 | MATLAB | 62,509 | 1,163 | %% Fig. 2h & 3c-f: dF/F raster plots individual recordings in each row
% recordings are sorted by the latency to the first post-stim frame with
% dF/F values > threshold and related panels
% For a flexible number of conditions and the ability to choose which
% cells to include for mean dF/F calculation for each re... |
c49c6ee3cb56353d66d9d8fe0782395544be8c9c90cf54f4210593ed98ec3aa7 | MATLAB | 62,637 | 1,519 | %% Create Graphs with strength of connections varying with time representing slopes of AFR between nodes
% Reduction of degrees to generate summary figure
clear
clc
close all
%Loading prerequisites
nostim_datatable=(load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim\dataInfo.mat"));
nostim_datatable=nostim_datatab... |
ff94ba0fe4c473e847c966ccd59a2e111c51e8a4ce5eef8fb2fc071440038163 | MATLAB | 62,888 | 1,324 | % Import Wizard 2
%
% Descriptions tba
%
% $Author: Peng Li, Ph.D.
% $Date: Dec 23, 2019
% $Modif.: Dec 02, 2021
% version 2
% interface major reorders
% add time parser here and remove module from main
% interface
% ... |
12d05d70d104a54b6cf23a10dc8f7c6daf630c6b042c66cb5c384823beb1f97b | MATLAB | 64,895 | 2,451 | function Duszkiewicz2024_Figure_Fourier
% This script reporoduces panels from:
% Figure 3, Extended Data Figures 3 and 4
% Dependencies:
% TStoolbox
% CircStat
% Matlab Toolbox for DImensionality Reduction
%TODO: script dependencies, links to external functions
% Copyright (C) 2023 by Adrian Duszkiewicz and Adrie... |
5471b17d5814a121f52c57d28b9647bcbca65b596fa27a87bb10bf169eb98e2e | MATLAB | 65,988 | 1,849 | classdef SnirfClass < AcqDataClass & FileLoadSaveClass
properties
formatVersion
metaDataTags
data
stim
probe
aux
end
properties (Access = private)
fid
gid
location
nirsdatanum
nirs_tb
stim0
end
... |
364f6177c60a4a41feee2e3b402c8b0c0d0b98d0d7182884f1d6fb1b040b442d | MATLAB | 66,988 | 2,205 | function varargout = MainGUI(varargin)
% Start initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @MainGUI_OpeningFcn, ...
'gui_OutputFcn', @MainGUI_OutputFcn, ...
'gui_LayoutFcn', [] , ...
... |
a51511e982bd26ed0bad9b2e9c05fe8f5157be922d0ed6d441b8872bf5f398a3 | MATLAB | 75,785 | 1,962 | classdef ProcStreamClass < handle
properties
fcalls; % Array of FuncCallClass objects representing function call chain i.e. processing stream
fcallsIdxs;
reg;
input;
output;
config;
end
properties (Access = private)
datatype... |
1ae3b21d523ed478bcf1be938fd57d47f9d3337a9c5d8402692881b9d10dd8a7 | MATLAB | 81,890 | 1,978 | % "Differential nanoscale organization of excitatory synapses onto excitatory vs. inhibitory neurons"
% Poorna A Dharmasri, Aaron D Levy, Thomas A Blanpied, PNAS 2024
% authors: Poorna A Dharmasri
% copyright: 2024 Blanpied Lab, Dept of Physiology, University of Maryland School of Medicine
%% SMAP data conversion... |
43980a9f21bfb9d173e153fe19a671fea4356993e143b674574d27d02b917a63 | MATLAB | 85,272 | 1,970 | classdef MinStack
properties
TIF;
tags;
out_pkfnd;
out_cntrd;
out_track;
out_track_plt;
end
% instance methods
methods
% constructor
function obj = MinStack(inputArg1)
if nargin==1
obj... |
529acdbf3a07809a469d24911f15b85ff1a8cd1b2b55a55361ecc90212c3bc56 | MATLAB | 91,379 | 2,215 | %GroupAna.m
%
%Purpose:
%
%
%
%Input Parameters:
%
%
%
%Output Parameters:
% err : 0 No Problem
% : 1 Problems
%
%
%
%Key Terms:
%
%More Info :
%
%
%
diary('diary'); % save all subsequent command window input and most of the resulting command window output to be app... |
d9cff9bfe5d304c41c4d15b37a2cb6aa9483ca7c7624d69379f5a64274c13488 | MATLAB | 95,126 | 6 | d1 = [0.198798020268678 0.192552439311808 0.206575536177233 0.213881687485270 0.232029224605232 0.222484091444733 0.233561159556917 0.231675701154843 0.240513787414565 0.248409144473250 0.257011548432713 0.251590855526750 0.251590855526750 0.238392646712232 0.242281404666510 0.230497289653547 0.236389347160028 0.224487... |
dec69e1a58c756cf36be1d29b5f22078903d331abb61a4e3aa7cae6c731c5bf0 | MATLAB | 100,490 | 1,829 | function D = MosbergerHoldPeriodBlockAnalyse(BlockDataRaw,AnalysisBlockIndex,PlotFlag)
% Analysis function for a single block containing data for animals and sessions.
if( nargin == 2 )
PlotFlag = false;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following code i... |
9495e09deca7af03cc531251e30f696b9124130792cd1ab6543c400f32b39cf0 | MATLAB | 118,106 | 2,218 | % Script to simulate OPM recordings from meld locations
close all; clear; clc;
addpath('D:\Documents\Software\spm12\');
spm('defaults', 'eeg');
addpath('D:\Documents\Scripts\opm_meld_simulations\');
MELD_dataset_directory = 'D:\Documents\Data\MELD_database';
%% Config
cd 'D:\Documents\Data\MELDsimulations\spm_dat... |
2549ce2f8ce66c07d3ff791c0828debc2bebf9fa31fd84f75c41baff6882da83 | MATLAB | 121,871 | 2,745 | classdef dlcdata < MSessionExplorer
% For analyzing whisker tracking data from DeepLabCut
% RD fall 2019
properties
mouseName
sessionDate
end
methods (Access = private)
end
methods (Static)
% Pre-pro... |
f1f53e551e5985ffd20a333a6c14f30da9c70ab18879764ff5666adc6f512b91 | MATLAB | 183,850 | 7 | d1 = [5.97125798389336 5.70258261594002 5.51930019439045 5.32421549569564 5.03818383782283 4.70494307136906 4.44251596778673 4.22035545681755 4.09330741460705 3.75590113857262 3.65940016662038 3.13732296584282 2.94779227992224 2.41183004720911 2.41807831158012 2.09525131907803 2.27506248264371 2.10983060261039 2.534018... |
51552ee2a2350df4fa1eca75e5944c8b487f1d9e7e87759f265e4181c804dd02 | MATLAB | 200,000 | 4,542 | %% Create Graphs with strength of connections varying with time representing slopes of AFR between nodes
clear
clc
close all
%Loading prerequisites
nostim_datatable=(load("D:\Brewer lab data\HFS\Temporal Analysis\No Stim\dataInfo.mat"));
nostim_datatable=nostim_datatable.dataInfo;
nostim_allreg=(load("D:\Brewer lab dat... |
ec75d76f3c25e168fdf41b617b5a1ca15cfdb20e1042834aaee781f3328cb2c5 | MATLAB | 200,000 | 15 | % 0.4304 Hz avg mean small fields
d1 = [0.621311000000000 0.591369000000000 0.602539000000000 0.570447000000000 0.592372000000000 0.540535000000000 0.524867000000000 0.501371000000000 0.475633000000000 0.422170000000000 0.385191000000000 0.387062000000000 0.358186000000000 0.375416000000000 0.380343000000000 0.38189800... |
398c6b9648f7df20d35e66d1edcdc332a9d50a690bc60918ec25ac5e6f1ef4b8 | MATLAB | 200,004 | 3,661 | classdef suMRak_exported < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
suMRakSimpleUtilityMRiAnalysisKitUIFigure matlab.ui.Figure
TabGroup matlab.ui.container.TabGroup
MainTab matlab.ui.c... |
6bdc0b691c81be3b50ddf3bbb8ab34daf6fac133a3097ad58f09a924f40cded5 | NEURON | 15 | 1 | soma insert hh
|
4afeb4b956ae04cc9a66cac7900955b9c13e87b730d6c5ba31d99f63adc88b7e | NEURON | 75 | 4 | proc pause() { local t0
t0 = startsw()
while (startsw()-t0 < $1) { }
}
|
64d4a8e0548c1f2cbedbfa851dc583a3407fa36ec5f6e2db5d2f147ef1bacf3e | NEURON | 80 | 7 | func round(){
if($1>0){
return int($1+0.5)
}else{
return int($1-0.5)
}
}
|
7a486acc4202c5ff347fed1072b34f64d1c90d8b8385683560bec924fe24b238 | NEURON | 97 | 12 | NEURON {
SUFFIX id
RANGE id1, id2, id3, id4, id5
}
ASSIGNED {
id1
id2
id3
id4
id5
} |
a1540ed919d979dd456f64044fd3765c770726f163ec116f7ca15336b1720a86 | NEURON | 198 | 20 |
proc init() {
finitialize(v_init)
fcurrent()
dtsave = dt
dt = 10
t = 1e06
for i = 0, 40 { fadvance() }
dt = dtsave
finitialize()
t = 0
}
proc run() {
stdinit()
continuerun(tstop)
}
|
7101b4e2c7055d6631b81cdb95d3c6dd4c75b2e1f8a0e6de6fe0d040c24ae2e0 | NEURON | 226 | 18 |
create soma[1]
create dend[1]
soma[0] {
pt3dadd(0, 0, 0, 9.861)
pt3dadd(0, 0, 19.722,9.861)
}
dend[0] {
pt3dadd(0, 0, 19.722, 2.)
pt3dadd(0, 0, 510, 2.)
}
soma[0] insert hh
connect dend[0](0), soma[0](1)
|
b68cb8381aa5150350e7da9850f10ea067d20f17609b2e8f808d216fc1f21eec | NEURON | 274 | 11 | // reset nseg so none smaller than segL microns
segL = 5 // the length (in microns) of each dendritic segment
forall { ns=int(L/segL+0.5)
if (ns==0) {
ns=1
}
if ((ns-int(ns/2)*2)==0) {
ns=ns+1
}
nseg = ns
}
|
e8603620bc82787f591340cfc962f92236e01075e0f672697c709786b660edfc | NEURON | 276 | 14 | // This function returns the decimal part of value of x / y
// Argument 1 = x, Argument 2 = y
// by Ching-Lung Hsu (2012)
func decimal(){ local aa, bb, Arg1, Arg2
Arg1 = $1
Arg2 = $2
aa = Arg1 / Arg2
bb = aa - int(aa) // int return the integer part
return bb
}
|
5ee68f698a4e51bdccc1df01a1d342be2eddcc31acdf92c60d55700f837bb7cc | NEURON | 294 | 14 | // This function returns the value of x modulo y, the remainder from x / y
// Argument 1 = x, Argument 2 = y
// by Ching-Lung Hsu (2012)
func mod(){ local aa, bb, Arg1, Arg2
Arg1 = $1
Arg2 = $2
aa = Arg1 / Arg2
bb = Arg1 - int(aa)*Arg2 // int return the integer part
return bb
}
|
5dc3bf4fe99bdca4b35cf628ebd83962f91411b2fb1b0de75ac0448133a0da9b | NEURON | 401 | 10 | totalDistSegs = 0
forsec distTuft {
for (x){
totalDistSegs+=1
}
}
numScan = totalDistSegs
objref nmdaACSFPeakSort,nmdaTTXPeakSort,nmdaACSFIntSort,nmdaTTXIntSort,inputDistsSortY,voltACSFBPeakSort,voltTTXBPeakSort,voltACSFBIntSort,voltTTXBIntSort,caiACSFBPeakSort,caiTTXBPeakSort,caiACSFBIntSort,caiTTXBIntSort,randDi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.