Browse Source

Updated .raw files, added code for stimulus reconstruction

dimokaramanlis 11 months ago
parent
commit
6bc4c25c0d

+ 1 - 1
20170802_fr_re_fp.rar

@@ -1 +1 @@
-/annex/objects/MD5-s61991734--b86a2ede800aafb4337ca2387f43d1d7
+/annex/objects/MD5-s62000492--18b6a5800f00710d583e6849a2bf6ba3

+ 1 - 1
20171116_fr_re.rar

@@ -1 +1 @@
-/annex/objects/MD5-s71355554--2466641ef40568c63677f2300b9f3d24
+/annex/objects/MD5-s71364290--6ff9c3ddf5d666ab85dca754d7dfe19b

+ 1 - 1
20171116_sr_le_fp.rar

@@ -1 +1 @@
-/annex/objects/MD5-s86202089--b50b7c75e6f16b6e19cbddc62500f6b9
+/annex/objects/MD5-s86210838--0c2ad833e6b5712e9c9e9674e7ab0e10

+ 1 - 1
20171215_sr_le_sp.rar

@@ -1 +1 @@
-/annex/objects/MD5-s42986004--a35338828f4471a68384f07076d07c82
+/annex/objects/MD5-s42996240--d94498303208d2778ddc49c2ef57237a

+ 1 - 1
20180116_sr_le_fp.rar

@@ -1 +1 @@
-/annex/objects/MD5-s37024478--1f832f449d109880782ec88f0f2b0a28
+/annex/objects/MD5-s37034723--95bec99a227a5ef92c6934f47cc601d2

+ 1 - 1
20180126_sr_le_sp.rar

@@ -1 +1 @@
-/annex/objects/MD5-s191240868--26fd0c78d833e7111f100928317bbbe6
+/annex/objects/MD5-s191252613--182aa892f9dfcb265c12c67482df5b2f

+ 1 - 1
20180222_fr_re.rar

@@ -1 +1 @@
-/annex/objects/MD5-s163079764--4cd521e69f10b6946cbc9b7cb96becb0
+/annex/objects/MD5-s163091503--4d39caa022607305680e1975d9d0fcd7

+ 1 - 1
20180222_sr_le_sp.rar

@@ -1 +1 @@
-/annex/objects/MD5-s74196506--bc302cc773dfd03f95d985610707d58e
+/annex/objects/MD5-s74208276--9f0d565b9cee1da4b1d96e486963152e

+ 1 - 1
20180316_sr_le_fp.rar

@@ -1 +1 @@
-/annex/objects/MD5-s22043434--92caa1d86916dcdb4bf37d133392ed26
+/annex/objects/MD5-s22055212--694ef79b030aed362cdc5122237ef0e6

+ 1 - 1
20180316_sr_le_sp.rar

@@ -1 +1 @@
-/annex/objects/MD5-s21427937--ed200428a2d65f288ab7a9d32fa8185d
+/annex/objects/MD5-s21436795--c4f928c7f6d1e4de434f1efc5c0c6fde

+ 1 - 1
20180405_fr_re.rar

@@ -1 +1 @@
-/annex/objects/MD5-s78034550--cf43bce7717e87c34e45962696100c8a
+/annex/objects/MD5-s78046311--af1f4c7f24924014f527480379818c72

+ 1 - 1
20180405_sr_le.rar

@@ -1 +1 @@
-/annex/objects/MD5-s65802703--9bc775d6c9cb27afe2e8ade1b59065d9
+/annex/objects/MD5-s65814462--982e767e811a9b295bd446e8afd77249

+ 40 - 0
code_for_stim_reconstruction/blur40.txt

@@ -0,0 +1,40 @@
+001   Berkeley 8143
+002   Berkeley 140075
+003   Berkeley 169012
+004   Berkeley 175032
+005   Berkeley 207049
+006   Berkeley 217090
+007   Berkeley 311081
+008   Berkeley 353013
+009   Berkeley 274007
+010   Berkeley 175043
+011 vanHateren imk01390.imc
+012 vanHateren imk01030.imc
+013 vanHateren imk01243.imc
+014 vanHateren imk01778.imc
+015     McGill merry_winter0004
+016     McGill Merry_0011_Lasalle
+017     McGill merry_flor0001
+018     McGill merry_flor0019
+019     McGill merry_mexico0139
+020     McGill merry_mexico0189
+021     McGill merry_mexico0243
+022     McGill merry_mtl07_009
+023     McGill pippin_jtalon0038
+024     McGill pippin_Mex07_011
+025     McGill pippin_RS_YachtClub006
+026     McGill pippin_RVHtexture005
+027     McGill pippin0117
+028     McGill pippin0120
+029     McGill pippin0221
+030     McGill merry_mtl07_008
+031     McGill merry_win07_001
+032     McGill pippin0015
+033     McGill pippin_city29
+034     McGill pippin_jtalon0017
+035     McGill pippin_jtalon0036
+036     McGill pippin_jtalon0050
+037     McGill pippin_Mex07_032
+038     McGill pippin_park0035
+039     McGill pippin_RS_YachtClub019
+040     McGill pippin_UniStrt008

+ 46 - 0
code_for_stim_reconstruction/findImageOrder.m

@@ -0,0 +1,46 @@
+function [ prs ] = findImageOrder( nimages, npulses, maxrepeats, seed )
+    %FINDIMAGEORDER Recover the order of images in an ImageSequence stimulus
+    %    [prs ] = findNewOrder( nimages, npulses, maxrepeats, seed )
+    %
+    %  Input:
+    %       nimages: struct containing description of stimulus
+    %                (mincontrast, maxcontrast, ncontrasts, nangles)
+    %       npulses: number of pulses recorded from the experiment
+    %       maxrepeats: only analyze until the maxrepeats-th repeat
+    %                  (use 'inf' for analyzing all the repeats)
+    %       seed: seed for ran1 (should be the same as in the experiment)
+    %
+    %  Output:
+    %        prs: order in which the images were presented, where 1
+    %             marks the presentation of a gray sceen and 2,...,nimages+1 
+    %             mark the presentation of the 1st, ..., nth image of the
+    %             list
+    
+    
+    nrepeats = floor(npulses/nimages); 
+    nrepeats = min(nrepeats, maxrepeats); % Obey maxrepeats
+    
+    prs = zeros( (nimages+1) * nrepeats, 1 );
+    
+    for ii = 1:nrepeats
+        [order, seed] = shuffleOrder(nimages+1, seed);
+        prs( (ii-1)*(nimages+1) + (1:nimages+1) ) = order;
+    end
+    prs = prs - 1;
+end
+
+function [order, seed] = shuffleOrder(nelem, seed)
+   % Fisher-Yates shuffle (initializes the vector in a random order)
+   
+   order = ones(nelem, 1);
+   
+   order(1) = 1;
+   for ii = 2:nelem
+       [jj, seed] = ran1(seed);
+       jj = floor(2 + (ii-1)*jj);
+       
+       order(ii) = order(jj);
+       order(jj) = ii;     
+   end
+   
+end

+ 130 - 0
code_for_stim_reconstruction/findLocallySparseSubunitFlashOrder.m

@@ -0,0 +1,130 @@
+function [stimMat, cta, ctb, screenMat, spaceVecX, spaceVecY] =...
+    findLocallySparseSubunitFlashOrder(nframes, stimdesc)
+%FINDLOCALLYSPARSESUBUNITFLASHORDER 
+
+Nx = stimdesc.Nx;
+Ny = stimdesc.Ny;
+
+screenNx=Nx*stimdesc.nstixelsx;
+screenNy=Ny*stimdesc.nstixelsy;
+%think of screen coordinates again
+spaceVecX=stimdesc.lmargin+0.5+stimdesc.stixelwidth*(0:screenNx-1)+stimdesc.stixelwidth/2;
+spaceVecY=stimdesc.bmargin+0.5+stimdesc.stixelheight*(0:screenNy-1)+stimdesc.stixelheight/2;
+
+gapx=stimdesc.gapwidth; gapy=stimdesc.gapheight;
+seedlocation=stimdesc.seedlocation;
+seedcombination=stimdesc.seedcombination;
+
+locationlist = (0:Nx*Ny-1)';
+neighbourlist = getneighbourlist(Nx, Ny, gapx, gapy);
+[cta, ctb] = genLists(stimdesc); ncombis=numel(cta);
+
+stimMat=zeros(nframes, Ny*Nx); 
+
+possibleXYlocs = zeros(floor(numel(locationlist)/min(cellfun(@numel,neighbourlist))),1);
+%outside loop is faster
+[randvals, ~]=ran1(seedlocation, nframes*numel(possibleXYlocs)); randIdx=1;
+
+for ii = 1:nframes
+    availablelist = locationlist;
+    currXYlocs = possibleXYlocs;
+    idx = 1;
+    while numel(availablelist)>0
+        
+        randval=randvals(randIdx); randIdx=randIdx+1;
+        stixelInd=floor(randval * size(availablelist,1))+1;
+        toadd=availablelist(stixelInd);
+        toremove = neighbourlist{Ny * mod(toadd,Nx) + floor(toadd/Nx)+1};
+        
+        %using the mex function for speed
+        availablelist(ismembc(availablelist,sort(toremove))) = [];
+        
+        currXYlocs(idx) = toadd+1;
+        idx = idx+1;
+    end
+    [randomvalues, seedcombination]=ran1(seedcombination, idx-1);
+    
+    stimMat(ii, currXYlocs(1:idx-1))=ceil(randomvalues*ncombis);
+end
+stimMat=reshape(stimMat, nframes, Nx, Ny);
+stimMat=flip(permute(stimMat, [1 3 2]),2);
+stimMat=sparse(reshape(stimMat,nframes,[]));
+%stimMat=ndSparse(stimMat);
+
+screenMat=zeros(nframes,screenNy, screenNx);
+
+n=max([stimdesc.nstixelsy, stimdesc.nstixelsx]);
+p = mod(1 : n, 2); C = bsxfun(@xor, p', p); 
+C=C(1:stimdesc.nstixelsy, 1:stimdesc.nstixelsx);
+
+for icon=1:numel(cta)
+   
+    [fInd,yInd,xInd]=ind2sub([nframes Ny Nx],find(stimMat==icon));
+    
+    stixelMat=zeros(stimdesc.nstixelsy, stimdesc.nstixelsx);
+    
+    stixelMat(~C)=ctb(icon);
+    stixelMat(C)=cta(icon);
+
+    for ii=1:numel(fInd)
+        screenMat(fInd(ii), ...
+            (yInd(ii)-1)*stimdesc.nstixelsy+(1:stimdesc.nstixelsy),...
+            (xInd(ii)-1)*stimdesc.nstixelsx+(1:stimdesc.nstixelsx))=stixelMat;
+    end
+end
+
+end
+
+
+function neighbourlist = getneighbourlist(nx, ny, gapx, gapy)
+
+neighbourlist = cell(nx*ny,1);
+idx = 1;
+for x = 0: nx-1
+    for y = 0: ny-1
+        localneigbour=[];
+        for currX = x-gapx : x+gapx
+            for currY = y-gapy : y+gapy
+                if (currX >=0 && currY >= 0 )
+                    localneigbour = [localneigbour, nx * currY + currX];    %#ok
+                end
+            end
+        end
+        neighbourlist{idx} = localneigbour;
+        idx = idx+1;
+    end
+end
+
+end
+
+
+function [cta, ctb] = genLists(stimdesc)
+    nAngles = stimdesc.nangles;
+    minCon = stimdesc.mincontrast;
+    maxCon = stimdesc.maxcontrast;
+    nContrasts = stimdesc.ncontrasts;
+    
+    angles = (0:(nAngles-1)) * 2*pi/nAngles;
+    cosAngs = cos(angles);
+    sinAngs = sin(angles);
+    
+    radii = minCon + (0:(nContrasts-1)) * (maxCon - minCon)/(nContrasts-1);
+    
+    cta = zeros( sum(radii >= 1e-5)*nAngles, 1 );
+    ctb = zeros( sum(radii >= 1e-5)*nAngles, 1 );
+    
+    idx = 1; % Start from 2nd element of (cta,ctb) [first element = (0,0)]
+    for ii = 1:nAngles
+        cosAng = cosAngs(ii);
+        sinAng = sinAngs(ii);
+        
+        for jj = 1:nContrasts
+            r = radii(jj);
+            if r < 1e-5; continue; end
+            cta(idx) = r * cosAng;
+            ctb(idx) = r * sinAng;
+            
+            idx = idx + 1;
+        end
+    end
+end

+ 86 - 0
code_for_stim_reconstruction/findNewOrder.m

@@ -0,0 +1,86 @@
+function [ cta, ctb, totalflashes, prs ] = findNewOrder( stimdesc, npulses, maxrepeats, seed )
+    %FINDNEWORDER Recover the order of cta,ctb from the new SubUnitFlash stimulus
+    %    The new stimulus only has radial components and more
+    %    parameters such as range of radial search, number of angles,
+    %    number of contrasts, etc. It also uses a different shuffling which
+    %    might give a different ordering than the one Michael has used
+    %    before.
+    %
+    %    [ cta, ctb, totalflashes, prs ] = findNewOrder( stimdesc, npulses, maxrepeats, seed )
+    %
+    %  Input:
+    %       stimdesc: struct containing description of stimulus
+    %                    (mincontrast, maxcontrast, ncontrasts, nangles)
+    %        npulses: number of pulses recorded from the experiment
+    %     maxrepeats: only analyze until the maxrepeats-th repeat
+    %                    (use 'inf' for analyzing all the repeats)
+    %           seed: seed for ran1 (should be the same as in the experiment)
+    %
+    %  Output:
+    %             cta: contrast at subtiles A, ctb: contrast at subtiles B
+    %    totalflashes: total number of flashes in one repeat
+    %             prs: order in which the contrasts are used
+    %
+    
+    
+    [cta, ctb] = genLists(stimdesc);
+    
+    totalflashes = numel(cta);
+    nrepeats = floor(npulses/totalflashes); 
+    nrepeats = min(nrepeats, maxrepeats); % Obey maxrepeats
+    
+    prs = zeros( totalflashes * nrepeats, 1 );
+    
+    for ii = 1:nrepeats
+        [order, seed] = shuffleOrder(totalflashes, seed);
+        prs( (ii-1)*totalflashes + (1:totalflashes) ) = order;
+    end
+end
+
+function [order, seed] = shuffleOrder(nelem, seed)
+   % Fisher-Yates shuffle (initializes the vector in a random order)
+   
+   order = ones(nelem, 1);
+   
+   order(2) = 2;
+   for ii = 3:nelem
+       [jj, seed] = ran1(seed);
+       jj = floor(2 + (ii-1)*jj);
+       
+       order(ii) = order(jj);
+       order(jj) = ii;     
+   end
+   
+end
+
+function [cta, ctb] = genLists(stimdesc)
+    nAngles = stimdesc.nangles;
+    minCon = stimdesc.mincontrast;
+    maxCon = stimdesc.maxcontrast;
+    nContrasts = stimdesc.ncontrasts;
+    
+    angles = (0:(nAngles-1)) * 2*pi/nAngles;
+    cosAngs = cos(angles);
+    sinAngs = sin(angles);
+    
+    radii = minCon + (0:(nContrasts-1)) * (maxCon - minCon)/(nContrasts-1);
+    %radii = (0:(nContrasts)) * (maxCon - minCon)/(2*nContrasts);
+   
+    cta = zeros( sum(radii >= 1e-5)*nAngles + 1, 1 );
+    ctb = zeros( sum(radii >= 1e-5)*nAngles + 1, 1 );
+    
+    idx = 2; % Start from 2nd element of (cta,ctb) [first element = (0,0)]
+    for ii = 1:nAngles
+        cosAng = cosAngs(ii);
+        sinAng = sinAngs(ii);
+        
+        for jj = 1:nContrasts
+            r = radii(jj);
+            if r < 1e-5; continue; end
+            cta(idx) = r * cosAng;
+            ctb(idx) = r * sinAng;
+            
+            idx = idx + 1;
+        end
+    end
+end

+ 19 - 0
code_for_stim_reconstruction/generateSaccadeSeq.m

@@ -0,0 +1,19 @@
+function [saccades, stimall, fixstim, transstim] = generateSaccadeSeq(stimdesc,frameN)
+
+saccades = zeros (8,2);
+for ii = 1:4
+    saccades(2*ii-1,1:2) = [ii,5];
+    saccades(2*ii,1:2) = [ii,6];
+end
+saccades = [repmat(saccades,4,1), kron(1:4,ones(1,8))'];
+
+% calculate the correct order of stimulus.
+
+seedvals= ran1(stimdesc.seed,2*frameN);
+seedvals=reshape(seedvals,2,frameN);
+fixstim=floor(4 * seedvals(1,:))';
+transstim=floor(2 * seedvals(2,:))';
+stimall = zeros(1,2*frameN);
+stimall(1:2:end)=transstim+5; stimall(2:2:end)=fixstim+1;
+
+end

+ 112 - 0
code_for_stim_reconstruction/imageresize.m

@@ -0,0 +1,112 @@
+%====================================================%
+%===========ECEN 5793: DIP===========================%
+%===========PROJECT 1================================%
+%====================================================%
+function A3 = imageresize(B3,p,m)
+% Zoom or shrink a image
+% Input:image B3: gray-image or RGB image
+%       p: ratio, zooming (p>1), shrink(p<1)
+%       m: mode; =0:(default) nearest neighbor interpolation 
+%                =1: Bilinear interpolation
+%                =2: Bicubic interpolation
+% Output: image A3
+% @Trung Duong, trungd@okstate.edu
+% Jan 25, 2009
+%====================================================%
+% Input checking and default values
+error(nargchk(2, 3, nargin, 'struct'));
+if nargin < 3, m = 0; end
+
+dimB = length(size(B3));
+if dimB== 2 % GRAY-IMAGE INPUT:
+    A3 = gray_resize(B3,p,m); 
+elseif dimB== 3 % COLOR RGB-IMAGE INPUT:
+    AR = gray_resize(B3(:,:,1),p,m);
+    AG = gray_resize(B3(:,:,2),p,m);
+    AB = gray_resize(B3(:,:,3),p,m);
+    A3 = zeros([size(AR) 3]);
+    A3(:,:,1) = AR;
+    A3(:,:,2) = AG;
+    A3(:,:,3) = AB;
+else
+    error('Improper input image');
+end
+    
+%**************************************************%
+%==================================================%
+% Sub-Function: Resize a gray-image
+% Same input argument with imageresize()
+function A = gray_resize(B,p,m)
+% Initialize new-grid and output
+[N,M] = size(B);
+xp = 1:1/p:N+1/p; yp = 1:1/p:M+1/p;
+A = zeros(length(xp),length(yp));
+% Symmetric Padding
+npad = 3;
+B = sym_pad(B,npad);
+switch m
+    case 0 % Nearest neighbor interpolation
+        U = round(xp); V = round(yp);
+        U(find(U<1)) = 1; V(find(V<1)) = 1; 
+        U(find(U>N)) = N; V(find(V>M)) = M; 
+        A = B(U+npad,V+npad);
+    case 1 % Bilinear interpolation
+        % Floor of (xp,yp)
+        xf = floor(xp);     yf = floor(yp);
+        % Distance to top-left neighbors                
+        [XF,YF] = ndgrid(xf,yf);
+        [XP,YP] = ndgrid(xp,yp);      
+        u = XP - XF;         v = YP  - YF;        
+        % Change xf, yf for new padding image
+        xf = xf + npad; yf = yf + npad;
+        % Interpolation
+        A = (1-u).*(1-v).*B(xf,yf)   + ...
+                 (1-u).*v    .*B(xf,yf+1) + ...
+                 u   .*(1-v) .*B(xf+1,yf) + ...
+                 u   .*v     .*B(xf+1,yf+1);           
+   case 2
+        % Floor of (xp,yp)
+        xf = floor(xp);yf = floor(yp);
+        % Distance to top-left neighbors      
+        [XF,YF] = ndgrid(xf,yf);
+        [XP,YP] = ndgrid(xp,yp);
+        u = XP - XF;        v = YP - YF;        
+        % Change xf, yf for new padding image
+        xf = xf + npad; yf = yf + npad;
+        % Interpolation: 16 neighbors
+        for i = -1:2
+            for j = -1:2
+                if i==-1, sgi = -1; else sgi = 1; end
+                if j==-1, sgj = -1; else sgj = 1; end                
+                A = A + mex_hat(sgi*(i-u)).*mex_hat(sgj*(j-v)).*B(xf+i,yf+j);
+            end
+        end       
+   otherwise
+        error('Undefined Interpolation method');
+end
+%**************************************************%
+%==================================================%
+% Sub-Function: Mexican-hat kernel
+function hx = mex_hat(x)
+    hx = zeros(size(x));
+    x = abs(x);
+    ind1 = find(x<=1);  ind2 = find(x>1 & x<=2);
+
+    hx(ind1) = 1 - 2*x(ind1).^2 + x(ind1).^3;
+    hx(ind2) = 4 - 8*x(ind2) + 5*x(ind2).^2 - x(ind2).^3;
+% END of sub-function
+%==================================================%
+% Sub-Function: symmetric padding, by default 2 pixels
+% Input: gray image
+function Bp = sym_pad(B,n)
+    Bp = zeros(size(B)+2*n);
+    Bp(n+1:end-n,n+1:end-n) = B;
+    % Padding symmetrically 4 boundaries
+    Bp(n:-1:1,n+1:end-n) = B(1:n,:);
+    Bp(n+1:end-n,n:-1:1) = B(:,1:n);
+    Bp(end-n+1:end,n+1:end-n) = B(end:-1:end-n+1,:);
+    Bp(n+1:end-n,end-n+1:end) = B(:,end:-1:end-n+1);
+% END of sub-function
+%==================================================%
+
+

+ 185 - 0
code_for_stim_reconstruction/imcast.m

@@ -0,0 +1,185 @@
+% Copyright (C) 2000, 2001 Kai Habel <kai.habel@gmx.de>
+% Copyright (C) 2012 Carn?? Draug <carandraug+dev@gmail.com>
+%
+% 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 program is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+% details.
+%
+% You should have received a copy of the GNU General Public License along with
+% this program; if not, see <http://www.gnu.org/licenses/>.
+
+% -*- texinfo -*-
+% @deftypefn  {Function File} {} imcast (@var{img}, @var{type})
+% @deftypefnx {Function File} {} imcast (@var{img}, @var{type}, "indexed")
+% Convert image to specific data type @var{type}.
+%
+% Converts a valid image @var{img} into another class @var{type}.  A valid
+% image must be of class logical, uint8, uint16, int16, single, or double.
+% Conversion of images of class logical is valid, but not the inverse, i.e.,
+% conversion of images into logical class is not supported. Use of
+% @code{im2bw} is recommended for such cases.
+%
+% If the image is indexed, the last argument may be the string
+% @qcode{"indexed"}.  An indexed image may not be of class int16 or
+% single (see @code{isind} for details).
+%
+% Details on how the conversion is performed is class dependent, and can
+% be seen on the help text of @code{im2double}, @code{im2single},
+% @code{im2uint8}, @code{im2uint16}, and @code{im2int16}.
+%
+% @seealso{im2bw, im2uint8, im2double, im2int16, im2single, im2uint16}
+% @end deftypefn
+
+function imout = imcast (img, outcls, varargin)
+
+  if (nargin < 2 || nargin > 3)
+    print_usage ();
+  elseif (nargin == 3 && ~ strcmpi (varargin{1}, 'indexed'))
+    error ('imcast: third argument must be the string \"indexed\"');
+  end
+
+  incls = class (img);
+  if (strcmp (outcls, incls))
+    imout = img;
+    return
+  end
+
+  % we are dealing with indexed images
+  if (nargin == 3)
+    if (~ isind (img))
+      error ('imcast: input should have been an indexed image but it is not.');
+    end
+
+    % Check that the new class is enough to hold all the previous indices
+    % If we are converting to floating point, then we don't bother
+    % check the range of indices. Also, note that indexed images of
+    % integer class are always unsigned.
+
+    % we will be converting a floating point image to integer class
+    if (strcmp (outcls, 'single') || strcmp (outcls, 'double'))
+      if (isinteger (img))
+        imout = cast (img, outcls) +1;
+      else
+        imout = cast (img, outcls);
+      end
+
+    % we will be converting an indexed image to integer class
+    else
+      if (isinteger (img) && intmax (incls) > intmax (outcls) && max (img(:)) > intmax (outcls))
+          error ('imcast: IMG has too many colours %d for the range of values in %s',...
+              max (img(:)), outcls);
+      elseif (isfloat (img))
+        imax = max (img(:)) -1;
+        if (imax > intmax (outcls))
+          error ('imcast: IMG has too many colours %d for the range of values in %s',...
+              imax, outcls);
+        end
+        img = img-1;
+      end
+      imout = cast (img, outcls);
+    end
+
+  % we are dealing with "normal" images
+  else
+    problem = false; % did we found a bad conversion?
+    switch (incls)
+
+      case {'double', 'single'}
+        switch (outcls)
+          case 'uint8',  imout = uint8  (img * 255);
+          case 'uint16', imout = uint16 (img * 65535);
+          case 'int16',  imout = int16 (double (img * uint16 (65535)) -32768);
+          case {'double', 'single'}, imout = cast (img, outcls);
+          otherwise, problem = true;
+        end
+
+      case {'uint8'}
+        switch (outcls)
+          case 'double', imout = double (img) / 255;
+          case 'single', imout = single (img) / 255;
+          case 'uint16', imout = uint16 (img) * 257; % 257 comes from 65535/255
+          case 'int16',  imout = int16 ((double (img) * 257) -32768); % 257 comes from 65535/255
+          otherwise, problem = true;
+        end
+
+      case {'uint16'}
+        switch (outcls)
+          case 'double', imout = double (img) / 65535;
+          case 'single', imout = single (img) / 65535;
+          case 'uint8',  imout = uint8 (img / 257); % 257 comes from 65535/255
+          case 'int16',  imout = int16 (double (img) -32768);
+          otherwise, problem = true;
+        end
+
+      case {'logical'}
+        switch (outcls)
+          case {'double', 'single'}
+            imout = cast (img, outcls);
+          case {'uint8', 'uint16', 'int16'}
+            imout = repmat (intmin (outcls), size (img));
+            imout(img) = intmax (outcls);
+          otherwise
+            problem = true;
+        end
+
+      case {'int16'}
+        switch (outcls)
+          case 'double', imout = (double (img) + 32768) / 65535;
+          case 'single', imout = (single (img) + 32768) / 65535;
+          case 'uint8',  imout = uint8 ((double (img) + 32768) / 257); % 257 comes from 65535/255
+          case 'uint16', imout = uint16 (double (img) + 32768);
+          otherwise, problem = true;
+        end
+
+      otherwise
+        error ('imcast: unknown image of class \"%s\"', incls);
+
+    end
+    if (problem)
+      error ('imcast: unsupported TYPE \"%s\"', outcls);
+    end
+  end
+
+end
+
+%!test
+%! im = randi ([0 255], 40, "uint8");
+%! assert (imcast (im, "uint8"), im2uint8 (im))
+%! assert (imcast (im, "uint16"), im2uint16 (im))
+%! assert (imcast (im, "single"), im2single (im))
+%! assert (imcast (im, "uint8", "indexed"), im2uint8 (im, "indexed"))
+%! assert (imcast (im, "uint16", "indexed"), im2uint16 (im, "indexed"))
+%! assert (imcast (im, "single", "indexed"), im2single (im, "indexed"))
+
+%!test
+%! im = randi ([1 256], 40, "double");
+%! assert (imcast (im, "uint8"), im2uint8 (im))
+%! assert (imcast (im, "uint8", "indexed"), im2uint8 (im, "indexed"))
+%! assert (imcast (im, "single", "indexed"), im2single (im, "indexed"))
+
+%!test
+%! im = randi ([0 65535], 40, "uint16");
+%! assert (imcast (im, "uint8"), im2uint8 (im))
+%! assert (imcast (im, "single"), im2single (im))
+%! assert (imcast (im, "single", "indexed"), im2single (im, "indexed"))
+
+%!test
+%! im = randi ([1 255], 40, "double");
+%! assert (imcast (im, "uint8", "indexed"), im2uint8 (im, "indexed"))
+%! assert (imcast (im, "single", "indexed"), im2single (im, "indexed"))
+
+%!test
+%! im = rand (40);
+%! assert (imcast (im, "uint8"), im2uint8 (im))
+
+%!error <unknown image of class> imcast (randi (127, 40, "int8"), "uint8")
+%!error <unsupported TYPE> imcast (randi (255, 40, "uint8"), "uint32")
+%!error <unsupported TYPE> imcast (randi (255, 40, "uint8"), "not a class")
+%!error <range of values> imcast (randi ([0 65535], 40, "uint16"), "uint8", "indexed")
+

+ 200 - 0
code_for_stim_reconstruction/mixed200.txt

@@ -0,0 +1,200 @@
+001   Berkeley 100075
+002   Berkeley 100098
+003   Berkeley 100099
+004   Berkeley 103006
+005   Berkeley 103029
+006   Berkeley 105019
+007   Berkeley 105027
+008   Berkeley 105053
+009   Berkeley 107014
+010   Berkeley 107072
+011   Berkeley 108004
+012   Berkeley 108069
+013   Berkeley 108073
+014   Berkeley 109034
+015   Berkeley 109055
+016   Berkeley 134008
+017   Berkeley 134049
+018   Berkeley 134052
+019   Berkeley 135037
+020   Berkeley 135069
+021   Berkeley 145079
+022   Berkeley 160006
+023   Berkeley 160067
+024   Berkeley 16052
+025   Berkeley 163062
+026   Berkeley 173036
+027   Berkeley 175083
+028   Berkeley 187039
+029   Berkeley 196015
+030   Berkeley 196062
+031   Berkeley 2092
+032   Berkeley 216066
+033   Berkeley 236017
+034   Berkeley 247003
+035   Berkeley 253016
+036   Berkeley 268048
+037   Berkeley 28075
+038   Berkeley 28083
+039   Berkeley 309004
+040   Berkeley 326038
+041   Berkeley 35008
+042   Berkeley 35049
+043   Berkeley 35058
+044   Berkeley 36046
+045   Berkeley 41004
+046   Berkeley 41006
+047   Berkeley 41029
+048   Berkeley 41085
+049   Berkeley 41096
+050   Berkeley 42044
+051   Berkeley 42078
+052   Berkeley 43033
+053   Berkeley 43051
+054   Berkeley 49024
+055   Berkeley 69022
+056   Berkeley 70011
+057   Berkeley 8049
+058   Berkeley 8068
+059   Berkeley 8143
+060   Berkeley 12003
+061   Berkeley 16068
+062   Berkeley 35010
+063   Berkeley 35091
+064   Berkeley 66053
+065   Berkeley 69040
+066   Berkeley 77062
+067   Berkeley 87015
+068   Berkeley 94095
+069   Berkeley 124084
+070   Berkeley 140075
+071   Berkeley 159008
+072   Berkeley 159045
+073   Berkeley 163096
+074   Berkeley 167083
+075   Berkeley 169012
+076   Berkeley 175032
+077   Berkeley 176019
+078   Berkeley 187003
+079   Berkeley 207038
+080   Berkeley 207049
+081   Berkeley 209021
+082   Berkeley 217090
+083   Berkeley 250047
+084   Berkeley 268074
+085   Berkeley 277095
+086   Berkeley 296058
+087   Berkeley 304074
+088   Berkeley 311081
+089   Berkeley 346016
+090   Berkeley 353013
+091   Berkeley 385039
+092   Berkeley 292066
+093   Berkeley 274007
+094   Berkeley 257098
+095   Berkeley 254054
+096   Berkeley 253092
+097   Berkeley 253027
+098   Berkeley 227092
+099   Berkeley 208001
+100   Berkeley 175043
+101     McGill merry_mexico0147
+102     McGill Merry_0045_Lasalle
+103     McGill pippin_city8
+104     McGill merry_mpark0029
+105     McGill pippin_Peel077
+106     McGill pippin_city42
+107     McGill merry_winter0004
+108     McGill merry_mexico0152
+109     McGill pippin0096
+110     McGill pippin0122
+111     McGill pippin0128
+112     McGill pippin0229
+113     McGill pippin0233
+114     McGill pippin0269
+115     McGill Mex07_023
+116     McGill Mex07_030
+117     McGill Merry_0007_Lasalle
+118     McGill Merry_0011_Lasalle
+119     McGill Merry_0015_Lasalle
+120     McGill Merry_0059_Lasalle
+121     McGill merry_flor0001
+122     McGill merry_flor0019
+123     McGill merry_florida0028
+124     McGill merry_florida0032
+125     McGill merry_italy0011
+126     McGill merry_italy0153
+127     McGill merry_mexico0061
+128     McGill merry_mexico0067
+129     McGill merry_mexico0073
+130     McGill merry_mexico0088
+131     McGill merry_mexico0111
+132     McGill merry_mexico0139
+133     McGill merry_mexico0182
+134     McGill merry_mexico0189
+135     McGill merry_mexico0190
+136     McGill merry_mexico0195
+137     McGill merry_mexico0213
+138     McGill merry_mexico0243
+139     McGill merry_mpark0016
+140     McGill merry_mtl07_009
+141     McGill merry_mtl07_026
+142     McGill merry_toys0010
+143     McGill merry_win07_010
+144     McGill merry0133
+145     McGill pippin_Biodome044
+146     McGill pippin_city14
+147     McGill ppin_city61
+148     McGill pippin_jamaica0243
+149     McGill pippin_jtalon0017
+150     McGill pippin_jtalon0036
+151     McGill pippin_jtalon0038
+152     McGill pippin_Mex07_011
+153     McGill pippin_Mex07_032
+154     McGill pippin_ParcSafari002
+155     McGill pippin_ParcSafari004
+156     McGill pippin_ParcSafari014
+157     McGill pippin_ParcSafari036
+158     McGill pippin_ParcSafari041
+159     McGill pippin_ParcSafari045
+160     McGill pippin_park0002
+161     McGill pippin_park0010
+162     McGill pippin_park0019
+163     McGill pippin_park0048
+164     McGill pippin_park0049
+165     McGill pippin_park0057
+166     McGill pippin_park0058
+167     McGill pippin_Peel049
+168     McGill pippin_RS_YachtClub002
+169     McGill pippin_RS_YachtClub006
+170     McGill pippin_RS_YachtClub023
+171     McGill pippin_RS_YachtClub027
+172     McGill pippin_RVHtexture005
+173     McGill pippin_wei001
+174     McGill pippin_wei011
+175     McGill pippin_wei023
+176     McGill pippin_wei043
+177     McGill pippin_wei053
+178     McGill pippin_wei057
+179     McGill pippin_wei058
+180     McGill pippin_wei078
+181     McGill pippin_wei096
+182     McGill pippin_wei139
+183     McGill pippin0021
+184     McGill pippin0061
+185     McGill pippin0098
+186     McGill pippin0117
+187     McGill pippin0120
+188     McGill pippin0130
+189     McGill pippin0146
+190     McGill pippin0168
+191     McGill pippin0214
+192     McGill pippin0221
+193     McGill pippin0226
+194     McGill pippin0243a
+195     McGill pippin0251
+196     McGill pippin0255a
+197     McGill pippin0264.
+198     McGill pippin0274
+199     McGill pippin0281
+200     McGill pippin0289

+ 300 - 0
code_for_stim_reconstruction/mixed300.txt

@@ -0,0 +1,300 @@
+001   Berkeley 100075
+002   Berkeley 100098
+003   Berkeley 100099
+004   Berkeley 103006
+005   Berkeley 103029
+006   Berkeley 105019
+007   Berkeley 105027
+008   Berkeley 105053
+009   Berkeley 107014
+010   Berkeley 107072
+011   Berkeley 108004
+012   Berkeley 108069
+013   Berkeley 108073
+014   Berkeley 109034
+015   Berkeley 109055
+016   Berkeley 134008
+017   Berkeley 134049
+018   Berkeley 134052
+019   Berkeley 135037
+020   Berkeley 135069
+021   Berkeley 145079
+022   Berkeley 160006
+023   Berkeley 160067
+024   Berkeley 16052
+025   Berkeley 163062
+026   Berkeley 173036
+027   Berkeley 175083
+028   Berkeley 187039
+029   Berkeley 196015
+030   Berkeley 196062
+031   Berkeley 2092
+032   Berkeley 216066
+033   Berkeley 236017
+034   Berkeley 247003
+035   Berkeley 253016
+036   Berkeley 268048
+037   Berkeley 28075
+038   Berkeley 28083
+039   Berkeley 309004
+040   Berkeley 326038
+041   Berkeley 35008
+042   Berkeley 35049
+043   Berkeley 35058
+044   Berkeley 36046
+045   Berkeley 41004
+046   Berkeley 41006
+047   Berkeley 41029
+048   Berkeley 41085
+049   Berkeley 41096
+050   Berkeley 42044
+051   Berkeley 42078
+052   Berkeley 43033
+053   Berkeley 43051
+054   Berkeley 49024
+055   Berkeley 69022
+056   Berkeley 70011
+057   Berkeley 8049
+058   Berkeley 8068
+059   Berkeley 8143
+060   Berkeley 12003
+061   Berkeley 16068
+062   Berkeley 35010
+063   Berkeley 35091
+064   Berkeley 66053
+065   Berkeley 69040
+066   Berkeley 77062
+067   Berkeley 87015
+068   Berkeley 94095
+069   Berkeley 124084
+070   Berkeley 140075
+071   Berkeley 159008
+072   Berkeley 159045
+073   Berkeley 163096
+074   Berkeley 167083
+075   Berkeley 169012
+076   Berkeley 175032
+077   Berkeley 176019
+078   Berkeley 187003
+079   Berkeley 207038
+080   Berkeley 207049
+081   Berkeley 209021
+082   Berkeley 217090
+083   Berkeley 250047
+084   Berkeley 268074
+085   Berkeley 277095
+086   Berkeley 296058
+087   Berkeley 304074
+088   Berkeley 311081
+089   Berkeley 346016
+090   Berkeley 353013
+091   Berkeley 385039
+092   Berkeley 292066
+093   Berkeley 274007
+094   Berkeley 257098
+095   Berkeley 254054
+096   Berkeley 253092
+097   Berkeley 253027
+098   Berkeley 227092
+099   Berkeley 208001
+100   Berkeley 175043
+101 vanHateren imk00182.imc
+102 vanHateren imk00264.imc
+103 vanHateren imk00459.imc
+104 vanHateren imk00895.imc
+105 vanHateren imk00942.imc
+106 vanHateren imk01024.imc
+107 vanHateren imk01057.imc
+108 vanHateren imk01097.imc
+109 vanHateren imk01159.imc
+110 vanHateren imk01166.imc
+111 vanHateren imk01220.imc
+112 vanHateren imk01251.imc
+113 vanHateren imk01261.imc
+114 vanHateren imk01266.imc
+115 vanHateren imk01306.imc
+116 vanHateren imk01322.imc
+117 vanHateren imk01333.imc
+118 vanHateren imk01343.imc
+119 vanHateren imk01378.imc
+120 vanHateren imk01390.imc
+121 vanHateren imk01470.imc
+122 vanHateren imk01491.imc
+123 vanHateren imk01536.imc
+124 vanHateren imk01559.imc
+125 vanHateren imk01574.imc
+126 vanHateren imk01601.imc
+127 vanHateren imk01643.imc
+128 vanHateren imk01677.imc
+129 vanHateren imk01710.imc
+130 vanHateren imk01733.imc
+131 vanHateren imk01776.imc
+132 vanHateren imk01950.imc
+133 vanHateren imk02169.imc
+134 vanHateren imk02655.imc
+135 vanHateren imk03348.imc
+136 vanHateren imk03402.imc
+137 vanHateren imk03407.imc
+138 vanHateren imk03725.imc
+139 vanHateren imk03833.imc
+140 vanHateren imk03836.imc
+141 vanHateren imk04103.imc
+142 vanHateren imk04175.imc
+143 vanHateren imk04208.imc
+144 vanHateren imk00016.imc
+145 vanHateren imk00112.imc
+146 vanHateren imk00199.imc
+147 vanHateren imk00205.imc
+148 vanHateren imk00208.imc
+149 vanHateren imk00242.imc
+150 vanHateren imk00265.imc
+151 vanHateren imk00305.imc
+152 vanHateren imk00315.imc
+153 vanHateren imk00325.imc
+154 vanHateren imk00341.imc
+155 vanHateren imk00352.imc
+156 vanHateren imk00354.imc
+157 vanHateren imk00361.imc
+158 vanHateren imk00386.imc
+159 vanHateren imk00396.imc
+160 vanHateren imk00443.imc
+161 vanHateren imk00444.imc
+162 vanHateren imk00634.imc
+163 vanHateren imk00649.imc
+164 vanHateren imk00671.imc
+165 vanHateren imk00741.imc
+166 vanHateren imk00753.imc
+167 vanHateren imk00765.imc
+168 vanHateren imk00829.imc
+169 vanHateren imk00874.imc
+170 vanHateren imk00944.imc
+171 vanHateren imk00983.imc
+172 vanHateren imk00987.imc
+173 vanHateren imk01015.imc
+174 vanHateren imk01020.imc
+175 vanHateren imk01027.imc
+176 vanHateren imk01030.imc
+177 vanHateren imk01040.imc
+178 vanHateren imk01096.imc
+179 vanHateren imk01243.imc
+180 vanHateren imk01257.imc
+181 vanHateren imk01303.imc
+182 vanHateren imk01335.imc
+183 vanHateren imk01419.imc
+184 vanHateren imk01422.imc
+185 vanHateren imk01435.imc
+186 vanHateren imk01498.imc
+187 vanHateren imk01506.imc
+188 vanHateren imk01512.imc
+189 vanHateren imk01514.imc
+190 vanHateren imk01519.imc
+191 vanHateren imk01578.imc
+192 vanHateren imk01579.imc
+193 vanHateren imk01778.imc
+194 vanHateren imk01864.imc
+195 vanHateren imk02094.imc
+196 vanHateren imk02237.imc
+197 vanHateren imk02326.imc
+198 vanHateren imk02676.imc
+199 vanHateren imk03332.imc
+200 vanHateren imk03760.imc
+201     McGill merry_mexico0147
+202     McGill Merry_0045_Lasalle
+203     McGill pippin_city8
+204     McGill merry_mpark0029
+205     McGill pippin_Peel077
+206     McGill pippin_city42
+207     McGill merry_winter0004
+208     McGill merry_mexico0152
+209     McGill pippin0096
+210     McGill pippin0122
+211     McGill pippin0128
+212     McGill pippin0229
+213     McGill pippin0233
+214     McGill pippin0269
+215     McGill Mex07_023
+216     McGill Mex07_030
+217     McGill Merry_0007_Lasalle
+218     McGill Merry_0011_Lasalle
+219     McGill Merry_0015_Lasalle
+220     McGill Merry_0059_Lasalle
+221     McGill merry_flor0001
+222     McGill merry_flor0019
+223     McGill merry_florida0028
+224     McGill merry_florida0032
+225     McGill merry_italy0011
+226     McGill merry_italy0153
+227     McGill merry_mexico0061
+228     McGill merry_mexico0067
+229     McGill merry_mexico0073
+230     McGill merry_mexico0088
+231     McGill merry_mexico0111
+232     McGill merry_mexico0139
+233     McGill merry_mexico0182
+234     McGill merry_mexico0189
+235     McGill merry_mexico0190
+236     McGill merry_mexico0195
+237     McGill merry_mexico0213
+238     McGill merry_mexico0243
+239     McGill merry_mpark0016
+240     McGill merry_mtl07_009
+241     McGill merry_mtl07_026
+242     McGill merry_toys0010
+243     McGill merry_win07_010
+244     McGill merry0133
+245     McGill pippin_Biodome044
+246     McGill pippin_city14
+247     McGill ppin_city61
+248     McGill pippin_jamaica0243
+249     McGill pippin_jtalon0017
+250     McGill pippin_jtalon0036
+251     McGill pippin_jtalon0038
+252     McGill pippin_Mex07_011
+253     McGill pippin_Mex07_032
+254     McGill pippin_ParcSafari002
+255     McGill pippin_ParcSafari004
+256     McGill pippin_ParcSafari014
+257     McGill pippin_ParcSafari036
+258     McGill pippin_ParcSafari041
+259     McGill pippin_ParcSafari045
+260     McGill pippin_park0002
+261     McGill pippin_park0010
+262     McGill pippin_park0019
+263     McGill pippin_park0048
+264     McGill pippin_park0049
+265     McGill pippin_park0057
+266     McGill pippin_park0058
+267     McGill pippin_Peel049
+268     McGill pippin_RS_YachtClub002
+269     McGill pippin_RS_YachtClub006
+270     McGill pippin_RS_YachtClub023
+271     McGill pippin_RS_YachtClub027
+272     McGill pippin_RVHtexture005
+273     McGill pippin_wei001
+274     McGill pippin_wei011
+275     McGill pippin_wei023
+276     McGill pippin_wei043
+277     McGill pippin_wei053
+278     McGill pippin_wei057
+279     McGill pippin_wei058
+280     McGill pippin_wei078
+281     McGill pippin_wei096
+282     McGill pippin_wei139
+283     McGill pippin0021
+284     McGill pippin0061
+285     McGill pippin0098
+286     McGill pippin0117
+287     McGill pippin0120
+288     McGill pippin0130
+289     McGill pippin0146
+290     McGill pippin0168
+291     McGill pippin0214
+292     McGill pippin0221
+293     McGill pippin0226
+294     McGill pippin0243a
+295     McGill pippin0251
+296     McGill pippin0255a
+297     McGill pippin0264.
+298     McGill pippin0274
+299     McGill pippin0281
+300     McGill pippin0289

+ 83 - 0
code_for_stim_reconstruction/prepareNaturalImages.m

@@ -0,0 +1,83 @@
+function prepareNaturalImages()
+%PREPARENATURALIMAGES 
+% Generates a folder with .raw files withing the path that contains the
+% images
+
+%--------------------------------------------------------------------------
+options.sqside  = 512; % change this number for images of different size
+options.imgmean = 0.5;
+options.imgstd  = 0.2;
+%--------------------------------------------------------------------------
+%select the images
+fstr={'*.jpg;*.tif;*.imc','All allowed image files';...
+    '*.jpg', 'Berkeley image files'; ...
+    '*.tif', 'McGill image files';...
+    '*.imc', 'vanHateren image files'};
+
+[filenames, pathname]= uigetfile(fstr,'Select the images you want to convert',...
+    'MultiSelect', 'on'); 
+
+if isequal(filenames,0); error('No images selected! Program is terminating...');
+else, disp('Images selected, proceeding to loading...'); end
+
+filenames=cellstr(filenames);
+%--------------------------------------------------------------------------
+%create saving folder
+rawFolderName = fullfile(pathname, 'rawFolder');
+if ~exist(rawFolderName,'dir'); mkdir(rawFolderName); end
+%--------------------------------------------------------------------------
+for ii=1:numel(filenames)
+    disp(['Loading and processing image ' filenames{ii} '...']);tic;
+    
+    imMat  = getProperGrayImg(fullfile(pathname, filenames{ii}), options.sqside);
+    valMat = double(imMat)/255;    
+    %--------------------------------------------------------------------------
+    %Scaling and shifting
+    reMat   = options.imgmean + (valMat-mean(valMat(:)))*options.imgstd/std(valMat(:));
+    saveMat = imcast(reMat,'uint8');
+    
+    %save original
+    name_raw = fullfile(rawFolderName, [strtok([ filenames{ii}], '.') '.raw']);
+    fid = fopen(name_raw,'w+'); 
+    fwrite(fid, saveMat, 'uint8'); 
+    fclose(fid);
+    %--------------------------------------------------------------------------
+end
+end
+%--------------------------------------------------------------------------
+function imgMat=getProperGrayImg(imgpath, tsize)
+
+[~,~,ext] = fileparts(imgpath);
+
+switch ext
+case '.imc'; imtype='vanHateren';
+case '.jpg'; imtype='Berkeley';
+case '.tif'; imtype='McGill';
+end
+
+switch imtype
+    case 'vanHateren'
+        w = 1536; h = 1024;
+        f1    = fopen(imgpath, 'rb', 'ieee-be');
+        imRaw = fread(f1, [w, h], 'uint16');
+        fclose(f1); clear f1; 
+        
+        imRaw = imRaw'/4095; 
+        imRaw(imRaw>1) = 1;
+        imRaw = imcast(imRaw,'uint8');
+        ih = size(imRaw,1); iw = size(imRaw,2); ifin = 1000;
+    otherwise
+        imRaw = imread(imgpath);
+        ih    = size(imRaw,1); 
+        iw    = size(imRaw,2); 
+        ifin  = min([ih iw]);
+end
+        imRawClipped = imRaw(round((ih-ifin)/2+1:(ih+ifin)/2),...
+            round((iw-ifin)/2+1:(iw+ifin)/2), :);
+        imRawResized = uint8(imageresize(imRawClipped, tsize/ifin));
+        imgMat       = imRawResized(1:tsize, 1:tsize,:);
+        if ndims(imgMat)>2; 
+            imgMat=rgb2gray(imgMat); 
+        end
+end
+

BIN
code_for_stim_reconstruction/ran1.mexw64