IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33758 for trunk/ippToPsps


Ignore:
Timestamp:
Apr 11, 2012, 8:51:13 AM (14 years ago)
Author:
rhenders
Message:

adding ObjectCalColor table to Object batches

Location:
trunk/ippToPsps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/config/OB/tables.vot

    r33457 r33758  
    295295      </DATA>
    296296    </TABLE>
     297    <TABLE name="ObjectCalColor">
     298      <DESCRIPTION>VOTable description of PSPS table ObjectCalColor</DESCRIPTION>
     299      <PARAM arraysize="1" datatype="char" ucd="meta.bib.author" name="Author" value="PSPS"></PARAM>
     300      <FIELD name="objID" arraysize="1" datatype="long" unit="unknown">
     301        <DESCRIPTION>ODM object identifier</DESCRIPTION>
     302      </FIELD>
     303      <FIELD name="ippObjID" arraysize="1" datatype="long" unit="unknown">
     304        <DESCRIPTION>ipp object identifier</DESCRIPTION>
     305      </FIELD>
     306      <FIELD name="filterID" arraysize="1" datatype="unsignedByte" unit="unknown">
     307        <DESCRIPTION>filter identifier</DESCRIPTION>
     308      </FIELD>
     309      <FIELD name="calColor" arraysize="1" datatype="float" unit="mag">
     310        <DESCRIPTION> color adopted for magnitude calculation</DESCRIPTION>
     311      </FIELD>
     312      <FIELD name="calColorErr" arraysize="1" datatype="float" unit="mag">
     313        <DESCRIPTION> error in calibrating color</DESCRIPTION>
     314      </FIELD>
     315      <FIELD name="calibModNum" arraysize="1" datatype="short" unit="unknown">
     316        <DESCRIPTION>calibration modification number</DESCRIPTION>
     317      </FIELD>
     318      <FIELD name="dataRelease" arraysize="1" datatype="unsignedByte" unit="unknown">
     319        <DESCRIPTION>Data release when this color calibration was established</DESCRIPTION>
     320      </FIELD>
     321      <DATA>
     322        <TABLEDATA></TABLEDATA>
     323      </DATA>
     324    </TABLE>
    297325  </RESOURCE>
    298326</VOTABLE>
  • trunk/ippToPsps/perl/pspsSchema2xml.pl

    r31759 r33758  
    44#
    55# Script that searches a dir containing PSPS schema files, finds those that comtain the
    6 # tables on interest then parses them into an XML format. Also generates C-header files
    7 # containing enums that detail table column names and numbers.
     6# tables on interest then parses them into the VOTable format. Also generates trac-wiki
     7# formatted tables.
    88#
    99#######################################################################################
     
    5151
    5252my $enumsHeader = ucfirst($type)."BatchEnums";
    53 open(OUT, ">".$enumsHeader.".h") or die("Error");
    54 
    55 print OUT "#ifndef ".uc($enumsHeader)."_H\n";
    56 print OUT "#define ".uc($enumsHeader)."_H\n\n";
    57 
    58 # tables file
    59 my $tablesOutput = new IO::File(">tables.xml");
    60 my $tablesWriter = new XML::Writer(OUTPUT => $tablesOutput, DATA_MODE => 1, DATA_INDENT=>2);
    61 $tablesWriter->xmlDecl('UTF-8');
    62 $tablesWriter->startTag('tableDescriptions', "type" => "$type");
    63 
    64 # map file
    65 my $mapOutput = new IO::File(">map.xml");
    66 my $mapWriter = new XML::Writer(OUTPUT => $mapOutput, DATA_MODE => 1, DATA_INDENT=>2);
    67 $mapWriter->xmlDecl('UTF-8');
    68 $mapWriter->startTag('tabledata', "type" => "$type");
    6953
    7054# VOTable file
     
    8266
    8367# finish up XML
    84 $tablesWriter->endTag();
    85 $tablesWriter->end();
    86 
    87 # finish up XML
    88 $mapWriter->endTag();
    89 $mapWriter->end();
    90 
    91 # finish up XML
    9268$votWriter->endTag(); # end RESOURCE tag
    9369$votWriter->endTag(); # end of TABLE tag
    9470$votWriter->end();
    9571
    96 print OUT "\n#endif";
    97 close OUT;
    9872close WIKI;
    9973
     
    208182
    209183    parseTable("Object");
     184    parseTable("ObjectCalColor");
    210185}
    211186
     
    230205    print WIKI "|| '''!".$tableNameOut."''' ||||||||||||||\n";
    231206    print WIKI "|| '''ODM attribute''' || '''units''' || '''Data type''' || '''Default''' || '''Description''' || '''IPP source''' || '''IPP variable/notes''' ||\n";
    232     print OUT "\ntypedef enum {\n";
    233     $tablesWriter->startTag('table', "name" => $tableNameOut);
    234     $mapWriter->startTag('table',
    235             "name" => $tableNameOut,
    236             "ippfitsextension" => "");
    237207    $votWriter->startTag('TABLE',
    238208            "name" => "$tableNameOut");
     
    287257
    288258    if (!$found) {print "Could not find table '$tableName'\n";}
    289     $tablesWriter->endTag();
    290     $mapWriter->endTag();
    291259
    292260    $votWriter->startTag('DATA');
     
    295263        $votWriter->endTag(); # end DATA tag
    296264        $votWriter->endTag(); # end TABLE tag
    297         print OUT "} ".$tableNameOut.";\n";
    298265
    299266    close SCHEMA;
     
    384351    $colNum++;
    385352
    386     print OUT "  ".uc($tableName)."_".uc($name)." = ".$colNum.",\n";
    387353    print WIKI "|| ".$name."||".$unit."||".$mstype."||".$default."||".$comment."|| || ||\n";
    388 
    389     $tablesWriter->startTag('column',
    390             "name" => $name,
    391             "type" => $type,
    392             "default" => $default,
    393             "comment" => $fullComment);
    394     $tablesWriter->endTag();
    395354
    396355    # get VOTable type
     
    413372    $votWriter->endTag();
    414373
    415     $mapWriter->comment(" **MISSING** <map pspsName=\"$name\" ippType=\"$type\" ippName=\"\" comment=\"$fullComment\"/>");
    416 
    417 #    $mapWriter->endTag();
    418 
    419374    return $colNum;
    420375}
Note: See TracChangeset for help on using the changeset viewer.