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

ObitIOTableFITS.h File Reference

ObitIOTableFITS class definition. More...

#include "fitsio.h"
#include "Obit.h"
#include "ObitIO.h"
#include "ObitTableDesc.h"
#include "ObitTableSel.h"
#include "ObitIOTableFITSDef.h"

Go to the source code of this file.

Classes

struct  ObitIOTableFITS
 ObitIOTableFITS Class structure. More...
struct  ObitIOTableFITSClassInfo
 ClassInfo Structure. More...

Defines

#define ObitIOTableFITSUnref(in)   ObitUnref (in)
 Macro to unreference (and possibly destroy) an ObitIOTableFITS returns a ObitIOTableImageFITS* (NULL).
#define ObitIOTableFITSRef(in)   ObitRef (in)
 Macro to reference (update reference count) an ObitIOTableFITS.
#define ObitIOTableFITSIsA(in)   ObitIsA (in, ObitIOTableFITSGetClass())
 Macro to determine if an object is the member of this or a derived class.

Functions

void ObitIOTableFITSClassInit (void)
 Public: Class initializer.
ObitIOTableFITSnewObitIOTableFITS (gchar *name, ObitInfoList *info, ObitErr *err)
 Public: Constructor.
gconstpointer ObitIOTableFITSGetClass (void)
 Public: ClassInfo pointer.
gboolean ObitIOTableFITSSame (ObitIO *in, ObitInfoList *in1, ObitInfoList *in2, ObitErr *err)
 Public: Are underlying structures the same.
void ObitIOTableFITSZap (ObitIOTableFITS *in, ObitErr *err)
 Public: Delete underlying structures.
ObitIOTableFITSObitIOTableFITSCopy (ObitIOTableFITS *in, ObitIOTableFITS *out, ObitErr *err)
 Public: Copy constructor.
ObitIOCode ObitIOTableFITSOpen (ObitIOTableFITS *in, ObitIOAccess access, ObitInfoList *info, ObitErr *err)
 Public: Open.
ObitIOCode ObitIOTableFITSClose (ObitIOTableFITS *in, ObitErr *err)
 Public: Close.
ObitIOCode ObitIOTableFITSSet (ObitIOTableFITS *in, ObitInfoList *info, ObitErr *err)
 Public: Init I/O.
ObitIOCode ObitIOTableFITSRead (ObitIOTableFITS *in, gfloat *data, ObitErr *err)
 Public: Read.
ObitIOCode ObitIOTableFITSReadRow (ObitIOTableFITS *in, glong rowno, gfloat *data, ObitErr *err)
 Public: Read specifying start row.
ObitIOCode ObitIOTableFITSWrite (ObitIOTableFITS *in, gfloat *data, ObitErr *err)
 Public: Write.
ObitIOCode ObitIOTableFITSWriteRow (ObitIOTableFITS *in, glong rowno, gfloat *data, ObitErr *err)
 Public: Write specifying start row.
ObitIOCode ObitIOTableFITSFlush (ObitIOTableFITS *in, ObitErr *err)
 Public: Flush.
ObitIOCode ObitIOTableFITSReadDescriptor (ObitIOTableFITS *in, ObitErr *err)
 Public: Read Descriptor.
ObitIOCode ObitIOTableFITSWriteDescriptor (ObitIOTableFITS *in, ObitErr *err)
 Public: Write Descriptor.
void ObitIOTableFITSCreateBuffer (gfloat **data, glong *size, ObitIOTableFITS *in, ObitInfoList *info, ObitErr *err)
 Public: Create buffer.


Detailed Description

ObitIOTableFITS class definition.

This class provides an interface to the cfitsio package for FITS images.

This class is derived from the ObitIO class. Related functions are in the ObitIOTableFITSUtil module.

Usage

Instances of this class are for access to FITS image files using the cfitsio package. Instances can be made using the $newObitIOTableFITS constructor, or the ObitIOTableFITSCopy copy constructor and pointers copied (with reference pointer update) using ObitIORef. The destructor (when reference count goes to zero) is ObitIOUnref. This class should seldom need be accessed directly outside of the ObitIO class. Parameters needed (passed via ObitInfoList) are:

Define Documentation

#define ObitIOTableFITSIsA in   )     ObitIsA (in, ObitIOTableFITSGetClass())
 

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 ObitIOTableFITSRef in   )     ObitRef (in)
 

Macro to reference (update reference count) an ObitIOTableFITS.

returns a ObitIOTableFITS*. in = object to reference

#define ObitIOTableFITSUnref in   )     ObitUnref (in)
 

Macro to unreference (and possibly destroy) an ObitIOTableFITS returns a ObitIOTableImageFITS* (NULL).

in = object to unreference.


Function Documentation

ObitIOTableFITS* newObitIOTableFITS gchar *  name,
ObitInfoList info,
ObitErr err
 

Public: Constructor.

Initializes class on the first call.

Parameters:
name An optional name for the object.
info if non-NULL it is used to initialize the new object.
err ObitErr for error messages.
Returns:
the new object.

void ObitIOTableFITSClassInit void   ) 
 

Public: Class initializer.

ObitIOCode ObitIOTableFITSClose ObitIOTableFITS in,
ObitErr err
 

Public: Close.

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

ObitIOTableFITS* ObitIOTableFITSCopy ObitIOTableFITS in,
ObitIOTableFITS 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.

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.

void ObitIOTableFITSCreateBuffer gfloat **  data,
glong *  size,
ObitIOTableFITS in,
ObitInfoList info,
ObitErr err
 

Public: Create buffer.

Should be called after ObitIO is opened.

Parameters:
data (output) pointer to data array
size (output) size of data array in bytes.
in Pointer to object to be accessed.
info ObitInfoList with instructions
err ObitErr for reporting errors.

ObitIOCode ObitIOTableFITSFlush ObitIOTableFITS in,
ObitErr err
 

Public: Flush.

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

gconstpointer ObitIOTableFITSGetClass void   ) 
 

Public: ClassInfo pointer.

Initializes class if needed on first call.

Returns:
pointer to the class structure.

ObitIOCode ObitIOTableFITSOpen ObitIOTableFITS in,
ObitIOAccess  access,
ObitInfoList info,
ObitErr err
 

Public: Open.

The file etc. info should have been stored in the ObitInfoList. The table descriptor is read if ReadOnly or ReadOnly and written to disk if opened WriteOnly. For accessing FITS files the following entries in the ObitInfoList are used:

  • "Disk" OBIT_int (1,1,1) FITS "disk" number.
  • "FileName" OBIT_string (?,1,1) FITS file name.
  • "TabName" OBIT_string (?,1,1) Table name (e.g. "AIPS CC").
  • "Ver" OBIT_int (1,1,1) Table version number
    Parameters:
    in Pointer to object to be opened.
    access access (OBIT_IO_ReadOnly,OBIT_IO_ReadWrite)
    info ObitInfoList with instructions for opening
    err ObitErr for reporting errors.
    Returns:
    return code, 0=> OK

ObitIOCode ObitIOTableFITSRead ObitIOTableFITS in,
gfloat *  data,
ObitErr err
 

Public: Read.

When OBIT_IO_EOF is returned all data has been read (then is no new data in buffer) and the I/O has been closed. If there are existing rows in the buffer marked as modified ("_status" column value =1) the buffer is rewritten to disk before the new buffer is read.

Parameters:
in Pointer to object to be read.
data pointer to buffer to receive results.
err ObitErr for reporting errors.
Returns:
return code, 0(OBIT_IO_OK)=> OK, OBIT_IO_EOF => image finished.

ObitIOCode ObitIOTableFITSReadDescriptor ObitIOTableFITS in,
ObitErr err
 

Public: Read Descriptor.

If the table version number is 0, then the highest numbered table of the same name is used.

Parameters:
in Pointer to object with ObitTableDesc to be read.
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

ObitIOCode ObitIOTableFITSReadRow ObitIOTableFITS in,
glong  rowno,
gfloat *  data,
ObitErr err
 

Public: Read specifying start row.

When OBIT_IO_EOF is returned all data has been read (then is no new data in buffer) and the I/O has been closed. If there are existing rows in the buffer marked as modified ("_status" column value =1) the buffer is rewritten to disk before the new buffer is read.

Parameters:
in Pointer to object to be read.
rowno Starting row number (1-rel) -1=> next.
data pointer to buffer to receive results.
err ObitErr for reporting errors.
Returns:
return code, 0(OBIT_IO_OK)=> OK, OBIT_IO_EOF => image finished.

gboolean ObitIOTableFITSSame ObitIO in,
ObitInfoList in1,
ObitInfoList in2,
ObitErr err
 

Public: Are underlying structures the same.

This test is done using values entered into the ObitInfoList in case the object has not yet been opened.

Parameters:
in ObitIO for test
in1 ObitInfoList for first object to be tested
in2 ObitInfoList for second object to be tested
err ObitErr for reporting errors.
Returns:
TRUE if to objects have the same underlying structures else FALSE

ObitIOCode ObitIOTableFITSSet ObitIOTableFITS in,
ObitInfoList info,
ObitErr err
 

Public: Init I/O.

Parameters:
in Pointer to object to be accessed.
info ObitInfoList with instructions
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

ObitIOCode ObitIOTableFITSWrite ObitIOTableFITS in,
gfloat *  data,
ObitErr err
 

Public: Write.

When OBIT_IO_EOF is returned the data has been written, data in data is ignored and the I/O is closed.

Parameters:
in Pointer to object to be written.
data pointer to buffer containing input data.
err ObitErr for reporting errors.
Returns:
return code, 0(OBIT_IO_OK)=> OK OBIT_IO_EOF => image finished.

ObitIOCode ObitIOTableFITSWriteDescriptor ObitIOTableFITS in,
ObitErr err
 

Public: Write Descriptor.

If the table version number is 0, then the highest numbered table of the same name +1 is used.

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

ObitIOCode ObitIOTableFITSWriteRow ObitIOTableFITS in,
glong  rowno,
gfloat *  data,
ObitErr err
 

Public: Write specifying start row.

void ObitIOTableFITSZap ObitIOTableFITS in,
ObitErr err
 

Public: Delete underlying structures.

Parameters:
in Pointer to object to be zapped.
err ObitErr for reporting errors.


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