aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-07-21 10:21:19 +0200
committerThomas White <taw@physics.org>2015-07-21 10:21:19 +0200
commit570299b343f0d1ea83c42645db81a335e1322042 (patch)
treef959ec9b9ced973c853b3b5d21c815f57923cd8f /scripts
parent33aa23c9d287ee0a34c445f7625a71d72657c061 (diff)
Add scripts/turbo-index
Diffstat (limited to 'scripts')
-rw-r--r--scripts/turbo-index25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/turbo-index b/scripts/turbo-index
new file mode 100644
index 00000000..7554adcb
--- /dev/null
+++ b/scripts/turbo-index
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+RUN=$1
+NOSAMPLE=`echo $RUN | sed -e 's/\-.*$//'`
+
+GEOM=<name of geometry file>
+
+find <path to CXI files>/$RUN -name '*.cxi' > files-${RUN}.lst
+list_events -i files-${RUN}.lst -g $GEOM -o events-${RUN}.lst
+wc -l events-${RUN}.lst
+rm -f split-events-${RUN}.lst files-${RUN}.lst
+split -d -l 500 events-${RUN}.lst split-events-${RUN}.lst
+rm -f events-${RUN}.lst
+
+for FILE in split-events-${RUN}.lst*; do
+
+ STREAM=`echo $FILE | sed -e "s/split-events-${RUN}.lst/${RUN}.stream/"`
+ NAME=`echo $FILE | sed -e "s/split-events-${RUN}.lst/${NOSAMPLE}-/"`
+ echo "$NAME: $FILE ---> $STREAM"
+
+ bsub -q psanaq -o $NAME.log -J $NAME -n 12 -R "span[hosts=1]" \
+ indexamajig \
+ -i $FILE -o $STREAM -j 32 -g $GEOM --peaks=cxi
+
+