addpath ~/no-backup/psurg/src/packages/Simulation/Graven/

version = 'v1.14';
fileDate = '6May2004';

seed = 123;

% Mode 1
rand('state', seed);
mode1 = makelist('../testrand.txt');
readme_mode1 = ['makelist ' version ', rand(''state'', 123); mode1=makelist(''../testrand.txt'')'];

% Mode 2

N = 10;
rand('state', seed);
mode2 = makelist(N, '../testrand.txt');
readme_mode2 = ['makelist ' version ', rand(''state'', 123); mode2=makelist(10,''../testrand.txt'')'];

% Mode 3

rand('state', seed);
mode3H1 = makelist('../testopt.txt', 'H1');
rand('state', seed);
mode3H2 = makelist('../testopt.txt', 'H2');
rand('state', seed);
mode3L1 = makelist('../testopt.txt', 'L1');
readme_mode3 = ['makelist ' version ', rand(''state'', 123); mode3<detId>=makelist(''../testrand.txt'',<detId>)'];

% Mode 4
rand('state', seed);
mode4H1 = makelist(N, '../testopt.txt', 'H1');
rand('state', seed);
mode4H2 = makelist(N, '../testopt.txt', 'H2');
rand('state', seed);
mode4L1 = makelist(N, '../testopt.txt', 'L1');
readme_mode4 = ['makelist ' version ', rand(''state'', 123); mode4<detId>=makelist(10,''../testrand.txt'',<detId>)'];

% Mode 5

Internal.x = 1;
Internal.phi = 2;

External.x = 0;
External.phi = 0.5;
External.psi = 1;

internal = [1, 2];
external = [0, 0.5, 1];

amplA = 1e-21;
amplB = [1e-23, 1e-19];
amplC = [1e-23, 1e-20, 1e-19];

simId = 'SINC_100_0.01_0.2';
startSamp = [1, 2];

rand('state', seed);
mode5a = makelist(N,simId,amplA,startSamp,'optimal','random');
rand('state', seed);
mode5b = makelist(N,simId,amplB,startSamp,internal,external);
rand('state', seed);
mode5c = makelist(N,simId,amplC,startSamp,Internal,External);
readme_mode5 = ['makelist ' version ', rand(''state'', 123); mode<a,b,c>=(10,''SINC_100_0.01_0.2'',ampl<A,B,C>,startSamp,<''optimal'',internal,Internal>,<''random'',external,External>)'];

% Mode 6

rand('state', seed);
mode6H1 = makelist(N,simId,amplA,startSamp,'optimal','optimal','H1');
rand('state', seed);
mode6H2 = makelist(N,simId,amplA,startSamp,'optimal','optimal','H2');
rand('state', seed);
mode6L1 = makelist(N,simId,amplA,startSamp,'optimal','optimal','L1');
readme_mode6 = ['makelist ' version ', rand(''state'', 123); mode6<detId>=makelist(N,simId,amplA,startSamp,''optimal'',''optimal'',<detId>)'];

eval(['save makelistData' fileDate ' seed mode1 readme_mode1 N mode2 readme_mode2 mode3H1 mode3H2 mode3L1 readme_mode3 ' ...
'mode4H1 mode4H2 mode4L1 readme_mode4 Internal External internal external amplA amplB amplC simId startSamp ' ...
'mode5a mode5b mode5c readme_mode5 mode6H1 mode6H2 mode6L1 readme_mode6'])