Main Page | Class List | Directories | File List | Class Members | File Members

ObitFileFITS.h File Reference

ObitFileFITS class definition. More...

#include "fitsio.h"
#include "Obit.h"
#include "ObitErr.h"
#include "ObitThread.h"
#include "ObitInfoList.h"
#include "ObitFile.h"

Go to the source code of this file.

Classes

struct  ObitFileFITS
 ObitFileFITS Class. More...
struct  ObitFileFITSClassInfo
 ClassInfo Structure. More...

Defines

#define ObitFileFITSUnref(in)   ObitUnref (in)
 Macro to unreference (and possibly destroy) an ObitFileFITS returns a ObitFileFITS*.
#define ObitFileFITSRef(in)   ObitRef (in)
 Macro to reference (update reference count) an ObitFileFITS.
#define ObitFileFITSIsA(in)   ObitIsA (in, ObitFileFITSGetClass())
 Macro to determine if an object is the member of this or a derived class.

Functions

void ObitFileFITSClassInit (void)
 Public: Class initializer.
ObitFileFITSnewObitFileFITS (gchar *name)
 Public: Constructor.
gconstpointer ObitFileFITSGetClass (void)
 Public: ClassInfo pointer.
ObitFileFITSObitFileFITSZap (ObitFileFITS *in, ObitErr *err)
 Public: destroy.
ObitIOCode ObitFileFITSZapHDU (ObitFileFITS *in, ObitErr *err)
 Public: Destroy current HDU.
ObitFileFITSObitFileFITSCopy (ObitFileFITS *in, ObitFileFITS *out, ObitErr *err)
 Public: Copy constructor.
ObitIOCode ObitFileFITSOpen (ObitFileFITS *in, gchar *fileName, gint disk, ObitIOAccess access, ObitErr *err)
 Public: Open.
ObitIOCode ObitFileFITSClose (ObitFileFITS *in, ObitErr *err)
 Public: Close.
gboolean ObitFileFITSExist (gchar *fileName, ObitErr *err)
 Public: Does a given file exist?
ObitIOCode ObitFileFITSNum (ObitFileFITS *in, gint hdunum, gint *hdutype, ObitErr *err)
 Public: Position to given extention number.
ObitIOCode ObitFileFITSName (ObitFileFITS *in, gint hdutype, gchar *extname, gint extver, ObitErr *err)
 Public: Position to given extention name.
ObitIOCode ObitFileFITSReadKeyStr (ObitFileFITS *in, gchar *Name, gchar *Value, gchar *Comment, ObitErr *err)
 Public: Read String keyword.
ObitIOCode ObitFileFITSReadKeyFlt (ObitFileFITS *in, gchar *Name, gfloat *Value, gchar *Comment, ObitErr *err)
 Public: Read float keyword.
ObitIOCode ObitFileFITSReadKeyDbl (ObitFileFITS *in, gchar *Name, gdouble *Value, gchar *Comment, ObitErr *err)
 Public: Read double keyword.
ObitIOCode ObitFileFITSReadKeyLng (ObitFileFITS *in, gchar *Name, glong *Value, gchar *Comment, ObitErr *err)
 Public: Read long keyword.
ObitIOCode ObitFileFITSReadHistory (ObitFileFITS *in, gchar *hiCard, ObitErr *err)
 Public: Read next HISTORY header card.
ObitIOCode ObitFileFITSWriteKeyStr (ObitFileFITS *in, gchar *Name, gboolean update, gchar *Value, gchar *Comment, ObitErr *err)
 Public: Write String keyword.
ObitIOCode ObitFileFITSWriteKeyFlt (ObitFileFITS *in, gchar *Name, gboolean update, gfloat Value, gchar *Comment, ObitErr *err)
 Public: Write float keyword.
ObitIOCode ObitFileFITSWriteKeyDbl (ObitFileFITS *in, gchar *Name, gboolean update, gdouble Value, gchar *Comment, ObitErr *err)
 Public: Write double keyword.
ObitIOCode ObitFileFITSWriteKeyLng (ObitFileFITS *in, gchar *Name, gboolean update, glong Value, gchar *Comment, ObitErr *err)
 Public: Write long keyword.
ObitIOCode ObitFileFITSWriteHisKeyStr (fitsfile *inFptr, gchar *Name, gchar *Value, gchar *Comment, ObitErr *err)
 Public: Write String HISTORY keyword.
ObitIOCode ObitFileFITSWriteHisKeyFlt (fitsfile *inFptr, gchar *Name, gfloat Value, gchar *Comment, ObitErr *err)
 Public: Write float HISTORY keyword.
ObitIOCode ObitFileFITSWriteHisKeyDbl (fitsfile *inFptr, gchar *Name, gdouble Value, gchar *Comment, ObitErr *err)
 Public: Write double HISTORY keyword.
ObitIOCode ObitFileFITSWriteHisKeyLng (fitsfile *inFptr, gchar *Name, glong Value, gchar *Comment, ObitErr *err)
 Public: Write long HISTORY keyword.
ObitIOCode ObitFileFITSWriteDate (ObitFileFITS *in, ObitErr *err)
 Public: Write Date keyword.
ObitIOCode ObitFileFITSWriteHistory (ObitFileFITS *in, gchar *hiCard, ObitErr *err)
 Public: Write next HISTORY header card.
ObitIOCode ObitFileFITSAddKeys (ObitFileFITS *in, gint morekeys, ObitErr *err)
 Public: Expand the current HDR by a specified number of keywords.


Detailed Description

ObitFileFITS class definition.

This class is derived from the ObitFile class.

This class provides an I/O interface to FITS files. This implementation uses cfitsio. The structure is also defined in ObitFileFITSDef.h to allow recursive definition in derived classes.

Usage

Instances of this class are for access to disk files and is used for access to AIPS data files. Instances can be made using the newObitFileFITS constructor, or the ObitFileFITSCopy copy constructor and pointers copied (with reference pointer update) using ObitFileFITSRef. The destructor (when reference count goes to zero) is ObitIOUnref.

Define Documentation

#define ObitFileFITSIsA in   )     ObitIsA (in, ObitFileFITSGetClass())
 

Macro to determine if an object is the member of this or a derived class.

Returns TRUE if a member, else FALSE in = object to reference

#define ObitFileFITSRef in   )     ObitRef (in)
 

Macro to reference (update reference count) an ObitFileFITS.

returns a ObitFileFITS*. in = object to reference

#define ObitFileFITSUnref in   )     ObitUnref (in)
 

Macro to unreference (and possibly destroy) an ObitFileFITS returns a ObitFileFITS*.

in = object to unreference


Function Documentation

ObitFileFITS* newObitFileFITS gchar *  name  ) 
 

Public: Constructor.

Initializes class if needed on first call.

Returns:
the new object.

ObitIOCode ObitFileFITSAddKeys ObitFileFITS in,
gint  morekeys,
ObitErr err
 

Public: Expand the current HDR by a specified number of keywords.

Parameters:
in Pointer to object to be modified
morekeys Number of keyword entries to be added.
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

void ObitFileFITSClassInit void   ) 
 

Public: Class initializer.

ObitIOCode ObitFileFITSClose ObitFileFITS in,
ObitErr err
 

Public: Close.

Parameters:
in Pointer to object to be closed.
err ObitErr for reporting errors.
Returns:
error code, 0=> OK

ObitFileFITS* ObitFileFITSCopy ObitFileFITS in,
ObitFileFITS out,
ObitErr err
 

Public: Copy constructor.

The result will have pointers to the more complex members. Parent class members are included but any derived class info is ignored. The contents of any files are not modified.

Parameters:
in The object to copy
out An existing object pointer for output or NULL if none exists.
err Obit error stack object.
Returns:
pointer to the new object.

gboolean ObitFileFITSExist gchar *  fileName,
ObitErr err
 

Public: Does a given file exist?

gconstpointer ObitFileFITSGetClass void   ) 
 

Public: ClassInfo pointer.

Initializes class if needed on first call.

Returns:
pointer to the class structure.

ObitIOCode ObitFileFITSName ObitFileFITS in,
gint  hdutype,
gchar *  extname,
gint  extver,
ObitErr err
 

Public: Position to given extention name.

ObitIOCode ObitFileFITSNum ObitFileFITS in,
gint  hdunum,
gint *  hdutype,
ObitErr err
 

Public: Position to given extention number.

ObitIOCode ObitFileFITSOpen ObitFileFITS in,
gchar *  fileName,
gint  disk,
ObitIOAccess  access,
ObitErr err
 

Public: Open.

The file will be positioned at the beginning.

Parameters:
in Pointer to object to be opened.
fileName Name of file to open. Prepend '!' to overwite
type Obit FITS disk number
access access (OBIT_IO_ReadOnly,OBIT_IO_ReadWrite)
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitFileFITSReadHistory ObitFileFITS in,
gchar *  hiCard,
ObitErr err
 

Public: Read next HISTORY header card.

Parameters:
in Pointer to object to be read
Name Keyword name
hiCard [out] HISTORY card (80 characters beginning with "HISTORY ") memory must be externally allocated.
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK, OBIT_IO_NotFoundErr => no more.

ObitIOCode ObitFileFITSReadKeyDbl ObitFileFITS in,
gchar *  Name,
gdouble *  Value,
gchar *  Comment,
ObitErr err
 

Public: Read double keyword.

Parameters:
in Pointer to object to be read
Name Keyword name
Value [out] Keyword value
Comment [out] Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK, OBIT_IO_NotFoundErr => not found

ObitIOCode ObitFileFITSReadKeyFlt ObitFileFITS in,
gchar *  Name,
gfloat *  Value,
gchar *  Comment,
ObitErr err
 

Public: Read float keyword.

Parameters:
in Pointer to object to be readwritten
Name Keyword name
Value [out] Keyword value
Comment [out] Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK, OBIT_IO_NotFoundErr => not found

ObitIOCode ObitFileFITSReadKeyLng ObitFileFITS in,
gchar *  Name,
glong *  Value,
gchar *  Comment,
ObitErr err
 

Public: Read long keyword.

Parameters:
in Pointer to object to be read
Name Keyword name
Value [out] Keyword value
Comment [out] Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK, OBIT_IO_NotFoundErr => not found

ObitIOCode ObitFileFITSReadKeyStr ObitFileFITS in,
gchar *  Name,
gchar *  Value,
gchar *  Comment,
ObitErr err
 

Public: Read String keyword.

Parameters:
in Pointer to object to be read
Name Keyword name
Value [out] Keyword value
Comment [out] Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK, OBIT_IO_NotFoundErr => not found

ObitIOCode ObitFileFITSWriteDate ObitFileFITS in,
ObitErr err
 

Public: Write Date keyword.

Parameters:
in Pointer to object to be written
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitFileFITSWriteHisKeyDbl fitsfile *  inFptr,
gchar *  Name,
gdouble  Value,
gchar *  Comment,
ObitErr err
 

Public: Write double HISTORY keyword.

"AIPS NAXIS ", exact match) The card will be updated or created.

Parameters:
inFptr Pointer to object to be read
Name Keyword name
Value Keyword value
Comment Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitFileFITSWriteHisKeyFlt fitsfile *  inFptr,
gchar *  Name,
gfloat  Value,
gchar *  Comment,
ObitErr err
 

Public: Write float HISTORY keyword.

"AIPS NAXIS ", exact match) The card will be updated or created.

Parameters:
inFptr Pointer to object to be read
Name Keyword name
Value Keyword value
Comment Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitFileFITSWriteHisKeyLng fitsfile *  inFptr,
gchar *  Name,
glong  Value,
gchar *  Comment,
ObitErr err
 

Public: Write long HISTORY keyword.

"AIPS NAXIS ", exact match) The card will be updated or created.

Parameters:
inFptr Pointer to object to be read
Name Keyword name
Value Keyword value
Comment Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitFileFITSWriteHisKeyStr fitsfile *  inFptr,
gchar *  Name,
gchar *  Value,
gchar *  Comment,
ObitErr err
 

Public: Write String HISTORY keyword.

"AIPS NAXIS ", exact match) The card will be updated or created.

Parameters:
inFptr Pointer to object to be read
Name Keyword name
Value Keyword value
Comment Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitFileFITSWriteHistory ObitFileFITS in,
gchar *  hiCard,
ObitErr err
 

Public: Write next HISTORY header card.

Parameters:
in Pointer to object to be written
Name Keyword name
hiCard HISTORY card if longer than 70 characters, it will be split.
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK, OBIT_IO_NotFoundErr => not found

ObitIOCode ObitFileFITSWriteKeyDbl ObitFileFITS in,
gchar *  Name,
gboolean  update,
gdouble  Value,
gchar *  Comment,
ObitErr err
 

Public: Write double keyword.

Parameters:
in Pointer to object to be read
Name Keyword name
update If true use "Update" rather than write (usually what you want)
Value Keyword value
Comment Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitFileFITSWriteKeyFlt ObitFileFITS in,
gchar *  Name,
gboolean  update,
gfloat  Value,
gchar *  Comment,
ObitErr err
 

Public: Write float keyword.

Parameters:
in Pointer to object to be read
Name Keyword name
update If TRUE use "Update" rather than "write" (usually what you want)
Value Keyword value
Comment Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitFileFITSWriteKeyLng ObitFileFITS in,
gchar *  Name,
gboolean  update,
glong  Value,
gchar *  Comment,
ObitErr err
 

Public: Write long keyword.

Parameters:
in Pointer to object to be read
Name Keyword name
update If true use "Update" rather than write (usually what you want)
Value Keyword value
Comment Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitFileFITSWriteKeyStr ObitFileFITS in,
gchar *  Name,
gboolean  update,
gchar *  Value,
gchar *  Comment,
ObitErr err
 

Public: Write String keyword.

Parameters:
in Pointer to object to be read
Name Keyword name
update If true use "Update" rather than write (usually what you want)
Value Keyword value
Comment Comment value, NULL=> not wanted
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitFileFITS* ObitFileFITSZap ObitFileFITS in,
ObitErr err
 

Public: destroy.

Objust must have been fully instantiated (opened) first

Parameters:
in Pointer to object to be zapped.
err ObitErr for reporting errors.
Returns:
NULL as value of pointer to in, on failure returns in.

ObitIOCode ObitFileFITSZapHDU ObitFileFITS in,
ObitErr err
 

Public: Destroy current HDU.

Object must have been fully instantiated (opened) first Refuses for the first (main) HDU

Parameters:
in Pointer to object to be zapped.
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK


Generated on Fri Aug 31 22:13:05 2007 for Obit by  doxygen 1.3.9.1