next up previous 264
Next: Size(element) - Character size for a Plot element
Up: AST Attribute Descriptions
Previous: SimpIF - Inverse-forward MathMap pairs simplify?


SinkFile - Output file to which to data should be written

Description:
This attribute specifies the name of a file to which the Channel should write data. If specified it is used in preference to any sink function specified when the Channel was created.

Assigning a new value to this attribute will cause any previously opened SinkFile to be closed. The first subsequent call to AST_WRITE will attempt to open the new file (an error will be reported if the file cannot be opened), and write data to it. All subsequent call to AST_WRITE will write data to the new file, until the SinkFile attribute is cleared or changed.

Clearing the attribute causes any open SinkFile to be closed. All subsequent data writes will use the sink function specified when the Channel was created, or will write to standard output if no sink function was specified.

If no value has been assigned to SinkFile, a null string will be returned if an attempt is made to get the attribute value.

Type:
String.
Class Applicability:
FitsChan
When the FitsChan is destroyed, any headers in the FitsChan will be written out to the sink file, if one is specified (if not, the sink function used when the FitsChan was created is used). The sink file is a text file (not a FITS file) containing one header per line.
Notes:
  • A new SinkFile will over-write any existing file with the same name unless the existing file is write protected, in which case an error will be reported.

  • Any open SinkFile is closed when the Channel is deleted.

  • If the Channel is copied or dumped (using AST_COPY or AST_SHOW) the SinkFile attribute is left in a cleared state in the output Channel (i.e. the value of the SinkFile attribute is not copied).


next up previous 264
Next: Size(element) - Character size for a Plot element
Up: AST Attribute Descriptions
Previous: SimpIF - Inverse-forward MathMap pairs simplify?

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 210
R.F. Warren-Smith & D.S. Berry
7th December 2012
E-mail:starlink@jiscmail.ac.uk

Copyright (C) 2012 Science \& Technology Facilities Council