#!/bin/sh # -*- shell -*- # Survey all the CR* files in the current directory PNOISE=2.5 SNOISE=20 D2NOISE=200 TMP=summary.$$ BitCheck() { filelist=`ls $ii/CRAT* $ii/CR00* 2>/dev/null` if [ "$filelist" = "" ] then echo "ERR No source files found in $ii" echo "" Help fi echo ">>> First check file integrity" for jj in $filelist do verify -r $jj done } Cleanup() { echo -n ">>>>>> Delete working browse file? yes/[no] " read foo case $foo in [yY]*) rm $TMP ;; *) echo "Leaving $TMP in place" ;; esac } Cobalt() { echo ">>> Generating science data plots" lf_cobalt -a 10 -b 4095 -r $TMP } Compress() { wholelist="" echo ">>> Generate single browse file: $TMP" for ii in $dirname do wholelist="$wholelist $ii/CR*" done browse -u -v -f $TMP $wholelist } Help() { echo "Usage $0 [-h] [dir1] .. [dirn]" echo " performs extensive checks on all SSR files with name" echo " of form CRAT* and CR00* in current or named directories" exit 0 } Limits() { echo ">>> Check red/yellow limits on housekeeping" ar_limits_check -a -v -T $TMP } Singles() { echo ">>> Check singles noise levels" ar_singles_check -m $SNOISE -d2 $D2NOISE -v $TMP } Stats() { echo ">>> Check limits on cal signal noise" statistics -n 80 -t -r $TMP | emi_noise_filter -m $PNOISE -v } while [ "$1" != "" ] do case $1 in -h*) Help ;; *) dirname="$dirname $1" ;; esac shift done if [ "$dirname" = "" ] then dirname="." # If no arg given, use current directory fi for ii in $dirname do BitCheck # run verify on all files individually done Compress # meld the whole mess into one working file Stats # check the cal signal noise Limits # check the red/yellow limits Singles # check the singles rates Cobalt # histogram the science data Cleanup # be neat exit 0 ######################################################################## # Pod follows ######################################################################## =for html