IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 19, 2009, 2:54:59 PM (17 years ago)
Author:
bills
Message:

manage magicked status of diffSkyfiles made with magicked inputs

File:
1 edited

Legend:

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

    r23435 r23438  
    9595my $tess_id;                    # Tesselation identifier
    9696my $camera;                     # Camera
     97my $magicked_0;
     98my $magicked_1;
    9799foreach my $file (@$files) {
    98100    if (defined $file->{template} and $file->{template}) {
     
    103105            $templateVariance = "PPSTACK.OUTPUT.VARIANCE";
    104106            $templateSources = "PSPHOT.OUT.CMF.MEF";  ## this must be consistent with the value in stack_skycell.pl:161
     107            # template is a stack so it doesn't need to be magicked
     108            $magicked_1 = 1;
    105109            ## use an explicit stack name for psphot output objects
    106110        } else {
     
    108112            $templateVariance = "PSWARP.OUTPUT.VARIANCE";
    109113            $templateSources = "PSWARP.OUTPUT.SOURCES";
     114            $magicked_1 = $file->{magicked};
    110115        }
    111116    } else {
    112117        $input = $file->{uri};
    113118        $inputPath = $file->{path_base};
     119        $magicked_0 = $file->{magicked};    # if input is a stack the output can't be "magicked"
    114120        if ($file->{warp_id} == 0) {
    115121            $inputMask = "PPSTACK.OUTPUT.MASK";
     
    146152&my_die("Unable to identify camera", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless defined $camera;
    147153$ipprc->define_camera($camera);
     154
     155# Compute the magicked status of the output.
     156# The output file will be considered magicked if the input has been magicked and the
     157# template is either a stack or a warp that has been magicked.
     158# note that difftool -inputskyfile outputs the magicked boolean as an int not T or F
     159# because the output is constructed from a union of two selects
     160my $magicked = $magicked_0 && $magicked_1;
    148161
    149162# Recipes to use based on reduction class
     
    265278        my $command = "$difftool -adddiffskyfile -diff_id $diff_id -skycell_id $skycell_id -uri $outputName -path_base $outroot";
    266279        $command .= " $cmdflags";
     280        $command .= " -magicked" if $magicked;
    267281        $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
    268282        $command .= " -hostname $host" if defined $host;
Note: See TracChangeset for help on using the changeset viewer.