Changeset 22
- Timestamp:
- Jan 20, 2003, 10:42:59 AM (24 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/perl/src/fr.getfringe (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/perl/src/fr.getfringe
r17 r22 7 7 8 8 # define the path to include FLIPS: 9 $flipsconf=`gconfig -q FLIPSCONF`; chop ($flipsconf);10 $flipspath=`gconfig -q FLIPSPATH`; chop ($flipspath);9 $flipsconf=`gconfig -q FLIPSCONF`; chop $flipsconf; 10 $flipspath=`gconfig -q FLIPSPATH`; chop $flipspath; 11 11 $ENV{'PATH'} = "$ENV{'PATH'}:$flipspath"; 12 12 $ENV{'FLIPSDIR'} = $flipsconf; … … 23 23 foreach $line (@inlist) { chop $line; } 24 24 25 # g tfringe is appendingto the output file:25 # getfringe appends to the output file: 26 26 unlink ($output); 27 27 28 # we construct the Fringe Coord File from: FRINGE_COORD_PATH/CAMERA-FILTER-CCDNN-FringeCoord.reg 29 $fkey = `gconfig -q FILTER-KEYWORD`; chop ($fkey); 30 $ckey = `gconfig -q CAMERA-KEYWORD`; chop ($ckey); 31 $coordpath = `gconfig -q FRINGE_COORD_PATH`; chop ($coordpath); 32 $Nccd = `cameraconfig -Nccd`; chop ($Nccd); 33 $answer = `cameraconfig -ccds`; 34 @ccds = split (" ", $answer); 35 36 # double check lists size: 28 # basic camera data 29 $Nccd = `cameraconfig -Nccd`; chop $Nccd; 30 $answer = `cameraconfig -ccds`; @ccds = split (" ", $answer); 37 31 if ($Nccd != @inlist) { die "ERROR: mis-matched image list sizes\n"; } 38 32 39 # find filter and camera from image 40 $answer = `echo $inlist[0] | fields $fkey $ckey`; 41 ($name, $filtvalue, $camera) = split (" ", $answer); 42 $filter = `filtnames $filtvalue`; chop $filter; 43 if ($?) { die "can't find filter for $filtvalue\n"; } 44 print STDERR "camera: $camera\n"; 45 if ($camera eq "") { $camera = "WFI"; } 46 #### a temporary hack to for this to work... 33 # find fringe coordinate file 34 $coordfile = `detsearch -image $inlist[0] 00 split -type frpts`; chop $coordfile; 35 if ($?) { die "ERROR: can't find fringe point file for this image\n"; } 47 36 37 # each call to getfringe adds a line to $output 48 38 for ($ccd = 0; $ccd < $Nccd; $ccd++) { 49 50 $infile = $inlist[$ccd]; 51 $coordfile = sprintf "%s/%s-%s-CCD%s-FringeCoord.reg", $coordpath, $camera, $filter, $ccds[$ccd]; 52 53 # each call to gtfringe adds a line to $output 54 vsystem ("getfringe $infile $coordfile $bin $output"); 55 if ($?) { 56 print STDERR "ERROR running getfringe\n"; 57 exit 1; 58 } 39 vsystem ("getfringe $inlist[$ccd] $ccds[$ccd] $coordfile $bin $output"); 40 if ($?) { die "ERROR running getfringe\n"; } 59 41 } 60 42
Note:
See TracChangeset
for help on using the changeset viewer.
