aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-02-28 15:39:53 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:16 +0100
commit0d2fd58266f87fb20aceb017c68b0e455ab4baee (patch)
tree1a6b90357611e45e129fe8041d522aa4f1e77179
parentdf361eb4219d01c450a9b8ef808cf8017bb945fd (diff)
Update geometry files
-rw-r--r--doc/examples/lcls-dec.geom28
-rw-r--r--doc/examples/lcls-june-r0013-r0128.geom28
-rw-r--r--doc/examples/lcls-xpp-estimate.geom14
-rw-r--r--doc/examples/simple.geom28
-rwxr-xr-xscripts/update-geometry76
5 files changed, 132 insertions, 42 deletions
diff --git a/doc/examples/lcls-dec.geom b/doc/examples/lcls-dec.geom
index 9ca0ea58..840796ad 100644
--- a/doc/examples/lcls-dec.geom
+++ b/doc/examples/lcls-dec.geom
@@ -1,24 +1,28 @@
n_panels = 2
; Upper panel
-0/min_x = 0
-0/max_x = 1023
-0/min_y = 512
-0/max_y = 1023
-0/cx = 491.9
-0/cy = 440.7
+0/min_fs = 0
+0/max_fs = 1023
+0/min_ss = 512
+0/max_ss = 1023
+0/corner_x = -491.90
+0/corner_y = 71.30
+0/fs = x
+0/ss = y
0/clen = 67.8e-3
0/res = 13333.3 ; 75 micron pixel size
0/badrow_direction = y
0/peak_sep = 50
; Lower panel
-1/min_x = 0
-1/max_x = 1023
-1/min_y = 0
-1/max_y = 511
-1/cx = 492.0
-1/cy = 779.7
+1/min_fs = 0
+1/max_fs = 1023
+1/min_ss = 0
+1/max_ss = 511
+1/corner_x = -492.00
+1/corner_y = -779.70
+1/fs = x
+1/ss = y
1/clen = 70.8e-3
1/res = 13333.3 ; 75 micron pixel size
1/badrow_direction = y
diff --git a/doc/examples/lcls-june-r0013-r0128.geom b/doc/examples/lcls-june-r0013-r0128.geom
index 73e1ceea..ef217d1a 100644
--- a/doc/examples/lcls-june-r0013-r0128.geom
+++ b/doc/examples/lcls-june-r0013-r0128.geom
@@ -1,24 +1,28 @@
n_panels = 2
; Upper panel (nearest the beam)
-0/min_x = 0
-0/max_x = 1023
-0/min_y = 512
-0/max_y = 1023
-0/cx = 512.9
-0/cy = 459.0
+0/min_fs = 0
+0/max_fs = 1023
+0/min_ss = 512
+0/max_ss = 1023
+0/corner_x = -512.90
+0/corner_y = 53.00
+0/fs = x
+0/ss = y
0/clen = 64.78e-3
0/res = 13333.3 ; 75 micron pixel size
0/badrow_direction = y
0/peak_sep = 50
; Lower panel (furthest from the beam)
-1/min_x = 0
-1/max_x = 1023
-1/min_y = 0
-1/max_y = 511
-1/cx = 519.0
-1/cy = 901.0
+1/min_fs = 0
+1/max_fs = 1023
+1/min_ss = 0
+1/max_ss = 511
+1/corner_x = -519.00
+1/corner_y = -901.00
+1/fs = x
+1/ss = y
1/clen = 67.73e-3
1/res = 13333.3 ; 75 micron pixel size
1/badrow_direction = y
diff --git a/doc/examples/lcls-xpp-estimate.geom b/doc/examples/lcls-xpp-estimate.geom
index 8cef9ce9..7e53d3d9 100644
--- a/doc/examples/lcls-xpp-estimate.geom
+++ b/doc/examples/lcls-xpp-estimate.geom
@@ -1,11 +1,13 @@
n_panels = 1
-0/min_x = 0
-0/max_x = 1455
-0/min_y = 0
-0/max_y = 1455
-0/cx = 727.5
-0/cy = 727.5
+0/min_fs = 0
+0/max_fs = 1455
+0/min_ss = 0
+0/max_ss = 1455
+0/corner_x = -727.50
+0/corner_y = -727.50
+0/fs = x
+0/ss = y
0/clen = 0.08 ; 8 cm camera length
0/res = 9090 ; 110 micron pixel size
0/badrow_direction = x
diff --git a/doc/examples/simple.geom b/doc/examples/simple.geom
index fe14a9d3..aa762b47 100644
--- a/doc/examples/simple.geom
+++ b/doc/examples/simple.geom
@@ -1,23 +1,27 @@
n_panels = 2
; Upper panel
-0/min_x = 0
-0/max_x = 1023
-0/min_y = 512
-0/max_y = 1023
-0/cx = 512.0
-0/cy = 502.0
+0/min_fs = 0
+0/max_fs = 1023
+0/min_ss = 512
+0/max_ss = 1023
+0/corner_x = -512.00
+0/corner_y = 10.00
+0/fs = x
+0/ss = y
0/clen = 50.0e-3
0/res = 13333.3 ; 75 micron pixel size
0/peak_sep = 50
; Lower panel
-1/min_x = 0
-1/max_x = 1023
-1/min_y = 0
-1/max_y = 511
-1/cx = 512.0
-1/cy = 522.0
+1/min_fs = 0
+1/max_fs = 1023
+1/min_ss = 0
+1/max_ss = 511
+1/corner_x = -512.00
+1/corner_y = -522.00
+1/fs = x
+1/ss = y
1/clen = 50.0e-3
1/res = 13333.3 ; 75 micron pixel size
1/peak_sep = 50
diff --git a/scripts/update-geometry b/scripts/update-geometry
new file mode 100755
index 00000000..82f961ba
--- /dev/null
+++ b/scripts/update-geometry
@@ -0,0 +1,76 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+open(FH, $ARGV[0]);
+
+my $done = 0;
+my $cx = 0.0;
+my $cy = 0.0;
+my $pan = 10000000;
+my $min_x;
+my $min_y;
+
+while ( my $line = <FH> ) {
+
+ chomp $line;
+
+ if ( $line =~ /^([0-9]+)\/min_x\ =\ ([0-9,\.\-e]+)$/ ) {
+
+ $pan = $1;
+ $min_x = $2;
+ printf("%i/min_fs = %i\n", $pan, $min_x);
+
+ } elsif ( $line =~ /^([0-9]+)\/min_y\ =\ ([0-9,\.\-e]+)$/ ) {
+
+ if ( $1 != $pan ) {
+ printf(STDERR "Error!\n");
+ exit(1);
+ }
+ $min_y = $2;
+ printf("%i/min_ss = %i\n", $pan, $min_y);
+
+ } elsif ( $line =~ /^([0-9]+)\/max_x\ =\ ([0-9,\.\-e]+)$/ ) {
+
+ if ( $1 != $pan ) {
+ printf(STDERR "Error!\n");
+ exit(1);
+ }
+ printf("%i/max_fs = %i\n", $pan, $2);
+
+ } elsif ( $line =~ /^([0-9]+)\/max_y\ =\ ([0-9,\.\-e]+)$/ ) {
+
+ if ( $1 != $pan ) {
+ printf(STDERR "Error!\n");
+ exit(1);
+ }
+ printf("%i/max_ss = %i\n", $pan, $2);
+
+ } elsif ( $line =~ /^([0-9]+)\/cx\ =\ ([0-9,\.\-e]+)$/ ) {
+
+ $cx = $2;
+ if ( $1 != $pan ) {
+ printf(STDERR "Error!\n");
+ exit(1);
+ }
+
+ } elsif ( $line =~ /^([0-9]+)\/cy\ =\ ([0-9,\.\-e]+)$/ ) {
+
+ $cy = $2;
+ if ( $1 != $pan ) {
+ printf(STDERR "Error!\n");
+ exit(1);
+ }
+
+ printf("%i/corner_x = %5.2f\n", $pan, $min_x - $cx);
+ printf("%i/corner_y = %5.2f\n", $pan, $min_y - $cy);
+ printf("%i/fs = x\n", $pan);
+ printf("%i/ss = y\n", $pan);
+
+ } else {
+ printf("%s\n", $line);
+ }
+
+}
+
+exit($done);