#### Description:

This function writes out all cards currently in the FitsChan. If the SinkFile attribute is set, they will be written out to the specified sink file. Otherwise, they will be written out using the sink function specified when the FitsChan was created. All cards are then deleted from the FitsChan.

#### Synopsis

void astWriteFits( AstFitsChan ∗this )

#### Parameters:

##### this

Pointer to the FitsChan.

#### Notes:

- If the SinkFile is unset, and no sink function is available, this method simply empties the FitsChan, and is then equivalent to astEmptyFits.

- This method attempt to execute even if an error has occurred previously.

Copyright (C) 2021 East Asian Observatory