IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2011, 11:00:22 AM (15 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110710/ippToPsps/perl/convertPhotCodesToXml.pl

    r28889 r32337  
    44use strict;
    55use IPC::Cmd 0.36 qw( can_run run );
    6 use XML::Writer;
    76use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
    87use Pod::Usage qw( pod2usage );
     
    2726
    2827
    29 
    30 my $output = new IO::File(">$outputPath");
    31 my $writer = new XML::Writer(OUTPUT => $output, DATA_MODE => 1, DATA_INDENT=>2);
    32 $writer->xmlDecl('UTF-8');
    33 
    34 $writer->startTag('table', "name" => "PhotoCal");
     28open (DATOUT, ">".$outputPath);
    3529
    3630open (PHOTCODES, $inputPath);
     
    5448        my $extinction = $columns[5];
    5549
    56         $writer->startTag('row',
    57                 "photoCalID" => $photCode,
    58                 "filterID" => $filter,
    59                 "photoCodeDesc" => $description,
    60                 "AB" => "0.0", # TODO
    61                 "zeropoint" => $zeroPoint,
    62                 "extinction" => $extinction,
    63                 "colorterm" => "0.0", # TODO
    64                 "colorExtn" => "0.0", # TODO
    65                 "orphanCalColor" => "0.0", # TODO
    66                 "orphanCalColorErr" => "0.0", # TODO
    67                 "startDate" => "54000.");
    68 
    69         $writer->endTag();
    70 
    71 
     50        print DATOUT "          <TR><TD>$photCode</TD><TD>$filter</TD><TD>$description</TD><TD>0.0</TD><TD>$zeroPoint</TD><TD>$extinction</TD><TD>0.0</TD><TD>0.0</TD><TD>0.0</TD><TD>0.0</TD><TD>54000.0</TD></TR>\n";
    7251
    7352    }
    7453}
    7554
    76 $writer->endTag();
    77 
    78 
     55close DATOUT;
    7956close PHOTCODES;
    8057
    81 # finish up XML
    82 #$writer->endTag();
    83 $writer->end();
    84 
    85 
Note: See TracChangeset for help on using the changeset viewer.