casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casacore::BasicFITS_global_functions_ReadFITS Struct Reference

read a FITS file from a Casacore array More...

#include <BasicFITS.h>

Public Member Functions

Array< FloatReadFITS (const char *FileName, Bool &ok, String &ErrorMessage, String *unitName=0, Vector< String > *axisNames=0, Vector< Float > *refPixel=0, Vector< Float > *refLocation=0, Vector< Float > *delta=0, std::map< String, Double > *keywords=0, String *objectName=0)
 blabla More...
 

Detailed Description

read a FITS file from a Casacore array

Review Status

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

Motivation

Quick and dirty interface to the FITS classes for turning Casacore arrays into FITS files and back. N.B. this will have many more features in the future, also some files should be renamed since we now have FITS.h and fits.h.

Synopsis

Read FITS from a file into a Casacore Array. Sets "ok" to False if there is any problem. We only deal with data in the primary data array. If ReadFITS fails, the state of array is undefined. Trailing degenerate (length==1) axes are NOT removed. If desired, you may do this yourself with the nonDegenerate array member function. If ok is false, ErrorMessage will contain an information error message. If necessary, the data is converted from whatever type it is stored as to Float. BSCALE and BZERO are applied. Blanks are not handled.

If unitName is non-null, the string it points to is filled with the FITS BUNIT keyword. If axisNames is name of the axes (CTYPEn). If refPixel is non-null, it is set to the reference pixel of the FITS file (CRPIX). Similarly refLocation is set to the position (image coordinates) of the reference pixel (CRVALn) and delta is set to the increment along each axis (CDELTn). All the vectors are resized if necessary. Note that FITS pixel indexing is one-based, Casacore is 0-based, this correction is made. unitName and axisNames have trailing blanks (a FITS "feature") removed.

If "keywords" is non-null, the integral and floating point keywords (excluding NAXIS*, BSCALE, BZERO) are read into keywords. Case is not changed.

If objectName is non-null, the string it points to is set to the value of the FITS OBJECT keyword.


Caution: This will only work properly on an IEEE big-endian machine at the moment;

Definition at line 87 of file BasicFITS.h.

Member Function Documentation

Array<Float> casacore::BasicFITS_global_functions_ReadFITS::ReadFITS ( const char *  FileName,
Bool ok,
String ErrorMessage,
String unitName = 0,
Vector< String > *  axisNames = 0,
Vector< Float > *  refPixel = 0,
Vector< Float > *  refLocation = 0,
Vector< Float > *  delta = 0,
std::map< String, Double > *  keywords = 0,
String objectName = 0 
)

blabla


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