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

ObitIOTableFITS.c File Reference

ObitIOTableFITS class function definitions. More...

#include "ObitIOTableFITS.h"
#include "ObitFITS.h"
#include "ObitMem.h"
#include "ObitFile.h"
#include <errno.h>

Functions

void ObitIOTableFITSInit (gpointer in)
 Private: Initialize newly instantiated object.
void ObitIOTableFITSClear (gpointer in)
 Private: Deallocate members.
void ObitIOTableKeysOtherRead (ObitIOTableFITS *in, gint *status, ObitErr *err)
 Private: Copy other header keywords.
void ObitIOTableFITSFixBug (gchar *out, gchar *in, glong maxn)
 Private: Fix bug in cfitsio keyword parsing.
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.
gconstpointer ObitGetIOTableFITSClass (void)
 Returns ClassInfo pointer for the class.
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 ObitIOTableFITSReadRow (ObitIOTableFITS *in, glong rowno, gfloat *data, ObitErr *err)
 Public: Read specifying start row.
ObitIOCode ObitIOTableFITSRead (ObitIOTableFITS *in, gfloat *data, ObitErr *err)
 Public: Read.
ObitIOCode ObitIOTableFITSReadRowSelect (ObitIOTableFITS *in, glong rowno, gfloat *data, ObitErr *err)
 Read table data from disk applying selection and specifying start row.
ObitIOCode ObitIOTableFITSReadSelect (ObitIOTableFITS *in, gfloat *data, ObitErr *err)
 Read table data from disk applying selection.
ObitIOCode ObitIOTableFITSWriteRow (ObitIOTableFITS *in, long rowno, gfloat *data, ObitErr *err)
 Write information to disk specifying starting row.
ObitIOCode ObitIOTableFITSWrite (ObitIOTableFITS *in, gfloat *data, ObitErr *err)
 Public: Write.
ObitIOCode ObitIOTableFITSReadDescriptor (ObitIOTableFITS *in, ObitErr *err)
 Public: Read Descriptor.
ObitIOCode ObitIOTableFITSWriteDescriptor (ObitIOTableFITS *in, ObitErr *err)
 Public: Write Descriptor.
ObitIOCode ObitIOTableFITSFlush (ObitIOTableFITS *in, ObitErr *err)
 Public: Flush.
void ObitIOTableFITSCreateBuffer (gfloat **data, glong *size, ObitIOTableFITS *in, ObitInfoList *info, ObitErr *err)
 Public: Create buffer.
void ObitIOTableFITSClassInit (void)
 Public: Class initializer.


Detailed Description

ObitIOTableFITS class function definitions.

This class is derived from the ObitIO class.


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.

gconstpointer ObitGetIOTableFITSClass void   ) 
 

Returns ClassInfo pointer for the class.

Initializes class if needed on first call.

Returns:
pointer to the class structure.

void ObitIOTableFITSClassInit void   ) 
 

Public: Class initializer.

void ObitIOTableFITSClear gpointer  inn  ) 
 

Private: Deallocate members.

Does (recursive) deallocation of parent class members.

Parameters:
inn Pointer to the object to deallocate.

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.

void ObitIOTableFITSFixBug gchar *  out,
gchar *  in,
glong  maxn
 

Private: Fix bug in cfitsio keyword parsing.

This routine blank fills out and null terminates at out[maxn-1].

Parameters:
out Output string
in Input string from cfitsio keyword read
maxn length of out

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.

void ObitIOTableFITSInit gpointer  inn  ) 
 

Private: Initialize newly instantiated object.

for each parent class.

Parameters:
inn Pointer to the object to initialize.

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.

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

Read table data from disk applying selection and specifying start row.

When OBIT_IO_EOF is returned all data has been read (then is no new data in data) 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 write results.
err ObitErr for reporting errors.
Returns:
return code, 0(OBIT_IO_OK)=> OK, OBIT_IO_EOF => image finished.

ObitIOCode ObitIOTableFITSReadSelect ObitIOTableFITS in,
gfloat *  data,
ObitErr err
 

Read table data from disk applying selection.

When OBIT_IO_EOF is returned all data has been read (then is no new data in data) 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 write 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,
long  rowno,
gfloat *  data,
ObitErr err
 

Write information to disk specifying starting row.

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.

void ObitIOTableFITSZap ObitIOTableFITS in,
ObitErr err
 

Public: Delete underlying structures.

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

void ObitIOTableKeysOtherRead ObitIOTableFITS in,
gint *  status,
ObitErr err
 

Private: Copy other header keywords.

Parameters:
in Pointer to ObitIOTableFITS.
status (Output) cfitsio status.
err ObitErr stack.
Returns:
return code, 0=> OK


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