IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 5, 2011, 10:05:10 AM (15 years ago)
Author:
eugene
Message:

merging updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110404/ippScripts/scripts/addstar_run.pl

    r30326 r31439  
    3737}
    3838my $minidvodb_path;
    39 my ( $exp_tag, $add_id, $camera, $outroot, $camroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update,
     39my ( $add_id, $camera, $stage, $outroot, $stageroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update,
    4040     $no_op, $redirect, $save_temps);
    4141GetOptions(
    42     'exp_tag=s'          => \$exp_tag, # Exposure identifier
    4342    'add_id=s'          => \$add_id, # Camtool identifier
    4443    'camera|c=s'        => \$camera, # Camera
     44    'stage|s=s'        => \$stage, # Camera
     45   
    4546    'dbname|d=s'        => \$dbname, # Database name
    4647    'outroot|w=s'       => \$outroot, # output file base name
    47     'camroot|w=s'       => \$camroot, # camera stage root name.
     48    'stageroot|w=s'       => \$stageroot, # stage root name.
    4849    'reduction=s'       => \$reduction, # Reduction class
    4950    'dvodb|w=s'         => \$dvodb,  # output DVO database
     
    6162pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    6263pod2usage(
    63           -msg => "Required options: --exp_tag --add_id --camera --outroot --dvodb --camroot",
     64          -msg => "Required options: --add_id --camera --outroot --dvodb --stageroot --stage",
    6465          -exitval => 3,
    6566          ) unless
    66     defined $exp_tag and
     67    defined $stage and
    6768    defined $add_id and
    6869    defined $outroot and
    69     defined $camroot and
     70    defined $stageroot and
    7071    defined $dvodb and
    7172    defined $camera;
     
    8687# Recipes to use based on reduction class
    8788$reduction = 'DEFAULT' unless defined $reduction;
    88 
     89my $recipe_addstar = $ipprc->reduction($reduction, 'ADDSTAR');
    8990# XXX This is now not used: do we still need it?
    90 my $recipe_addstar = $ipprc->reduction($reduction, 'ADDSTAR'); # Recipe to use
     91if ($stage =~/cam/) {
     92  $recipe_addstar = $ipprc->reduction($reduction, 'ADDSTAR'); # Recipe to use
     93}
     94if ($stage =~/stack/) {
     95  $recipe_addstar = $ipprc->reduction($reduction, 'ADDSTAR_STACK'); # Recipe to use
     96}
     97#if ($stage =~/staticsky/) {
     98#  $recipe_addstar = $ipprc->reduction($reduction, 'ADDSTAR_STATICSKY'); # Recipe to use
     99#}
    91100&my_die("Unrecognised ADDSTAR recipe", $add_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe_addstar;
    92101
     
    97106
    98107# the camera configurations should define the psastro output to be a single file (MEF), regardless of the inputs
    99 my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT",     $camroot) or &my_die("Missing entry from camera config", $add_id, $PS_EXIT_CONFIG_ERROR);
     108
     109# it was PSASTRO.OUTPUT
     110my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT",     $stageroot) or &my_die("Missing entry from camera config", $add_id, $PS_EXIT_CONFIG_ERROR);
     111
     112if (($stage =~/staticsky/) || ($stage =~/stack/)) {
     113    $fpaObjects =~ s/smf$/cmf/;
     114   
     115}
    100116my $traceDest  = $ipprc->filename("TRACE.EXP",          $outroot) or &my_die("Missing entry from camera config", $add_id, $PS_EXIT_CONFIG_ERROR);
    101117
     
    173189        $command .= " $realFile";
    174190        $command .= " -use-name $fpaObjects"; # DVO wants the neb-name as a file reference
    175         $command .= " -image" if $image_only;
    176 
     191            $command .= " -image" if $image_only;
     192            if ($stage = ~/staticsky/) {
     193                $command .= " -accept-astrom ";
     194            }
    177195        my $mjd_addstar_start = DateTime->now->mjd;   # MJD of starting script
    178196
Note: See TracChangeset for help on using the changeset viewer.