IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28628


Ignore:
Timestamp:
Jul 7, 2010, 4:22:55 PM (16 years ago)
Author:
bills
Message:

check for existence of files before invoking ppstamp. Get astromety file from params
istead of args

Location:
trunk/pstamp/scripts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_checkdependent.pl

    r28145 r28628  
    277277    # if chipProcessedImfile.state is cleaned call check_states_chip
    278278
    279     # need to code warptool -setskyfiletoupdate
    280279    my $metadata = shift;
    281280    my $whole_run = shift;  # if true queue entire run for update
     
    287286    my $warp_id = $metadata->{warp_id};
    288287    my $state = $metadata->{state};
    289     if ($state =~ /error/) {
     288    if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop')) {
    290289        print STDERR "warpRun $warp_id has state $state faulting jobs\n";
    291290        faultJobs('stop', undef, undef, $PSTAMP_GONE);
  • trunk/pstamp/scripts/pstamp_job_run.pl

    r27953 r28628  
    9292    my_die("argument list is empty", $job_id, $PS_EXIT_DATA_ERROR) if !$argString;
    9393
    94     # XXX: remove -astrom from argString and add it here
    95 
    9694    $argString .= " -file $params->{image}";
    9795    $argString .= " -mask $params->{mask}";
     96    my @file_list = ($params->{image}, $params->{mask});
    9897    if ($options & $PSTAMP_SELECT_VARIANCE) {
    9998        $argString .= " -variance $params->{weight}";
    100     }
     99        push @file_list, $params->{weight};
     100    }
     101
     102    if ($params->{astrom}) {
     103        $argString .= " -astrom $params->{astrom}";
     104        push @file_list, $params->{astrom};
     105    }
     106
     107    check_files(@file_list);
    101108
    102109    my $command = "$ppstamp $outputBase $argString";
     
    341348}
    342349
     350sub check_files {
     351    foreach my $f (@_) {
     352        if (!$ipprc->file_exists($f)) {
     353            my_die( "file $f does not exist:", $job_id, $PS_EXIT_SYS_ERROR);
     354        }
     355    }
     356}
     357
    343358sub my_die
    344359{
  • trunk/pstamp/scripts/pstampparse.pl

    r28583 r28628  
    500500    }
    501501
     502if (0) {
    502503    # add astrometry file for raw and chip images if one is available
    503504    if (($stage eq "chip") || ($stage eq "raw")) {
    504505        $args .= " -astrom $image->{astrom}" if $image->{astrom};
    505506    }
     507}
    506508
    507509    $image->{job_args} = $args;
Note: See TracChangeset for help on using the changeset viewer.