IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 12, 2007, 5:01:10 PM (19 years ago)
Author:
Paul Price
Message:

Updating directory names, output file names.

File:
1 edited

Legend:

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

    r12416 r12421  
    7878}
    7979
     80# Make sure everything is from the same exposure, and get the exposure tag
     81my $exp_tag;                    # Exposure tag
     82foreach my $imfile ( @$imfiles ) {
     83    unless (defined $exp_tag) {
     84        $exp_tag = $imfile->{exp_tag};
     85    } elsif ($exp_tag ne $imfile->{exp_tag}) {
     86        &my_die("Multiple exposures in the same warp.", $warp_id, $PS_EXIT_SYS_ERROR);
     87    }
     88}
     89
    8090unless ($no_op) {
    8191
     
    93103if (defined $workdir) {
    94104    $workdir = $ipprc->convert_filename_absolute( $workdir );
     105    $workdir = File::Spec->catdir( $workdir, $exp_tag );
    95106} else {
    96107    my $example = $ipprc->convert_filename_absolute( $$imfiles[0]->{uri} );
     
    98109    $workdir = $dir;
    99110}
    100 
    101 $workdir = File::Spec->catfile( $workdir, "warp$warp_id" );
    102111system "mkdir -p $workdir" unless -d $workdir;
    103112
     
    108117foreach my $imfile (@$imfiles) {
    109118    print $overlapFile "warpSkyCellMap\tMETADATA\n";
    110     print $overlapFile "\twarp_id\tS32\t" . $warp_id . "\n";
     119    print $overlapFile "\twarp_id\t\tS32\t" . $warp_id . "\n";
    111120    print $overlapFile "\tskycell_id\tSTR\t" . $imfile->{skycell_id} . "\n";
    112121    print $overlapFile "\ttess_id\t\tSTR\t" . $imfile->{tess_id} . "\n";
    113     print $overlapFile "\texp_tag\t\tSTR\t" . $imfile->{exp_tag} . "\n";
    114     print $overlapFile "\tcam_version\tS32\t" . $imfile->{cam_version} . "\n";
    115     print $overlapFile "\tclass_id\t\tSTR\t" . $imfile->{class_id} . "\n";
    116     print $overlapFile "\tfault\tS16\t" . $imfile->{fault} . "\n";
     122    print $overlapFile "\tcam_id\t\tS32\t" . int($imfile->{cam_id}) . "\n";
     123    print $overlapFile "\tclass_id\tSTR\t" . $imfile->{class_id} . "\n";
     124    print $overlapFile "\tfault\t\tS16\t" . $imfile->{fault} . "\n";
    117125    print $overlapFile "END\n\n";
    118126}
Note: See TracChangeset for help on using the changeset viewer.