IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2008, 2:31:37 PM (17 years ago)
Author:
eugene
Message:

adding chip_imfile_id argument; get source_id from ipprc->source_id

File:
1 edited

Legend:

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

    r20369 r20927  
    2727
    2828# Parse the command-line arguments
    29 my ( $exp_id, $chip_id, $class_id, $uri, $camera, $outroot, $dbname, $run_state, $reduction, $threads, $verbose,
     29my ( $exp_id, $chip_id, $class_id, $chip_imfile_id, $uri, $camera, $outroot, $dbname, $run_state, $reduction, $threads, $verbose,
    3030     $no_update, $no_op, $redirect );
    3131GetOptions(
     
    3333    'chip_id=s'         => \$chip_id,   # Chiptool identifier
    3434    'class_id=s'        => \$class_id,  # Class identifier
     35    'chip_imfile_id=s'  => \$chip_imfile_id, # Unique file identifier
    3536    'uri|u=s'           => \$uri,       # Input FITS file
    3637    'camera|c=s'        => \$camera,    # Camera
     
    5253    defined $chip_id and
    5354    defined $class_id and
     55    ## defined $chip_imfile_id and  XXX until this is added to the scheme, do not require it :
    5456    defined $uri and
    5557    defined $camera and
     
    6264$logDest .= ".update" if $run_state eq "update";
    6365
    64 $ipprc->redirect_output($logDest) if $redirect;
     66if ($redirect) {
     67    $ipprc->redirect_output($logDest);
     68    print STDOUT "\n\n";
     69    print STDOUT "Starting script $0 on $host\n\n";
     70    print STDOUT "COMMAND IS: @ARGV\n\n";
     71}
    6572
    6673# Look for programs we need
     
    95102$ipprc->outroot_prepare($outroot);
    96103
     104my $image_id = $chip_imfile_id;
     105my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_CHIP);
     106
    97107## these names are used in ppImage, and thus may be URIs
    98108my $outputImage   = $ipprc->filename("PPIMAGE.CHIP",        $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     
    123133        $command .= " -threads $threads" if defined $threads;
    124134        $command .= " -dbname $dbname" if defined $dbname;
     135        # $command .= " -image_id $image_id" if defined $image_id;
     136        # $command .= " -source_id $source_id" if defined $source_id;
    125137        $command .= " -dumpconfig $configuration";
    126138        $command .= " -tracedest $traceDest -log $logDest";
     
    131143        $command .= " -threads $threads" if defined $threads;
    132144        $command .= " -dbname $dbname" if defined $dbname;
     145        # $command .= " -image_id $image_id" if defined $image_id;
     146        # $command .= " -source_id $source_id" if defined $source_id;
    133147        $command .= " -tracedest $traceDest -log $logDest";
    134148        $command .= " -Db PPIMAGE:PHOTOM FALSE";
Note: See TracChangeset for help on using the changeset viewer.