IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14898


Ignore:
Timestamp:
Sep 19, 2007, 2:04:03 PM (19 years ago)
Author:
Paul Price
Message:

Adding input source list, output source list.

Location:
trunk/ippScripts/scripts
Files:
2 edited

Legend:

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

    r14383 r14898  
    8888
    8989# Identify the input and the template
    90 my ($input, $inputMask, $inputWeight, $inputPath); # Input files and path
    91 my ($template, $templateMask, $templateWeight, $templatePath); # Template files and path
     90my ($input, $inputMask, $inputWeight, $inputPath, $inputPSF); # Input files and path
     91my ($template, $templateMask, $templateWeight, $templatePath, $templateSources); # Template files and path
    9292my $tess_id;                    # Tesselation identifier
    9393my $skycell_id;                 # Skycell identifier
     
    100100            $templateMask = "PPSTACK.OUTPUT.MASK";
    101101            $templateWeight = "PPSTACK.OUTPUT.WEIGHT";
     102            $templateSources = "PPSTACK.OUTPUT.SOURCES";
    102103        } else {
    103104            $templateMask = "PSWARP.OUTPUT.MASK";
    104105            $templateWeight = "PSWARP.OUTPUT.WEIGHT";
     106            $templateSources = "PSWARP.OUTPUT.SOURCES";
    105107        }
    106108    } else {
     
    110112            $inputMask = "PPSTACK.OUTPUT.MASK";
    111113            $inputWeight = "PPSTACK.OUTPUT.WEIGHT";
     114            die "ppStack doesn't output a PSF model yet.";
    112115        } else {
    113116            $inputMask = "PSWARP.OUTPUT.MASK";
    114117            $inputWeight = "PSWARP.OUTPUT.WEIGHT";
     118            $inputPSF = "PSPHOT.PSF.SAVE";
    115119        }
    116120    }
     
    144148$templateWeight = $ipprc->filename($templateWeight, $templatePath);
    145149$inputWeight = $ipprc->filename($inputWeight, $inputPath);
     150$inputPSF = $ipprc->filename($inputPSF, $inputPath);
     151$templateSources = $ipprc->filename($templateSources, $templatePath);
    146152
    147153&my_die("Couldn't find input: $template", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($template);
     
    151157&my_die("Couldn't find input: $inputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inputMask);
    152158&my_die("Couldn't find input: $inputWeight", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inputWeight);
     159&my_die("Couldn't find input: $inputPSF", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inputPSF);
     160&my_die("Couldn't find input: $templateSources", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateSources);
    153161
    154162# Get the output filenames
     
    158166my $outputMask = $ipprc->filename("PPSUB.OUTPUT.MASK", $outputRoot);
    159167my $outputWeight = $ipprc->filename("PPSUB.OUTPUT.WEIGHT", $outputRoot);
     168my $outputSources = $ipprc->filename("PSPHOT.OUTPUT", $outputRoot);
    160169#my $bin1Name =  $ipprc->filename("PPSUB.BIN1", $outputRoot);
    161170#my $bin2Name =  $ipprc->filename("PPSUB.BIN2", $outputRoot);
     
    177186    $command .= " -stats $outputStats";
    178187    $command .= " -recipe PPSTATS WARPSTATS";
     188    $command .= " -sources $templateSources";
     189    $command .= " -psf $inputPSF";
    179190
    180191    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    187198    &my_die("Couldn't find expected output file: $outputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
    188199    &my_die("Couldn't find expected output file: $outputWeight", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
     200    &my_die("Couldn't find expected output file: $outputSources", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);
    189201#    &my_die("Couldn't find expected output file: $bin1Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
    190202#    &my_die("Couldn't find expected output file: $bin2Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
  • trunk/ippScripts/scripts/stack_skycell.pl

    r14718 r14898  
    120120                                      UNLINK => !$save_temps );
    121121my $num = 0;
     122my $inputSources;               # Sources to use as stamps
    122123foreach my $file (@$files) {
    123124    print $listFile "INPUT$num\tMETADATA\n";
     
    141142
    142143    print $listFile "END\n\n";
     144
     145    unless (defined $inputSources) {
     146        $inputSources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $file->{path_base});
     147        &my_die("Source file $inputSources does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $inputSources );
     148    }
     149       
    143150}
    144151
     
    149156my $outputMask = $ipprc->filename("PPSTACK.OUTPUT.MASK", $outputRoot);
    150157my $outputWeight = $ipprc->filename("PPSTACK.OUTPUT.WEIGHT", $outputRoot);
     158my $outputSources = $ipprc->filename("PPSTACK.OUTPUT.SOURCES", $outputRoot);
    151159#my $bin1Name =  $ipprc->filename("PPSTACK.BIN1", $outputRoot);
    152160#my $bin2Name =  $ipprc->filename("PPSTACK.BIN2", $outputRoot);
     
    158166    $command .= " -stats $outputStats";
    159167    $command .= " -recipe PPSTATS WARPSTATS";
     168    $command .= " -sources $inputSources";
     169    $command .= " -target 5.0";
     170    $command .= " -photometry";
     171
     172    print "\n\nWARNING: Convolving to 1 arcsec FWHM seeing!\n\n";
    160173
    161174    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    168181    &my_die("Couldn't find expected output file: $outputMask", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
    169182    &my_die("Couldn't find expected output file: $outputWeight", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
     183    &my_die("Couldn't find expected output file: $outputSources", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);
    170184#    &my_die("Couldn't find expected output file: $bin1Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
    171185#    &my_die("Couldn't find expected output file: $bin2Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
Note: See TracChangeset for help on using the changeset viewer.