Next Previous Up Contents
Next: Examples
Up: Functions
Previous: URLs

#### 10.6.21 VO

Virtual Observatory-specific functions. Some of these are for rather technical purposes.

The UCD parsing functions are based on Grégory Mantelet's library Ucidy corresponding to UCD1+ 1.4, and the VOUnit parsing functions are based on Norman Gray's library Unity corresponding to VOUnits 1.0.

`ucdStatus( ucd )`
  Returns a token string giving the category of UCD compliance. UCD1+, UCD1 and SIAv1 ("VOX:")-style UCDs are recognised.

  Possible return values are currently:

  - "OK": conforms to UCD1+ standard
  - "UCD1": looks like a UCD1
  - "VOX": is in VOX: namespace introduced by SIAv1
  - "BAD_SYNTAX": not a UCD1 and cannot be parsed according to UCD1+
  - "BAD_SEQUENCE": UCD words violate UCD1+ sequence rules
  - "UNKNOWN_WORD": follows UCD1+ syntax rules but contains non-UCD1+ atom
  - "NAMESPACE": follows UCD1+ syntax but contains atoms in non-standard namespace
  - "DEPRECATED": contains deprecated UCD1+ words

  In the case of non-compliant values, more information can be found using the `ucdMessage` function.

  - Parameters:
    - `ucd` (String): UCD string
  - Return value
    - (String): "OK" for conformant UCD1+, otherwise some other value
`ucdMessage( ucd )`
  Returns a human-readable message associated with the parsing of a UCD. This is expected to be empty for a fully compliant UCD, and may contain error messages or advice otherwise.

  - Parameters:
    - `ucd` (String): UCD value
  - Return value
    - (String): message text
`vounitStatus( unit )`
  Returns a token string giving the category of VOUnits compliance.

  Possible return values are currently:

  - "OK": conforms to VOUnits syntax
  - "UNKNOWN_UNIT": parsed as VOUnit but contains unknown base unit(s)
  - "BAD_SYNTAX": cannot be parsed as VOUnit syntax
  - "PARSE_ERROR": unexpected error during parsing
  - "USAGE": violates VOUnit usage constraints
  - "WHITESPACE": legal VOUnit except that it contains whitespace, which is not allowed by VOUnits

  In the case of non-compliant values, more information can be found using the `vounitMessage` function.

  - Parameters:
    - `unit` (String): unit string
  - Return value
    - (String): "OK" for conformant VOUnits, otherwise some other value
`vounitMessage( unit )`
  Returns a human-readable message associated with the parsing of a unit string. This is expected to be empty for a string fully compliant with VOUnits, and may contain error messages or additional information otherwise.

  - Parameters:
    - `unit` (String): unit string
  - Return value
    - (String): message text

Next Previous Up Contents
Next: Examples
Up: Functions
Previous: URLs

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk