### 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 astWrite) 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" functions which connect it to an external data store by reading and writing the resulting text. These functions should perform any conversions needed between external character encodings and the internal ASCII encoding. If no such functions 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.

#### Notes:

• This class uses the limyaml library to read and write yaml. If the libyaml library cannot be found when the AST library is configured, then an error will be reported if any YamlChan methods are invoked.

#### 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 functions beyond those which are applicable to all Channels.