IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2011, 10:13:30 AM (15 years ago)
Author:
bills
Message:

Change survey.publish to allow multiple entries for a given label and include
an optional COMMENT. Change pubtool to support selecting inputs by rawExp.comment.
Change publish_file to accept a flag --need_magic. If not set, attempt to publish
sources from the destreak backup file. That is the original uncensored sources.
Note: This is currently only implemented at diff stage.

File:
1 edited

Legend:

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

    r29980 r30376  
    4242
    4343# Parse the command-line arguments
    44 my ( $pub_id, $camera, $stage, $stage_id, $fileset, $format, $product, $workdir );
     44my ( $pub_id, $camera, $stage, $stage_id, $fileset, $format, $product, $workdir, $need_magic );
    4545my ( $dbname, $verbose, $no_update, $no_op, $save_temps, $redirect );
    4646my ( $output_format );
     
    5454    'fileset=s'         => \$fileset,     # Fileset name
    5555    'workdir=s'         => \$workdir,     # Working directory
     56    'need-magic'        => \$need_magic,  # do we require censored detections?
    5657    'dbname=s'          => \$dbname,    # Database name
    5758    'verbose'           => \$verbose,   # Print to stdout
     
    166167    foreach my $comp ( @$components ) {
    167168        my $path_base = $comp->{path_base}; # Base name for file
     169        if (!$need_magic and $comp->{magicked}) {
     170            # This client is authorized to receive uncensored detections
     171            # Get the uri for the "backup" files
     172            print "Using uncensored input from $path_base\n";
     173            $path_base = $ipprc->destreaked_filename($path_base);
     174        }
    168175        next if defined $comp->{quality} and $comp->{quality} > 0;
    169176        print "Warning: mis-matched comments\n" if defined $comment and $comment ne $comp->{comment};
     
    181188            $filename = $ipprc->filename( "PSPHOT.OUT.CMF.MEF", "$path_base.pos" );
    182189        }
    183         $filename = $ipprc->file_resolve($filename);
     190        &my_die("input file does not exist: $filename", $pub_id, $PS_EXIT_SYS_ERROR) if !$ipprc->file_exists($filename);
     191        my $resolved = $ipprc->file_resolve($filename);
     192       
     193        &my_die("unable to resolve input file: $filename", $pub_id, $PS_EXIT_SYS_ERROR) if !$resolved;
     194
     195        $filename = $resolved;
    184196
    185197        my $data = { zp => $zp,
Note: See TracChangeset for help on using the changeset viewer.