IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2444


Ignore:
Timestamp:
Nov 24, 2004, 1:08:52 PM (22 years ago)
Author:
eugene
Message:

clear locks

Location:
trunk/Ohana/src
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/perl/src/ckastrom

    r17 r2444  
    3838    exit 0;
    3939}
    40 if ($Nbad < 5) {
     40if ($Nbad < 0.4*$Nccd) {
    4141    print STDOUT "pass $Nbad bad\n";
    4242    exit 0;
  • trunk/Ohana/src/perl/src/elixir.photreport

    r70 r2444  
    2929print STAT "macro go\n";
    3030foreach $filter (@filter) {
    31     print STAT "echo $filter\n";
    32     print STAT "photreport $filter $name\n";
     31    @word = split (" ", `filtnames $filter -cal`);
     32    if (@word[1] == 0) { next; }
     33    $target = $word[2];
     34    print STAT "echo $filter -> $target\n";
     35    print STAT "photreport $target $name\n";
    3336}
    3437print STAT "exit 0\n";
  • trunk/Ohana/src/perl/src/fr.mkhtml

    r17 r2444  
    4747        if (-e $line) { $Nfound ++; }
    4848    }
    49     if ($Nfound == 0) {
     49    if ($Nfound < @list) {
    5050        print STDERR "NOTE: no files from $list: assuming initial state\n";
    5151        open (FILE, ">$outlist");
     
    5353        &goodbye;
    5454    }
    55     if ($Nfound != @list) { &escape ("missing some files from $list"); }
    5655
    5756    open (FILE, ">$outlist");
  • trunk/Ohana/src/perl/src/fr.modestats

    r17 r2444  
    44if ($ARGV[0] eq "-h") { &usage (); }
    55if ($ARGV[0] eq "-help") { &usage (); }
    6 if (@ARGV != 5) { &usage (); }
     6if (@ARGV != 6) { &usage (); }
    77
    88# assign the command line arguments
     
    1212$modejpg   = $ARGV[3]; # root of jpg images
    1313$residjpg  = $ARGV[4]; # root of jpg images
     14$inmapjpg  = $ARGV[5]; # root of jpg images
    1415
    1516# find the appropriate script file
     
    2021$xhost=`gconfig -q XHOST`; chop ($xhost);
    2122$xdisp=`gconfig -q XDISP`; chop ($xdisp);
    22 if (vsystem ("xdpyinfo -display $xdisp")) {
     23if (vsystem ("xdpyinfo -display $xdisp >& /dev/null")) {
    2324    print STDERR "X server is not running. start it now on $xhost\n";
    2425    exit 1;
     
    4445open (MANA, "|mana --norc");
    4546print MANA "input $script\n";
    46 
    4747print MANA "macro go\n";
    4848
    4949# we'll use the default 8 to generate the jpgs of the modes
    5050print MANA "jpgmodes $modefits $modejpg\n";
     51
     52system ("rm -f $residjpg");
     53system ("rm -f $inmapjpg");
    5154
    5255# reset $Nmode for the actual number desired
     
    5659    ($name, $status) = split (" ", $imlist[$i]);
    5760    $jpgname = sprintf "%s.%03d.jpg", $residjpg, $i;
    58     print MANA "jpgresid $name $jpgname\n";
     61    system ("basename $jpgname >> $residjpg");
     62    $srcname = sprintf "%s.%03d.jpg", $inmapjpg, $i;
     63    system ("basename $srcname >> $inmapjpg");
     64    print MANA "jpgresid $name $jpgname $srcname\n";
    5965}
    6066print MANA "exit 0\n";
     
    8389
    8490sub usage {
    85     print "USAGE: fr.modestats (map.list) (mode.fits) (mode.list) (modes[.NNN.jpg]) (resid[.NNN.jpg])\n";
     91    print "USAGE: fr.modestats (map.list) (mode.fits) (mode.list) (modes[.NNN.jpg]) (resid[.NNN.jpg]) (source[.NNN.jpg])\n";
    8692    exit 1;
    8793}
  • trunk/Ohana/src/perl/src/fr.select

    r70 r2444  
    4949@marginal = ();
    5050
     51# special list to skip specific chips
     52$CHIPSKIP     = `gconfig CHIP_SKIP_LIST`; chop $CHIPSKIP;
     53@chipskip = ();
     54if (-e $CHIPSKIP) {
     55    open (FILE, $CHIPSKIP);
     56    @chipskip = <FILE>;
     57    close (FILE);
     58    foreach $chip (@chipskip) { chop $chip; }
     59}
     60
    5161$criteria = "-type object -mode $mode -trange $start $stop -filter $filter";
    5262
     
    7181print STDERR "found $Nlist images\n";
    7282
    73 IMLIST:
     83FRAME:
    7484    foreach $image (@list) {
    7585    @words = split (" ",$image);
     
    8090        # in a subdirectory of their own, .fits extension assumed
    8191        @answer = <$words[4]/*.fits>;
    82         if (@answer != $Nccd) { print STDERR "$words[5] rejected: missing images\n"; next IMLIST; }
     92        if (@answer != $Nccd) { print STDERR "$words[5] rejected: missing images\n"; next FRAME; }
    8393    }
    8494
     
    90100    }
    91101    ($tmp, $Nx, $Ny) = split (" ", $answer);
    92     if (($Nx != $Naxis1) || ($Ny != $Naxis2)) { print STDERR "$words[5] rejected: wrong dimensions\n"; next IMLIST; }
     102    if (($Nx != $Naxis1) || ($Ny != $Naxis2)) { print STDERR "$words[5] rejected: wrong dimensions\n"; next FRAME; }
    93103
    94104    # $match is a word unique to the full mosaic image (the rootdir for split, the image for mef)
     
    101111    @list2 = `imsearch -name $match`;
    102112   
    103   MOSLIST:
     113  CCD:
    104114    foreach $ccd (@list2) {
    105115        @words2 = split (" ", $ccd);
     116        foreach $chipskip (@chipskip) {
     117            if ($words2[3] eq $chipskip) { next CCD; }
     118        }
    106119       
    107120        $cnts = $words2[11];
    108121        $flux = $words2[11] / $words2[7];
    109122        # test for acceptable flux range
    110         if ($cnts < $MIN_CNTS) { print STDERR "$words[5] rejected: cnts too low:  $cnts vs $MIN_CNTS\n"; next IMLIST; }
    111         if ($cnts > $MAX_CNTS) { print STDERR "$words[5] rejected: cnts too high: $cnts vs $MAX_CNTS\n"; next IMLIST; }
    112         if ($flux < $MIN_FLUX) { print STDERR "$words[5] rejected: flux too low:  $flux vs $MIN_FLUX\n"; next IMLIST; }
    113         if ($flux > $MAX_FLUX) { print STDERR "$words[5] rejected: flux too high: $flux vs $MAX_FLUX\n"; next IMLIST; }
     123        if ($cnts < $MIN_CNTS) { print STDERR "$words[5] rejected: cnts too low:  $cnts vs $MIN_CNTS\n"; next FRAME; }
     124        if ($cnts > $MAX_CNTS) { print STDERR "$words[5] rejected: cnts too high: $cnts vs $MAX_CNTS\n"; next FRAME; }
     125        if ($flux < $MIN_FLUX) { print STDERR "$words[5] rejected: flux too low:  $flux vs $MIN_FLUX\n"; next FRAME; }
     126        if ($flux > $MAX_FLUX) { print STDERR "$words[5] rejected: flux too high: $flux vs $MAX_FLUX\n"; next FRAME; }
    114127    }
    115128
     
    122135open (LIST, ">$output");
    123136# write output to Nccd list files
    124 # keep a random sample of roughly 40 images:
     137# keep a random sample of roughly 60 images:
    125138$Nselect = @good;
    126139for ($i = 0; $i < $Nselect; $i++) {
    127     if (rand ($Nselect) < 40) {
     140    if (rand ($Nselect) < 60) {
    128141        print LIST "$good[$i]\n";
    129142    }
  • trunk/Ohana/src/perl/src/grab.keywords

    r113 r2444  
    135135    # parse the photometry data line
    136136    @words = split (" ", $photlist[$Nphot-1]);
    137     $line = sprintf "PHOT_C  = %20.4F / Nightly zero point - actual                   \n", $words[2];  @photom = (@photom, $line);
    138     $line = sprintf "PHOT_C0 = %20.4F / Nightly zero point - nominal                  \n", $words[3];  @photom = (@photom, $line);
    139     $line = sprintf "PHOT_CS = %20.4F / Nightly zero point - scatter                  \n", $words[4];  @photom = (@photom, $line);
    140     $line = sprintf "PHOT_NS = %20d / Nightly zero point - N stars                  \n", $words[5];  @photom = (@photom, $line);
    141     $line = sprintf "PHOT_NM = %20d / Nightly zero point - N images                 \n", $words[6];  @photom = (@photom, $line);
    142     $line = sprintf "PHOT_X  = %20.4F / Nightly zero point - color term             \n", $words[7];  @photom = (@photom, $line);
    143     $line = sprintf "PHOT_K  = %20.4F / Nightly zero point - airmass term             \n", $words[8];  @photom = (@photom, $line);
    144     $line = sprintf "PHOT_C1 = '%-18s' / Nightly zero point - color 1               \n", $words[9];  @photom = (@photom, $line);
    145     $line = sprintf "PHOT_C2 = '%-18s' / Nightly zero point - color 2               \n", $words[10]; @photom = (@photom, $line);
     137#   we conclude that the nightly zero point contains insufficient information
     138    $line = sprintf "PHOT_C  = %20.4F / Elixir zero point - measured for camera run \n", $words[2];  @photom = (@photom, $line);
     139    $line = sprintf "PHOT_CS = %20.4F / Elixir zero point - scatter                \n", $words[4];  @photom = (@photom, $line);
     140    $line = sprintf "PHOT_NS = %20d / Elixir zero point - N stars                  \n", $words[5];  @photom = (@photom, $line);
     141    $line = sprintf "PHOT_NM = %20d / Elixir zero point - N images                 \n", $words[6];  @photom = (@photom, $line);
     142    $line = sprintf "PHOT_C0 = %20.4F / Elixir zero point - nominal                \n", $words[3];  @photom = (@photom, $line);
     143    $line = sprintf "PHOT_X  = %20.4F / Elixir zero point - color term             \n", $words[7];  @photom = (@photom, $line);
     144    $line = sprintf "PHOT_K  = %20.4F / Elixir zero point - airmass term           \n", $words[8];  @photom = (@photom, $line);
     145    $line = sprintf "PHOT_C1 = '%-18s' / Elixir zero point - color 1               \n", $words[9];  @photom = (@photom, $line);
     146    $line = sprintf "PHOT_C2 = '%-18s' / Elixir zero point - color 2               \n", $words[10]; @photom = (@photom, $line);
    146147   
    147148    if ($cmproot ne "phu") {
  • trunk/Ohana/src/perl/src/mktrans

    r92 r2444  
    1212    print STDERR "filter: $code\n";
    1313    @list = `photsearch -trange $start $stop -photcode $code`;
     14    if (! @list) { next; }
    1415
    1516    # the lines from photsearch look like this:
     
    1718    # V 2001/02/03,15:38:53  26.249  0.017 3 1 elixir
    1819
    19     @dates = ();
     20    if (1) {
    2021
    21     # use date hashes to extract stats for each date:
    22     foreach $line (@list) {
     22        # first pass, get list of zp, sort, find median
     23        @zp = ();
     24        $sumN = $sumM = $sum1 = $sum2 = $n = 0;
     25        foreach $line (@list) {
     26            @words = split (" ", $line);
     27            push @zp, $words[2];
     28            $sumN ++;
     29            $sumM += $words[5];
     30        }
     31        @zp = sort {$a <=> $b} @zp;
     32
     33        $N = @zp;
     34        for ($i = 0.2*$N; $i < 0.8*$N; $i++) {
     35            $sum1 += $zp[$i];
     36            $sum2 += $zp[$i]*$zp[$i];
     37            $n ++;
     38        }
    2339       
    24         # parse the line for the date
    25         @words = split (" ", $line);
    26         ($date) = $words[1] =~ /(\d\d\d\d\/\d\d\/\d\d),/;
    27        
    28         # if this is a new date, save it in the list
    29         unless ($sum1{$date}) { @dates = (@dates, $date); }
     40        $zp = $sum1 / $n;
     41        $dzp = sqrt (abs($sum2 / $n - $zp*$zp));
    3042
    31         # add to the stats
    32         $sumN{$date} ++;
    33         $sumM{$date} += $words[5];
    34         $sum1{$date} += $words[2];
    35         $sum2{$date} += $words[2]*$words[2];
     43        printf STDOUT "photreg -trans -photcode $code -zp %6.3f -dzp %6.4f -trange $start $stop -Nmeas $sumM -Ntime $sumN\n", $zp, $dzp;
     44
     45    } else {
     46        # use date hashes to extract stats for each date:
     47        @dates = ();
     48        foreach $line (@list) {
     49           
     50            # parse the line for the date
     51            @words = split (" ", $line);
     52            ($date) = $words[1] =~ /(\d\d\d\d\/\d\d\/\d\d),/;
     53           
     54            # if this is a new date, save it in the list
     55            unless ($sum1{$date}) { @dates = (@dates, $date); }
     56
     57            # add to the stats
     58            $sumN{$date} ++;
     59            $sumM{$date} += $words[5];
     60            $sum1{$date} += $words[2];
     61            $sum2{$date} += $words[2]*$words[2];
     62        }
     63
     64        @sdates = sort by_date @dates;
     65
     66        # calculate mean and stdev for each date
     67        foreach $date (@sdates) {
     68           
     69            $Nm  = $sumM{$date};
     70            $Np  = $sumN{$date};
     71            $zp  = $sum1{$date} / $Np;
     72            $dzp = sqrt (abs($sum2{$date} / $Np - $zp*$zp));
     73
     74            printf STDOUT "photreg -trans -photcode $code -zp %6.3f -dzp %6.4f -trange $start $stop -Nmeas $Nm -Ntime $Np\n", $zp, $dzp;
     75        }
     76
     77        %sumM = ();
     78        %sumN = ();
     79        %sum1 = ();
     80        %sum2 = ();
     81        print STDOUT "\n";
    3682    }
    37 
    38     @sdates = sort by_date @dates;
    39 
    40     # calculate mean and stdev for each date
    41     foreach $date (@sdates) {
    42        
    43         $Nm  = $sumM{$date};
    44         $Np  = $sumN{$date};
    45         $zp  = $sum1{$date} / $Np;
    46         $dzp = sqrt (abs($sum2{$date} / $Np - $zp*$zp));
    47 
    48         printf STDOUT "photreg -trans -photcode $code -zp %6.3f -dzp %6.4f -trange $date 1d -Nmeas $Nm -Ntime $Np\n", $zp, $dzp;
    49     }
    50 
    51     %sumM = ();
    52     %sumN = ();
    53     %sum1 = ();
    54     %sum2 = ();
    55     print STDOUT "\n";
    5683   
    5784}
  • trunk/Ohana/src/shell/src/dads.cleanup

    r16 r2444  
    1010rm -f $outdir/*.raw
    1111rm -f $outdir/*.det
    12 rm -f $outdir/*.dem
     12rm -f $outdir/*.def
     13
     14# generate binned-by-12 image
     15mosmc $outdir/*.fits $outdir.B12.fits 12
    1316
    1417echo "SUCCESS"
  • trunk/Ohana/src/shell/src/el_plots

    r70 r2444  
    1111if ($camera == "cfhtir") goto valid;
    1212if ($camera == "megacam") goto valid;
     13if ($camera == "meganorth") goto valid;
    1314
    1415if ("$1" == "init") then
  • trunk/Ohana/src/shell/src/elixir.launch

    r87 r2444  
    5656     case meganorth:
    5757      echo "checking for existing imstatreg -daemon"
    58       imstatreg -D CAMERA $camera -daemon -status
     58      imstatreg -D CAMERA $camera -D RUNID $run -daemon -status
    5959      if ($status) then
    6060        echo "no imstatreg -daemon, starting..."
    61         imstatreg -D CAMERA $camera -daemon -v
     61        imstatreg -D CAMERA $camera -D RUNID $run -daemon -v
    6262        if ($status) then
    6363            echo "error starting imstatreg -daemon"
     
    7979     case meganorth:
    8080      set date = `date -u +%Y%m%d+%H:%M:%S`
    81       imsearch -D CAMERA $camera -trange now -1d -cadctable $datdir/cadc/mcmd.raw.$date.fits
    82       cp $datdir/cadc/mcmd.raw.$date.fits /h/ftp/pub/fits_hdrs/
     81
     82      # extract CADC table, using all undistributed, object images from the past few days
     83      imsearch -D CAMERA $camera -D RUNID $run -type object -dist f -trange now -4d -cadctable $datdir/cadc/mcmd.raw.$date.fits
    8384      if ($status) then
    8485        echo "error extracting cadc table"
    8586        exit 1;
    8687      endif
    87       imsearch -D CAMERA $camera -trange now -1d -dist f -modify dist t
     88      # mark the images above distributed
     89      imsearch -D CAMERA $camera -D RUNID $run -type object -dist f -trange now -4d -modify dist t
     90
     91      # send the file to the CADC ftp location
     92      cp $datdir/cadc/mcmd.raw.$date.fits /h/ftp/pub/fits_hdrs/
     93
     94      # update the values to the QSO database
     95      cadc2qso $datdir/cadc/mcmd.raw.$date.fits
     96
    8897      breaksw;
    8998
  • trunk/Ohana/src/shell/src/getfocus

    r70 r2444  
    102102foreach ccd ($ccdn)
    103103 block $temp.sdat.$ccd -t 60 || goto failure;
    104  awk '($6 > -14) && ($6 < -8){print $0}' $temp.sdat.$ccd | sort -k 6n | head -300 | sort -k 2n > $temp.$ccd.sdat
     104 awk '($6 > -14) && ($6 < -8) && ($4== 0){print $0}' $temp.sdat.$ccd | sort -k 6n | head -500 | sort -k 2n > $temp.$ccd.sdat
    105105 rm -f $temp.sdat.$ccd
    106106end
     
    157157foreach ccd ($ccdn)
    158158 block $temp.sdat.$ccd -t 60 || goto failure;
    159  awk '($6 > -14) && ($6 < -8){print $0}' $temp.sdat.$ccd | sort -k 6n | head -300 | sort -k 2n > $temp.$ccd.sdat
     159 awk '($6 > -14) && ($6 < -8) && ($4 == 0){print $0}' $temp.sdat.$ccd | sort -k 6n | head -500 | sort -k 2n > $temp.$ccd.sdat
    160160 rm -f $temp.sdat.$ccd
    161161end
  • trunk/Ohana/src/shell/src/getseeing

    r70 r2444  
    3737set pixscale = `gconfig ASEC_PIX`
    3838set ccd      = `gconfig SEEING_REF_CCD`
     39set amp      = `gconfig SEEING_REF_AMP`
    3940set datdir   = `gconfig DATDIR`
    4041set confdir  = `gconfig CONFDIR`
     
    6667if ($mef) then
    6768 set Nextend = `echo $file | fields NEXTEND | awk '{print $2}'`
     69 set Nccds   = `echo $file | fields NCCDS | awk '{print $2}'`
    6870 set tccd = $ccd
    69  if ($Nextend > 50) set tccd = amp26
     71 if ($Nextend != $Nccds) set tccd = $amp
     72 # use amp for un-spliced data, ccd for spliced
    7073 echo "subraster.mef   $file $tccd $temp.fits $temp.stats" > $temp.pro
    7174else
  • trunk/Ohana/src/shell/src/sp_command

    r16 r2444  
    44set template  = "/h/skyprobe/data/Refs/template.fits"
    55set dummyfits = "/h/skyprobe/data/Refs/dummy.fits"
    6 set dlogfile  = "/h/skyprobe/sp_expose.log"
    7 set photlog   = "/h/skyprobe/sp_phot.log"
     6set dlogfile  = "/h/skyprobe/log/sp_expose.log"
     7set photlog   = "/h/skyprobe/log/sp_phot.log"
    88set process   = 1
    99
     
    2929end
    3030
    31 if ($#args == 0) goto usage;
     31if ($args[1] == "") goto usage;
    3232if ($args[1] == "init")   goto init;
    3333if ($args[1] == "cool")   goto cool;
     
    4545  mkdir -p $args[2]
    4646 endif
     47 echo "" > $dlogfile
     48 echo "" > $photlog
    4749 exit 0;
    4850
     
    6567
    6668test:
     69
    6770 echo ""
    6871 echo "starting skyprobe test suite"
     
    9396
    9497 # take a dark frame
    95  echo "taking 1 sec dark frame test.dark.fits"
     98 echo "taking 1 sec dark frame sample.dark.fits"
    9699 set exptime = 1.0
    97  set output  = test.dark.fits
     100 set output  = sample.dark.fits
    98101 ssh -n $IOPENER sp_ccdcontrol expose -etime $exptime -shuttermode 2 > $output
    99102 echo ""
    100103
    101104 # is DETTEMP in range?
    102  set temps = `echo test.dark.fits | fields DETTEM CAMTEM`
     105 set temps = `echo sample.dark.fits | fields DETTEM CAMTEM`
    103106 if ($status) then
    104    echo "header information incorrect for test.dark.fits"
     107   echo "header information incorrect for sample.dark.fits"
    105108   exit 1
    106109 endif
     
    117120 mana --norc << EOF >& /dev/null
    118121  macro go
    119    rd a test.dark.fits
     122   rd a sample.dark.fits
    120123   stats a - - - -
    121    exec echo \$MEAN \$MEDIAN \$SIGMA > test.dark.dat
     124   exec echo \$MEAN \$MEDIAN \$SIGMA > sample.dark.dat
    122125   exit 0
    123126  end
     
    131134
    132135 # check dark frame stats
    133  set flux = `cat test.dark.dat`
     136 set flux = `cat sample.dark.dat`
    134137 echo "dark flux: $flux[2]"
    135138 set t = `echo $flux[2] | awk '($1 > 10000){print 1}'`
     
    140143 
    141144 # take a light frame
    142  echo "taking 0.1 sec light frame test.light.fits"
     145 echo "taking 0.1 sec light frame sample.light.fits"
    143146 set exptime = 0.1
    144  set output  = test.light.fits
     147 set output  = sample.light.fits
    145148 ssh -n $IOPENER sp_ccdcontrol expose -etime $exptime -shuttermode 1 > $output
    146149 echo ""
     
    158161 endif
    159162 setenv DISPLAY $xdisp
     163 echo $xdisp
    160164
    161165 # delete old PS file
    162166 date +%Y.%m.%d | awk '{printf "TEXT 10 20 date:%s\n", $1}' > date.reg
    163167
    164  # measure light frame stats
    165168 mana --norc << EOF >& /dev/null
    166169  macro go
    167    rd a test.light.fits
     170   rd a sample.light.fits
    168171   stats a - - - -
    169    exec echo \$MEAN \$MEDIAN \$SIGMA > test.light.dat
     172   exec echo \$MEAN \$MEDIAN \$SIGMA > sample.light.dat
    170173   keyword a NAXIS1 nx
    171174   keyword a NAXIS2 ny
    172    echo "nx, ny: \$nx, \$ny"
     175   tv a {\$MEDIAN*1.1} {-0.2*\$MEDIAN}
    173176   resize \$nx \$ny
    174    tv a {\$MEDIAN*1.1} {-0.2*\$MEDIAN}
    175177   load red date.reg
    176    ps -name skyprobe.ps
     178   exec sleep 2
     179   ps -name sample.light.ps
    177180   exit 0
    178181  end
     
    186189
    187190 # check light frame stats
    188  set flux = `cat test.light.dat`
     191 set flux = `cat sample.light.dat`
    189192 echo "light flux: $flux[2]"
    190193 echo "approx. expected counts: "
     
    194197 echo ""
    195198
    196  if (! -e skyprobe.ps) then
    197    echo "skyprobe.ps not created, cannot print out image"
    198  else
    199    lpr -Psps skyprobe.ps
     199 if (! -e sample.light.ps) then
     200   echo "sample.light.ps not created, cannot print out image"
     201 else
     202   lpr -Psps sample.light.ps
    200203   echo "image is being printed on SPS"
    201204 endif
    202205
     206 rm -f date.reg
     207 rm -r sample.dark.dat
     208 rm -r sample.light.dat
     209
    203210 # test tcsh & loggerh
    204 # cp -f $template $dummyfits
    205 # setenv FFTEMPLATE $dummyfits
    206 # /cfht/bin/tcsh -B >>& $logfile
    207 # /cfht/bin/loggerh -E >>& $logfile
     211 # cp -f $template $dummyfits
     212 # setenv FFTEMPLATE $dummyfits
     213 # /cfht/bin/tcsh -B >>& $logfile
     214 # /cfht/bin/loggerh -E >>& $logfile
    208215
    209216 exit 0;
  • trunk/Ohana/src/shell/src/sp_phot

    r70 r2444  
    1919set args=""
    2020set setdate=1
    21 while ("$1" != "")
     21set testrun=0
     22while ($#argv)
    2223 switch ($1)
    2324  case -date:
     
    3334end
    3435
    35 if ($#args != 1) then
     36if ("$args[1]" == "") then
    3637  echo "USAGE: sp_phot (filename.fits) [-date YYYYMMDD]";
     38  echo "USAGE: sp_phot (test)";
    3739  exit 2;
    3840endif
     41
     42if ($args[1] == "test") set testrun = 1
    3943
    4044# kill off other processes with this name, and their children
     
    5357end
    5458
    55 # setenv PATH {$PATH}:/apps/elixir/bin
    56 
    5759if ($setdate) then
    5860  set DATE=`date -u +%Y%m%d`
    5961endif
     62
    6063set spdir = `gconfig SKYPROBE_DIR`
    6164if ($?) then
    62   echo "problem with config system"
     65  echo "problem with config system: missing SKYPROBE_DIR"
    6366  exit 1;
    6467endif
     
    8487
    8588set raw=$args[1]
     89if ($testrun) then
     90 set raw = /h/skyprobe/data/Refs/sample.fits
     91endif
     92
    8693set root=`echo $raw | awk -F/ '{print $NF}' | sed s/.fits//`
    8794
     
    104111
    105112# use the tycho data only to do astrometry
    106 rsh -n $DBMACHINE gastro -D CATDIR $TYCHO $SMPDIR/$root.smp
     113# rsh -n $DBMACHINE gastro -D CATDIR $TYCHO $SMPDIR/$root.smp
     114echo gastro -D CATDIR $TYCHO $SMPDIR/$root.smp
     115gastro -D CATDIR $TYCHO $SMPDIR/$root.smp
    107116# if ($status) goto cleanup;
    108117
    109 rsh -n $DBMACHINE addspphot -image -cal TYCHO_V TYCHO_B $SMPDIR/$root.smp
     118# rsh -n $DBMACHINE addspphot -image -cal TYCHO_V TYCHO_B $SMPDIR/$root.smp
     119addspphot -image -cal TYCHO_V TYCHO_B $SMPDIR/$root.smp
    110120# if ($status) goto cleanup;
     121
     122if ($testrun) then
     123 set N = `imphotsearch -name sample | wc -l`
     124 imphotsearch -name sample
     125 if ($status) then
     126   echo "failure to find image in db"
     127   exit 2;
     128 endif
     129 if ($N == 0) then
     130   echo "failure to write image to db"
     131   exit 1;
     132 endif
     133 echo delstar $SMPDIR/$root.smp
     134 delstar $SMPDIR/$root.smp
     135 if ($status) then
     136   echo "failure to remove test image from db"
     137   exit 2;
     138 endif
     139endif
    111140
    112141rm -f $SMPDIR/$root.flt
  • trunk/Ohana/src/shell/src/sp_plots

    r70 r2444  
    99set datdir=`gconfig DATDIR`
    1010set script="$confdir/mana/skyprobe"
    11 set xhost=`gconfig XHOST`
    12 set xdisp=`gconfig XDISP`
     11set xhost=`gconfig XHOST.SUMMIT`
     12set xdisp=`gconfig XDISP.SUMMIT`
    1313setenv DISPLAY $xdisp
    1414
Note: See TracChangeset for help on using the changeset viewer.