diff --git a/README.pdf b/README.pdf
new file mode 100644
index 0000000..b402542
Binary files /dev/null and b/README.pdf differ
diff --git a/contrasts.m b/contrasts.m
index 5ce32e8..72638d6 100644
--- a/contrasts.m
+++ b/contrasts.m
@@ -14,7 +14,10 @@
% contrasts are not orthonormalized!
%
%
-% Copyright (C) 2013 Carsten Allefeld
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
+% Copyright (C) 2013–2016 Carsten Allefeld
% number of factors
@@ -61,4 +64,3 @@
% 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.
-
diff --git a/cvManovaCore.m b/cvManovaCore.m
index fd88670..f7d6ff8 100644
--- a/cvManovaCore.m
+++ b/cvManovaCore.m
@@ -33,6 +33,9 @@
% See also cvManovaSearchlight, cvManovaRegion
%
%
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
% Copyright (C) 2016 Carsten Allefeld
diff --git a/cvManovaSearchlight.m b/cvManovaSearchlight.m
index fe3becd..a129518 100644
--- a/cvManovaSearchlight.m
+++ b/cvManovaSearchlight.m
@@ -6,20 +6,23 @@ function cvManovaSearchlight(dirName, slRadius, Cs, permute, lambda)
%
% dirName: directory where the SPM.mat file referring to an estimated
% model is located
-% slRadius: radius of the searchlight sphere, in voxels
+% slRadius: radius of the searchlight sphere in voxels
% Cs: cell array of contrast vectors or matrices
% permute: whether to compute permutation values
% lambda: regularization parameter (0–1)
%
% Output files are written to the same directory:
-% spmD_C####_P####.nii: images of the pattern discriminability D
-% contrast and permutation are identified by numbers
-% spmD_C####_P####.nii: images of standardized pattern discriminability D_s
-% VPSL.nii: image of the number of voxels for each searchlight
-% cmsParameters.mat: record of the analysis parameters
+% spmD_C####_P####.nii: images of the pattern discriminability D
+% contrast and permutation are identified by numbers
+% spmDs_C####_P####.nii: images of standardized pattern discriminability D_s
+% VPSL.nii: image of the number of voxels for each searchlight
+% cmsParameters.mat: record of the analysis parameters
%
%
-% Copyright (C) 2013-2016 Carsten Allefeld
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
+% Copyright (C) 2013–2016 Carsten Allefeld
fprintf('\n\ncvManovaSearchlight\n\n')
diff --git a/fletcher16.m b/fletcher16.m
index ffe13c1..58e0a4a 100644
--- a/fletcher16.m
+++ b/fletcher16.m
@@ -7,11 +7,14 @@
% data: data to be checksummed,
% array of integers in the range 0 to 255 (0xFF)
% checksum: Fletcher-16 checksum,
-% integer where each of the bytes is in the range 0 to 254 (0xFE)
+% 16-bit integer where each of the bytes is in the range 0 to 254 (0xFE)
%
% https://en.wikipedia.org/wiki/Fletcher%27s_checksum
%
%
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
% Copyright (C) 2016 Carsten Allefeld
diff --git a/inestimability.m b/inestimability.m
index 194abad..5f377fd 100644
--- a/inestimability.m
+++ b/inestimability.m
@@ -1,6 +1,6 @@
function ie = inestimability(C, X)
-% degree of inestimability of a contrast wrt a design matrix
+% degree of inestimability of a contrast w.r.t. a design matrix
%
% ie = inestimability(C, X)
%
@@ -12,7 +12,10 @@
% part. For a completely inestimable contrast, ie = 1.
%
%
-% Copyright (C) 2013 Carsten Allefeld
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
+% Copyright (C) 2013–2016 Carsten Allefeld
% maximum "0" observed so far: 4.79*eps
@@ -46,4 +49,3 @@
% 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.
-
diff --git a/loadDataSPM.m b/loadDataSPM.m
index 3f00404..630aed4 100644
--- a/loadDataSPM.m
+++ b/loadDataSPM.m
@@ -7,20 +7,25 @@
% dirName: name of directory that contains SPM.mat
% regions: optional additional region mask(s),
% (cell array of) logical 3D volume(s) or filename(s)
-% Ys: MR data (within mask) for each session, scans x voxels
-% Xs: design matrix for each session, scans x regressors
+% Ys: MR data (within mask), cell array with one element for each
+% session, containing an array of size scans × voxels
+% Xs: design matrix for each session, cell array with one element
+% for each session, containing an array of size scans × regressors
% mask: analysis brain mask, logical 3D volume;
-% possibly combined with region mask
+% possibly combined with union of region masks
% misc: struct with additional data:
% mat voxels to mm transformation matrix
-% fE residual degrees of freedom per session
+% fE residual degrees of freedom for each session
% rmvi cell array of mask voxel indices for each region
%
% Y & X and are high-pass filtered and whitened.
% Y includes only those voxels selected through mask.
%
%
-% Copyright (C) 2013-2016 Carsten Allefeld
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
+% Copyright (C) 2013–2016 Carsten Allefeld
% default argument values
diff --git a/runSearchlight.m b/runSearchlight.m
index 30b2dbe..28cf89c 100644
--- a/runSearchlight.m
+++ b/runSearchlight.m
@@ -6,11 +6,11 @@
% res = runSearchlight(checkpoint, slRadius, mask, fun, ...)
%
% checkpoint: name of checkpoint file ([] to disable checkpointing)
-% slRadius: radius of searchlight, in voxels
+% slRadius: radius of searchlight in voxels
% mask: 3-dimensional logical array indicating which voxels to use
% fun: function to call with voxel indices within window
% ...: additional arguments are passed through to the function
-% res: results, 2-dimensional matrix, voxels x output values
+% res: results, array of size voxels × output values
% p: number of voxels in each searchlight, column vector
%
% The function has to be of the form r = fun(mvi, ...)
@@ -21,17 +21,20 @@
%
% A voxel is included in the searchlight if its distance from the center is
% *smaller than or equal to* the radius. Note that fractional values are
-% possible. Run slSizes for a table of meaningful values and resulting
+% possible. Run slSize for a table of meaningful values and resulting
% searchlight sizes
%
% Intermediate results are saved at regular intervals to the checkpoint
% file, if given. On a subsequent run, if the checkpoint file exists, its
% contents are loaded and the computation continues from that point.
%
-% See also slSizes
+% See also slSize
%
%
-% Copyright (C) 2013-2016 Carsten Allefeld
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
+% Copyright (C) 2013–2016 Carsten Allefeld
% normalize checkpoint file name, preserving emptiness
diff --git a/signPermutations.m b/signPermutations.m
index 41bc030..210c95b 100644
--- a/signPermutations.m
+++ b/signPermutations.m
@@ -14,7 +14,10 @@
% permutation, ones(n, 1).
%
%
-% Copyright (C) 2013-2016 Carsten Allefeld
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
+% Copyright (C) 2013–2016 Carsten Allefeld
if nargin < 2
@@ -42,4 +45,3 @@
% 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.
-
diff --git a/spmReadVolMatched.m b/spmReadVolMatched.m
index 24950fa..e7a5487 100644
--- a/spmReadVolMatched.m
+++ b/spmReadVolMatched.m
@@ -26,9 +26,12 @@
% consistent. Only the fields mat (4 × 4 matrix) and dim (1 × 3 vector)
% have to be present.
%
-% See also spmCoords, spm_write_sn, spm_slice_vol
+% See also spm_write_sn, spm_slice_vol
%
%
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
% Copyright (C) 2016 Carsten Allefeld
% adapted from spm_read_vols and John Ashburner's reslice.m, v1.42
% see https://www2.warwick.ac.uk/fac/sci/statistics/staff/academic-research/nichols/scripts/spm/johnsgems/#Gem8
diff --git a/spmReadVolsMasked.m b/spmReadVolsMasked.m
index 03bd37a..cadd5aa 100644
--- a/spmReadVolsMasked.m
+++ b/spmReadVolsMasked.m
@@ -14,9 +14,12 @@
% memory spikes and to gain speed. This is achieved by directly accessing
% memory-mapped data via the volume structs' file_array object V.private.raw.
%
-% See also spmUnMask, spmReadMatched, spmCoords
+% See also spmUnMask, spmReadVolMatched, spmCoords
%
%
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
% Copyright (C) 2016 Carsten Allefeld
% This function is about 2–3 times faster than spm_read_vols on a local
diff --git a/spmWriteImage.m b/spmWriteImage.m
index 278bbc7..24696ad 100644
--- a/spmWriteImage.m
+++ b/spmWriteImage.m
@@ -38,9 +38,9 @@
% For background information, see
% http://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/
%
-% It is however possible to store floating-point data that only attain
-% discrete and linearly-spaced values (e.g. ratios) using an integer data
-% type using the linear transformation feature of the NIfTI format,
+% It is possible to store floating-point data that only attain discrete and
+% linearly-spaced values (e.g. ratios) using an integer data type using the
+% linear transformation feature of the NIfTI format,
% spmWriteImage(int, fname, mat, 'scl_slope', slope, 'scl_inter', inter)
% where int is of class uint8, uint16, or uint32. Upon reading the file,
% the integer data are automatically transformed according to
@@ -48,9 +48,12 @@
% This way the image file may be kept substantially smaller. Note however
% that 'scl_slope' and 'scl_inter' are stored only with single precision.
%
-% See also spmCoords, nifti/Contents
+% See also nifti/Contents
%
%
+% This file is part of v3 of cvmanova, see
+% https://github.com/allefeld/cvmanova/releases
+%
% Copyright (C) 2016 Carsten Allefeld
@@ -139,4 +142,3 @@
% 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.
-