IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 7, 2009, 4:08:25 PM (17 years ago)
Author:
Paul Price
Message:

Merging trunk (r25026) to get up-to-date on old branch.

Location:
branches/pap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/pap

  • branches/pap/ippScripts/scripts/detrend_resid_imfile.pl

    r23688 r25027  
    7474    defined $detrend;
    7575
     76# force det_type to be upper-case in this script
     77$det_type = uc($det_type);
     78
    7679my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $det_id, $iter, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
    7780my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) or my_die( "Unable to find LOG.IMFILE", $det_id, $iter, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR );
     
    8386my $recipe;                     # Name of recipe to use
    8487if ($mode eq 'master') {
    85     $recipe = uc($det_type) . '_RESID';
     88    $recipe = $det_type . '_RESID';
    8689} elsif ($mode eq 'verify') {
    87     $recipe = uc($det_type) . '_VERIFY';
     90    $recipe = $det_type . '_VERIFY';
    8891} else {
    8992    &my_die("Unrecognised mode: $mode", $det_id, $iter, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
     
    9295print "raw recipe: $recipe\n";
    9396my $ppimage_recipe = $ipprc->reduction($reduction, $recipe);
    94 my $jpeg_recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_RESID');
     97my $jpeg_recipe = $ipprc->reduction($reduction, $det_type . '_JPEG_RESID');
    9598print "real recipe: $recipe\n";
    9699
    97100# Flags to specify the particular detrend to use
    98101use constant DETRENDS => {
    99     'bias'             => '-bias',      # Specify the bias frame
    100     'dark'             => '-dark',      # Specify the dark frame
    101     'dark_premask'     => '-dark',      # Specify the dark frame
    102     'shutter'          => '-shutter',   # Specify the shutter frame
    103     'flat_premask'     => '-flat',      # Specify the flat frame
    104     'domeflat_premask' => '-flat',      # Specify the flat frame
    105     'skyflat_premask'  => '-flat',      # Specify the flat frame
    106     'flat_raw'         => '-flat',      # Specify the flat frame
    107     'domeflat_raw'     => '-flat',      # Specify the flat frame
    108     'skyflat_raw'      => '-flat',      # Specify the flat frame
    109     'flat'             => '-flat',      # Specify the flat frame
    110     'domeflat'         => '-flat',      # Specify the flat frame
    111     'skyflat'          => '-flat',      # Specify the flat frame
    112     'fringe'           => '-fringe',    # Specify the fringe frame
    113     'mask'             => '-mask',      # Specify the mask frame
    114     'darkmask'         => '-mask',      # Specify the mask frame
    115     'flatmask'         => '-mask',      # Specify the mask frame
    116     'ctemask'          => '-mask',      # Specify the mask frame
     102    'BIAS'             => '-bias',      # Specify the bias frame
     103    'DARK'             => '-dark',      # Specify the dark frame
     104    'DARK_PREMASK'     => '-dark',      # Specify the dark frame
     105    'DARKTEST'         => '-dark',      # Specify the dark frame
     106    'SHUTTER'          => '-shutter',   # Specify the shutter frame
     107    'FLAT_PREMASK'     => '-flat',      # Specify the flat frame
     108    'DOMEFLAT_PREMASK' => '-flat',      # Specify the flat frame
     109    'SKYFLAT_PREMASK'  => '-flat',      # Specify the flat frame
     110    'FLAT_RAW'         => '-flat',      # Specify the flat frame
     111    'DOMEFLAT_RAW'     => '-flat',      # Specify the flat frame
     112    'SKYFLAT_RAW'      => '-flat',      # Specify the flat frame
     113    'FLAT'             => '-flat',      # Specify the flat frame
     114    'DOMEFLAT'         => '-flat',      # Specify the flat frame
     115    'SKYFLAT'          => '-flat',      # Specify the flat frame
     116    'FRINGE'           => '-fringe',    # Specify the fringe frame
     117    'MASK'             => '-mask',      # Specify the mask frame
     118    'DARKMASK'         => '-mask',      # Specify the mask frame
     119    'FLATMASK'         => '-mask',      # Specify the mask frame
     120    'CTEMASK'          => '-mask',      # Specify the mask frame
    117121};
    118122
     
    124128                  'BIAS'             => 'PPIMAGE.OUTPUT.RESID',
    125129                  'DARK'             => 'PPIMAGE.OUTPUT.RESID',
     130                  'DARKTEST'         => 'PPIMAGE.OUTPUT.RESID',
    126131                  'DARK_PREMASK'     => 'PPIMAGE.OUTPUT.RESID',
    127132                  'SHUTTER'          => 'PPIMAGE.OUTPUT.DETREND',
     
    172177
    173178    # Detrend to use in processing
    174     my $detFlag = DETRENDS->{lc($det_type)};
     179    my $detFlag = DETRENDS->{$det_type};
    175180    &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $exp_id, $class_id, $PS_EXIT_PROG_ERROR) unless defined $detFlag;
    176181    $command .= " $detFlag $detrend";
Note: See TracChangeset for help on using the changeset viewer.