Changeset 31146 for branches/eam_branches/ipp-20110213/ippToPsps
- Timestamp:
- Apr 4, 2011, 11:09:34 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110213/ippToPsps
- Files:
-
- 1 edited
- 10 copied
-
config/detection/tables.vot (copied) (copied from trunk/ippToPsps/config/detection/tables.vot )
-
config/stack/tables.vot (copied) (copied from trunk/ippToPsps/config/stack/tables.vot )
-
jython (copied) (copied from trunk/ippToPsps/jython )
-
jython/batch.py (copied) (copied from trunk/ippToPsps/jython/batch.py )
-
jython/demo.fits (copied) (copied from trunk/ippToPsps/jython/demo.fits )
-
jython/detectionbatch.py (copied) (copied from trunk/ippToPsps/jython/detectionbatch.py )
-
jython/initbatch.py (copied) (copied from trunk/ippToPsps/jython/initbatch.py )
-
jython/run.sh (copied) (copied from trunk/ippToPsps/jython/run.sh )
-
jython/stackbatch.py (copied) (copied from trunk/ippToPsps/jython/stackbatch.py )
-
jython/stilts.py (copied) (copied from trunk/ippToPsps/jython/stilts.py )
-
perl/pspsSchema2xml.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/ippToPsps/perl/pspsSchema2xml.pl
r30186 r31146 54 54 print OUT "#define ".uc($enumsHeader)."_H\n\n"; 55 55 56 56 # tables file 57 57 my $tablesOutput = new IO::File(">tables.xml"); 58 58 my $tablesWriter = new XML::Writer(OUTPUT => $tablesOutput, DATA_MODE => 1, DATA_INDENT=>2); … … 60 60 $tablesWriter->startTag('tableDescriptions', "type" => "$type"); 61 61 62 # map file 62 63 my $mapOutput = new IO::File(">map.xml"); 63 64 my $mapWriter = new XML::Writer(OUTPUT => $mapOutput, DATA_MODE => 1, DATA_INDENT=>2); 64 65 $mapWriter->xmlDecl('UTF-8'); 65 66 $mapWriter->startTag('tabledata', "type" => "$type"); 67 68 # VOTable file 69 my $votOutput = new IO::File(">tables.vot"); 70 my $votWriter = new XML::Writer(OUTPUT => $votOutput, DATA_MODE => 1, DATA_INDENT=>2); 71 $votWriter->xmlDecl('UTF-8'); 72 $votWriter->startTag('VOTABLE', "version" => "1.1"); 73 $votWriter->startTag('RESOURCE'); 66 74 67 75 if ($type eq "init") {createInit();} … … 78 86 $mapWriter->endTag(); 79 87 $mapWriter->end(); 88 89 # finish up XML 90 $votWriter->endTag(); # end RESOURCE tag 91 $votWriter->endTag(); # end of TABLE tag 92 $votWriter->end(); 80 93 81 94 print OUT "\n#endif"; … … 214 227 "name" => $tableNameOut, 215 228 "ippfitsextension" => ""); 229 $votWriter->startTag('TABLE', 230 "name" => "$tableNameOut"); 231 $votWriter->dataElement('DESCRIPTION', "VOTable description of PSPS table $tableNameOut"); 232 $votWriter->startTag('PARAM', 233 "arraysize" => "1", 234 "datatype" => "char", 235 "ucd" => "meta.bib.author", 236 "name" => "Author", 237 "value" => "PSPS"); 238 $votWriter->endTag(); 216 239 217 240 open (SCHEMA, $path); … … 258 281 $tablesWriter->endTag(); 259 282 $mapWriter->endTag(); 260 print OUT "} ".$tableNameOut.";\n"; 283 284 $votWriter->startTag('DATA'); 285 $votWriter->startTag('TABLEDATA'); 286 $votWriter->endTag(); # end TABLEDDATA tag 287 $votWriter->endTag(); # end DATA tag 288 $votWriter->endTag(); # end TABLE tag 289 print OUT "} ".$tableNameOut.";\n"; 261 290 262 291 close SCHEMA; … … 350 379 $tablesWriter->endTag(); 351 380 381 # get VOTable type 382 my $votType = "undef"; 383 my $arraySize = 1; 384 if ($type eq "TBYTE") {$votType = "unsignedByte";} 385 elsif ($type eq "TSHORT") {$votType = "short";} 386 elsif ($type eq "TLONG") {$votType = "int";} 387 elsif ($type eq "TLONGLONG") {$votType = "long";} 388 elsif ($type eq "TFLOAT") {$votType = "float";} 389 elsif ($type eq "TDOUBLE") {$votType = "double";} 390 elsif ($type eq "TSTRING") {$votType = "char"; $arraySize = 100;} 391 392 $votWriter->startTag('FIELD', 393 "name" => $name, 394 "arraysize" => $arraySize, 395 "datatype" => $votType); 396 $votWriter->endTag(); 397 352 398 $mapWriter->comment(" **MISSING** <map pspsName=\"$name\" ippType=\"$type\" ippName=\"\" comment=\"$comment\"/>"); 353 399
Note:
See TracChangeset
for help on using the changeset viewer.
