IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 14, 2009, 10:36:13 AM (17 years ago)
Author:
Paul Price
Message:

Put FPA_ID = exp_id in MOPS output.

File:
1 edited

Legend:

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

    r24957 r25072  
    3939
    4040# Parse the command-line arguments
    41 my ( $pub_id, $exp_id, $camera, $stage, $stage_id, $format, $product, $workdir );
     41my ( $pub_id, $camera, $stage, $stage_id, $format, $product, $workdir );
    4242my ( $dbname, $verbose, $no_update, $save_temps, $redirect );
    4343
    4444GetOptions(
    4545    'pub_id=s'          => \$pub_id, # Publish identifier
    46     'exp_id=s'          => \$exp_id, # Exposure identifier
    4746    'camera=s'          => \$camera, # Camera name
    4847    'stage=s'           => \$stage,       # Stage of interest
     
    5857
    5958pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    60 pod2usage( -msg => "Required options: --pub_id --exp_id --camera --stage --stage_id --product --workdir",
     59pod2usage( -msg => "Required options: --pub_id --camera --stage --stage_id --product --workdir",
    6160           -exitval => $PS_EXIT_CONFIG_ERROR) unless
    6261    defined $pub_id and
    63     defined $exp_id and
    6462    defined $camera and
    6563    defined $product and
     
    6866    defined $workdir;
    6967
    70 my $outroot = "$workdir/$product.$pub_id.$exp_id"; # Output root name
     68my $outroot = "$workdir/$product.$pub_id"; # Output root name
    7169
    7270my $ipprc = PS::IPP::Config->new( $camera ) or
     
    8381my %files;                      # Input filenames
    8482my %zp;                         # Zero points
     83my %exp_id;                     # Exposure identifiers
    8584{
    8685    my $command;                # Command to run
     
    119118            $zp{"$skycell_id.pos"} = $zp;
    120119            $zp{"$skycell_id.neg"} = $zp if defined $comp->{bothways} and $comp->{bothways};
     120            $exp_id{"$skycell_id.pos"} = $comp->{exp1};
     121            $exp_id{"$skycell_id.neg"} = $comp->{exp2} if defined $comp->{bothways} and $comp->{bothways};
    121122        } elsif ($stage eq 'camera') {
    122123            my $cam_id = $comp->{cam_id};
    123124            $files{$cam_id} = $ipprc->filename( "PSASTRO.OUTPUT", $path_base );
    124125            $zp{$cam_id} = $zp;
     126            $exp_id{$cam_id} = $comp->{exp_id};
    125127        }
    126128    }
     
    137139
    138140    my $zp = $zp{$comp};
     141    my $exp_id = $exp_id{$comp};
    139142    if ($product eq "IPP-MOPS") {
    140143        my $outuri = "$outroot.$comp.fits";
     
    142145            &my_die( "Unable to resolve output file $outuri", $pub_id, $PS_EXIT_SYS_ERROR);
    143146
    144         my $command = "$ppMops $file $zp $out";
     147        my $command = "$ppMops $file $zp $exp_id $out";
    145148        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    146149            run(command => $command, verbose => $verbose);
Note: See TracChangeset for help on using the changeset viewer.