Bases: astropy.io.votable.tree.SimpleElement, astropy.io.votable.tree._IDProperty, astropy.io.votable.tree._NameProperty, astropy.io.votable.tree._XtypeProperty, astropy.io.votable.tree._UtypeProperty, astropy.io.votable.tree._UcdProperty
FIELD element: describes the datatype of a particular column of data.
The keyword arguments correspond to setting members of the same name, documented below.
If ID is provided, it is used for the column name in the resulting recarray of the table. If no ID is provided, name is used instead. If neither is provided, an exception will be raised.
Attributes Summary
links | A list of Link instances used to reference more details about the meaning of the FIELD. |
precision | Along with width, defines the numerical accuracy associated with the data. |
arraysize | Specifies the size of the multidimensional array if this FIELD contains more than a single value. |
unit | A string specifying the units for the FIELD. |
datatype | [required] The datatype of the column. Valid values (as |
type | The type attribute on FIELD elements is reserved for future extensions. |
width | Along with precision, defines the numerical accuracy associated with the data. |
values | A Values instance (or None) defining the domain of the column. |
ref | On FIELD elements, ref is used only for informational purposes, for example to refer to a COOSYS element. |
Methods Summary
parse(iterator, config) | |
to_xml(w, **kwargs) | |
to_table_column(column) | Sets the attributes of a given astropy.table.Column instance to match the information in this Field. |
from_table_column(votable, column) | Restores a Field instance from a given astropy.table.Column instance. |
uniqify_names(fields) | Make sure that all names and titles in a list of fields are unique, by appending numbers if necessary. |
Attributes Documentation
A list of Link instances used to reference more details about the meaning of the FIELD. This is purely informational and is not used by the astropy.io.votable package.
Along with width, defines the numerical accuracy associated with the data. These values are used to limit the precision when writing floating point values back to the XML file. Otherwise, it is purely informational – the Numpy recarray containing the data itself does not use this information.
Specifies the size of the multidimensional array if this FIELD contains more than a single value.
[required] The datatype of the column. Valid values (as defined by the spec) are:
‘boolean’, ‘bit’, ‘unsignedByte’, ‘short’, ‘int’, ‘long’, ‘char’, ‘unicodeChar’, ‘float’, ‘double’, ‘floatComplex’, or ‘doubleComplex’
Many VOTABLE files in the wild use ‘string’ instead of ‘char’, so that is also a valid option, though ‘string’ will always be converted to ‘char’ when writing the file back out.
Along with precision, defines the numerical accuracy associated with the data. These values are used to limit the precision when writing floating point values back to the XML file. Otherwise, it is purely informational – the Numpy recarray containing the data itself does not use this information.
On FIELD elements, ref is used only for informational purposes, for example to refer to a COOSYS element.
Methods Documentation
Sets the attributes of a given astropy.table.Column instance to match the information in this Field.
Restores a Field instance from a given astropy.table.Column instance.
Make sure that all names and titles in a list of fields are unique, by appending numbers if necessary.