IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13698


Ignore:
Timestamp:
Jun 7, 2007, 9:45:27 AM (19 years ago)
Author:
Paul Price
Message:

Commenting out the database error-handling. This means that bad configurations won't mark a product as bad in the database, which is currently annoying because we can't rewind.

Location:
trunk/ippScripts/scripts
Files:
16 edited

Legend:

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

    r13652 r13698  
    243243        my $command = "$camtool -addprocessedexp -cam_id $cam_id -code $exit_code";
    244244        $command .= " -dbname $dbname" if defined $dbname;
    245         system ($command);
     245###        system ($command);
    246246    }
    247247    exit $exit_code;
  • trunk/ippScripts/scripts/chip_imfile.pl

    r13652 r13698  
    7777$ppImage .= " -dbname $dbname" if defined $dbname;
    7878
     79&my_die("Couldn't find input file: $input\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input);
    7980
    8081$workdir = caturi( $workdir, $exp_id ) if defined $workdir;
     
    8283my $outputRoot = $ipprc->file_prepare( "$exp_id.chp$chip_id", $workdir, $input );
    8384my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id);
     85my $outputMask = $ipprc->filename("PPIMAGE.OUTPUT.MASK", $outputRoot, $class_id);
    8486my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $class_id);
    8587my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $class_id);
     
    101103        &my_die("Unable to perform ppImage: $error_code", $chip_id, $class_id, $error_code);
    102104    }
    103     &my_die("Couldn't find expected output file: $outputImage\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputImage);
    104     &my_die("Couldn't find expected output file: $outputBin1\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBin1);
    105     &my_die("Couldn't find expected output file: $outputBin2\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBin2);
    106     &my_die("Couldn't find expected output file: $outputStats\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats);
     105    &my_die("Couldn't find expected output file: $outputImage\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage);
     106    &my_die("Couldn't find expected output file: $outputMask\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
     107    &my_die("Couldn't find expected output file: $outputBin1\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1);
     108    &my_die("Couldn't find expected output file: $outputBin2\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2);
     109    &my_die("Couldn't find expected output file: $outputStats\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats);
    107110
    108111    # Get the statistics on the processed image
     
    159162        $command .= " -uri $outputImage";
    160163        $command .= " -dbname $dbname" if defined $dbname;
    161         system ($command);
     164###        system ($command);
    162165    }
    163166    exit $exit_code;
  • trunk/ippScripts/scripts/detrend_norm_apply.pl

    r13275 r13698  
    149149        my $command = "$dettool -addnormalizedimfile -det_id $det_id -iteration $iter -class_id $class_id -code $exit_code";
    150150        $command .= " -dbname $dbname" if defined $dbname;
    151         system ($command);
     151###        system ($command);
    152152    }
    153153    exit $exit_code;
  • trunk/ippScripts/scripts/detrend_norm_calc.pl

    r12800 r13698  
    204204        my $command = "$dettool -addnormalizedstat -det_id $det_id -iteration $iter -code $exit_code";
    205205        $command .= " -dbname $dbname" if defined $dbname;
    206         system ($command);
     206###        system ($command);
    207207    }
    208208    exit $exit_code;
  • trunk/ippScripts/scripts/detrend_norm_exp.pl

    r13590 r13698  
    202202        my $command = "$dettool -addprocessedimfile -det_id $det_id -iter $iter -code $exit_code";
    203203        $command .= " -dbname $dbname" if defined $dbname;
    204         system ($command);
     204###        system ($command);
    205205    }
    206206    exit $exit_code;
  • trunk/ippScripts/scripts/detrend_process_exp.pl

    r13680 r13698  
    212212        my $command = "$dettool -addprocessedexp -det_id $det_id -exp_tag $exp_tag -code $exit_code";
    213213        $command .= " -dbname $dbname" if defined $dbname;
    214         system ($command);
     214###        system ($command);
    215215    }
    216216    exit $exit_code;
  • trunk/ippScripts/scripts/detrend_process_imfile.pl

    r13680 r13698  
    154154        my $command = "$dettool -addprocessedimfile -det_id $det_id -exp_tag $exp_tag -class_id $class_id -code $exit_code";
    155155        $command .= " -dbname $dbname" if defined $dbname;
    156         system ($command);
     156###        system ($command);
    157157    }
    158158    exit $exit_code;
  • trunk/ippScripts/scripts/detrend_reject_exp.pl

    r13639 r13698  
    318318        my $command = "$dettool -adddetrunsummary -det_id $det_id -iteration $iter -code $exit_code";
    319319        $command .= " -dbname $dbname" if defined $dbname;
    320         system ($command);
     320###        system ($command);
    321321    }
    322322    exit $exit_code;
  • trunk/ippScripts/scripts/detrend_reject_imfile.pl

    r13683 r13698  
    394394        my $command = "$dettool -addresidexp -det_id $det_id -iteration $iter -exp_tag $exp_tag -code $exit_code";
    395395        $command .= " -dbname $dbname" if defined $dbname;
    396         system ($command);
     396###        system ($command);
    397397    }
    398398    exit $exit_code;
  • trunk/ippScripts/scripts/detrend_resid.pl

    r13683 r13698  
    217217        my $command = "$dettool -addresidimfile -det_id $det_id -iteration $iter -exp_tag $exp_tag -class_id $class_id -code $exit_code";
    218218        $command .= " -dbname $dbname" if defined $dbname;
    219         system ($command);
     219###        system ($command);
    220220    }
    221221    exit $exit_code;
  • trunk/ippScripts/scripts/detrend_stack.pl

    r13678 r13698  
    173173        my $command = "$dettool -addstacked -det_id $det_id -iteration $iter -class_id $class_id -code $exit_code";
    174174        $command .= " -dbname $dbname" if defined $dbname;
    175         system ($command);
     175###        system ($command);
    176176    }
    177177    exit $exit_code;
  • trunk/ippScripts/scripts/diff_skycell.pl

    r13663 r13698  
    8080
    8181# Identify the input and the template
    82 my $input;                      # Input file
    83 my $template;                   # Template file
     82my $input, $inputMask;          # Input file and mask
     83my $template, $templateMask;    # Template file and mask
    8484my $tess_id;                    # Tesselation identifier
    8585my $skycell_id;                 # Skycell identifier
     
    8888    if (defined $file->{template} and $file->{template}) {
    8989        $template = $file->{uri};
     90        $templateMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $file->{path_base});
    9091    } else {
    9192        $input = $file->{uri};
     93        $inputMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $file->{path_base});
    9294    }
    9395    if (defined $tess_id) {
     
    115117$ipprc->define_camera($camera);
    116118
     119&my_die("Couldn't find input: $template", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($template);
     120&my_die("Couldn't find input: $templateMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateMask);
     121&my_die("Couldn't find input: $nput", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input);
     122&my_die("Couldn't find input: $nputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inputMask);
    117123
    118124# Get the output filenames
    119125$workdir = caturi( $workdir, "tess_" . $tess_id, "sky_" . $skycell_id ) if defined $workdir;
    120126my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.dif$diff_id", $workdir, $input );
    121 my $outputName = $outputRoot . ".fits";
    122 my $bin1Name =  $ipprc->filename("PPIMAGE.BIN1", $outputRoot);
    123 my $bin2Name =  $ipprc->filename("PPIMAGE.BIN2", $outputRoot);
     127my $outputName = $ipprc->filename("PPSUB.OUTPUT", $outputRoot);
     128my $outputMask = $ipprc->filename("PPSUB.OUTPUT.MASK", $outputRoot);
     129#my $bin1Name =  $ipprc->filename("PPSUB.BIN1", $outputRoot);
     130#my $bin2Name =  $ipprc->filename("PPSUB.BIN2", $outputRoot);
    124131my $outputStats = $outputRoot . '.stats';
    125132
     
    133140my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser
    134141unless ($no_op) {
    135     my $command = "$ppSub $input $template $outputName"; # Command to run ppSub
     142    my $command = "$ppSub $input $template $outputName -inmask $inputMask -refmask $templateMask -stat $outputStats"; # Command to run ppSub
    136143
    137144    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    141148        &my_die("Unable to perform ppSub: $error_code", $diff_id, $error_code);
    142149    }
    143     &my_die("Couldn't find expected output file: $outputName", $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputName);
    144 #    &my_die("Couldn't find expected output file: $bin1Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin1Name);
    145 #    &my_die("Couldn't find expected output file: $bin2Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin2Name);
    146 #    &my_die("Couldn't find expected output file: $outputStats", $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats);
     150    &my_die("Couldn't find expected output file: $outputName", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName);
     151    &my_die("Couldn't find expected output file: $outputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
     152#    &my_die("Couldn't find expected output file: $bin1Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
     153#    &my_die("Couldn't find expected output file: $bin2Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
     154    &my_die("Couldn't find expected output file: $outputStats", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats);
    147155
    148156    # Get the statistics on the residual image
     
    164172    # Add the subtraction result
    165173    {
    166         my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName"; # -path_base $outputRoot";
     174        my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName -path_base $outputRoot";
    167175        $command .= " -bg $bg -bg_stdev $bg_stdev";
    168176        $command .= " -dbname $dbname" if defined $dbname;
     
    202210        my $command = "$difftool -updaterun -diff_id $diff_id -state stop -code $exit_code";
    203211        $command .= " -dbname $dbname" if defined $dbname;
    204         system ($command);
     212###        system ($command);
    205213    }
    206214    exit $exit_code;
  • trunk/ippScripts/scripts/register_exp.pl

    r13606 r13698  
    255255        my $command = "$regtool -addprocessedexp -exp_tag $exp_tag -code $exit_code";
    256256        $command .= " -dbname $dbname" if defined $dbname;
    257         system($command);
     257###        system($command);
    258258    }
    259259    exit $exit_code;
  • trunk/ippScripts/scripts/register_imfile.pl

    r13606 r13698  
    200200        my $command = "$regtool -addprocessedimfile -exp_tag $exp_tag -class_id $class_id -code $exit_code";
    201201        $command .= " -dbname $dbname" if defined $dbname;
    202         system ($command);
     202###        system ($command);
    203203    }
    204204    exit $exit_code;
  • trunk/ippScripts/scripts/stack_skycell.pl

    r13668 r13698  
    113113    print $listFile "INPUT$num\tMETADATA\n";
    114114    $num++;
    115     print $listFile "\tIMAGE\tSTR\t" . $file->{uri} . "\n";
     115
     116    my $image = $file->{uri};   # Image name
     117    my $mask = $ipprc->filename( "PSWARP.OUTPUT.MASK", $file->{path_base} ); # Mask name
     118
     119    &my_die("Image $image does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $image );
     120    &my_die("Mask $mask does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $mask );
     121   
     122    print $listFile "\tIMAGE\tSTR\t" . $image . "\n";
     123    print $listFile "\tMASK\tSTR\t" . $mask . "\n";
    116124
    117125    ### XXX NEED TO UPDATE THESE appropriately
    118 #    print $listFile "\tMASK\tSTR\t" . "NULL" . "\n";
    119126    print $listFile "\tSEEING\tF32\t" . 1.0 . "\n";
    120127    print $listFile "\tWEIGHT\tF32\t" . 1.0 . "\n";
     
    127134$workdir = caturi( $workdir, "tess_" . $tess_id, "sky_" . $skycell_id ) if defined $workdir;
    128135my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.stk$stack_id", $workdir, $$files[0]->{uri} );
    129 my $outputName = $outputRoot . ".fits";
    130 #my $bin1Name =  $ipprc->filename("PPSTAC.BIN1", $outputRoot);
    131 #my $bin2Name =  $ipprc->filename("PPSTAC.BIN2", $outputRoot);
     136my $outputName = $ipprc->filename("PPSTACK.OUTPUT", $outputRoot);
     137my $outputMask = $ipprc->filename("PPSTACK.OUTPUT.MASK", $outputRoot);
     138#my $bin1Name =  $ipprc->filename("PPSTACK.BIN1", $outputRoot);
     139#my $bin2Name =  $ipprc->filename("PPSTACK.BIN2", $outputRoot);
    132140my $outputStats = $outputRoot . '.stats';
    133141
     
    143151        &my_die("Unable to perform ppImage: $error_code", $stack_id, $error_code);
    144152    }
    145     &my_die("Couldn't find expected output file: $outputName", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputName);
    146 #    &my_die("Couldn't find expected output file: $bin1Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin1Name);
    147 #    &my_die("Couldn't find expected output file: $bin2Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin2Name);
    148     &my_die("Couldn't find expected output file: $outputStats", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats);
     153    &my_die("Couldn't find expected output file: $outputName", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName);
     154    &my_die("Couldn't find expected output file: $outputMask", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
     155#    &my_die("Couldn't find expected output file: $bin1Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
     156#    &my_die("Couldn't find expected output file: $bin2Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
     157    &my_die("Couldn't find expected output file: $outputStats", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats);
    149158
    150159    # Get the statistics on the stacked image
     
    166175    # Add the stack result
    167176    {
    168         my $command = "$stacktool -addsumskyfile -stack_id $stack_id -uri $outputName"; # -path_base $outputRoot";
     177        my $command = "$stacktool -addsumskyfile -stack_id $stack_id -uri $outputName -path_base $outputRoot";
    169178        $command .= " -bg $bg -bg_stdev $bg_stdev";
    170179        $command .= " -dbname $dbname" if defined $dbname;
     
    204213        my $command = "$stacktool -updaterun -stack_id $stack_id -state stop -code $exit_code";
    205214        $command .= " -dbname $dbname" if defined $dbname;
    206         system ($command);
     215###        system ($command);
    207216    }
    208217    exit $exit_code;
  • trunk/ippScripts/scripts/warp_skycell.pl

    r13275 r13698  
    8888my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.wrp$warp_id", $workdir, $$imfiles[0]->{uri} );
    8989my $outputImage = $ipprc->filename("PSWARP.OUTPUT", $outputRoot, $skycell_id );
     90my $outputMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $outputRoot, $skycell_id);
    9091my $outputBin1 = $ipprc->filename("PSWARP.BIN1", $outputRoot, $skycell_id );
    9192my $outputBin2 = $ipprc->filename("PSWARP.BIN2", $outputRoot, $skycell_id );
     
    9495
    9596# Get list of filenames
    96 my ($listFile, $listName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.list.XXXX", UNLINK => 1);
     97my ($list1File, $list1Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.image.list.XXXX", UNLINK => 1);
     98my ($list2File, $list2Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.mask.list.XXXX", UNLINK => 1);
    9799foreach my $imfile (@$imfiles) {
    98     print $listFile ( $imfile->{uri} . "\n");
     100    my $image = $imfile->{uri}; # Image name
     101    my $mask = $ipprc->filename("PPIMAGE.OUTPUT.MASK", $imfile->{path_base}, $imfile->{class_id}); # Mask name
     102    &my_die("Couldn't find input file: $image", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($image);
     103    &my_die("Couldn't find input file: $mask", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($mask);
     104
     105    print $list1File ( $image . "\n");
     106    print $list2File ( $mask  . "\n");
    99107}
    100 close $listFile;
     108close $list1File;
     109close $list2File;
    101110
    102111# Run pswarp
    103112my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser
    104113unless ($no_op) {
    105     my $command = "$pswarp -list $listName $outputRoot $skyFile -stat $outputStats"; # Command to run pswarp
     114    my $command = "$pswarp -list $list1Name -masklist $list2Name $outputRoot $skyFile -stat $outputStats"; # Command to run pswarp
    106115    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    107116        run(command => $command, verbose => 1);
     
    110119        &my_die("Unable to perform pswarp: $error_code", $warp_id, $skycell_id, $error_code);
    111120    }
    112     &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputImage);
    113     &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats);
    114 #    &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBin1);
    115 #    &my_die("Couldn't find expected output file: $outputBin2", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBin2);
     121    &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage);
     122    &my_die("Couldn't find expected output file: $outputMask", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
     123    &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats);
     124#    &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1);
     125#    &my_die("Couldn't find expected output file: $outputBin2", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2);
    116126
    117127    # Get the statistics on the warped image
     
    130140unless ($no_update) {
    131141    my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id" .
    132         " -uri $outputImage"; # -path_base $outputRoot"; # Command to run dettool
     142        " -uri $outputImage -path_base $outputRoot"; # -path_base $outputRoot"; # Command to run dettool
    133143    $command .= " -bg $bg -bg_stdev $bg_stdev";
    134144    $command .= " -dbname $dbname" if defined $dbname;
     
    155165        my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id -code $exit_code";
    156166        $command .= " -dbname $dbname" if defined $dbname;
    157         system ($command);
     167###        system ($command);
    158168    }
    159169    exit $exit_code;
Note: See TracChangeset for help on using the changeset viewer.