aboutsummaryrefslogtreecommitdiff
path: root/scripts/turbo-index
blob: c11f521ebdd5ed68d21d506a1274d617af36ac8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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

done