Skip to content

Commit 10ce0a8

Browse files
author
William Jones
committed
Tidied up comments and licenses.
1 parent 883da50 commit 10ce0a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+124
-61
lines changed

DATA_COVID_JHU.m

+1-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@
3737

3838
% Karl Friston
3939
% $Id: DATA_COVID_JHU.m 8001 2020-11-03 19:05:40Z karl $
40-
41-
% get data
42-
% TODO: Implement websave in Octave. For now, files have been predownloaded.
43-
% IF you need to reaquire these files, you'll need to strip all commas and
44-
% quotes from fields for compatibility with octaves import functions
40+
# SPDX-License-Identifier: GPL-2.0
4541
%--------------------------------------------------------------------------
4642
% defaults
4743
%--------------------------------------------------------------------------

DEM_COVID.m

+2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323

2424
% Karl Friston
2525
% $Id: DEM_COVID.m 7868 2020-06-02 16:39:02Z karl $
26+
# SPDX-License-Identifier: GPL-2.0
2627

2728
% F: -1.5701e+04 social distancing based upon P(infected)
2829
% F: -1.5969e+04 social distancing based upon P(symptomatic)
2930
% F: -1.5909e+04 social distancing based upon P(waiting)
3031
% F = 0; for i = 1:numel(DCM), F = F + DCM{1}.F; end, disp(F)
3132

33+
3234
% Flush octave outputs immediately
3335
if exist ('OCTAVE_VERSION', 'builtin');
3436
page_screen_output(0);

DEM_COVID_tests.m

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
% 0: print nothing but end result
1515
% 1: output details of test results to console
1616
% 2: output logs of failed comparisons to text file
17-
%
17+
%__________________________________________________________________________
18+
# Copyright (C) 2021 Embecosm Limited
19+
# Contributor: William Jones <william.jones@embecosm.com>
20+
# SPDX-License-Identifier: GPL-2.0
1821

1922
function DEM_COVID_tests(verbosity)
2023
if nargin < 1

README.md

+1-1

octave_importglobal.m

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
% Function to import time series CSV files for COVID data. Should work well on
2-
% the following specific files:
1+
% Function to import time series CSV files for COVID data. Written for the
2+
% following specific files:
33
% - 'time_series_covid19_confirmed_global.csv'
44
% - 'time_series_covid19_deaths_global.csv'
55
% from:
66
% 'https://github.com/CSSEGISandData/COVID-19/raw/master/csse_covid_19_data/csse_covid_19_time_series/'
7-
% and probably won't work well on anything else.
7+
%__________________________________________________________________________
8+
# Copyright (C) 2021 Embecosm Limited
9+
# Contributor: William Jones <william.jones@embecosm.com>
10+
# SPDX-License-Identifier: GPL-2.0
811
function out = octave_importglobal(filename, delim)
912
if (nargin < 2)
1013
delim = ',';

octave_importpop.m

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
% Function to import time series CSV files for COVID data. Should work well on
2-
% the following specific files:
1+
% Function to import time series CSV files for COVID data. Written to import the
2+
% specific file
33
% - 'population.csv'
4-
% and probably won't work well on much else
4+
%
5+
%__________________________________________________________________________
6+
# Copyright (C) 2021 Embecosm Limited
7+
# Contributor: William Jones <william.jones@embecosm.com>
8+
# SPDX-License-Identifier: GPL-2.0
59

610
function out = octave_importpop(filename, delim)
711
if (nargin < 2)

octave_websave.m

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
% A simple websave function for Octave.
2+
%__________________________________________________________________________
3+
# Copyright (C) 2021 Embecosm Limited
4+
# Contributor: William Jones <william.jones@embecosm.com>
5+
# SPDX-License-Identifier: GPL-2.0
6+
17
function S = octave_websave(filename, url)
28
txt = urlread(url);
39
fid = fopen(filename,'w');

spm_COVID.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
% Karl Friston
4343
% $Id: spm_COVID.m 7866 2020-05-30 09:57:38Z karl $
44-
44+
# SPDX-License-Identifier: GPL-2.0
4545

4646
% Gaussian priors over model parameters
4747
%--------------------------------------------------------------------------

spm_COVID_B.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
% Karl Friston
2424
% $Id: spm_COVID_B.m 7942 2020-09-10 22:00:08Z spm $
25-
25+
# SPDX-License-Identifier: GPL-2.0
2626
% setup
2727
%==========================================================================
2828

spm_COVID_PV.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function spm_COVID_PV(DCM,i,T)
99

1010
% Karl Friston
1111
% $Id: spm_COVID_PV.m 7866 2020-05-30 09:57:38Z karl $
12-
12+
# SPDX-License-Identifier: GPL-2.0
1313
% use priors from parametric empirical Bayes
1414
%--------------------------------------------------------------------------
1515
pE = DCM{i}.M.pE;

spm_COVID_ci.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
% Karl Friston
3434
% $Id: spm_COVID_ci.m 7871 2020-06-11 08:37:38Z karl $
35-
35+
# SPDX-License-Identifier: GPL-2.0
3636
% default: number of outcomes to evaluate
3737
%--------------------------------------------------------------------------
3838
if nargin < 4, U = 1:3; end

spm_COVID_gen.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
% Karl Friston
5353
% $Id: spm_COVID_gen.m 7929 2020-08-16 13:43:49Z karl $
54-
54+
# SPDX-License-Identifier: GPL-2.0
5555

5656
% The generative model:
5757
%==========================================================================

spm_COVID_plot.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function spm_COVID_plot(Y,X,Z,u,U)
1616

1717
% Karl Friston
1818
% $Id: spm_COVID_plot.m 7891 2020-07-07 16:34:13Z karl $
19-
19+
# SPDX-License-Identifier: GPL-2.0
2020
% Plot outcomes
2121
%==========================================================================
2222
% https://www.england.nhs.uk/statistics/statistical-work-areas/critical-care-capacity/

spm_COVID_priors.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
% Karl Friston
3838
% $Id: spm_COVID_priors.m 7929 2020-08-16 13:43:49Z karl $
39-
39+
# SPDX-License-Identifier: GPL-2.0
4040
% sources and background
4141
%--------------------------------------------------------------------------
4242
% https://jamanetwork.com/journals/jama/fullarticle/2761044

spm_Ce.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
% Karl Friston
2727
% $Id: spm_Ce.m 7203 2017-11-08 12:49:15Z guillaume $
28-
28+
# SPDX-License-Identifier: GPL-2.0
2929

3030
%-Defaults (and backward compatibility with spm_Ce(v,a) == spm_Ce('ar',v,a))
3131
%--------------------------------------------------------------------------

spm_Ncdf.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
% Andrew Holmes
5454
% $Id: spm_Ncdf.m 7548 2019-03-20 10:08:49Z guillaume $
55-
55+
# SPDX-License-Identifier: GPL-2.0
5656

5757
%-Format arguments, note & check sizes
5858
%--------------------------------------------------------------------------

spm_axis.m

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# SPDX-License-Identifier: GPL-2.0
12
function varargout = spm_axis(varargin)
23
% AXIS Control axis scaling and appearance.
34

spm_cat.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
% Karl Friston
2424
% $Id: spm_cat.m 8045 2021-02-02 18:46:28Z karl $
25-
25+
# SPDX-License-Identifier: GPL-2.0
2626

2727
%error('spm_cat.c not compiled - see Makefile')
2828

spm_check_version.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
% Darren Gitelman
6565
% $Id: spm_check_version.m 6156 2014-09-05 17:34:53Z guillaume $
66-
66+
# SPDX-License-Identifier: GPL-2.0
6767

6868
%-Detect software used
6969
%==========================================================================

spm_cross.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
% Karl Friston
1616
% $Id: spm_cross.m 7838 2020-04-23 17:40:45Z karl $
17-
17+
# SPDX-License-Identifier: GPL-2.0
1818
% handle single inputs
1919
%--------------------------------------------------------------------------
2020
if nargin < 2

spm_dcm_bma.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090
% Will Penny
9191
% $Id: spm_dcm_bma.m 7679 2019-10-24 15:54:07Z spm $
92-
92+
# SPDX-License-Identifier: GPL-2.0
9393
% defaults
9494
%--------------------------------------------------------------------------
9595
if nargin < 4 || isempty(Nsamp)

spm_dcm_bmr_all.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
% Karl Friston, Peter Zeidman
6767
% $Id: spm_dcm_bmr_all.m 8045 2021-02-02 18:46:28Z karl $
68-
68+
# SPDX-License-Identifier: GPL-2.0
6969

7070
%-specification of null prior covariance
7171
%--------------------------------------------------------------------------

spm_dcm_bpa.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
% Will Penny & Klaas Enno Stephan
4646
% $Id: spm_dcm_bpa.m 7866 2020-05-30 09:57:38Z karl $
47-
47+
# SPDX-License-Identifier: GPL-2.0
4848

4949
% Preiminaries
5050
%--------------------------------------------------------------------------

spm_dcm_peb.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
% Karl Friston
9494
% $Id: spm_dcm_peb.m 8024 2020-11-28 12:09:53Z karl $
95-
95+
# SPDX-License-Identifier: GPL-2.0
9696

9797
% get filenames and set up
9898
%==========================================================================

spm_diag.m

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
% Guillaume Flandin
1010
% $Id: spm_diag.m 7809 2020-03-31 11:55:09Z karl $
11+
# SPDX-License-Identifier: GPL-2.0
1112

1213
try
1314
X = varargin{1};

spm_diff.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
% Karl Friston
3131
% $Id: spm_diff.m 7977 2020-10-07 15:29:54Z guillaume $
32-
32+
# SPDX-License-Identifier: GPL-2.0
3333

3434
% step size for numerical derivatives
3535
%--------------------------------------------------------------------------

spm_dx.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
% Karl Friston
5151
% $Id: spm_dx.m 7975 2020-10-06 14:46:56Z spm $
52-
52+
# SPDX-License-Identifier: GPL-2.0
5353
% defaults
5454
%--------------------------------------------------------------------------
5555
nmax = 512; % threshold for numerical approximation

spm_en.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
% Karl Friston
1414
% $Id: spm_en.m 3901 2010-05-27 16:14:36Z karl $
15-
15+
# SPDX-License-Identifier: GPL-2.0
1616

1717
% detrend
1818
%--------------------------------------------------------------------------

spm_expm.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
% Karl Friston
1616
% $Id: spm_expm.m 5691 2013-10-11 16:53:00Z karl $
17-
17+
# SPDX-License-Identifier: GPL-2.0
1818
% % standard [eigen]solution
1919
% %--------------------------------------------------------------------------
2020
% [V,D] = eig(full(J));

spm_fieldindices.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
% Karl Friston
1818
% $Id: spm_fieldindices.m 7031 2017-02-27 19:46:48Z karl $
19-
19+
# SPDX-License-Identifier: GPL-2.0
2020

2121
% if varargin is a vector simply return fieldnames
2222
%--------------------------------------------------------------------------

spm_figure.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
% Andrew Holmes
4848
% $Id: spm_figure.m 7833 2020-04-17 10:43:06Z guillaume $
49-
49+
# SPDX-License-Identifier: GPL-2.0
5050

5151
%==========================================================================
5252
% - FORMAT specifications for embedded CallBack functions

spm_find_pC.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
% Karl Friston
2323
% $Id: spm_find_pC.m 8024 2020-11-28 12:09:53Z karl $
24-
24+
# SPDX-License-Identifier: GPL-2.0
2525
%-parse input arguments
2626
%--------------------------------------------------------------------------
2727
if nargin > 2

spm_funcheck.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
% Karl Friston
1111
% $Id: spm_funcheck.m 6481 2015-06-16 17:01:47Z karl $
12-
12+
# SPDX-License-Identifier: GPL-2.0
1313

1414
%-Create function handle
1515
%==========================================================================

spm_hist_smooth.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
% Karl Friston
1010
% $Id: spm_hist_smooth.m 8000 2020-11-03 19:04:17Z karl $
11-
11+
# SPDX-License-Identifier: GPL-2.0
1212
% remove negative values
1313
%--------------------------------------------------------------------------
1414
x = x(:);

spm_inv.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
% Karl Friston
1515
% $Id: spm_inv.m 7143 2017-07-29 18:50:38Z karl $
16-
16+
# SPDX-License-Identifier: GPL-2.0
1717
% check A
1818
%--------------------------------------------------------------------------
1919
[m,n] = size(A);

spm_invNcdf.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
% Andrew Holmes
6565
% $Id: spm_invNcdf.m 6859 2016-08-24 16:46:16Z guillaume $
66-
66+
# SPDX-License-Identifier: GPL-2.0
6767

6868
%-Format arguments, note & check sizes
6969
%--------------------------------------------------------------------------

spm_kron.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
% Karl Friston
2020
% $Id: spm_kron.m 7814 2020-04-06 11:47:47Z guillaume $
21-
21+
# SPDX-License-Identifier: GPL-2.0
2222

2323
% Deal with cell arrays
2424
%--------------------------------------------------------------------------

spm_length.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
% Karl Friston
1616
% $Id: spm_length.m 6233 2014-10-12 09:43:50Z karl $
17-
17+
# SPDX-License-Identifier: GPL-2.0
1818

1919
% vectorise numerical arrays
2020
%--------------------------------------------------------------------------

spm_log_evidence.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030

3131
% Karl Friston
3232
% $Id: spm_log_evidence.m 6856 2016-08-10 17:55:05Z karl $
33-
33+
# SPDX-License-Identifier: GPL-2.0
34+
3435
% Compute reduced log-evidence
3536
%==========================================================================
3637

spm_log_evidence_reduce.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
% Karl Friston
2727
% $Id: spm_log_evidence_reduce.m 6849 2016-07-31 12:34:33Z karl $
28-
28+
# SPDX-License-Identifier: GPL-2.0
2929

3030
% Compute reduced log-evidence
3131
%==========================================================================

spm_logdet.m

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
% Karl Friston and Ged Ridgway
1313
% $Id: spm_logdet.m 7975 2020-10-06 14:46:56Z spm $
14+
# SPDX-License-Identifier: GPL-2.0
1415

1516
% Note that whether sparse or full, rank deficient cases are handled in the
1617
% same way as in spm_logdet revision 4068, using svd on a full version of C

0 commit comments

Comments
 (0)