YamlChan

I/O Channel that uses YAML to represent Objects

Description:

A YamlChan is a specialised form of Channel which supports YAML I/O operations. Writing an Object to a YamlChan (using AST_WRITE) will, if the Object is suitable, generate an YAML description of that Object, and reading from a YamlChan will create a new Object from its YAML description.

YAML itself does not define a way to store coordinate systems or transformations - such definitions must be provided by a suitable WCS-oriented schema. The scheme to use is defined by the YamlEncoding attribute. Currently, the only schema supported by this class is " ASDF" , defined by the Space Telescope Science Institute. (see http://asdf-standard.readthedocs.io). At some point in the future support will be added for the AST NATIVE scheme.

Normally, when you use a YamlChan, you should provide " source" and " sink" routines which connect it to an external data store by reading and writing the resulting text. These routines should perform any conversions needed between external character encodings and the internal ASCII encoding. If no such routines are supplied, a Channel will read from standard input and write to standard output.

Alternatively, a YamlChan can be told to read or write from specific text files using the SinkFile and SourceFile attributes, in which case no sink or source function need be supplied.

Constructor Function

AST_YAMLCHAN

Notes:

Inheritance

The YamlChan class inherits from the Channel class.

Attributes

In addition to those attributes common to all Channels, every YamlChan also has the following attributes:

Functions

The YamlChan class does not define any new routines beyond those which are applicable to all Channels.