IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 22


Ignore:
Timestamp:
Jan 20, 2003, 10:42:59 AM (24 years ago)
Author:
eugene
Message:

convert to FITS table fringe pts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/perl/src/fr.getfringe

    r17 r22  
    77
    88# 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;
    1111$ENV{'PATH'} = "$ENV{'PATH'}:$flipspath";
    1212$ENV{'FLIPSDIR'} = $flipsconf;
     
    2323foreach $line (@inlist) { chop $line; }
    2424
    25 # gtfringe is appending to the output file:
     25# getfringe appends to the output file:
    2626unlink ($output);
    2727
    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);
    3731if ($Nccd != @inlist) { die "ERROR: mis-matched image list sizes\n"; }
    3832
    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;
     35if ($?) { die "ERROR: can't find fringe point file for this image\n"; }
    4736
     37# each call to getfringe adds a line to $output
    4838for ($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"; }
    5941}
    6042
Note: See TracChangeset for help on using the changeset viewer.