Loading...
Searching...
No Matches
casacore::BasicFITS_global_functions_WriteFITS Struct Reference
fits package (libcasa_fits) » FITS_module

write a FITS file to a Casacore array More...

`#include <BasicFITS.h>`

## Public Member Functions

Bool | WriteFITS (const char *FileName, const Array< Float > &array, String &ErrorMessage, const char *unitName=0, const Vector< String > *axisNames=0, const Vector< Float > *refPixel=0, const Vector< Float > *refLocation=0, const Vector< Float > *delta=0, const std::map< String, Double > *keywords=0, const char *objectName=0, Int BITPIX=-32, Float minPix=1.0, Float maxPix=-1.0)
| blabla

## Detailed Description

write a FITS file to a Casacore array

### Review Status

Reviewed By:
  UNKNOWN
Date Reviewed:
  before2004/08/25

### Synopsis

Write a FITS file from a Casacore Array. Returns False if there is any proglem. The data is written into the primary data array, and the data is written in floating point (BITPIX=-32). If the operation fails, ErrorMessage will contain an informative error. At the moment this probably isn't bulletproof enough at finding errors on output.

If any of unitName, axisNames, refPixel, refLocation, or delta are non-null, the corresponding FITS keywords (BUNIT, CTYPEn, CRPIXn, CRVALn, CDELTn) are set. CRVALn is corrected for the difference in addressing between FITS and Casacore (1 vs. 0). If a Vector pointer is non-null, then that vector must be the correct length.

If keywords is non-null, the contents are written out as FITS keywords. The names are upper-cased and truncated to 8 characters (yuck). No other validation is done (e.g. that SIMPLE or NAXIS is not in the map).

If objectName is non-null, the OBJECT keyword is set.

BITPIX can presently be set to -32 or 16 only. When BITPIX is 16 it will write BSCALE and BZERO into the FITS file. If minPix is greater than maxPix the minimum and maximum pixel values will be determined from the array, otherwise the supplied values will be used and pixels outside that range will be truncated to the minimum and maximum pixel values (note that this truncation does not occur for BITPIX=-32).

Definition at line 130 of file BasicFITS.h.

## Member Function Documentation

## WriteFITS()

Bool casacore::BasicFITS_global_functions_WriteFITS::WriteFITS | ( | const char * | FileName,
|  | const Array< Float > & | array,
|  | String & | ErrorMessage,
|  | const char * | unitName = 0,
|  | const Vector< String > * | axisNames = 0,
|  | const Vector< Float > * | refPixel = 0,
|  | const Vector< Float > * | refLocation = 0,
|  | const Vector< Float > * | delta = 0,
|  | const std::map< String, Double > * | keywords = 0,
|  | const char * | objectName = 0,
|  | Int | BITPIX = -32,
|  | Float | minPix = 1.0,
|  | Float | maxPix = -1.0 )

blabla

References casacore::array.

The documentation for this struct was generated from the following file:

- fits/FITS/BasicFITS.h