IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 26, 2007, 2:43:31 PM (18 years ago)
Author:
Paul Price
Message:

Use PS::IPP::Operations to get name of skycell file.

File:
1 edited

Legend:

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

    r15618 r15690  
    1414
    1515use IPC::Cmd 0.36 qw( can_run run );
     16use File::Spec;
     17use File::Temp qw( tempfile );
     18use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
     19use Pod::Usage qw( pod2usage );
    1620use PS::IPP::Metadata::Config;
    1721use PS::IPP::Metadata::Stats;
     
    2933                       caturi
    3034                       );
     35use PS::IPP::Operations qw( skycell_file );
     36
    3137my $ipprc = PS::IPP::Config->new(); # IPP configuration
    32 use File::Spec;
    33 use File::Temp qw( tempfile );
    34 
    35 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
    36 use Pod::Usage qw( pod2usage );
    3738
    3839my ($warp_id, $skycell_id, $tess_id, $camera, $dbname, $workdir, $no_update, $no_op, $save_temps);
     
    123124my $outputBin2 = $ipprc->filename("PSWARP.BIN2", $outputRoot, $skycell_id );
    124125my $outputStats = $outputRoot . '.stats';
    125 my $skyFile = caturi( $workdir, $skycell_id ); # Target sky cell file
     126
     127my $skyFile = skycell_file($tess_id, $skycell_id, $workdir) or
     128    &my_die("Unable to get name of skycell file", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR);
     129&my_die("Unable to find skycell file", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless
     130    $ipprc->exists( $skyfile );
    126131
    127132my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".trace"; # Trace messages
Note: See TracChangeset for help on using the changeset viewer.