IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 30, 2009, 2:04:18 PM (17 years ago)
Author:
eugene
Message:

use RAWTABLES

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/ipp_apply_burntool.pl

    r23585 r24018  
    9191
    9292my $REALRUN = 1;
     93my $RAWTABLES = 1;
     94# XXX if we want to avoid using the raw tables in this script, we need to delay deletion of the tempfile until the next pass.
     95
     96# first pass: mark the db entries to catch failures
     97# these will not be identified as burned by chip processing (user_1 > 0.5)
     98if (! $skip_burned)  {
     99    foreach my $file (@files) {
     100        my $exp_id = $file->{exp_id};
     101
     102        my $status;
     103        $status = vsystem ("$regtool -dbname $dbname -updateprocessedimfile -exp_id $exp_id -class_id $class_id -user_1 0.1", 1);
     104        if ($status) {
     105            &my_die("failed to update imfile");
     106        }
     107    }
     108}
    93109
    94110my $prevFileOpt = "";
     
    120136    # print "outImfile: $outImfile -> $outImfileReal\n";
    121137
    122     # destination for the burntool artifacts
    123     my $artImfile = $rawImfile;
    124     $artImfile =~ s/fits$/burn.tbl/;
    125     my $artImfileReal = $ipprc->file_resolve($artImfile, 1);
    126     # print "artImfile: $artImfile -> $artImfileReal\n";
     138    # burntool now can write the artifacts to the fits file.
     139    # destination for the burntool artifacts.  use this if RAWTABLES is set.
     140    my $artImfile;
     141    my $artImfileReal;
     142    if ($RAWTABLES) {
     143        $artImfile = $rawImfile;
     144        $artImfile =~ s/fits$/burn.tbl/;
     145        $artImfileReal = $ipprc->file_resolve($artImfile, 1);
     146        # print "artImfile: $artImfile -> $artImfileReal\n";
     147    }
    127148
    128149    # uncompress the image (do we need to check if it is compressed?)
     
    132153    }
    133154
    134     $status = vsystem ("$burntool $tmpImfileReal out=$artImfileReal $prevFileOpt", $REALRUN);
     155    if ($RAWTABLES) {
     156        $status = vsystem ("$burntool $tmpImfileReal out=$artImfileReal $prevFileOpt", $REALRUN);
     157    } else {
     158        $status = vsystem ("$burntool $tmpImfileReal $prevFileOpt", $REALRUN);
     159    }
    135160    if ($status) {
    136161        &my_die("failed on burntool");
     
    149174
    150175    # save the artifact file for the next image
    151     $prevFileOpt = "in=$artImfileReal";
     176    if ($RAWTABLES) {
     177        $prevFileOpt = "in=$artImfileReal";
     178    } else {
     179        $prevFileOpt = "infits=$artImfileReal";
     180    }
    152181    print "\n";
    153182}
Note: See TracChangeset for help on using the changeset viewer.