IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2012, 5:46:39 PM (14 years ago)
Author:
bills
Message:

In psphot and psphotStack accept exposure number images (EXPNUM) as inputs.
If supplied set the N_FRAMES value for each source based on the
value in the EXPNUM image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/staticsky.pl

    r31662 r33690  
    8989
    9090my $logDest = $ipprc->filename("LOG.EXP", $outroot);
    91 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $sky_id, $PS_EXIT_SYS_ERROR ) if $redirect;
     91$ipprc->redirect_to_logfile($logDest) or my_die( "Unable to redirect output", $sky_id, $PS_EXIT_SYS_ERROR ) if $redirect;
    9292
    9393my $traceDest      = $ipprc->filename("TRACE.EXP", $outroot);
     
    148148            my $maskCnv   = $ipprc->filename("PPSTACK.OUTPUT.MASK",     $path_base ); # Mask name
    149149            my $weightCnv = $ipprc->filename("PPSTACK.OUTPUT.VARIANCE", $path_base ); # Weight name
     150            my $expnumCnv = $ipprc->filename("PPSTACK.OUTPUT.EXPNUM",   $path_base ); # Expnum name
    150151
    151152            my $imageRaw  = $ipprc->filename("PPSTACK.UNCONV",          $path_base ); # Image name
    152153            my $maskRaw   = $ipprc->filename("PPSTACK.UNCONV.MASK",     $path_base ); # Mask name
    153154            my $weightRaw = $ipprc->filename("PPSTACK.UNCONV.VARIANCE", $path_base ); # Weight name
     155            my $expnumRaw = $ipprc->filename("PPSTACK.UNCONV.EXPNUM",   $path_base ); # Expnum name
    154156
    155157            my $sources   = $ipprc->filename("PSPHOT.OUT.CMF.MEF",      $path_base ); # Sources name
     
    162164            &my_die("Couldn't find input: $maskRaw",   $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$maskRaw");
    163165            &my_die("Couldn't find input: $weightRaw", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$weightRaw");
     166            &my_die("Couldn't find input: $expnumRaw", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$expnumRaw");
    164167            &my_die("Couldn't find input: $imageCnv",  $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$imageCnv");
    165168            &my_die("Couldn't find input: $maskCnv",   $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$maskCnv");
    166169            &my_die("Couldn't find input: $weightCnv", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$weightCnv");
     170            &my_die("Couldn't find input: $expnumCnv", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$expnumCnv");
    167171            &my_die("Couldn't find input: $psfCnv",    $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$psfCnv");
    168172            &my_die("Couldn't find input: $sources",   $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$sources");
     
    171175            print $listFile "  RAW:MASK      STR  " . $maskRaw   . "\n";
    172176            print $listFile "  RAW:VARIANCE  STR  " . $weightRaw . "\n";
     177            print $listFile "  RAW:EXPNUM    STR  " . $expnumRaw . "\n";
    173178
    174179            print $listFile "  CNV:IMAGE     STR  " . $imageCnv  . "\n";
    175180            print $listFile "  CNV:MASK      STR  " . $maskCnv   . "\n";
    176181            print $listFile "  CNV:VARIANCE  STR  " . $weightCnv . "\n";
     182            print $listFile "  CNV:EXPNUM    STR  " . $expnumCnv . "\n";
    177183            print $listFile "  CNV:PSF       STR  " . $psfCnv    . "\n";
    178184
     
    288294        my $use_raw = metadataLookupBool($recipeData, 'PSPHOT.STACK.USE.RAW');
    289295
    290         my ($image, $mask, $variance);
     296        my ($image, $mask, $variance, $expnum);
    291297        if ($use_raw) {
    292298            $image  = $ipprc->filename("PPSTACK.UNCONV",          $path_base ); # Image name
     
    297303            $mask   = $ipprc->filename("PPSTACK.OUTPUT.MASK",     $path_base ); # Mask name
    298304            $variance = $ipprc->filename("PPSTACK.OUTPUT.VARIANCE", $path_base ); # Weight name
     305            $expnum = $ipprc->filename("PPSTACK.OUTPUT.EXPNUM", $path_base ); # Weight name
    299306        }
    300307
     
    306313        &my_die("Couldn't find input: $mask",   $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$mask");
    307314        &my_die("Couldn't find input: $variance", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$variance");
     315        &my_die("Couldn't find input: $expnum", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$expnum");
    308316
    309317        # Perform stack photometry analysis
     
    313321            $command .= " -mask $mask";
    314322            $command .= " -variance $variance";
     323            $command .= " -expnum $expnum";
    315324            $command .= " -threads $threads" if defined $threads;
    316325            $command .= " -recipe PSPHOT  $recipe_psphot";
Note: See TracChangeset for help on using the changeset viewer.