IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 7, 2009, 4:08:25 PM (17 years ago)
Author:
Paul Price
Message:

Merging trunk (r25026) to get up-to-date on old branch.

Location:
branches/pap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/pap

  • branches/pap/ippScripts/scripts/warp_skycell.pl

    r23716 r25027  
    3636}
    3737
    38 my ($warp_id, $skycell_id, $warp_skyfile_id, $tess_dir, $camera, $dbname, $outroot, $threads, $run_state, $magicked, $verbose, $no_update, $no_op, $redirect, $save_temps);
     38my ($warp_id, $skycell_id, $warp_skyfile_id, $tess_dir, $reduction, $camera, $dbname, $outroot, $threads, $run_state, $magicked, $verbose, $no_update, $no_op, $redirect, $save_temps);
    3939GetOptions(
    4040    'warp_id|i=s'         => \$warp_id, # Warp identifier
     
    4444    'camera|c=s'          => \$camera, # Camera name
    4545    'dbname|d=s'          => \$dbname, # Database name
     46    'reduction=s'         => \$reduction, # Reduction class
    4647    'outroot=s'           => \$outroot, # Output root name
    4748    'threads=s'           => \$threads,   # Number of threads to use for pswarp
     
    5758pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    5859pod2usage(
    59     -msg => "Required options: --warp_id --skycell_id --tess_dir --camera --outroot --run-state",
     60    -msg => "Required options: --warp_id --warp_skyfile_id --skycell_id --tess_dir --camera --outroot --run-state",
    6061    -exitval => 3,
    6162) unless defined $warp_id
     
    7475$ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR ) if $redirect;
    7576
     77# Recipes to use based on reduction class
     78$reduction = 'DEFAULT' unless defined $reduction;
     79my $recipe_pswarp = $ipprc->reduction($reduction, 'WARP_PSWARP'); # Recipe to use for ppImage
     80unless ($recipe_pswarp) {
     81    &my_die("Couldn't find selected reduction for WARP_PSWARP: $reduction\n", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_CONFIG_ERROR);
     82}
     83
    7684my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_WARP);
    7785
     
    8189{
    8290    # XXX change -tess_id to -tess_dir when db schema is updated
    83     my $command = "$warptool -scmap -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_dir";
     91    my $command = "$warptool -scmap";
     92    $command .= " -warp_id $warp_id";
     93    $command .= " -skycell_id $skycell_id";
     94    # $command .= " -tess_id $tess_dir";  XXX I don't think this is necessary or useful
    8495    $command .= " -dbname $dbname" if defined $dbname;
    8596    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    99110my $astromSource;               # The astrometry source
    100111{
    101     my $command = "$ppConfigDump -camera $camera -dump-recipe PSWARP -";
     112    my $command = "$ppConfigDump -camera $camera -recipe PSWARP $recipe_pswarp -dump-recipe PSWARP -";
    102113    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    103114        run(command => $command, verbose => $verbose);
     
    189200    $command .= " -F SOURCE.PLOT.PSFMODEL SOURCE.PLOT.SKY.PSFMODEL";
    190201    $command .= " -F SOURCE.PLOT.APRESID SOURCE.PLOT.SKY.APRESID";
     202    $command .= " -recipe PSWARP $recipe_pswarp";
    191203    $command .= " -psf";        # Turn on PSF determination
    192204    $command .= " -tracedest $traceDest -log $logDest";
     
    199211        $do_stats = 1;
    200212    } else {
    201         $command .= " -ipprc $configuration";
     213        #$command .= " -ipprc $configuration";
     214        my $resolved = $ipprc->file_resolve($configuration);
     215        $command .= " -ipprc $resolved";
    202216    }
    203217    if ($do_stats) {
     
    303317            $command .= " -path_base $outroot";
    304318            $command .= " -hostname $host" if defined $host;
     319            $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
    305320        } else {
    306321            $command .= " -updateskyfile";
     
    308323        $command .= " -warp_id $warp_id";
    309324        $command .= " -skycell_id $skycell_id";
    310         $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
    311325        $command .= " -fault $exit_code";
    312326        $command .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.