This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hitlistIncremental = manualCalibTool(calibtargets,fixlist1,fixlist2) | |
if nargin < 1 | |
% dummy variables with some noise in case of no input | |
[xx, yy] = meshgrid(1:5,1:2); | |
xx = xx(:); | |
yy = yy(:); | |
calibtargets = [xx yy]; | |
fixlist1 = [xx yy]; | |
fixlist2 = [xx yy]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%fetch the Eyetracker | |
if EyelinkInit()~= 1; % | |
return; | |
end; | |
%%%%%%%%%%%%%%%%%%%%%%% | |
Eyelink('command', '!*write_ioport 0x378 %d',params.trig_trialStart); | |
WaitSecs(0.005); | |
Eyelink('command', '!*write_ioport 0x378 %d',0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Behinger version | |
% taken and adapted from ept_TFCE | |
% Licence from original: | |
% Copyright(C) 2012 Armand Mensen (14.12.2010) | |
% This program is free software: you can redistribute it and/or modify | |
% it under the terms of the GNU General Public License as published by | |
% the Free Software Foundation, either version 3 of the License, or | |
% (at your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change to etcomp version (with all packages) | |
pyversion /net/store/nbp/users/behinger/projects/etcomp/local/etcompvenv/bin/python3 | |
# add the functions | |
insert(py.sys.path,int32(0),'/net/store/nbp/users/behinger/projects/etcomp/code'); | |
# add this path so that matlab can find etcomp/lib | |
insert(py.sys.path,int32(0),'/net/store/nbp/users/behinger/projects/etcomp/'); | |
# call the function to import the data | |
data = py.functions.et_import.import_pl(pyargs('datapath','/net/store/nbp/projects/etcomp/VP1/raw','surfaceMap',0,'recalib',1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Behinger version | |
% taken and adapted from ept_TFCE | |
% Licence from original: | |
% Copyright(C) 2012 Armand Mensen (14.12.2010) | |
% This program is free software: you can redistribute it and/or modify | |
% it under the terms of the GNU General Public License as published by | |
% the Free Software Foundation, either version 3 of the License, or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Behinger version | |
% taken and adapted from ept_TFCE | |
% Licence from original: | |
% Copyright(C) 2012 Armand Mensen (14.12.2010) | |
% This program is free software: you can redistribute it and/or modify | |
% it under the terms of the GNU General Public License as published by | |
% the Free Software Foundation, either version 3 of the License, or | |
% (at your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = " | |
data { | |
vector[100] A; | |
} | |
parameters { | |
real beta; | |
real<lower=0> sigma; | |
} | |
model { | |
A ~ normal(beta, sigma); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vif = VIF(X) | |
[n, k] = size(X); | |
Exxprim = full(X'*X)/n; %I'm shocked if this isn't full so let's drop sparse now | |
Ex = full(mean(X))'; %same deal | |
COVX = (Exxprim - Ex*Ex'); | |
STDEVX = sqrt(diag(COVX)); | |
CORRX = COVX ./ (STDEVX * STDEVX'); | |
invcorrx = inv(CORRX); | |
vif = diag(invcorrx); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function tvm_showObjectContourOnSlice(configuration) | |
% | |
% | |
% Copyright (C) Tim van Mourik, 2015, DCCN | |
% | |
%% Parse configuration | |
volume = tvm_getOption(configuration, 'i_Volume'); | |
%no default | |
roi = tvm_getOption(configuration, 'i_ROI', ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
dodge(x,y,args...;[plot_fun=scatter!,kwargs...]) | |
dodges plot items if they are on the same `x` (or `y` if specified) value. | |
## Attributes | |
### Specific to `dodge` | |
- `plot_fun::Function = scatter!` in place plotting function to be called after dodging the x/y values | |
- `dodge::Vector{Int} = Makie.automatic`. Indicates to which group each point belongs, e.g. [1, 1, 2, 3, 2, 2] | |
- `n_dodge::Int = Makie.automatic` maximal number of dodglings. This indicates over how many "dodglings" `dodge_width` should be split |