sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
6f05509592bcb172218af2ff1555d556236c0ebbfd7d611a58ea612de328c3fc | MATLAB | 108 | 3 | function [path] = create_path (dir, sub, sess, type)
path = strcat(dir, sub, '/', sess, '/', type);
end |
6cd1f0b8eb33cd54bb0477e5526b910ed9236a656abe6feddb23c6be0c33447a | MATLAB | 109 | 3 | function y=joinNumVec(x)
temp=join(arrayfun(@(x) num2str(x),x,'UniformOutput',false),',');
y=temp{1}; |
75126a7f6bd04db6522b578c3db483f3e2e26dcd702593b2db269cfd838fcf7a | MATLAB | 111 | 4 | function List = Matrix2List (Matrix)
[a,b] = size(Matrix);
List = Matrix(tril(ones(a,b),-1)>0);
end |
30e288ccbdaaba7530072117b16fa97c16ef9a3530760d6e4cb3b01df5fe35b5 | MATLAB | 112 | 6 | %{
# population statistics parameters
bin : smallint # bin size in ms
%}
classdef PopStatsOpt < dj.Lookup
end |
e546123d1a752945d06d422169204eac9e4faa1af43f8565f2bdf037cf602003 | MATLAB | 112 | 4 | close all
clear all
run('C:\Users\MysticSocialist\Documents\GitHub\BCI\CLOOSE\Load_variables\some_variables.m') |
8b606267f8a516498920e6265e11872c2658791f36f99a045b04393fdff6af65 | MATLAB | 113 | 8 | addpath('src')
close all
clear all
folder_loc = fullfile(pwd,'images');
batchSpot('chosen_folder',folder_loc); |
e85f8e010e0fa5fdd6c9fcc13c9347c1ba3b02e3cb6a5b54b5b4dfcc93dbfa6d | MATLAB | 113 | 7 | function [ts, n, z, a] = sero_srr_default_image_pars()
ttot = 300;
ts = 0.15;
n = round(ttot/ts);
z = 50;
a = 4; |
26dc9644e895f1840506fccf7c2967a15f2620b37abff00f1aceb868cf22b7b8 | MATLAB | 114 | 4 |
[result,rt] = UnitTest('SinglePRESS',0,0);
assert(sum(rt{1}.Failed) == 0 && sum(rt{1}.Incomplete) == 0)
|
a459d84810b5ccc660a0b38a547c62c6aee37dbc8fb4f2eee3a1e6d8f38aee1e | MATLAB | 114 | 3 | function res = hlp_homedir
% Get the user's home directory
res = char(java.lang.System.getProperty('user.home'));
|
905e6200e9395c6ab17dbcd7ad793e2b5f0f89fcf1c017877bca4ae9680d3be6 | MATLAB | 115 | 4 | function Hp = essential_flat(H)
%Reshape a [3x6xk] matrix to a [3x3x2k] matrix
Hp = reshape(H,3,3,[]);
end
|
257804c6601ef03f853194e090cda833e22427cafe3c06255279a48d53021b2e | MATLAB | 116 | 4 | function H = essential_sharp(Hp)
%Reshape a [3x3x2k] matrix to a [3x6xk] matrix
H = reshape(Hp,3,6,[]);
end
|
4575ea5843c325b4f97eeaf5bcb2c99366fff28b79cbcf45a28609a61934a258 | MATLAB | 117 | 4 | function res = is_dataset(x)
% Determine whether some object is a data set.
res = all(isfield(x,{'data','srate'}));
|
6769a2fcd818f64277453388c1f9d8184b5e1d759978cdf547cf9448987f9689 | MATLAB | 117 | 9 | %{
experiment.ScanIgnored (manual) # scans to ignore
-> experiment.Scan
---
%}
classdef ScanIgnored < dj.Relvar
end |
ce6b27e16c6d9217045ee4ddc54d3e732aa8d0bbc4cbb04f5f7db41507edb7ab | MATLAB | 117 | 9 | function Y = nonnan(X)
% Y = nonnan(X)
%
% removes 'nan' values.
%
% jbh 1/6/15
nannies = isnan(X);
Y=X(~nannies); |
ed280cb4d120397170c6780c20165d7ef8010f97df546abf03eb7a7ccf52deba | MATLAB | 119 | 10 | %{
# Retinotopy for different directions
-> map.RetMap
-> map.OptImageBar
---
%}
classdef RetMapScan < dj.Manual
end
|
1e054ff42e5faa990fb26bc0dedbdf341bf74686317833d11d114a3f763c3043 | MATLAB | 120 | 9 | function figureJ(varargin);
if nargin==0
gcf=figure;
else
gcf=figure(varargin{1});
end;
set(gcf,'Color',[1 1 1]);
|
5cf197b7d27bf57eac49449aae5844d8d4b950560dae7be9b7db9b4fcf8f54fe | MATLAB | 120 | 9 | function [nb,nb_inds] = hylid_noise_bands()
n_band = 72;
nb = 1:4;
nb_inds = false(1,n_band);
nb_inds(nb) = true;
end |
884021dd0b63e1487a61828f0aa8e3ccd7e59e6c266425af9bbd37f18b992229 | MATLAB | 120 | 2 | function x = is_structured(x)
x = iscell(x) && length(x) == 2 && ischar(x{1}) && strcmp(x{1},'struct') && iscell(x{2});
|
71b8dfa4f3476229a3a88d67dda68aa4dbdc40fe9aafba062fc87a6005da2ddb | MATLAB | 121 | 4 | function val = sero_pulseq_roundToRaster(val, dt)
% function val = pulseq_roundToRaster(val, dt)
val = round(val/dt)*dt; |
71d6360ed450eb4c93860008846d2a2d12d74d4a0f3ce63b6f4f934f7c64b3e3 | MATLAB | 121 | 2 | function x = is_Nd_distributed(x)
x = iscell(x) && length(x) == 2 && ischar(x{1}) && strcmp(x{1},'mvn') && iscell(x{2});
|
52614dc898000cb37ea6184df9a2b3b2c3676ef83c0f5debd54a845aea1ab632 | MATLAB | 122 | 8 | %{
# visual stimulus trial syncing indicator
-> pipeline_behavior.TrialBuffer
%}
classdef SynchedTrials < dj.Manual
end
|
a1626d1548a66c6c7cefe86ca84cf81cfab2571b9484e015c348c924579ae638 | MATLAB | 122 | 5 | function [x] = interp1_nans(x)
nanx = isnan(x);
t = 1:numel(x);
x(nanx) = interp1(t(~nanx), x(~nanx), t(nanx));
end |
05c50919011c2d5b2877d8abf17361ebf00d99e69a1b2f4aeb9eb8f01e91c70f | MATLAB | 123 | 8 | %{
rf.Site (manual) # sites grouping several scans
site : smallint # site number
-----
%}
classdef Site < dj.Relvar
end |
17eff240743e58e35895f9c8ac1941dc991df690b0613b8d8fc15861793631d9 | MATLAB | 125 | 12 |
% A is numbers, B is text
[A,B] = xlsread(dbname);
names = B(1,:);
B = B(2:end,:);
for i = 1:length(names)
|
c616c39d6f8e7e230a17411ed799cea6749b76a5e3de3335dac74a7c84a4caaf | MATLAB | 125 | 5 | function portion = Portion(logical)
if isvector(logical), logical = logical(:); end
portion = sum(logical)/size(logical,1); |
beb09415fd269286122bd4500f1231c6c6f2c2cb7400beadb5240eaea1a6915e | MATLAB | 126 | 10 | %{
# Used for the webinterface
-> experiment.Scan
-> shared.Field
-> shared.Channel
%}
classdef DoNotSegment < dj.Manual
end |
f34930218c87238f92c842c089f3ecf635a88cc9499cfd57cfc9a694faa2f830 | MATLAB | 126 | 4 | function output = sortby(data,vector2order)
[~,order] = sort(vector2order,'MissingPlacement','last');
output = data(order,:); |
162b8bf33d4c65384289a6c22615140b2fd2e7ff461c9727c99f9521e793d271 | MATLAB | 127 | 7 | function bdm = ctx_bdm2d(X)
persistent L
if(isempty(L))
load('BDM2d_data.mat', 'L');
end
[ ~ ,bdm] = cal_info_s(X,L);
end
|
75d7a3e99eedde95b8491d73813edd0871adbc503dbeefcb108a89da8d863a29 | MATLAB | 127 | 2 | function x = is_distributed(x)
x = is_1d_distributed(x) || is_Nd_distributed(x) || is_discrete(x) || is_custom_distributed(x);
|
9bc6640d5f4c451657633d289a9bcbca7a1050f4cb6df9853112ad4141949998 | MATLAB | 129 | 8 | %{
# fields in mesoscope scans
field : tinyint #
%}
classdef Field < dj.Lookup
end |
4831831413bc8df4f7ec1d5755f48858b337ab772709ce279519df1165de2943 | MATLAB | 130 | 3 | function res = is_pure_expression(x)
% a pure expression is anything except for impure expressions
res = ~is_impure_expression(x); |
62bd541f02cb9fd81818ddce6f4c52c3b25e6001d7f0ca413cbb1068f81e9024 | MATLAB | 130 | 3 | function res = ismatlab()
% true if called from Matlab; false if called from Octave
res = exist('OCTAVE_VERSION','builtin') == 0;
|
cc8e65e30717d75aafb8f0c7676b4c6d942f82d07a4382113ff5c61f13cd6167 | MATLAB | 130 | 5 | function c = matlab_mprod(a,b)
c = zeros(size(a,1),size(b,2),size(a,3));
for i = 1:size(a,3)
c(:,:,i) = a(:,:,i)*b(:,:,i);
end |
876bca3f54bb17edc9218fb2364f801c8d9d2586322ce7ef9deb7a41697c38e2 | MATLAB | 132 | 8 | function Run_VBM_Analysis
BASEdir = pwd ;
%DataFixHeader( BASEdir ) ;
%DataSegmentation( BASEdir ) ;
DataAnalysis( BASEdir ) ;
end |
e7b7cad8bc7e4ed545d0fc98fecb823eccebf5f78747d17e8cc6662e20e92b37 | MATLAB | 132 | 7 | function standard_error_of_mean = sem(xx)
standard_error_of_mean =...
std(xx, 'omitnan')./sqrt(sum(~isnan(xx)));
end
|
1536fb61d0b89320e96d8a009a59bcb651d9e1f0f4f793a2efe060cb4a23348c | MATLAB | 133 | 4 | function h = bigfigure
% opens a figure and maximizes it
h = figure; set(gcf, 'units', 'normalized', 'outerposition', [0 0 1 1]);
end |
e5343c5615f73437d5dbd2a8324f88d225eb355153857f2194141dd6d641d132 | MATLAB | 133 | 9 | function m = mmax(A)
% mmax - maximum entry from a matrix.
%
% m = mmax(A)
%
% Copyright (c) 2004 Gabriel Peyré
m = max(A(:)); |
8451e681af0a15b557e9c56d6dc61def7c23ad1face0d1d3d6f854a0dca88ae0 | MATLAB | 134 | 2 | function x = is_custom_distributed(x)
x = iscell(x) && length(x) == 2 && ischar(x{1}) && isa(x{1},'function_handle') && iscell(x{2});
|
19d70d7ad4665cd5c22f48bb0034d199bb285cb767741a83feaa9fef86f682c0 | MATLAB | 136 | 9 | %{
experiment.Rig (lookup) #
rig : char(4) # multiphoton imaging setup
---
%}
classdef Rig < dj.Relvar
end |
3d17adbc530d1a1b424d9cadb81dee3afec5889b4fb4ff77e229051ec4743ced | MATLAB | 136 | 6 | function [ID ] = find_subgraph_ID( A )
x=reshape(A',16,1);
str_x = num2str(x);
str_x(isspace(str_x)) = '';
ID= bin2dec(str_x');
end |
75460b6198ddef15b8afbb8230c96cbb557b16e09626869d1b075909e65019be | MATLAB | 136 | 8 | function [ res ] = norm2( img )
%NORM2 Summary of this function goes here
% Detailed explanation goes here
res = norm(img(:));
end
|
afe0f314c5ca9050fc8048ca325d106a98a87ec8c9421325ed724c2aa5ff16b4 | MATLAB | 137 | 6 | function middleIndex = osp_FindMiddle(m)
% Method 1:
middleIndex(1) = ceil(size(m, 1)/2);
middleIndex(2) = ceil(size(m, 2)/2);
end |
db3b4128741ec8324ed7ee82414c92acecf187c2d37c4b8cc04a21b236052914 | MATLAB | 137 | 6 | function y = fsmoothing(x,b,dsmoothing)
if nargin < 3
dsmoothing = 2;
end
y = b(1)+diff(b)./(1+exp(-log(1/0.01-1)*2/dsmoothing*x));
|
a87ed1ab2b7f28b3be7e176cbcbccbd8b08954f83315d5bc1a157354ad5a50dc | MATLAB | 139 | 5 | function F = GaussModel(x,freq)
F = x(1)*exp(x(2)*(freq-x(3)).*(freq-x(3)))+x(4)*(freq-x(3))+x(5);
%NB Integral is x(1)*sqrt(pi/x(2))
end
|
2848c0aed19d648900bcf5c864afa6cba8a2520f2a486c6208655e8404d3d196 | MATLAB | 140 | 6 | function s = sem(data,nan_arg)
if nargin<2
nan_arg = 'omitnan';
end
s = std(data,nan_arg)./ sqrt(size(data, 1));
end |
5ffd561c2c8cb06e82cd9da99be75a28563077c776e18e1af840064a80ca39d5 | MATLAB | 140 | 4 | function List = Matrix2List (Matrix)
[a,b] = size(Matrix);
List = Matrix(tril(ones(a,b),-1)>0); %°´ÁÐÒÀ´ÎÅÅÏÂÀ´
end |
e3beb53af865ed45a8e1a9c5eba8b2fdfae3646b9134393b5b37efa13eeb12d3 | MATLAB | 140 | 8 | %{
# Names of fused pipelines
pipe : varchar(16) # pipeline name
%}
classdef Pipe < dj.Lookup
end |
10edecbd797c8e66a677ee0001427f47f9577b12047844230fa943adfd50b689 | MATLAB | 141 | 6 | function varargout = size(varargin)
format = brca.format.auto(varargin{1});
[varargout{1:nargout}] = format.size(varargin{:});
end
|
3509dcf7197c51ace69326334454515a257366f234fddb64d380a94d06548f4a | MATLAB | 141 | 6 | function varargout = like(varargin)
format = brca.format.auto(varargin{1});
[varargout{1:nargout}] = format.like(varargin{:});
end
|
ba90ca8d5f6f05a4f27bf9521866e69d392d09e97f86e8829f5dad3fe28473b8 | MATLAB | 141 | 6 | function varargout = read(varargin)
format = brca.format.auto(varargin{1});
[varargout{1:nargout}] = format.read(varargin{:});
end
|
1ee40961c0f1b3fa863eff3970e63322a353265689ea0c096e008a10316b0736 | MATLAB | 142 | 4 | function p = mixpdfGauss2(x, mu, sigma, Pm)
%weighted mixture of von Mises pdf and uniform pdf
p = normpdf(x,mu,sigma)*Pm + 1/(2*pi)*(1-Pm); |
4567397c9a258a1c5313dbaeba38d9c71738dd1dfc300424cce8853fdf2c8df1 | MATLAB | 142 | 6 | function s = sem(data, nan_arg)
if nargin<2
nan_arg = 'omitnan';
end
s = std(data, nan_arg)./ sqrt(size(data, 1));
end |
5f5b601f0291f99aa2bd697205ab5ab1c49e97f42fadc3c19465334f9385a070 | MATLAB | 142 | 10 | %{
# channel to use for raster and motion correction
-> experiment.Stack
---
-> shared.Channel
%}
classdef CorrectionChannel < dj.Manual
end |
df37089f192357f0d0ad3fe096ebd1cdd76f7d54540ed7bbafb4dd82cd3cae2b | MATLAB | 142 | 4 | function parts = ctx_partition(str, n, d)
parts = arrayfun(@(l) str(l:l+(n-1)), 1:d:(length(str)-(n-1)), ...
'UniformOutput', false);
end
|
1a63b0f20f71808d04122155d025839f98bb18a9731cce0ea7621c8620827592 | MATLAB | 143 | 11 | function [data] = tapas_linear_prepare_data(data, model, inference)
%%
%
% aponteeduardo@gmail.com
% copyright (C) 2016
%
data = data;
end
|
349407fe12d6d317d73b0db14b6df592e0241c01badcabee26ca2ea0fc8367c0 | MATLAB | 143 | 6 | function varargout = class(varargin)
format = brca.format.auto(varargin{1});
[varargout{1:nargout}] = format.class(varargin{:});
end
|
538efaea7485bbb0886880f329b96a2a73585fefd65ec9746e7868c691af6bbb | MATLAB | 143 | 6 | function varargout = numel(varargin)
format = brca.format.auto(varargin{1});
[varargout{1:nargout}] = format.numel(varargin{:});
end
|
82b5496c0d270af1cbe41e3450818e0dbfda3000e1979558d2d531f641e31ed8 | MATLAB | 143 | 6 | function varargout = write(varargin)
format = brca.format.auto(varargin{1});
[varargout{1:nargout}] = format.write(varargin{:});
end
|
f84ce9724285a03c3b006120d4398b6a12e116ed870beb63907636c8e188efb2 | MATLAB | 143 | 5 | function this = orderfields(this, vals);
for index = 1:length(this)
this(index).EEG = orderfields(this(index).EEG, vals);
end
|
98f78989abcd4f585aead4c6d8b4ecb9dc66d911f4b6821b90f1463cbc23c1fc | MATLAB | 144 | 7 | function [c,p] = nancorr(x,y,varargin)
if ~exist('y','var'), y = x(:,2); x = x(:,1); end
[c,p] = corr(x,y,'rows','pairwise',varargin{:});
end |
a4c0594df484660aa17605861435459fd0ef79ff3faf8451ddb9d02baa4eac38 | MATLAB | 144 | 8 | function mni=TMSmat2mni(cor,T)
cor = round(cor);
mni = T*[cor(:,1) cor(:,2) cor(:,3) ones(size(cor,1),1)]';
mni = mni';
mni(:,4) = [];
return; |
de0d2d5f879db8496ab83c0aacef445b12e418a277cdc3097a71345881e50a8d | MATLAB | 144 | 7 | function y = objfun( x, a, b, c, d )
% used for fit the non-linear part.
% a example is Or42a's data.
y = a ./ (1 + exp(b * (c-x))) + d;
end |
f166c01f5c444838e7f52a8250b904095447d454affd443b71c83526ccaf3d43 | MATLAB | 144 | 8 | %{
# versions for the reso pipeline
pipe_version : smallint #
%}
classdef PipelineVersion < dj.Lookup
end |
e1f0b04d6ef36e2e3f331535401b954bc15e8e9630ab4e8e5d4e96ef709dad1d | MATLAB | 146 | 9 | %{
experiment.Lens (lookup) # Lens used for the recording
lens : char(4) # objective lens
---
%}
classdef Lens < dj.Relvar
end |
b95f468900fd2b7a7524d75766fba7d49aeab4b366ef1c1f054427b94acf8d55 | MATLAB | 147 | 7 | while true
parpopulate(monet.CleanRF)
parpopulate(monet.Fit)
disp 'taking a break...'
pause(1000)
disp 'Trying again!'
end
|
2c3c641240a106580ca02bdacba5306917432d54676bdaa722aaf08d39b138fb | MATLAB | 149 | 5 | function d = pointsdist(points, x)
% calculates the distance from each point to x
difs = bsxfun(@minus, points, x);
d = sqrt(sum(difs.^2,1));
end |
3f112fcfd42846b94fdb158339e4a2732e67569a1a0da440ef558ed111476253 | MATLAB | 149 | 5 | function this = horzcat(varargin);
this = varargin{1};
for index = 2:length(varargin)
this.EEG(index) = varargin{index}.EEG;
end
|
9272534d5e9e2f3bed854997fdfc8b9dd7894b98be4972ced63d5a6cb2db6e87 | MATLAB | 149 | 8 | function cor=TMSmni2mat(mni,T)
mni = round(mni);
cor = inv(T)*[mni(:,1) mni(:,2) mni(:,3) ones(size(mni,1),1)]';
cor = cor';
cor(:,4) = [];
return; |
fbfe39102c91de0f09047145d2a4c7058c0a72a9e38031d7724e4e055478b452 | MATLAB | 149 | 6 | function varargout = allocate(varargin)
format = brca.format.auto(varargin{1});
[varargout{1:nargout}] = format.allocate(varargin{:});
end
|
44f0b40a6681d06c6a053f0b78cd8a6528cfa3d2cbdc26e5458463e9374db068 | MATLAB | 150 | 5 | function this_path = sero_pulseq_goToFolder()
% function this_path = pulseq_goToFolder()
this_path = fileparts(mfilename('fullpath'));
cd(this_path)
|
4b3ac6aefe7a947b6bad7b13897c10628ee4ca834dc35ab4d7b2d53fbbe3c22d | MATLAB | 150 | 5 | function store = getStore(problem, x, storedb) %#ok<STOUT,INUSD>
error('This file was removed from Manopt. Please use the StoreDB class.');
end
|
b112bcac1ca7be5816ab3c7bc8883a57fc65d2c3e35b1fc24247ce4b37f14a3c | MATLAB | 150 | 8 | function p=chi2test2(x)
s=size(x,1) ;
r=size(x,2) ;
np=sum(x,2)/sum(sum(x))*sum(x);
q=sum(sum((x-np).^2./(np)));
p=1-gammainc(q/2,(r-1)*(s-1)/2) ;
|
cf460156d4c49990610fb931fc0663403c5f11e13c2000b7a150fb6bb1ab5055 | MATLAB | 150 | 9 | function [y,x] = swap(x,y)
% function [x,y] = swap(x,y)
%
% assign <x> to <y> and assign <y> to <x>.
%
% example:
% [x,y] = swap(2,3);
% x==3 & y==2
|
dd1a987c358f361413f613abe81835d5952a48dc170d56bfe01f17c464dacfbb | MATLAB | 150 | 5 | function storedb = purgeStoredb(storedb, storedepth) %#ok<INUSD>
error('This file was removed from Manopt. Please use the StoreDB class.');
end
|
130897107dd041b2bd2d388a1b38a2667159e0adffc133541721cfdc28fccdc1 | MATLAB | 151 | 8 | %{
# color options for projector channels
color : varchar(32) # color name
---
%}
classdef ProjectorColor < dj.Lookup
end
|
ebb474fced22b158a5319b6faefcb3865d775fcc378b0ae35fb423d9b89fece7 | MATLAB | 151 | 8 | %{
# possible classfications for a segmented mask
type : varchar(16) #
%}
classdef MaskType < dj.Lookup
end |
2c574249a30c87f0da5984e665b064f8558db56706320cfe05e9f47621dadc70 | MATLAB | 152 | 6 | % Stop playback
PsychPortAudio('Stop', audios.pahandle);
% Close the audio device
PsychPortAudio('Close', audios.pahandle);
% Clear the screen
sca; |
549935ce9a1cc2ff77592c86f279a3a78f9a2f49446206658d719fd5ae824aff | MATLAB | 152 | 8 | %{
# classification of segmentation masks
mask_type : varchar(32) # cell type
%}
classdef MaskType < dj.Lookup
end |
6836f2b5483f6b7a0018e60f0e872e7e73f2cb3a5749fd770fdbdcb9000f4f7d | MATLAB | 152 | 7 | function [Q,R] = getQuoRem(a,b)
% get the quotient and remainded between 2 input
% variables.
Q=floor(max(a,b)/min(a,b));
R=mod(max(a,b),min(a,b));
end |
871e9c326fd4dfa71e796740153186c3726290d76607f0891de187c4be8c5f1e | MATLAB | 153 | 5 | function storedb = setStore(problem, x, storedb, store) %#ok<INUSD>
error('This file was removed from Manopt. Please use the StoreDB class.');
end
|
c66fdd33b193760ee5a2809a9cee0e5ab4be3aec66fb4476c79d4513a9cb8233 | MATLAB | 153 | 9 | %{
vis.ScanConditions (manual) # Link between conditions and scan_idx
-> vis.Condition
-> experiment.Scan
---
%}
classdef ScanConditions < dj.Relvar
end |
e4d49b895acdbd6da6dd7cf0aee4faed81adb8fb6040611240817b18944a5c1c | MATLAB | 153 | 12 | function [nu] = tapas_ti_init_u(u, ptheta, pars)
%%
%
% aponteeduardo@gmail.com
% copyright (C) 2016
%
nu = cell(1, numel(pars.T));
nu(:) = {u};
end
|
518c248df37bf8d5704e9bc90e9ab2923aadc5865ac37a5033eeb29ac17d8fa3 | MATLAB | 154 | 9 | %{
experiment.AutoProcessing (manual) # scans that should enter automatic processing
-> experiment.Scan
-----
%}
classdef AutoProcessing < dj.Relvar
end |
6715870d735c6c11a86d84debacee3728b1e706fbf1cdae1b44c36c35d03e582 | MATLAB | 154 | 7 | while true
parpopulate(aodpre.Scan)
parpopulate(aodpre.Set)
parpopulate(aodpre.Sync)
parpopulate(aodpre.ComputeTraces)
pause(1000)
end |
671cf835c8eff9e434b41ff2b3f9a2e58512c5753fbe0f2c6fc2a68e91140464 | MATLAB | 154 | 5 | % script to run user functions
parpopulate(preprocess.CirclesLookup)
parpopulate(preprocess.CircleMap)
parpopulate(preprocess.EyePosClusterCenter) ;
exit
|
e7087d5a2062452f990c384d33fccdb93856b5841e495e6930909f17c2308db5 | MATLAB | 156 | 9 | function Xt = multitransp_ez(X)
[n1, n2, n3] = size(X);
Xt = zeros(n2, n1, n3);
for k = 1 : n3
Xt(:, :, k) = X(:, :, k)';
end
end
|
6b1f5a695bbc02661667fa6227f6b0c9cebe9e6a668d1f221fc51546756c9e6a | MATLAB | 157 | 7 | function val = iseeglabdeployed()
% iseeglabdeployed - true for EEGLAB compile version and false otherwise
try
val = isdeployed;
catch
val = 0;
end
|
dd0d7b95225eedd515cb4be08460ba25202db38c754a6e52bf0c8f1f358230ce | MATLAB | 157 | 11 | %{
# channel to use for raster and motion correction
-> experiment.Scan
-> shared.Field
---
-> shared.Channel
%}
classdef CorrectionChannel < dj.Manual
end |
ae61f7980d3a4020779c3c2fcc0112351a85024ba73f94a5adc35ea185778dab | MATLAB | 159 | 6 | function output = out2(fun, varargin);
% returns second output argument of fun
% EXAMPLE: order = output2(@sort, matrix, dim);
[~,output] = fun(varargin{:}); |
22c34be8d5bdd1b0433b1f14f97c9675ea14f6b99d47c38b0c42266f9131fb77 | MATLAB | 160 | 6 | function [s] = newid()
%returns a unique identifier string
%generated by AFNI's 3dnewid
[ee,s] = system('3dnewid -fun');
s = s(1:length(s)-1);
return;
|
b9223b41ea2de254cf312a4d992031cb756f57df73d740c6ab7996ad62867870 | MATLAB | 160 | 2 | function x = check_discrete(x)
x = is_discrete(x) && ischar(x{1}) && strcmp(x{1},'disc') && isnumeric(x{2}) && isnumeric(x{3}) && size(x{2},2) == size(x{3},1);
|
f21fcba4ac07696404e7ca49fc35240687ffc8861abb2970b4f6c85dae2a41a3 | MATLAB | 160 | 9 | %{
preprocess.Slice (lookup) # slices in resonant scanner scans
slice : tinyint # slice in scan
---
%}
classdef Slice < dj.Relvar
end |
f54d49643d10d9c091163775b023b23c7f9e7a52a5a4672eae090dd2f127b215 | MATLAB | 160 | 5 | function fn_par = sero_srr_fn_nii2xps(fn_nii)
% function fn_par = sero_srr_fn_nii2xps(fn_nii)
[a,b] = msf_fileparts(fn_nii);
fn_par = [a filesep b '_xps.mat']; |
06be086828e2af4f99ef300f514a7a819e9c40ae65724d2ecdbd113cac562ba6 | MATLAB | 161 | 5 | function fn_seq = sero_srr_fn_data2nii(fn_data)
% function fn_seq = sero_srr_fn_data2nii(fn_data)
[a,b] = fileparts(fn_data);
fn_seq = [a filesep b '.nii.gz'];
|
b7a6194ca7caf2bb8c1de97927307f4c294b802c5c25867ea778cf80cf0d427f | MATLAB | 161 | 6 | function y = sem(X, d)
% computes standard error of the mean (SEM) of matrix 'X' along the dimension 'd'
% (c) Jiri, Mar17
y = nanstd(X, 0, d)./size(X,d)^0.5;
|
263fe75063cddd278f0107be3eeef86eb6223b85431e11c22cda7a2331d50175 | MATLAB | 163 | 7 |
function y = runrms(x,span)
% Running root-mean-square transformation of the input signal X.
y = sqrt(movmean(x.^2, [0 span-1]));
y = y(1:span:end, :); |
8f929991233ce397b8ca70debbbc76b4c1f2600d4895d550a773dd6698ce6aa5 | MATLAB | 163 | 9 | %{
experiment.Compartment (lookup) # cell compartments that can be imaged
compartment : char(16) #
---
%}
classdef Compartment < dj.Relvar
end |
1a9987ec0dbe713859ba9090d5bdcf9332dc28d49496a3a6951fd8068fc3f83f | MATLAB | 164 | 7 | function obj = getSchema
persistent schemaObject
if isempty(schemaObject)
schemaObject = dj.Schema(dj.conn, 'vis', 'pipeline_vis');
end
obj = schemaObject;
end
|
96fc1e56397ac0e4f6a1e48aa7aa611eeeeeb7f9d038f9b11fe39d9dc56dbe7e | MATLAB | 164 | 7 | function obj = getSchema
persistent schemaObject
if isempty(schemaObject)
schemaObject = dj.Schema(dj.conn, 'eye', 'pipeline_eye');
end
obj = schemaObject;
end
|
9e9dbf8a87b5e173e2af9e3ec3a7d67410dcf18c2d3cb5a8af905d25a536a4eb | MATLAB | 164 | 5 | function fn_seq = sero_pulseq_fn_data2seq(fn_data)
% function fn_seq = sero_pulseq_fn_data2seq(fn_data)
[a,b] = fileparts(fn_data);
fn_seq = [a filesep b '.seq'];
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.