Ignore:
Timestamp:
01/10/06 22:12:58 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/processmcsequences

    r7448 r7460  
    2020#   Author(s): Daniela Dorner  12/2005 <mailto:dorner@astro.uni-wuerzburg.de>
    2121#
    22 #   Copyright: MAGIC Software Development, 2000-2004
     22#   Copyright: MAGIC Software Development, 2000-2006
    2323#
    2424#
    2525# ========================================================================
    2626#
     27# This script is an intermediate solution to process the montecarlo files.
     28# As soon as the montecarlo database is running, this script shall be
     29# exchanged.
     30#
     31# The script is processing the montecarlo sequences: callisto and star
    2732#
    2833
     
    3843date >> $scriptlog 2>&1
    3944
     45# check if script is already running
    4046lockfile=$lockpath/lock-processmcsequences.txt
    4147date > $lockfile >> $scriptlog 2>&1
     
    5056esac
    5157
    52 
    5358mcpath=/montecarlo/rawfiles
    5459mccalpath=/montecarlo/callisto
     
    5762callistorc=$setuppath/callisto/callisto.rc
    5863
    59 sequfiles=`find $mcsequpath -type f`
    60 
    6164cd $mars
    6265
     66# find montecarlo sequence files
     67sequfiles=`find $mcsequpath -type f`
    6368for sequfile in ${sequfiles[@]}
    6469do
     
    6974   makedir $caloutpath >> $scriptlog 2>&1
    7075   
     76   # continue with next sequence, if sequence is already processed
     77   #  or processing  of sequence is just running
    7178   if ls $caloutpath/.done >> $scriptlog 2>&1
    7279   then
    7380      continue
    7481   fi
    75    
    7682   if ls $caloutpath/.doing >> $scriptlog 2>&1
    7783   then
     
    7985   fi
    8086   
     87   # lock file
    8188   touch $caloutpath/.doing
    82    
    8389   echo "processing sequ $sequfile" >> $scriptlog 2>&1
    84    
     90   # find callisto.rc file
    8591   if [ -e $caloutpath/callisto.rc ]
    8692   then
     
    9298      callistorcseq=$caloutpath/callisto.rc
    9399   fi
    94    
     100   # calibrate data
    95101   echo "./callisto -mc -f -b -q --ind=$mcpath/$date --log=$caloutpath/callisto$sequno.log --html=$caloutpath/callisto$sequno.html --out=$caloutpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null" >> $scriptlog 2>&1
    96102   ./callisto -mc -f -b -q --ind=$mcpath/$date --log=$caloutpath/callisto$sequno.log --html=$caloutpath/callisto$sequno.html --out=$caloutpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null
    97103   check1=$?
    98  
     104   # if calibration worked -> run star for sequence
    99105   case $check1 in
    100106      0)   echo "check1=$check1 -> everything ok..." >> $scriptlog 2>&1
     
    103109           imgoutpath=$mccalpath/$no/$sequno
    104110           makedir $imgoutpath >> $scriptlog 2>&1
     111           
    105112           ./star -b -q -v4 -f -mc --log=$imgoutpath/star$sequno.log --html=$imgoutpath/star$sequno.html --ind=$caloutpath --out=$imgoutpath $sequfile  2>> $scriptlog> /dev/null
    106113           check2=$?
     
    118125done
    119126
    120 
    121127rm -v $lockfile >> $scriptlog 2>&1
    122128
Note: See TracChangeset for help on using the changeset viewer.