IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2012, 2:49:37 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/ippScripts/scripts/camera_exp.pl

    r32562 r33638  
    4141
    4242my ( $exp_tag, $cam_id, $camera, $outroot, $dbname, $reduction, $dvodb, $verbose, $no_update,
    43      $no_op, $redirect, $save_temps, $run_state);
     43     $no_op, $redirect, $save_temps, $run_state, $skip_binned, $skip_masks);
    4444GetOptions(
    45     'exp_tag=s'          => \$exp_tag, # Exposure identifier
     45    'exp_tag=s'         => \$exp_tag, # Exposure identifier
    4646    'cam_id=s'          => \$cam_id, # Camtool identifier
    4747    'camera|c=s'        => \$camera, # Camera
     
    5151    'dvodb|w=s'         => \$dvodb,  # output DVO database
    5252    'run-state=s'       => \$run_state, # 'new' or 'update'
     53    'skip-binned'       => \$skip_binned, # override recipe - don't create binned images
     54    'skip-refmask'      => \$skip_masks, # override recipe - don't create refmask
    5355    'verbose'           => \$verbose,   # Print to stdout
    5456    'no-update'         => \$no_update, # Update the database?
     
    156158    { # Determine if FWHM is too large to bother continuing.
    157159        my $maxFWHM = 0;
     160      # XXX: temporary hack if this is a CNP exposure set maxFWHM to a large
     161      # value.
     162      # Before the next tag we will put this into a recipe
     163      if ($outroot =~ /CNP/) {
     164            $maxFWHM = 25;
     165      } else {
    158166        my $command = "$ppConfigDump -camera $camera -get-key MAX_ALLOWED_FWHM";
    159167        my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    168176            $maxFWHM = metadataLookupStr($cameraConfig, 'MAX_ALLOWED_FWHM');
    169177        }
     178      }
    170179        if ($maxFWHM) {
    171180            my $expFWHM;
     
    183192
    184193my $produceMasks;               # Produce masks?
    185 {
     194if (!$skip_masks) {
    186195    # Get the PSASTRO recipe
    187196    my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe PSASTRO -";
     
    198207}
    199208
    200 
    201209### not needed to have such an extensive temp file name.
    202210my ($list1File, $list1Name) = tempfile( "/tmp/$exp_tag.cm.$cam_id.b1.list.XXXX", UNLINK => !$save_temps ); # For binning 1
     
    254262
    255263    # Make the jpeg for binning 1
    256     if ($run_state eq 'new') {
     264    if (!$skip_binned and ($run_state eq 'new')) {
    257265        my $command = "$ppImage -list $list1Name $outroot"; # Command to run
    258266        $command .= " -recipe PPIMAGE $recipe1";
     
    269277
    270278    # Make the jpeg for binning 2
    271     if ($run_state eq 'new') {
     279    if (!$skip_binned and ($run_state eq 'new')) {
    272280        my $command = "$ppImage -list $list2Name $outroot"; # Command to run
    273281        $command .= " -recipe PPIMAGE $recipe2";
     
    288296        $command  = "$psastro";
    289297        $command .= " -list $list3Name";
    290         $command .= " -masklist $list4Name";
     298        $command .= " -masklist $list4Name" if $produceMasks;
    291299        $command .= " $outroot";
    292300        $command .= " -recipe PSASTRO $recipe_psastro";
     301        $command .= " -Db PSASTRO:REFSTAR_MASK F" if $skip_masks;
    293302        $command .= " -tracedest $traceDest -log $logDest";
    294303        $command .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.