source: trunk/DataCheck/Processing/RunStar.sh@ 18253

Last change on this file since 18253 was 17891, checked in by Daniela Dorner, 10 years ago
using new image cleaning
  • Property svn:executable set to *
File size: 2.2 KB
Line 
1#!/bin/bash
2#
3
4source `dirname $0`/../Sourcefile.sh
5printprocesslog "INFO starting $0"
6program=RunStar
7step=Star
8
9set -C
10
11for (( i=0; i<100; i++ ))
12do
13 # get todo list
14 gettodo "1"
15
16 # get all needed variables
17 night=${primaries[0]}
18 seqid=${primaries[1]}
19 nightpath=`echo $night | cut -c 1-4`"/"`echo $night | cut -c 5-6`"/"`echo $night | cut -c 7-8`
20 seqnum=$night"_"`printf %03d $seqid`
21
22 # check if script is already running
23 lockfile=$lockpath"/lock-"$program"-"$seqnum".txt"
24 checklock continue
25 printprocesslog "INFO got todo with try #"$i
26 break
27done
28
29# get all needed paths and files
30seqfile=$seqpath"/"$nightpath"/"$seqnum".seq"
31inpath=$datapath"/callisto/"$nightpath
32outpath=$datapath"/star/"$nightpath
33makedir $outpath
34logfile=$outpath"/"$seqnum"-images.log"
35
36cd $mars
37
38# run star
39printprocesslog "INFO starting star.C for sequence "$seqnum
40setstatus "start"
41
42#check1=`root -q -b fact/star.C\("\"$seqfile\""\,7.5\,3.9\,"\"$inpath\""\,"\"$outpath\""\) | tee $logfile | intgrep`
43# new cleaning levels starting from version 2012.06.22
44#check1=`root -q -b fact/analysis/star.C\("\"$seqfile\""\,4.0\,2.5\,"\"$inpath\""\,"\"$outpath\""\) | tee $logfile | intgrep`
45# new cleaning levels for the new calibration
46#check1=`root -q -b fact/analysis/star.C\("\"$seqfile\""\,5.2\,3.3\,"\"$inpath\""\,"\"$outpath\""\) | tee $logfile | intgrep`
47# new cleaning
48check1=`root -q -b fact/analysis/star.C\("\"$seqfile\""\,"\"$inpath\""\,"\"$outpath\""\) | tee $logfile | intgrep`
49
50case $check1 in
51 0) printprocesslog "INFO star was successful for sequence "$seqnum" (check1=$check1)"
52 ;;
53 *) printprocesslog "ERROR star.C failed for sequence "$seqnum" (check1=$check1)"
54 check=$check1
55 ;;
56esac
57
58# run merpp
59printprocesslog "INFO starting merpp3.C for sequence "$seqnum
60logfile=$outpath"/"$seqnum"-merpp.log"
61
62check1=`root -q -b fact/analysis/merpp.C\("\"$seqfile\""\,"\"$outpath\""\) | tee $logfile | intgrep`
63
64case $check1 in
65 0) printprocesslog "INFO merpp was successful for sequence "$seqnum" (check1=$check1)"
66 ;;
67 *) printprocesslog "ERROR merpp3.C failed for sequence "$seqnum" (check1=$check1)"
68 check=10
69 ;;
70esac
71
72setstatus "stop"
73
74finish
75
Note: See TracBrowser for help on using the repository browser.