Changeset 2444
- Timestamp:
- Nov 24, 2004, 1:08:52 PM (22 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 15 edited
-
perl/src/ckastrom (modified) (1 diff)
-
perl/src/elixir.photreport (modified) (1 diff)
-
perl/src/fr.mkhtml (modified) (2 diffs)
-
perl/src/fr.modestats (modified) (6 diffs)
-
perl/src/fr.select (modified) (6 diffs)
-
perl/src/grab.keywords (modified) (1 diff)
-
perl/src/mktrans (modified) (2 diffs)
-
shell/src/dads.cleanup (modified) (1 diff)
-
shell/src/el_plots (modified) (1 diff)
-
shell/src/elixir.launch (modified) (2 diffs)
-
shell/src/getfocus (modified) (2 diffs)
-
shell/src/getseeing (modified) (2 diffs)
-
shell/src/sp_command (modified) (11 diffs)
-
shell/src/sp_phot (modified) (5 diffs)
-
shell/src/sp_plots (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/perl/src/ckastrom
r17 r2444 38 38 exit 0; 39 39 } 40 if ($Nbad < 5) {40 if ($Nbad < 0.4*$Nccd) { 41 41 print STDOUT "pass $Nbad bad\n"; 42 42 exit 0; -
trunk/Ohana/src/perl/src/elixir.photreport
r70 r2444 29 29 print STAT "macro go\n"; 30 30 foreach $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"; 33 36 } 34 37 print STAT "exit 0\n"; -
trunk/Ohana/src/perl/src/fr.mkhtml
r17 r2444 47 47 if (-e $line) { $Nfound ++; } 48 48 } 49 if ($Nfound == 0) {49 if ($Nfound < @list) { 50 50 print STDERR "NOTE: no files from $list: assuming initial state\n"; 51 51 open (FILE, ">$outlist"); … … 53 53 &goodbye; 54 54 } 55 if ($Nfound != @list) { &escape ("missing some files from $list"); }56 55 57 56 open (FILE, ">$outlist"); -
trunk/Ohana/src/perl/src/fr.modestats
r17 r2444 4 4 if ($ARGV[0] eq "-h") { &usage (); } 5 5 if ($ARGV[0] eq "-help") { &usage (); } 6 if (@ARGV != 5) { &usage (); }6 if (@ARGV != 6) { &usage (); } 7 7 8 8 # assign the command line arguments … … 12 12 $modejpg = $ARGV[3]; # root of jpg images 13 13 $residjpg = $ARGV[4]; # root of jpg images 14 $inmapjpg = $ARGV[5]; # root of jpg images 14 15 15 16 # find the appropriate script file … … 20 21 $xhost=`gconfig -q XHOST`; chop ($xhost); 21 22 $xdisp=`gconfig -q XDISP`; chop ($xdisp); 22 if (vsystem ("xdpyinfo -display $xdisp ")) {23 if (vsystem ("xdpyinfo -display $xdisp >& /dev/null")) { 23 24 print STDERR "X server is not running. start it now on $xhost\n"; 24 25 exit 1; … … 44 45 open (MANA, "|mana --norc"); 45 46 print MANA "input $script\n"; 46 47 47 print MANA "macro go\n"; 48 48 49 49 # we'll use the default 8 to generate the jpgs of the modes 50 50 print MANA "jpgmodes $modefits $modejpg\n"; 51 52 system ("rm -f $residjpg"); 53 system ("rm -f $inmapjpg"); 51 54 52 55 # reset $Nmode for the actual number desired … … 56 59 ($name, $status) = split (" ", $imlist[$i]); 57 60 $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"; 59 65 } 60 66 print MANA "exit 0\n"; … … 83 89 84 90 sub 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"; 86 92 exit 1; 87 93 } -
trunk/Ohana/src/perl/src/fr.select
r70 r2444 49 49 @marginal = (); 50 50 51 # special list to skip specific chips 52 $CHIPSKIP = `gconfig CHIP_SKIP_LIST`; chop $CHIPSKIP; 53 @chipskip = (); 54 if (-e $CHIPSKIP) { 55 open (FILE, $CHIPSKIP); 56 @chipskip = <FILE>; 57 close (FILE); 58 foreach $chip (@chipskip) { chop $chip; } 59 } 60 51 61 $criteria = "-type object -mode $mode -trange $start $stop -filter $filter"; 52 62 … … 71 81 print STDERR "found $Nlist images\n"; 72 82 73 IMLIST:83 FRAME: 74 84 foreach $image (@list) { 75 85 @words = split (" ",$image); … … 80 90 # in a subdirectory of their own, .fits extension assumed 81 91 @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; } 83 93 } 84 94 … … 90 100 } 91 101 ($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; } 93 103 94 104 # $match is a word unique to the full mosaic image (the rootdir for split, the image for mef) … … 101 111 @list2 = `imsearch -name $match`; 102 112 103 MOSLIST:113 CCD: 104 114 foreach $ccd (@list2) { 105 115 @words2 = split (" ", $ccd); 116 foreach $chipskip (@chipskip) { 117 if ($words2[3] eq $chipskip) { next CCD; } 118 } 106 119 107 120 $cnts = $words2[11]; 108 121 $flux = $words2[11] / $words2[7]; 109 122 # 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; } 114 127 } 115 128 … … 122 135 open (LIST, ">$output"); 123 136 # write output to Nccd list files 124 # keep a random sample of roughly 40 images:137 # keep a random sample of roughly 60 images: 125 138 $Nselect = @good; 126 139 for ($i = 0; $i < $Nselect; $i++) { 127 if (rand ($Nselect) < 40) {140 if (rand ($Nselect) < 60) { 128 141 print LIST "$good[$i]\n"; 129 142 } -
trunk/Ohana/src/perl/src/grab.keywords
r113 r2444 135 135 # parse the photometry data line 136 136 @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); 146 147 147 148 if ($cmproot ne "phu") { -
trunk/Ohana/src/perl/src/mktrans
r92 r2444 12 12 print STDERR "filter: $code\n"; 13 13 @list = `photsearch -trange $start $stop -photcode $code`; 14 if (! @list) { next; } 14 15 15 16 # the lines from photsearch look like this: … … 17 18 # V 2001/02/03,15:38:53 26.249 0.017 3 1 elixir 18 19 19 @dates = ();20 if (1) { 20 21 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 } 23 39 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)); 30 42 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"; 36 82 } 37 38 @sdates = sort by_date @dates;39 40 # calculate mean and stdev for each date41 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";56 83 57 84 } -
trunk/Ohana/src/shell/src/dads.cleanup
r16 r2444 10 10 rm -f $outdir/*.raw 11 11 rm -f $outdir/*.det 12 rm -f $outdir/*.dem 12 rm -f $outdir/*.def 13 14 # generate binned-by-12 image 15 mosmc $outdir/*.fits $outdir.B12.fits 12 13 16 14 17 echo "SUCCESS" -
trunk/Ohana/src/shell/src/el_plots
r70 r2444 11 11 if ($camera == "cfhtir") goto valid; 12 12 if ($camera == "megacam") goto valid; 13 if ($camera == "meganorth") goto valid; 13 14 14 15 if ("$1" == "init") then -
trunk/Ohana/src/shell/src/elixir.launch
r87 r2444 56 56 case meganorth: 57 57 echo "checking for existing imstatreg -daemon" 58 imstatreg -D CAMERA $camera - daemon -status58 imstatreg -D CAMERA $camera -D RUNID $run -daemon -status 59 59 if ($status) then 60 60 echo "no imstatreg -daemon, starting..." 61 imstatreg -D CAMERA $camera - daemon -v61 imstatreg -D CAMERA $camera -D RUNID $run -daemon -v 62 62 if ($status) then 63 63 echo "error starting imstatreg -daemon" … … 79 79 case meganorth: 80 80 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 83 84 if ($status) then 84 85 echo "error extracting cadc table" 85 86 exit 1; 86 87 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 88 97 breaksw; 89 98 -
trunk/Ohana/src/shell/src/getfocus
r70 r2444 102 102 foreach ccd ($ccdn) 103 103 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.sdat104 awk '($6 > -14) && ($6 < -8) && ($4== 0){print $0}' $temp.sdat.$ccd | sort -k 6n | head -500 | sort -k 2n > $temp.$ccd.sdat 105 105 rm -f $temp.sdat.$ccd 106 106 end … … 157 157 foreach ccd ($ccdn) 158 158 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.sdat159 awk '($6 > -14) && ($6 < -8) && ($4 == 0){print $0}' $temp.sdat.$ccd | sort -k 6n | head -500 | sort -k 2n > $temp.$ccd.sdat 160 160 rm -f $temp.sdat.$ccd 161 161 end -
trunk/Ohana/src/shell/src/getseeing
r70 r2444 37 37 set pixscale = `gconfig ASEC_PIX` 38 38 set ccd = `gconfig SEEING_REF_CCD` 39 set amp = `gconfig SEEING_REF_AMP` 39 40 set datdir = `gconfig DATDIR` 40 41 set confdir = `gconfig CONFDIR` … … 66 67 if ($mef) then 67 68 set Nextend = `echo $file | fields NEXTEND | awk '{print $2}'` 69 set Nccds = `echo $file | fields NCCDS | awk '{print $2}'` 68 70 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 70 73 echo "subraster.mef $file $tccd $temp.fits $temp.stats" > $temp.pro 71 74 else -
trunk/Ohana/src/shell/src/sp_command
r16 r2444 4 4 set template = "/h/skyprobe/data/Refs/template.fits" 5 5 set dummyfits = "/h/skyprobe/data/Refs/dummy.fits" 6 set dlogfile = "/h/skyprobe/ sp_expose.log"7 set photlog = "/h/skyprobe/ sp_phot.log"6 set dlogfile = "/h/skyprobe/log/sp_expose.log" 7 set photlog = "/h/skyprobe/log/sp_phot.log" 8 8 set process = 1 9 9 … … 29 29 end 30 30 31 if ($ #args == 0) goto usage;31 if ($args[1] == "") goto usage; 32 32 if ($args[1] == "init") goto init; 33 33 if ($args[1] == "cool") goto cool; … … 45 45 mkdir -p $args[2] 46 46 endif 47 echo "" > $dlogfile 48 echo "" > $photlog 47 49 exit 0; 48 50 … … 65 67 66 68 test: 69 67 70 echo "" 68 71 echo "starting skyprobe test suite" … … 93 96 94 97 # take a dark frame 95 echo "taking 1 sec dark frame test.dark.fits"98 echo "taking 1 sec dark frame sample.dark.fits" 96 99 set exptime = 1.0 97 set output = test.dark.fits100 set output = sample.dark.fits 98 101 ssh -n $IOPENER sp_ccdcontrol expose -etime $exptime -shuttermode 2 > $output 99 102 echo "" 100 103 101 104 # is DETTEMP in range? 102 set temps = `echo test.dark.fits | fields DETTEM CAMTEM`105 set temps = `echo sample.dark.fits | fields DETTEM CAMTEM` 103 106 if ($status) then 104 echo "header information incorrect for test.dark.fits"107 echo "header information incorrect for sample.dark.fits" 105 108 exit 1 106 109 endif … … 117 120 mana --norc << EOF >& /dev/null 118 121 macro go 119 rd a test.dark.fits122 rd a sample.dark.fits 120 123 stats a - - - - 121 exec echo \$MEAN \$MEDIAN \$SIGMA > test.dark.dat124 exec echo \$MEAN \$MEDIAN \$SIGMA > sample.dark.dat 122 125 exit 0 123 126 end … … 131 134 132 135 # check dark frame stats 133 set flux = `cat test.dark.dat`136 set flux = `cat sample.dark.dat` 134 137 echo "dark flux: $flux[2]" 135 138 set t = `echo $flux[2] | awk '($1 > 10000){print 1}'` … … 140 143 141 144 # 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" 143 146 set exptime = 0.1 144 set output = test.light.fits147 set output = sample.light.fits 145 148 ssh -n $IOPENER sp_ccdcontrol expose -etime $exptime -shuttermode 1 > $output 146 149 echo "" … … 158 161 endif 159 162 setenv DISPLAY $xdisp 163 echo $xdisp 160 164 161 165 # delete old PS file 162 166 date +%Y.%m.%d | awk '{printf "TEXT 10 20 date:%s\n", $1}' > date.reg 163 167 164 # measure light frame stats165 168 mana --norc << EOF >& /dev/null 166 169 macro go 167 rd a test.light.fits170 rd a sample.light.fits 168 171 stats a - - - - 169 exec echo \$MEAN \$MEDIAN \$SIGMA > test.light.dat172 exec echo \$MEAN \$MEDIAN \$SIGMA > sample.light.dat 170 173 keyword a NAXIS1 nx 171 174 keyword a NAXIS2 ny 172 echo "nx, ny: \$nx, \$ny"175 tv a {\$MEDIAN*1.1} {-0.2*\$MEDIAN} 173 176 resize \$nx \$ny 174 tv a {\$MEDIAN*1.1} {-0.2*\$MEDIAN}175 177 load red date.reg 176 ps -name skyprobe.ps 178 exec sleep 2 179 ps -name sample.light.ps 177 180 exit 0 178 181 end … … 186 189 187 190 # check light frame stats 188 set flux = `cat test.light.dat`191 set flux = `cat sample.light.dat` 189 192 echo "light flux: $flux[2]" 190 193 echo "approx. expected counts: " … … 194 197 echo "" 195 198 196 if (! -e s kyprobe.ps) then197 echo "s kyprobe.ps not created, cannot print out image"198 else 199 lpr -Psps s kyprobe.ps199 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 200 203 echo "image is being printed on SPS" 201 204 endif 202 205 206 rm -f date.reg 207 rm -r sample.dark.dat 208 rm -r sample.light.dat 209 203 210 # test tcsh & loggerh 204 # cp -f $template $dummyfits205 # setenv FFTEMPLATE $dummyfits206 # /cfht/bin/tcsh -B >>& $logfile207 # /cfht/bin/loggerh -E >>& $logfile211 # cp -f $template $dummyfits 212 # setenv FFTEMPLATE $dummyfits 213 # /cfht/bin/tcsh -B >>& $logfile 214 # /cfht/bin/loggerh -E >>& $logfile 208 215 209 216 exit 0; -
trunk/Ohana/src/shell/src/sp_phot
r70 r2444 19 19 set args="" 20 20 set setdate=1 21 while ("$1" != "") 21 set testrun=0 22 while ($#argv) 22 23 switch ($1) 23 24 case -date: … … 33 34 end 34 35 35 if ( $#args != 1) then36 if ("$args[1]" == "") then 36 37 echo "USAGE: sp_phot (filename.fits) [-date YYYYMMDD]"; 38 echo "USAGE: sp_phot (test)"; 37 39 exit 2; 38 40 endif 41 42 if ($args[1] == "test") set testrun = 1 39 43 40 44 # kill off other processes with this name, and their children … … 53 57 end 54 58 55 # setenv PATH {$PATH}:/apps/elixir/bin56 57 59 if ($setdate) then 58 60 set DATE=`date -u +%Y%m%d` 59 61 endif 62 60 63 set spdir = `gconfig SKYPROBE_DIR` 61 64 if ($?) then 62 echo "problem with config system "65 echo "problem with config system: missing SKYPROBE_DIR" 63 66 exit 1; 64 67 endif … … 84 87 85 88 set raw=$args[1] 89 if ($testrun) then 90 set raw = /h/skyprobe/data/Refs/sample.fits 91 endif 92 86 93 set root=`echo $raw | awk -F/ '{print $NF}' | sed s/.fits//` 87 94 … … 104 111 105 112 # 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 114 echo gastro -D CATDIR $TYCHO $SMPDIR/$root.smp 115 gastro -D CATDIR $TYCHO $SMPDIR/$root.smp 107 116 # if ($status) goto cleanup; 108 117 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 119 addspphot -image -cal TYCHO_V TYCHO_B $SMPDIR/$root.smp 110 120 # if ($status) goto cleanup; 121 122 if ($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 139 endif 111 140 112 141 rm -f $SMPDIR/$root.flt -
trunk/Ohana/src/shell/src/sp_plots
r70 r2444 9 9 set datdir=`gconfig DATDIR` 10 10 set script="$confdir/mana/skyprobe" 11 set xhost=`gconfig XHOST `12 set xdisp=`gconfig XDISP `11 set xhost=`gconfig XHOST.SUMMIT` 12 set xdisp=`gconfig XDISP.SUMMIT` 13 13 setenv DISPLAY $xdisp 14 14
Note:
See TracChangeset
for help on using the changeset viewer.
