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

ObitFileFITS.c File Reference

ObitFileFITS class function definitions. More...

#include "ObitFileFITS.h"
#include "ObitFITS.h"

Functions

void ObitFileFITSInit (gpointer in)
 Private: Initialize newly instantiated object.
void ObitFileFITSClear (gpointer in)
 Private: Deallocate members.
ObitFileFITSnewObitFileFITS (gchar *name)
 Public: Constructor.
gconstpointer ObitFileFITSGetClass (void)
 Public: ClassInfo pointer.
ObitFileFITSObitFileFITSCopy (ObitFileFITS *in, ObitFileFITS *out, ObitErr *err)
 Public: Copy constructor.
gboolean ObitFileFITSExist (gchar *fileName, ObitErr *err)
 Determine if a given file name exists.
ObitFileFITSObitFileFITSZap (ObitFileFITS *in, ObitErr *err)
 Public: destroy.
ObitIOCode ObitFileFITSZapHDU (ObitFileFITS *in, ObitErr *err)
 Public: Destroy current HDU.
ObitIOCode ObitFileFITSOpen (ObitFileFITS *in, gchar *fileName, gint disk, ObitIOAccess access, ObitErr *err)
 Public: Open.
ObitIOCode ObitFileFITSClose (ObitFileFITS *in, ObitErr *err)
 Public: Close.
ObitIOCode ObitFileFITSPosNum (ObitFileFITS *in, gint hdunum, gint *hdutype, ObitErr *err)
 Position to given extention number.
ObitIOCode ObitFileFITSPosName (ObitFileFITS *in, gint hdutype, gchar *extname, gint extver, ObitErr *err)
 Position to given extention nam2.
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 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.
ObitIOCode ObitFileFITSWriteDate (ObitFileFITS *in, ObitErr *err)
 Public: Write Date 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.
void ObitFileFITSClassInit (void)
 Public: Class initializer.


Detailed Description

ObitFileFITS class function definitions.

This implementation uses cfitsio. This class allows generic access to FITS files.


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.

void ObitFileFITSClear gpointer  inn  ) 
 

Private: Deallocate members.

Does (recursive) deallocation of parent class members.

Parameters:
inn Pointer to the object to deallocate.

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
 

Determine if a given file name exists.

Parameters:
fileName Name of file to test.
err ObitErr for reporting errors.
Returns:
TRUE if exists, else FALSE.

gconstpointer ObitFileFITSGetClass void   ) 
 

Public: ClassInfo pointer.

Initializes class if needed on first call.

Returns:
pointer to the class structure.

void ObitFileFITSInit gpointer  inn  ) 
 

Private: Initialize newly instantiated object.

Does (recursive) initialization of base class members before this class.

Parameters:
inn Pointer to the object to initialize.

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 ObitFileFITSPosName ObitFileFITS in,
gint  hdutype,
gchar *  extname,
gint  extver,
ObitErr err
 

Position to given extention nam2.

Parameters:
in Pointer to object to be positioned
hdutype (IMAGE_HDU, ASCII_TBL, BINARY_TBL, ANY_HDU)
extname extension (table) name
extver extension (table) version, 0=>next
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

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

Position to given extention number.

Parameters:
in Pointer to object to be positioned
hdunum Desired (1-rel) HDU
hdutype cfitsio code for type, NULL => not wanted has values (IMAGE_HDU, ASCII_TBL, BINARY_TBL)
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