IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2628


Ignore:
Timestamp:
Dec 3, 2004, 9:31:55 PM (22 years ago)
Author:
eugene
Message:

updated changes from cfht

Location:
trunk/Ohana/src
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/extract.c

    r2598 r2628  
    5151  }
    5252
    53   if ((out = SelectBuffer (argv[2], OLDBUFFER, TRUE)) == NULL) {
     53  if ((out = SelectBuffer (argv[2], OLDBUFFER, FALSE)) == NULL) {
    5454    if ((out = SelectBuffer (argv[2], ANYBUFFER, TRUE)) == NULL) return (FALSE);
    5555    fits_free_matrix (&out[0].matrix);
  • trunk/Ohana/src/perl/src/darktime.linear

    r17 r2628  
    1313if (@ARGV != 2) { die "USAGE: darktime.linear (image.exptime) (dark.exptime)\n" }
    1414
    15 print STDOUT "1.0\n";
     15
     16$t1 = $ARGV[0];
     17$t2 = $ARGV[1];
     18
     19$r = $t1 / $t2;
     20
     21# no dark correction for exptime < 60 sec
     22if ($t1 < 60) { $r = 0.0; }
     23
     24print STDOUT "$r\n";
    1625
    1726exit 0;
  • trunk/Ohana/src/perl/src/dt.select

    r120 r2628  
    149149           
    150150            # test for acceptable flux
    151             $Flux = $words2[11] / $words2[7];
     151            if ($words2[7] > 0.0) {
     152               $Flux = $words2[11] / $words2[7];
     153            } else {
     154               $Flux = 0.0;
     155            }
    152156            if ($Flux < $minflux) { print STDERR "$words[5] rejected: flux too low: $Flux vs $minflux\n"; next FRAME; }
    153157        }
  • trunk/Ohana/src/perl/src/normalize

    r118 r2628  
    11#!/usr/bin/env perl
    22
    3 $revline = "\$Revision: 1.5 $?";
     3$revline = "\$Revision: 1.6 $?";
    44($version) = $revline =~ m|\$Revision:\s*(\S*)|;
    55
     
    110110        print STDERR "ERROR: ref file $args[3] is missing\n";
    111111        exit 1;
     112    }
     113    $chipref = `gconfig FLIPS_REF_CCD`; chop ($chipref);
     114    $baseref = $chipref;
     115    print STDERR "Normalizing reference: using file $ref\n";
     116
     117    # Check that FLIPS_REF_CCD is not in CHIPSKIP, otherwise find another CCD
     118    $Nccd = `cameraconfig -Nccd`; chop ($Nccd);
     119    @ccdn = split (" ", `cameraconfig -ccdn`);
     120    $CHIPSKIP = `gconfig CHIP_SKIP_LIST`; chop $CHIPSKIP;
     121    @chipskip = ();
     122    if (-e $CHIPSKIP) {
     123
     124       open (FILE, $CHIPSKIP);
     125       @chipskip = <FILE>;
     126       close (FILE);
     127       foreach $chip (@chipskip) { chop $chip; }
     128
     129       foreach $chip (@chipskip) {
     130          $chip =~ s/ccd//;
     131          if ($chip eq $chipref) {
     132             print STDERR "Warning: found reference chip in skip list ($chipref)\n";
     133             
     134             # Find a new reference: increment by one
     135             for ($i = 0; $i < $Nccd; $i++) {
     136                $ccdindex = $ccdn[$i];
     137                if ( $ccdindex eq $chipref ) {
     138                   $newref = $ccdn[$i + 1];
     139                }
     140             }
     141             $chipref = $newref
     142          }
     143       }
     144       # Substitute the CCD reference number in the name of the ref FITS file
     145       $ref =~ s/.$baseref./.$chipref./;
     146       print STDERR "New SkipChip selection: using ref file $ref\n";
    112147    }
    113148   
Note: See TracChangeset for help on using the changeset viewer.