entries0=1282; valmin0=39; valmax0=144;pin0=[
-32;	-32;	-32;	-32;	-32;	-31;	-32;	-32;	-33;	-33
-33;	-34;	-34;	-34;	-35;	-35;	-35;	-36;	-36;	-35
-36;	-36;	-36;	-36;	-36;	-37;	-37;	-37;	-37;	-37
-37;	-38;	-37;	-38;	-38;	-37;	-38;	-38;	-38;	-38
-36;	-32;	-26;	-19;	-6;	17;	24;	29;	32;	34
35;	36;	36;	37;	37;	37;	37;	37;	37;	37
37;	37;	37;	37;	37;	37;	36;	37;	36;	36
36;	36;	36;	36;	35;	35;	35;	35;	35;	34
34;	34;	33;	34;	34;	33;	33;	32;	32;	32
32;	31;	31;	31;	31;	30;	30;	30;	30;	30
29;	30;	29;	29;	29;	28;	28;	28;	28;	27
27;	27;	27;	26;	26;	26;	26;	26;	25;	25
25;	25;	24;	24;	24;	24;	23;	22;	22;	22
21;	21;	21;	21;	20;	21;	20;	19;	19;	20
20;	20;	19;	19;	19;	18;	19;	18;	16;	16
16;	14;	14;	14;	13;	14;	14;	14;	13;	14
14;	12;	11;	11;	9;	8;	7;	3;	-5;	-3
-4;	-5;	1;	1;	-1;	-2;	4;	4;	4;	4
4;	4;	4;	4;	-3;	4;	4;	7;	7;	7
7;	7;	4;	4;	4;	-6;	-6;	-6;	-6;	-6
-3;	-8;	-8;	-6;	-6;	-6;	-6;	-3;	-2;	4
5;	5;	5;	5;	5;	-2;	-6;	-6;	-6;	-6
-2;	-1;	-1;	5;	5;	7;	7;	7;	5;	5
5;	-2;	-2;	-6;	-8;	-8;	-8;	-8;	-8;	-8
-8;	-5;	-1;	1;	0;	-5;	-5;	-5;	-1;	-1
-1;	1;	-1;	5;	5;	5;	5;	5;	-2;	-1
5;	5;	5;	7;	5;	5;	7;	8;	8;	5
5;	0;	0;	5;	1;	2;	6;	6;	6;	5
1;	-5;	1;	6;	-5;	-4;	-4;	-4;	6;	2
-4;	-4;	3;	6;	6;	6;	3;	6;	1;	1
-1;	-2;	-2;	5;	5;	6;	5;	5;	5;	4
4;	7;	7;	7;	7;	4;	-3;	-3;	-6;	-8
-10;	-8;	-8;	-7;	-4;	-4;	3;	6;	6;	3
2;	2;	-5;	-5;	-8;	-8;	-5;	-5;	-1;	-2
-3;	-6;	-3;	-2;	-2;	5;	-3;	-3;	-6;	-4
-6;	-6;	-6;	-8;	-8;	-9;	-7;	-7;	-7;	-7
-4;	4;	6;	6;	6;	2;	6;	8;	8;	8
8;	8;	9;	7;	5;	5;	5;	6;	5;	5
-2;	-3;	-2;	-2;	-5;	-5;	-6;	-6;	-6;	-3
-3;	-3;	5;	5;	4;	-3;	-7;	-9;	-9;	-9
-8;	-8;	-9;	-7;	2;	2;	2;	0;	-6;	-3
-5;	-6;	-7;	-8;	-8;	-9;	-8;	-9;	-10;	-10
-13;	-13;	-13;	-14;	-14;	-14;	-15;	-15;	-16;	-17
-18;	-18;	-17;	-18;	-19;	-19;	-19;	-19;	-19;	-19
-19;	-19;	-19;	-20;	-21;	-21;	-22;	-22;	-22;	-23
-23;	-23;	-23;	-23;	-23;	-23;	-23;	-23;	-23;	-24
-24;	-24;	-24;	-25;	-26;	-25;	-25;	-26;	-27;	-27
-28;	-27;	-27;	-28;	-28;	-29;	-29;	-29;	-29;	-29
-30;	-30;	-30;	-30;	-30;	-31;	-31;	-31;	-31;	-31
-32;	-32;	];
entries1=1283; valmin1=99; valmax1=117;pin1=[
-30;	-30;	-30;	-31;	-31;	-32;	-32;	-32;	-32;	-32
-32;	-32;	-32;	-32;	-32;	-33;	-33;	-33;	-33;	-33
-33;	-33;	-34;	-34;	-35;	-35;	-35;	-36;	-36;	-36
-37;	-37;	-36;	-37;	-37;	-37;	-37;	-37;	-37;	-37
-35;	-32;	-27;	-21;	-14;	10;	19;	26;	30;	32
33;	34;	34;	34;	34;	35;	35;	35;	35;	35
35;	35;	34;	35;	35;	35;	35;	35;	34;	34
34;	33;	33;	33;	33;	33;	33;	33;	32;	32
32;	31;	31;	31;	30;	30;	30;	30;	31;	31
31;	31;	30;	30;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-5;	-8;	-8;	-10;	-10;	-8;	-6;	-5
-8;	-6;	-7;	-6;	-6;	-7;	-10;	-10;	-9;	-10
-10;	-11;	-11;	-13;	-14;	-15;	-16;	-17;	-16;	-17
-19;	-17;	-17;	-16;	-17;	-16;	-17;	-17;	-16;	-17
-19;	-19;	-19;	-20;	-19;	-19;	-20;	-20;	-20;	-20
-20;	-20;	-21;	-21;	-21;	-21;	-22;	-22;	-22;	-23
-24;	-24;	-25;	-25;	-25;	-26;	-26;	-26;	-26;	-26
-27;	-26;	-26;	-27;	-28;	-28;	-28;	-28;	-28;	-29
-28;	-29;	-29;	-29;	-29;	-29;	-29;	-30;	-30;	-30
-30;	-30;	];
close all;
 entries=[entries0,entries1]; dumpval=[pin0,pin1];
 for f=1:2
  cs=dumpval(:,f); cs=shift(cs,-mod(entries(f),length(cs)));
  cs=sign(cs).*cs.*cs;  [f,min(cs),max(cs)]
  figure(f); stairs(sintv*(1:length(cs)),cs);
  title(sprintf("pin %d",f-1)); grid on;
endfor
