IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 21, 2008, 4:56:26 PM (18 years ago)
Author:
eugene
Message:

making chip/host and nebulous upgrades

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080121/ippScripts/scripts/camera_exp.pl

    r16018 r16176  
    3737use Pod::Usage qw( pod2usage );
    3838
    39 my ($exp_tag, $cam_id, $recipe, $camera, $dbname, $workdir, $reduction, $dvodb, $no_update, $no_op);
     39my ($exp_tag, $cam_id, $camera, $outroot, $recipe, $dbname, $reduction, $dvodb, $no_update, $no_op);
    4040GetOptions(
    4141           'exp_tag=s'          => \$exp_tag, # Exposure identifier
     
    4444           'camera|c=s'        => \$camera, # Camera
    4545           'dbname|d=s'        => \$dbname, # Database name
    46            'workdir|w=s'       => \$workdir, # Working directory
     46           'outroot|w=s'       => \$outroot, # output file base name
    4747           'reduction=s'       => \$reduction, # Reduction class                       
    4848           'dvodb|w=s'         => \$dvodb,  # output DVO database
     
    5555          -msg => "Required options: --exp_tag --cam_id --camera",
    5656          -exitval => 3,
    57           ) unless defined $exp_tag
    58     and defined $cam_id
    59     and defined $camera;
     57          ) unless
     58    defined $exp_tag and
     59    defined $cam_id and
     60    defined $outroot and
     61    defined $camera;
    6062
    6163$ipprc->define_camera($camera);
     
    136138}
    137139
     140### not needed to have such an extensive temp file name.
    138141my ($list1File, $list1Name) = tempfile( "$exp_tag.cm.$cam_id.b1.list.XXXX", UNLINK => 1 ); # For binning 1
    139142my ($list2File, $list2Name) = tempfile( "$exp_tag.cm.$cam_id.b2.list.XXXX", UNLINK => 1 ); # For binning 2
     
    162165
    163166# Output products
    164 $workdir = caturi( $workdir, $exp_tag ) if defined $workdir;
    165 my $outputRoot = $ipprc->file_prepare( "$exp_tag.cm.$cam_id", $workdir, ${$files}[0]->{path_base} );
    166 
    167 my $jpeg1      = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
    168 my $jpeg2      = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
    169 my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT.MEF", $outputRoot); # MEF psastro output
    170 
    171 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".trace"; # Trace messages
    172 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".log"; # Log messages
     167$ipprc->outroot_prepare($outroot);
     168
     169my $jpeg1      = $ipprc->filename("PPIMAGE.JPEG1",      $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
     170my $jpeg2      = $ipprc->filename("PPIMAGE.JPEG2",      $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
     171my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT.MEF", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
     172my $traceDest  = $ipprc->filename("TRACE.EXP",          $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
     173my $logDest    = $ipprc->filename("LOG.EXP",            $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
    173174
    174175# convert supplied DVO database name to UNIX filename
     
    184185    # Make the jpeg for binning 1
    185186    {
    186         my $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE $recipe1"; # Command to run
     187        my $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    187188        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    188189            run(command => $command, verbose => 1);
     
    196197    # Make the jpeg for binning 2
    197198    {
    198         my $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE $recipe2"; # Command to run
     199        my $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    199200        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    200201            run(command => $command, verbose => 1);
     
    229230            # XXX add a ppStats call which will collect the astrometry stats
    230231            my $command;
    231             $command  = "$psastro -list $list3Name $outputRoot";
     232            $command  = "$psastro -list $list3Name $outroot";
    232233            $command .= " +mosastro -chipastro";
    233234            $command .= " -F PSASTRO.OUTPUT PSASTRO.OUTPUT.MEF";
     
    276277$fpaCommand .= " -cam_id $cam_id";
    277278$fpaCommand .= " -uri UNKNOWN";
    278 $fpaCommand .= " -path_base $outputRoot";
     279$fpaCommand .= " -path_base $outroot";
    279280$fpaCommand .= " -dbname $dbname" if defined $dbname;
    280281$fpaCommand .= $chipStats->cmdflags();
Note: See TracChangeset for help on using the changeset viewer.