IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10601


Ignore:
Timestamp:
Dec 9, 2006, 1:51:19 PM (20 years ago)
Author:
Paul Price
Message:

Need to get the exp_tag and use that to inject the imfile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataChallenge/inject_essence.pl

    r10596 r10601  
    4040        my $relpath = $ipprc->convert_filename_relative( $file );
    4141
    42         {
    43             my $command = "$pxinject -newExp -exp_id $exp -inst CTIO_MOSAIC2 -telescope CTIO4m " .
    44                 "-exp_type $type -imfiles 1" ; # Command to run
    45             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    46                 run( command => $command, verbose => 1 );
    47             die "Unable to inject $exp: $error_code\n" if not $success;
    48         }
     42        my $command_exp = "$pxinject -newExp -exp_id $exp -inst CTIO_MOSAIC2 -telescope CTIO4m " .
     43            "-exp_type $type -imfiles 1" ; # Command to run
     44        my ( $success_exp, $error_code_exp, $full_buf_exp, $stdout_buf_exp, $stderr_buf_exp ) =
     45            run( command => $command_exp, verbose => 1 );
     46        die "Unable to inject $exp: $error_code\n" if not $success_exp;
     47       
     48        my @line = split(/\s+/, $$stdout_buf_exp[0]); # The output line, containing the exposure tag
     49        my $exp_tag = $line[2]; # The exposure tag
    4950
    50         {
    51             my $command = "$pxinject -newImfile -exp_tag $exp -class fpa -class_id fpa " .
    52                 "-uri $relpath"; # Command to run
    53             my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    54                 run( command => $command, verbose => 1 );
    55             die "Unable to inject $exp imfile: $error_code\n" if not $success;
    56         }
    57        
     51        my $command_imfile = "$pxinject -newImfile -exp_tag $exp_tag -class fpa -class_id fpa " .
     52            "-uri $relpath"; # Command to run
     53        my ( $success_imfile, $error_code_imfile, $full_buf_imfile,
     54             $stdout_buf_imfile, $stderr_buf_imfile ) = run( command => $command_imfile, verbose => 1 );
     55        die "Unable to inject $exp imfile: $error_code\n" if not $success;
    5856    }
    5957
Note: See TracChangeset for help on using the changeset viewer.