aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/examples/cspad-feb2011.geom1088
-rwxr-xr-xscripts/sk_to_crystfel.pl139
2 files changed, 715 insertions, 512 deletions
diff --git a/doc/examples/cspad-feb2011.geom b/doc/examples/cspad-feb2011.geom
index 75fef63f..e6448293 100644
--- a/doc/examples/cspad-feb2011.geom
+++ b/doc/examples/cspad-feb2011.geom
@@ -1,898 +1,962 @@
n_panels = 64
; Quadrant 0, asic 0
-0/min_x = 0
-0/min_y = 0
-0/max_x = 193
-0/max_y = 184
+0/min_fs = 0
+0/min_ss = 0
+0/max_fs = 193
+0/max_ss = 184
0/badrow_direction = -
0/res = 9090.91
0/peak_sep = 6.0
0/clen = 77.0e-3
-0/fs = +x
-0/ss = +y
-0/corner_x = 185.00
-0/corner_y = 0.00
+0/fs = +y
+0/ss = -x
+0/corner_x = 429.39
+0/corner_y = -17.30
+0/no_index = 0
; Quadrant 0, asic 1
-1/min_x = 194
-1/min_y = 0
-1/max_x = 387
-1/max_y = 184
+1/min_fs = 194
+1/min_ss = 0
+1/max_fs = 387
+1/max_ss = 184
1/badrow_direction = -
1/res = 9090.91
1/peak_sep = 6.0
1/clen = 77.0e-3
-1/fs = +x
-1/ss = +y
-1/corner_x = 185.00
-1/corner_y = 199.00
+1/fs = +y
+1/ss = -x
+1/corner_x = 429.39
+1/corner_y = 181.70
+1/no_index = 0
; Quadrant 1, asic 0
-2/min_x = 388
-2/min_y = 0
-2/max_x = 581
-2/max_y = 184
+2/min_fs = 388
+2/min_ss = 0
+2/max_fs = 581
+2/max_ss = 184
2/badrow_direction = -
2/res = 9090.91
2/peak_sep = 6.0
2/clen = 77.0e-3
-2/fs = +y
-2/ss = -x
-2/corner_x = 388.00
-2/corner_y = 0.00
+2/fs = -x
+2/ss = -y
+2/corner_x = 17.36
+2/corner_y = 421.43
+2/no_index = 0
; Quadrant 1, asic 1
-3/min_x = 582
-3/min_y = 0
-3/max_x = 775
-3/max_y = 184
+3/min_fs = 582
+3/min_ss = 0
+3/max_fs = 775
+3/max_ss = 184
3/badrow_direction = -
3/res = 9090.91
3/peak_sep = 6.0
3/clen = 77.0e-3
-3/fs = +y
-3/ss = -x
-3/corner_x = 388.00
-3/corner_y = 199.00
+3/fs = -x
+3/ss = -y
+3/corner_x = -181.64
+3/corner_y = 421.43
+3/no_index = 0
; Quadrant 2, asic 0
-4/min_x = 776
-4/min_y = 0
-4/max_x = 969
-4/max_y = 184
+4/min_fs = 776
+4/min_ss = 0
+4/max_fs = 969
+4/max_ss = 184
4/badrow_direction = -
4/res = 9090.91
4/peak_sep = 6.0
4/clen = 77.0e-3
-4/fs = -x
-4/ss = -y
-4/corner_x = 776.00
-4/corner_y = 393.00
+4/fs = -y
+4/ss = +x
+4/corner_x = -428.12
+4/corner_y = 12.64
+4/no_index = 0
; Quadrant 2, asic 1
-5/min_x = 970
-5/min_y = 0
-5/max_x = 1163
-5/max_y = 184
+5/min_fs = 970
+5/min_ss = 0
+5/max_fs = 1163
+5/max_ss = 184
5/badrow_direction = -
5/res = 9090.91
5/peak_sep = 6.0
5/clen = 77.0e-3
-5/fs = -x
-5/ss = -y
-5/corner_x = 776.00
-5/corner_y = 194.00
+5/fs = -y
+5/ss = +x
+5/corner_x = -428.12
+5/corner_y = -186.36
+5/no_index = 0
; Quadrant 3, asic 0
-6/min_x = 1164
-6/min_y = 0
-6/max_x = 1357
-6/max_y = 184
+6/min_fs = 1164
+6/min_ss = 0
+6/max_fs = 1357
+6/max_ss = 184
6/badrow_direction = -
6/res = 9090.91
6/peak_sep = 6.0
6/clen = 77.0e-3
-6/fs = -y
-6/ss = +x
-6/corner_x = 1557.00
-6/corner_y = 185.00
+6/fs = +x
+6/ss = +y
+6/corner_x = -14.95
+6/corner_y = -426.38
+6/no_index = 0
; Quadrant 3, asic 1
-7/min_x = 1358
-7/min_y = 0
-7/max_x = 1551
-7/max_y = 184
+7/min_fs = 1358
+7/min_ss = 0
+7/max_fs = 1551
+7/max_ss = 184
7/badrow_direction = -
7/res = 9090.91
7/peak_sep = 6.0
7/clen = 77.0e-3
-7/fs = -y
-7/ss = +x
-7/corner_x = 1358.00
-7/corner_y = 185.00
+7/fs = +x
+7/ss = +y
+7/corner_x = 184.05
+7/corner_y = -426.38
+7/no_index = 0
; Quadrant 0, asic 2
-8/min_x = 0
-8/min_y = 185
-8/max_x = 193
-8/max_y = 369
+8/min_fs = 0
+8/min_ss = 185
+8/max_fs = 193
+8/max_ss = 369
8/badrow_direction = -
8/res = 9090.91
8/peak_sep = 6.0
8/clen = 77.0e-3
-8/fs = +x
-8/ss = +y
-8/corner_x = 185.00
-8/corner_y = 185.00
+8/fs = +y
+8/ss = -x
+8/corner_x = 214.99
+8/corner_y = -15.01
+8/no_index = 0
; Quadrant 0, asic 3
-9/min_x = 194
-9/min_y = 185
-9/max_x = 387
-9/max_y = 369
+9/min_fs = 194
+9/min_ss = 185
+9/max_fs = 387
+9/max_ss = 369
9/badrow_direction = -
9/res = 9090.91
9/peak_sep = 6.0
9/clen = 77.0e-3
-9/fs = +x
-9/ss = +y
-9/corner_x = 185.00
-9/corner_y = 384.00
+9/fs = +y
+9/ss = -x
+9/corner_x = 214.99
+9/corner_y = 183.99
+9/no_index = 0
; Quadrant 1, asic 2
-10/min_x = 388
-10/min_y = 185
-10/max_x = 581
-10/max_y = 369
+10/min_fs = 388
+10/min_ss = 185
+10/max_fs = 581
+10/max_ss = 369
10/badrow_direction = -
10/res = 9090.91
10/peak_sep = 6.0
10/clen = 77.0e-3
-10/fs = +y
-10/ss = -x
-10/corner_x = 388.00
-10/corner_y = 185.00
+10/fs = -x
+10/ss = -y
+10/corner_x = 16.59
+10/corner_y = 205.62
+10/no_index = 0
; Quadrant 1, asic 3
-11/min_x = 582
-11/min_y = 185
-11/max_x = 775
-11/max_y = 369
+11/min_fs = 582
+11/min_ss = 185
+11/max_fs = 775
+11/max_ss = 369
11/badrow_direction = -
11/res = 9090.91
11/peak_sep = 6.0
11/clen = 77.0e-3
-11/fs = +y
-11/ss = -x
-11/corner_x = 388.00
-11/corner_y = 384.00
+11/fs = -x
+11/ss = -y
+11/corner_x = -182.41
+11/corner_y = 205.62
+11/no_index = 0
; Quadrant 2, asic 2
-12/min_x = 776
-12/min_y = 185
-12/max_x = 969
-12/max_y = 369
+12/min_fs = 776
+12/min_ss = 185
+12/max_fs = 969
+12/max_ss = 369
12/badrow_direction = -
12/res = 9090.91
12/peak_sep = 6.0
12/clen = 77.0e-3
-12/fs = -x
-12/ss = -y
-12/corner_x = 776.00
-12/corner_y = 578.00
+12/fs = -y
+12/ss = +x
+12/corner_x = -212.64
+12/corner_y = 6.51
+12/no_index = 0
; Quadrant 2, asic 3
-13/min_x = 970
-13/min_y = 185
-13/max_x = 1163
-13/max_y = 369
+13/min_fs = 970
+13/min_ss = 185
+13/max_fs = 1163
+13/max_ss = 369
13/badrow_direction = -
13/res = 9090.91
13/peak_sep = 6.0
13/clen = 77.0e-3
-13/fs = -x
-13/ss = -y
-13/corner_x = 776.00
-13/corner_y = 379.00
+13/fs = -y
+13/ss = +x
+13/corner_x = -212.64
+13/corner_y = -192.49
+13/no_index = 0
; Quadrant 3, asic 2
-14/min_x = 1164
-14/min_y = 185
-14/max_x = 1357
-14/max_y = 369
+14/min_fs = 1164
+14/min_ss = 185
+14/max_fs = 1357
+14/max_ss = 369
14/badrow_direction = -
14/res = 9090.91
14/peak_sep = 6.0
14/clen = 77.0e-3
-14/fs = -y
-14/ss = +x
-14/corner_x = 1557.00
-14/corner_y = 370.00
+14/fs = +x
+14/ss = +y
+14/corner_x = -11.44
+14/corner_y = -212.34
+14/no_index = 0
; Quadrant 3, asic 3
-15/min_x = 1358
-15/min_y = 185
-15/max_x = 1551
-15/max_y = 369
+15/min_fs = 1358
+15/min_ss = 185
+15/max_fs = 1551
+15/max_ss = 369
15/badrow_direction = -
15/res = 9090.91
15/peak_sep = 6.0
15/clen = 77.0e-3
-15/fs = -y
-15/ss = +x
-15/corner_x = 1358.00
-15/corner_y = 370.00
+15/fs = +x
+15/ss = +y
+15/corner_x = 187.56
+15/corner_y = -212.34
+15/no_index = 0
; Quadrant 0, asic 4
-16/min_x = 0
-16/min_y = 370
-16/max_x = 193
-16/max_y = 554
+16/min_fs = 0
+16/min_ss = 370
+16/max_fs = 193
+16/max_ss = 554
16/badrow_direction = -
16/res = 9090.91
16/peak_sep = 6.0
16/clen = 77.0e-3
-16/fs = +y
-16/ss = -x
-16/corner_x = 0.00
-16/corner_y = 370.00
+16/fs = -x
+16/ss = -y
+16/corner_x = 851.64
+16/corner_y = 392.87
+16/no_index = 0
; Quadrant 0, asic 5
-17/min_x = 194
-17/min_y = 370
-17/max_x = 387
-17/max_y = 554
+17/min_fs = 194
+17/min_ss = 370
+17/max_fs = 387
+17/max_ss = 554
17/badrow_direction = -
17/res = 9090.91
17/peak_sep = 6.0
17/clen = 77.0e-3
-17/fs = +y
-17/ss = -x
-17/corner_x = 0.00
-17/corner_y = 569.00
+17/fs = -x
+17/ss = -y
+17/corner_x = 652.64
+17/corner_y = 392.87
+17/no_index = 0
; Quadrant 1, asic 4
-18/min_x = 388
-18/min_y = 370
-18/max_x = 581
-18/max_y = 554
+18/min_fs = 388
+18/min_ss = 370
+18/max_fs = 581
+18/max_ss = 554
18/badrow_direction = -
18/res = 9090.91
18/peak_sep = 6.0
18/clen = 77.0e-3
-18/fs = -x
-18/ss = -y
-18/corner_x = 388.00
-18/corner_y = 763.00
+18/fs = -y
+18/ss = +x
+18/corner_x = -381.23
+18/corner_y = 847.15
+18/no_index = 0
; Quadrant 1, asic 5
-19/min_x = 582
-19/min_y = 370
-19/max_x = 775
-19/max_y = 554
+19/min_fs = 582
+19/min_ss = 370
+19/max_fs = 775
+19/max_ss = 554
19/badrow_direction = -
19/res = 9090.91
19/peak_sep = 6.0
19/clen = 77.0e-3
-19/fs = -x
-19/ss = -y
-19/corner_x = 388.00
-19/corner_y = 564.00
+19/fs = -y
+19/ss = +x
+19/corner_x = -381.23
+19/corner_y = 648.15
+19/no_index = 0
; Quadrant 2, asic 4
-20/min_x = 776
-20/min_y = 370
-20/max_x = 969
-20/max_y = 554
+20/min_fs = 776
+20/min_ss = 370
+20/max_fs = 969
+20/max_ss = 554
20/badrow_direction = -
20/res = 9090.91
20/peak_sep = 6.0
20/clen = 77.0e-3
-20/fs = -y
-20/ss = +x
-20/corner_x = 1169.00
-20/corner_y = 555.00
+20/fs = +x
+20/ss = +y
+20/corner_x = -849.25
+20/corner_y = -383.71
+20/no_index = 0
; Quadrant 2, asic 5
-21/min_x = 970
-21/min_y = 370
-21/max_x = 1163
-21/max_y = 554
+21/min_fs = 970
+21/min_ss = 370
+21/max_fs = 1163
+21/max_ss = 554
21/badrow_direction = -
21/res = 9090.91
21/peak_sep = 6.0
21/clen = 77.0e-3
-21/fs = -y
-21/ss = +x
-21/corner_x = 970.00
-21/corner_y = 555.00
+21/fs = +x
+21/ss = +y
+21/corner_x = -650.25
+21/corner_y = -383.71
+21/no_index = 0
; Quadrant 3, asic 4
-22/min_x = 1164
-22/min_y = 370
-22/max_x = 1357
-22/max_y = 554
+22/min_fs = 1164
+22/min_ss = 370
+22/max_fs = 1357
+22/max_ss = 554
22/badrow_direction = -
22/res = 9090.91
22/peak_sep = 6.0
22/clen = 77.0e-3
-22/fs = +x
-22/ss = +y
-22/corner_x = 1349.00
-22/corner_y = 370.00
+22/fs = +y
+22/ss = -x
+22/corner_x = 389.50
+22/corner_y = -846.40
+22/no_index = 0
; Quadrant 3, asic 5
-23/min_x = 1358
-23/min_y = 370
-23/max_x = 1551
-23/max_y = 554
+23/min_fs = 1358
+23/min_ss = 370
+23/max_fs = 1551
+23/max_ss = 554
23/badrow_direction = -
23/res = 9090.91
23/peak_sep = 6.0
23/clen = 77.0e-3
-23/fs = +x
-23/ss = +y
-23/corner_x = 1349.00
-23/corner_y = 569.00
+23/fs = +y
+23/ss = -x
+23/corner_x = 389.50
+23/corner_y = -647.40
+23/no_index = 0
; Quadrant 0, asic 6
-24/min_x = 0
-24/min_y = 555
-24/max_x = 193
-24/max_y = 739
+24/min_fs = 0
+24/min_ss = 555
+24/max_fs = 193
+24/max_ss = 739
24/badrow_direction = -
24/res = 9090.91
24/peak_sep = 6.0
24/clen = 77.0e-3
-24/fs = +y
-24/ss = -x
-24/corner_x = 0.00
-24/corner_y = 555.00
+24/fs = -x
+24/ss = -y
+24/corner_x = 855.29
+24/corner_y = 180.48
+24/no_index = 0
; Quadrant 0, asic 7
-25/min_x = 194
-25/min_y = 555
-25/max_x = 387
-25/max_y = 739
+25/min_fs = 194
+25/min_ss = 555
+25/max_fs = 387
+25/max_ss = 739
25/badrow_direction = -
25/res = 9090.91
25/peak_sep = 6.0
25/clen = 77.0e-3
-25/fs = +y
-25/ss = -x
-25/corner_x = 0.00
-25/corner_y = 754.00
+25/fs = -x
+25/ss = -y
+25/corner_x = 656.29
+25/corner_y = 180.48
+25/no_index = 0
; Quadrant 1, asic 6
-26/min_x = 388
-26/min_y = 555
-26/max_x = 581
-26/max_y = 739
+26/min_fs = 388
+26/min_ss = 555
+26/max_fs = 581
+26/max_ss = 739
26/badrow_direction = -
26/res = 9090.91
26/peak_sep = 6.0
26/clen = 77.0e-3
-26/fs = -x
-26/ss = -y
-26/corner_x = 388.00
-26/corner_y = 948.00
+26/fs = -y
+26/ss = +x
+26/corner_x = -167.72
+26/corner_y = 848.43
+26/no_index = 0
; Quadrant 1, asic 7
-27/min_x = 582
-27/min_y = 555
-27/max_x = 775
-27/max_y = 739
+27/min_fs = 582
+27/min_ss = 555
+27/max_fs = 775
+27/max_ss = 739
27/badrow_direction = -
27/res = 9090.91
27/peak_sep = 6.0
27/clen = 77.0e-3
-27/fs = -x
-27/ss = -y
-27/corner_x = 388.00
-27/corner_y = 749.00
+27/fs = -y
+27/ss = +x
+27/corner_x = -167.72
+27/corner_y = 649.43
+27/no_index = 0
; Quadrant 2, asic 6
-28/min_x = 776
-28/min_y = 555
-28/max_x = 969
-28/max_y = 739
+28/min_fs = 776
+28/min_ss = 555
+28/max_fs = 969
+28/max_ss = 739
28/badrow_direction = -
28/res = 9090.91
28/peak_sep = 6.0
28/clen = 77.0e-3
-28/fs = -y
-28/ss = +x
-28/corner_x = 1169.00
-28/corner_y = 740.00
+28/fs = +x
+28/ss = +y
+28/corner_x = -847.07
+28/corner_y = -177.93
+28/no_index = 0
; Quadrant 2, asic 7
-29/min_x = 970
-29/min_y = 555
-29/max_x = 1163
-29/max_y = 739
+29/min_fs = 970
+29/min_ss = 555
+29/max_fs = 1163
+29/max_ss = 739
29/badrow_direction = -
29/res = 9090.91
29/peak_sep = 6.0
29/clen = 77.0e-3
-29/fs = -y
-29/ss = +x
-29/corner_x = 970.00
-29/corner_y = 740.00
+29/fs = +x
+29/ss = +y
+29/corner_x = -648.07
+29/corner_y = -177.93
+29/no_index = 0
; Quadrant 3, asic 6
-30/min_x = 1164
-30/min_y = 555
-30/max_x = 1357
-30/max_y = 739
+30/min_fs = 1164
+30/min_ss = 555
+30/max_fs = 1357
+30/max_ss = 739
30/badrow_direction = -
30/res = 9090.91
30/peak_sep = 6.0
30/clen = 77.0e-3
-30/fs = +x
-30/ss = +y
-30/corner_x = 1349.00
-30/corner_y = 555.00
+30/fs = +y
+30/ss = -x
+30/corner_x = 174.81
+30/corner_y = -849.86
+30/no_index = 0
; Quadrant 3, asic 7
-31/min_x = 1358
-31/min_y = 555
-31/max_x = 1551
-31/max_y = 739
+31/min_fs = 1358
+31/min_ss = 555
+31/max_fs = 1551
+31/max_ss = 739
31/badrow_direction = -
31/res = 9090.91
31/peak_sep = 6.0
31/clen = 77.0e-3
-31/fs = +x
-31/ss = +y
-31/corner_x = 1349.00
-31/corner_y = 754.00
+31/fs = +y
+31/ss = -x
+31/corner_x = 174.81
+31/corner_y = -650.86
+31/no_index = 0
; Quadrant 0, asic 8
-32/min_x = 0
-32/min_y = 740
-32/max_x = 193
-32/max_y = 924
+32/min_fs = 0
+32/min_ss = 740
+32/max_fs = 193
+32/max_ss = 924
32/badrow_direction = -
32/res = 9090.91
32/peak_sep = 6.0
32/clen = 77.0e-3
-32/fs = -x
-32/ss = -y
-32/corner_x = 0.00
-32/corner_y = 1133.00
+32/fs = -y
+32/ss = +x
+32/corner_x = 450.39
+32/corner_y = 804.70
+32/no_index = 0
; Quadrant 0, asic 9
-33/min_x = 194
-33/min_y = 740
-33/max_x = 387
-33/max_y = 924
+33/min_fs = 194
+33/min_ss = 740
+33/max_fs = 387
+33/max_ss = 924
33/badrow_direction = -
33/res = 9090.91
33/peak_sep = 6.0
33/clen = 77.0e-3
-33/fs = -x
-33/ss = -y
-33/corner_x = 0.00
-33/corner_y = 934.00
+33/fs = -y
+33/ss = +x
+33/corner_x = 450.39
+33/corner_y = 605.70
+33/no_index = 0
; Quadrant 1, asic 8
-34/min_x = 388
-34/min_y = 740
-34/max_x = 581
-34/max_y = 924
+34/min_fs = 388
+34/min_ss = 740
+34/max_fs = 581
+34/max_ss = 924
34/badrow_direction = -
34/res = 9090.91
34/peak_sep = 6.0
34/clen = 77.0e-3
-34/fs = -y
-34/ss = +x
-34/corner_x = 781.00
-34/corner_y = 925.00
+34/fs = +x
+34/ss = +y
+34/corner_x = -808.26
+34/corner_y = 437.34
+34/no_index = 0
; Quadrant 1, asic 9
-35/min_x = 582
-35/min_y = 740
-35/max_x = 775
-35/max_y = 924
+35/min_fs = 582
+35/min_ss = 740
+35/max_fs = 775
+35/max_ss = 924
35/badrow_direction = -
35/res = 9090.91
35/peak_sep = 6.0
35/clen = 77.0e-3
-35/fs = -y
-35/ss = +x
-35/corner_x = 582.00
-35/corner_y = 925.00
+35/fs = +x
+35/ss = +y
+35/corner_x = -609.26
+35/corner_y = 437.34
+35/no_index = 0
; Quadrant 2, asic 8
-36/min_x = 776
-36/min_y = 740
-36/max_x = 969
-36/max_y = 924
+36/min_fs = 776
+36/min_ss = 740
+36/max_fs = 969
+36/max_ss = 924
36/badrow_direction = -
36/res = 9090.91
36/peak_sep = 6.0
36/clen = 77.0e-3
-36/fs = +x
-36/ss = +y
-36/corner_x = 961.00
-36/corner_y = 740.00
+36/fs = +y
+36/ss = -x
+36/corner_x = -450.89
+36/corner_y = -804.28
+36/no_index = 0
; Quadrant 2, asic 9
-37/min_x = 970
-37/min_y = 740
-37/max_x = 1163
-37/max_y = 924
+37/min_fs = 970
+37/min_ss = 740
+37/max_fs = 1163
+37/max_ss = 924
37/badrow_direction = -
37/res = 9090.91
37/peak_sep = 6.0
37/clen = 77.0e-3
-37/fs = +x
-37/ss = +y
-37/corner_x = 961.00
-37/corner_y = 939.00
+37/fs = +y
+37/ss = -x
+37/corner_x = -450.89
+37/corner_y = -605.28
+37/no_index = 0
; Quadrant 3, asic 8
-38/min_x = 1164
-38/min_y = 740
-38/max_x = 1357
-38/max_y = 924
+38/min_fs = 1164
+38/min_ss = 740
+38/max_fs = 1357
+38/max_ss = 924
38/badrow_direction = -
38/res = 9090.91
38/peak_sep = 6.0
38/clen = 77.0e-3
-38/fs = +y
-38/ss = -x
-38/corner_x = 1164.00
-38/corner_y = 740.00
+38/fs = -x
+38/ss = -y
+38/corner_x = 799.39
+38/corner_y = -440.30
+38/no_index = 0
; Quadrant 3, asic 9
-39/min_x = 1358
-39/min_y = 740
-39/max_x = 1551
-39/max_y = 924
+39/min_fs = 1358
+39/min_ss = 740
+39/max_fs = 1551
+39/max_ss = 924
39/badrow_direction = -
39/res = 9090.91
39/peak_sep = 6.0
39/clen = 77.0e-3
-39/fs = +y
-39/ss = -x
-39/corner_x = 1164.00
-39/corner_y = 939.00
+39/fs = -x
+39/ss = -y
+39/corner_x = 600.39
+39/corner_y = -440.30
+39/no_index = 0
; Quadrant 0, asic 10
-40/min_x = 0
-40/min_y = 925
-40/max_x = 193
-40/max_y = 1109
+40/min_fs = 0
+40/min_ss = 925
+40/max_fs = 193
+40/max_ss = 1109
40/badrow_direction = -
40/res = 9090.91
40/peak_sep = 6.0
40/clen = 77.0e-3
-40/fs = -x
-40/ss = -y
-40/corner_x = 0.00
-40/corner_y = 1318.00
+40/fs = -y
+40/ss = +x
+40/corner_x = 642.39
+40/corner_y = 876.70
+40/no_index = 0
; Quadrant 0, asic 11
-41/min_x = 194
-41/min_y = 925
-41/max_x = 387
-41/max_y = 1109
+41/min_fs = 194
+41/min_ss = 925
+41/max_fs = 387
+41/max_ss = 1109
41/badrow_direction = -
41/res = 9090.91
41/peak_sep = 6.0
41/clen = 77.0e-3
-41/fs = -x
-41/ss = -y
-41/corner_x = 0.00
-41/corner_y = 1119.00
+41/fs = -y
+41/ss = +x
+41/corner_x = 642.39
+41/corner_y = 677.70
+41/no_index = 0
; Quadrant 1, asic 10
-42/min_x = 388
-42/min_y = 925
-42/max_x = 581
-42/max_y = 1109
+42/min_fs = 388
+42/min_ss = 925
+42/max_fs = 581
+42/max_ss = 1109
42/badrow_direction = -
42/res = 9090.91
42/peak_sep = 6.0
42/clen = 77.0e-3
-42/fs = -y
-42/ss = +x
-42/corner_x = 781.00
-42/corner_y = 1110.00
+42/fs = +x
+42/ss = +y
+42/corner_x = -809.61
+42/corner_y = 647.70
+42/no_index = 0
; Quadrant 1, asic 11
-43/min_x = 582
-43/min_y = 925
-43/max_x = 775
-43/max_y = 1109
+43/min_fs = 582
+43/min_ss = 925
+43/max_fs = 775
+43/max_ss = 1109
43/badrow_direction = -
43/res = 9090.91
43/peak_sep = 6.0
43/clen = 77.0e-3
-43/fs = -y
-43/ss = +x
-43/corner_x = 582.00
-43/corner_y = 1110.00
+43/fs = +x
+43/ss = +y
+43/corner_x = -610.61
+43/corner_y = 647.70
+43/no_index = 0
; Quadrant 2, asic 10
-44/min_x = 776
-44/min_y = 925
-44/max_x = 969
-44/max_y = 1109
+44/min_fs = 776
+44/min_ss = 925
+44/max_fs = 969
+44/max_ss = 1109
44/badrow_direction = -
44/res = 9090.91
44/peak_sep = 6.0
44/clen = 77.0e-3
-44/fs = +x
-44/ss = +y
-44/corner_x = 961.00
-44/corner_y = 925.00
+44/fs = +y
+44/ss = -x
+44/corner_x = -657.61
+44/corner_y = -788.30
+44/no_index = 0
; Quadrant 2, asic 11
-45/min_x = 970
-45/min_y = 925
-45/max_x = 1163
-45/max_y = 1109
+45/min_fs = 970
+45/min_ss = 925
+45/max_fs = 1163
+45/max_ss = 1109
45/badrow_direction = -
45/res = 9090.91
45/peak_sep = 6.0
45/clen = 77.0e-3
-45/fs = +x
-45/ss = +y
-45/corner_x = 961.00
-45/corner_y = 1124.00
+45/fs = +y
+45/ss = -x
+45/corner_x = -657.61
+45/corner_y = -589.30
+45/no_index = 0
; Quadrant 3, asic 10
-46/min_x = 1164
-46/min_y = 925
-46/max_x = 1357
-46/max_y = 1109
+46/min_fs = 1164
+46/min_ss = 925
+46/max_fs = 1357
+46/max_ss = 1109
46/badrow_direction = -
46/res = 9090.91
46/peak_sep = 6.0
46/clen = 77.0e-3
-46/fs = +y
-46/ss = -x
-46/corner_x = 1164.00
-46/corner_y = 925.00
+46/fs = -x
+46/ss = -y
+46/corner_x = 793.39
+46/corner_y = -655.30
+46/no_index = 0
; Quadrant 3, asic 11
-47/min_x = 1358
-47/min_y = 925
-47/max_x = 1551
-47/max_y = 1109
+47/min_fs = 1358
+47/min_ss = 925
+47/max_fs = 1551
+47/max_ss = 1109
47/badrow_direction = -
47/res = 9090.91
47/peak_sep = 6.0
47/clen = 77.0e-3
-47/fs = +y
-47/ss = -x
-47/corner_x = 1164.00
-47/corner_y = 1124.00
+47/fs = -x
+47/ss = -y
+47/corner_x = 594.39
+47/corner_y = -655.30
+47/no_index = 0
; Quadrant 0, asic 12
-48/min_x = 0
-48/min_y = 1110
-48/max_x = 193
-48/max_y = 1294
+48/min_fs = 0
+48/min_ss = 1110
+48/max_fs = 193
+48/max_ss = 1294
48/badrow_direction = -
48/res = 9090.91
48/peak_sep = 6.0
48/clen = 77.0e-3
-48/fs = +y
-48/ss = -x
-48/corner_x = 0.00
-48/corner_y = 1110.00
+48/fs = -x
+48/ss = -y
+48/corner_x = 417.94
+48/corner_y = 793.20
+48/no_index = 0
; Quadrant 0, asic 13
-49/min_x = 194
-49/min_y = 1110
-49/max_x = 387
-49/max_y = 1294
+49/min_fs = 194
+49/min_ss = 1110
+49/max_fs = 387
+49/max_ss = 1294
49/badrow_direction = -
49/res = 9090.91
49/peak_sep = 6.0
49/clen = 77.0e-3
-49/fs = +y
-49/ss = -x
-49/corner_x = 0.00
-49/corner_y = 1309.00
+49/fs = -x
+49/ss = -y
+49/corner_x = 218.94
+49/corner_y = 793.20
+49/no_index = 0
; Quadrant 1, asic 12
-50/min_x = 388
-50/min_y = 1110
-50/max_x = 581
-50/max_y = 1294
+50/min_fs = 388
+50/min_ss = 1110
+50/max_fs = 581
+50/max_ss = 1294
50/badrow_direction = -
50/res = 9090.91
50/peak_sep = 6.0
50/clen = 77.0e-3
-50/fs = -x
-50/ss = -y
-50/corner_x = 388.00
-50/corner_y = 1503.00
+50/fs = -y
+50/ss = +x
+50/corner_x = -783.68
+50/corner_y = 411.77
+50/no_index = 0
; Quadrant 1, asic 13
-51/min_x = 582
-51/min_y = 1110
-51/max_x = 775
-51/max_y = 1294
+51/min_fs = 582
+51/min_ss = 1110
+51/max_fs = 775
+51/max_ss = 1294
51/badrow_direction = -
51/res = 9090.91
51/peak_sep = 6.0
51/clen = 77.0e-3
-51/fs = -x
-51/ss = -y
-51/corner_x = 388.00
-51/corner_y = 1304.00
+51/fs = -y
+51/ss = +x
+51/corner_x = -783.68
+51/corner_y = 212.77
+51/no_index = 0
; Quadrant 2, asic 12
-52/min_x = 776
-52/min_y = 1110
-52/max_x = 969
-52/max_y = 1294
+52/min_fs = 776
+52/min_ss = 1110
+52/max_fs = 969
+52/max_ss = 1294
52/badrow_direction = -
52/res = 9090.91
52/peak_sep = 6.0
52/clen = 77.0e-3
-52/fs = -y
-52/ss = +x
-52/corner_x = 1169.00
-52/corner_y = 1295.00
+52/fs = +x
+52/ss = +y
+52/corner_x = -433.03
+52/corner_y = -788.57
+52/no_index = 0
; Quadrant 2, asic 13
-53/min_x = 970
-53/min_y = 1110
-53/max_x = 1163
-53/max_y = 1294
+53/min_fs = 970
+53/min_ss = 1110
+53/max_fs = 1163
+53/max_ss = 1294
53/badrow_direction = -
53/res = 9090.91
53/peak_sep = 6.0
53/clen = 77.0e-3
-53/fs = -y
-53/ss = +x
-53/corner_x = 970.00
-53/corner_y = 1295.00
+53/fs = +x
+53/ss = +y
+53/corner_x = -234.03
+53/corner_y = -788.57
+53/no_index = 0
; Quadrant 3, asic 12
-54/min_x = 1164
-54/min_y = 1110
-54/max_x = 1357
-54/max_y = 1294
+54/min_fs = 1164
+54/min_ss = 1110
+54/max_fs = 1357
+54/max_ss = 1294
54/badrow_direction = -
54/res = 9090.91
54/peak_sep = 6.0
54/clen = 77.0e-3
-54/fs = +x
-54/ss = +y
-54/corner_x = 1349.00
-54/corner_y = 1110.00
+54/fs = +y
+54/ss = -x
+54/corner_x = 835.39
+54/corner_y = -395.30
+54/no_index = 0
; Quadrant 3, asic 13
-55/min_x = 1358
-55/min_y = 1110
-55/max_x = 1551
-55/max_y = 1294
+55/min_fs = 1358
+55/min_ss = 1110
+55/max_fs = 1551
+55/max_ss = 1294
55/badrow_direction = -
55/res = 9090.91
55/peak_sep = 6.0
55/clen = 77.0e-3
-55/fs = +x
-55/ss = +y
-55/corner_x = 1349.00
-55/corner_y = 1309.00
+55/fs = +y
+55/ss = -x
+55/corner_x = 835.39
+55/corner_y = -196.30
+55/no_index = 0
; Quadrant 0, asic 14
-56/min_x = 0
-56/min_y = 1295
-56/max_x = 193
-56/max_y = 1479
+56/min_fs = 0
+56/min_ss = 1295
+56/max_fs = 193
+56/max_ss = 1479
56/badrow_direction = -
56/res = 9090.91
56/peak_sep = 6.0
56/clen = 77.0e-3
-56/fs = +y
-56/ss = -x
-56/corner_x = 0.00
-56/corner_y = 1295.00
+56/fs = -x
+56/ss = -y
+56/corner_x = 425.57
+56/corner_y = 578.42
+56/no_index = 0
; Quadrant 0, asic 15
-57/min_x = 194
-57/min_y = 1295
-57/max_x = 387
-57/max_y = 1479
+57/min_fs = 194
+57/min_ss = 1295
+57/max_fs = 387
+57/max_ss = 1479
57/badrow_direction = -
57/res = 9090.91
57/peak_sep = 6.0
57/clen = 77.0e-3
-57/fs = +y
-57/ss = -x
-57/corner_x = 0.00
-57/corner_y = 1494.00
+57/fs = -x
+57/ss = -y
+57/corner_x = 226.57
+57/corner_y = 578.42
+57/no_index = 0
; Quadrant 1, asic 14
-58/min_x = 388
-58/min_y = 1295
-58/max_x = 581
-58/max_y = 1479
+58/min_fs = 388
+58/min_ss = 1295
+58/max_fs = 581
+58/max_ss = 1479
58/badrow_direction = -
58/res = 9090.91
58/peak_sep = 6.0
58/clen = 77.0e-3
-58/fs = -x
-58/ss = -y
-58/corner_x = 388.00
-58/corner_y = 1688.00
+58/fs = -y
+58/ss = +x
+58/corner_x = -572.18
+58/corner_y = 418.35
+58/no_index = 0
; Quadrant 1, asic 15
-59/min_x = 582
-59/min_y = 1295
-59/max_x = 775
-59/max_y = 1479
+59/min_fs = 582
+59/min_ss = 1295
+59/max_fs = 775
+59/max_ss = 1479
59/badrow_direction = -
59/res = 9090.91
59/peak_sep = 6.0
59/clen = 77.0e-3
-59/fs = -x
-59/ss = -y
-59/corner_x = 388.00
-59/corner_y = 1489.00
+59/fs = -y
+59/ss = +x
+59/corner_x = -572.18
+59/corner_y = 219.35
+59/no_index = 0
; Quadrant 2, asic 14
-60/min_x = 776
-60/min_y = 1295
-60/max_x = 969
-60/max_y = 1479
+60/min_fs = 776
+60/min_ss = 1295
+60/max_fs = 969
+60/max_ss = 1479
60/badrow_direction = -
60/res = 9090.91
60/peak_sep = 6.0
60/clen = 77.0e-3
-60/fs = -y
-60/ss = +x
-60/corner_x = 1169.00
-60/corner_y = 1480.00
+60/fs = +x
+60/ss = +y
+60/corner_x = -415.37
+60/corner_y = -581.60
+60/no_index = 0
; Quadrant 2, asic 15
-61/min_x = 970
-61/min_y = 1295
-61/max_x = 1163
-61/max_y = 1479
+61/min_fs = 970
+61/min_ss = 1295
+61/max_fs = 1163
+61/max_ss = 1479
61/badrow_direction = -
61/res = 9090.91
61/peak_sep = 6.0
61/clen = 77.0e-3
-61/fs = -y
-61/ss = +x
-61/corner_x = 970.00
-61/corner_y = 1480.00
+61/fs = +x
+61/ss = +y
+61/corner_x = -216.37
+61/corner_y = -581.60
+61/no_index = 0
; Quadrant 3, asic 14
-62/min_x = 1164
-62/min_y = 1295
-62/max_x = 1357
-62/max_y = 1479
+62/min_fs = 1164
+62/min_ss = 1295
+62/max_fs = 1357
+62/max_ss = 1479
62/badrow_direction = -
62/res = 9090.91
62/peak_sep = 6.0
62/clen = 77.0e-3
-62/fs = +x
-62/ss = +y
-62/corner_x = 1349.00
-62/corner_y = 1295.00
+62/fs = +y
+62/ss = -x
+62/corner_x = 577.59
+62/corner_y = -426.89
+62/no_index = 0
; Quadrant 3, asic 15
-63/min_x = 1358
-63/min_y = 1295
-63/max_x = 1551
-63/max_y = 1479
+63/min_fs = 1358
+63/min_ss = 1295
+63/max_fs = 1551
+63/max_ss = 1479
63/badrow_direction = -
63/res = 9090.91
63/peak_sep = 6.0
63/clen = 77.0e-3
-63/fs = +x
-63/ss = +y
-63/corner_x = 1349.00
-63/corner_y = 1494.00
+63/fs = +y
+63/ss = -x
+63/corner_x = 577.59
+63/corner_y = -227.89
+63/no_index = 0
diff --git a/scripts/sk_to_crystfel.pl b/scripts/sk_to_crystfel.pl
new file mode 100755
index 00000000..d0dd0f4f
--- /dev/null
+++ b/scripts/sk_to_crystfel.pl
@@ -0,0 +1,139 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+open(ROT, "< rotations.lst");
+open(COORD, "< coords.dat");
+open(OUT, "> cspad-feb2011.geom");
+
+my $quadrant = 0;
+printf(OUT "n_panels = 64\n\n");
+my $x = 0;
+my $y = 0;
+my $p = 0;
+
+my $global_x = 0.0;
+my $global_y = 0.0;
+
+while ( my $coord = <COORD> ) {
+
+ my $rot = <ROT>;
+ my $cx = 0.0;
+ my $cy = 0.0;
+ my $minx = $x*194;
+ my $miny = $y*185;
+ my $sc1;
+ my $sc2;
+
+ chomp $coord;
+ chomp $rot;
+
+ if ( $coord =~ /\(([0-9\.\-]+),\s([0-9\.\-]+)\)/ ) {
+ $sc1 = $1;
+ $sc2 = $2;
+ printf("%f %f\n", $sc1, $sc2);
+
+ } else {
+ printf("!!!\n");
+ }
+
+ my $a = 388.0; # Fast scan
+ my $b = 185.0; # Slow scan
+
+ # FIXME: Remove the $b for versions of Stephan's code after 20th Feb
+ $sc1 -= (1308.696-$b);
+ $sc2 -= (980.3862-$b);
+
+ my $sx = -$sc2;
+ my $sy = -$sc1;
+
+ printf(OUT "; Quadrant %i, asic %i\n", $quadrant, ($x%2)+2*$y);
+ printf(OUT "%i/min_fs = %i\n", $p, $minx);
+ printf(OUT "%i/min_ss = %i\n", $p, $miny);
+ printf(OUT "%i/max_fs = %i\n", $p, ($x+1)*194-1);
+ printf(OUT "%i/max_ss = %i\n", $p, ($y+1)*185-1);
+ printf(OUT "%i/badrow_direction = -\n", $p);
+ printf(OUT "%i/res = 9090.91\n", $p);
+ printf(OUT "%i/peak_sep = 6.0\n", $p);
+ printf(OUT "%i/clen = 77.0e-3\n", $p);
+ if ( $rot == "0" ) {
+ printf(OUT "%i/fs = -x\n", $p);
+ printf(OUT "%i/ss = -y\n", $p);
+ $cx = $sx;
+ $cy = $sy;
+ } elsif ( $rot == "90" ) {
+ printf(OUT "%i/fs = +y\n", $p);
+ printf(OUT "%i/ss = -x\n", $p);
+ $cx = $sx;
+ $cy = $sy - $a - 5.0;
+ } elsif ( $rot == "180" ) {
+ printf(OUT "%i/fs = +x\n", $p);
+ printf(OUT "%i/ss = +y\n", $p);
+ $cx = $sx - $a - 5.0;
+ $cy = $sy - $b;
+ } elsif ( $rot == "270" ) {
+ printf(OUT "%i/fs = -y\n", $p);
+ printf(OUT "%i/ss = +x\n", $p);
+ $cx = $sx - $b;
+ $cy = $sy;
+ }
+ printf(OUT "%i/corner_x = %5.2f\n", $p, $cx+$global_x);
+ printf(OUT "%i/corner_y = %5.2f\n", $p, $cy+$global_y);
+ printf(OUT "%i/no_index = 0\n", $p);
+ printf(OUT "\n");
+ #if ( ($y < 20) && ($x < 1) ) {
+ printf(STDERR "%f %f %f %f\n", $cx, $cy, $sc1, $sc2);
+ #}
+ $x++;
+ $p++;
+
+ printf(OUT "; Quadrant %i, asic %i\n", $quadrant, ($x%2)+2*$y);
+ printf(OUT "%i/min_fs = %i\n", $p, $x*194);
+ printf(OUT "%i/min_ss = %i\n", $p, $y*185);
+ printf(OUT "%i/max_fs = %i\n", $p, ($x+1)*194-1);
+ printf(OUT "%i/max_ss = %i\n", $p, ($y+1)*185-1);
+ printf(OUT "%i/badrow_direction = -\n", $p);
+ printf(OUT "%i/res = 9090.91\n", $p);
+ printf(OUT "%i/peak_sep = 6.0\n", $p);
+ printf(OUT "%i/clen = 77.0e-3\n", $p);
+ if ( $rot == "0" ) {
+ printf(OUT "%i/fs = -x\n", $p);
+ printf(OUT "%i/ss = -y\n", $p);
+ $cx = $sx - $a/2.0 - 5.0;
+ $cy = $sy;
+ } elsif ( $rot == "90" ) {
+ printf(OUT "%i/fs = +y\n", $p);
+ printf(OUT "%i/ss = -x\n", $p);
+ $cx = $sx;
+ $cy = $sy - $a/2.0;
+ } elsif ( $rot == "180" ) {
+ printf(OUT "%i/fs = +x\n", $p);
+ printf(OUT "%i/ss = +y\n", $p);
+ $cx = $sx - $a/2.0;
+ $cy = $sy - $b;
+ } elsif ( $rot == "270" ) {
+ printf(OUT "%i/fs = -y\n", $p);
+ printf(OUT "%i/ss = +x\n", $p);
+ $cx = $sx - $b;
+ $cy = $sy - $a/2.0 - 5.0;
+ }
+ printf(OUT "%i/corner_x = %5.2f\n", $p, $cx+$global_x);
+ printf(OUT "%i/corner_y = %5.2f\n", $p, $cy+$global_y);
+ printf(OUT "%i/no_index = 0\n", $p);
+ printf(OUT "\n");
+ #if ( ($y < 20) && ($x < 1) ) {
+ printf(STDERR "%f %f %f %f\n", $cx, $cy, $sc1, $sc2);
+ #}
+ $x++;
+ $p++;
+
+ if ( $x == 8 ) {
+ $x = 0;
+ $y++;
+ }
+
+ $quadrant++;
+ if ( $quadrant == 4 ) {
+ $quadrant = 0;
+ }
+}