/usr/share/doc/stilts/sun256/secB.38.2.html is in stilts-doc 3.1.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="sun-style.css">
<title>Examples</title>
</head>
<body>
<hr>
<a href="votlint.html">Next</a> <a href="votcopy-usage.html">Previous</a> <a href="votcopy.html">Up</a> <a href="index.html">Contents</a> <br> <b>Next: </b><a href="votlint.html">votlint: Validates VOTable documents</a><br>
<b>Up: </b><a href="votcopy.html">votcopy: Transforms between VOTable encodings</a><br>
<b>Previous: </b><a href="votcopy-usage.html">Usage</a><br>
<hr>
<h3><a name="secB.38.2">B.38.2 Examples</a></h3>
<p>Normal use of <code>votcopy</code> is pretty straightforward.
We give here a couple of examples of its input and output.
</p>
<p>Here is an example VOTable document, <code>cat.vot</code>:
<pre>
<VOTABLE>
<RESOURCE>
<TABLE name="Authors">
<FIELD name="AuthorName" datatype="char" arraysize="*"/>
<DATA>
<TABLEDATA>
<TR><TD>Charles Messier</TD></TR>
<TR><TD>Mark Taylor</TD></TR>
</TABLEDATA>
</DATA>
</TABLE>
<RESOURCE>
<COOSYS equinox="J2000.0" epoch="J2000.0" system="eq_FK4"/>
<TABLE name="Messier Objects">
<FIELD name="Identifier" datatype="char" arraysize="10"/>
<FIELD name="RA" datatype="double" units="degrees"/>
<FIELD name="Dec" datatype="double" units="degrees"/>
<DATA>
<TABLEDATA>
<TR> <TD>M51</TD> <TD>202.43</TD> <TD>47.22</TD> </TR>
<TR> <TD>M97</TD> <TD>168.63</TD> <TD>55.03</TD> </TR>
</TABLEDATA>
</DATA>
</TABLE>
</RESOURCE>
</RESOURCE>
</VOTABLE>
</pre>
Note that it contains more structure than just a flat table: there are
two <code>TABLE</code> elements,
the <code>RESOURCE</code> element of the second one being nested
in the <code>RESOURCE</code> of the first.
Processing this document using a generic table tool such as
<code>tpipe</code> or <code>tcopy</code> would lose this structure.
</p>
<p>To convert the data encoding to BINARY format, we simply execute
<pre>
stilts votcopy format=binary cat.vot
</pre>
and the output is
<pre>
<?xml version="1.0"?>
<VOTABLE>
<RESOURCE>
<TABLE name="Authors">
<FIELD name="AuthorName" datatype="char" arraysize="*"/>
<DATA>
<BINARY>
<STREAM encoding='base64'>
AAAAD0NoYXJsZXMgTWVzc2llcgAAAAtNYXJrIFRheWxvcg==
</STREAM>
</BINARY>
</DATA>
</TABLE>
<RESOURCE>
<COOSYS equinox="J2000.0" epoch="J2000.0" system="eq_FK4"/>
<TABLE name="Messier Objects">
<FIELD name="Identifier" datatype="char" arraysize="10"/>
<FIELD name="RA" datatype="double" units="degrees"/>
<FIELD name="Dec" datatype="double" units="degrees"/>
<DATA>
<BINARY>
<STREAM encoding='base64'>
TTUxAAAAAAAAAEBpTcKPXCj2QEecKPXCj1xNOTcAAAAAAAAAQGUUKPXCj1xAS4PX
Cj1wpA==
</STREAM>
</BINARY>
</DATA>
</TABLE>
</RESOURCE>
</RESOURCE>
</VOTABLE>
</pre>
Note that both tables in the document have been translated to BINARY format.
The basic structure of the document is unchanged: the only differences
are within the <code>DATA</code> elements. If we ran
<pre>
stilts votcopy format=tabledata
</pre>
on either this output or the original input then the output would
be identical (apart perhaps from whitespace) to the input table,
since the data are originally in TABLEDATA format.
</p>
<p>To generate a VOTable document with the data in external files,
the <code>href</code> parameter is used. We will output in FITS format
this time. Executing:
<pre>
stilts votcopy format=fits href=true cat.vot fcat.vot
</pre>
writes the following to the file <code>fcat.vot</code>:
<pre>
...
<DATA>
<FITS>
<STREAM href="fcat-1.fits"/>
</FITS>
</DATA>
...
<DATA>
<FITS>
<STREAM href="fcat-2.fits"/>
</FITS>
</DATA>
...
</pre>
(the unchanged parts of the document have been skipped here for brevity).
The actual data are written in two additional files in the same
directory as the output file, <code>fcat-1.fits</code> and
<code>fcat-2.fits</code>. These filenames are based on the
main output filename, but can be altered using the <code>base</code>
flag if required. Note this has also given you FITS binary table
versions of all the tables in the input VOTable document, which can be
operated on by normal FITS-aware software quite separately from the VOTable
if required.
</p>
<hr><a href="votlint.html">Next</a> <a href="votcopy-usage.html">Previous</a> <a href="votcopy.html">Up</a> <a href="index.html">Contents</a> <br> <b>Next: </b><a href="votlint.html">votlint: Validates VOTable documents</a><br>
<b>Up: </b><a href="votcopy.html">votcopy: Transforms between VOTable encodings</a><br>
<b>Previous: </b><a href="votcopy-usage.html">Usage</a><br>
<hr><i>STILTS - Starlink Tables Infrastructure Library Tool Set<br>Starlink User Note256<br>STILTS web page:
<a href="http://www.starlink.ac.uk/stilts/">http://www.starlink.ac.uk/stilts/</a><br>Author email:
<a href="mailto:m.b.taylor@bristol.ac.uk">m.b.taylor@bristol.ac.uk</a><br>Mailing list:
<a href="mailto:topcat-user@jiscmail.ac.uk">topcat-user@jiscmail.ac.uk</a><br></i></body>
</html>
|