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

ObitAIPS.c File Reference

ObitAIPS class function definitions. More...

#include <math.h>
#include <string.h>
#include "ObitAIPS.h"
#include "ObitAIPSCat.h"
#include "ObitHistory.h"

Classes

union  FBLANKequiv

Functions

void ObitAIPSClassInit (gint number, gchar *dir[], oint F_TRUE, oint F_FALSE)
 Public: Class initializer.
void ObitAIPSShutdown (void)
 Public: Shutdown.
gchar * ObitAIPSFilename (ObitAIPSFileType type, gint disk, gint cno, gint userid, gchar *tabType, gint tabVer, ObitErr *err)
 Public: Generate name of AIPS file.
void ObitAIPSSetDirname (gint disk, gchar *dir, ObitErr *err)
 Public: Set directory string.
gchar * ObitAIPSDirname (gint disk, ObitErr *err)
 Public: Get directory string.
gint ObitAIPSGetNumDisk (ObitErr *err)
 Public: Get number of AIPS disks.
ObitFilePos ObitAIPSImageFileOffset (gint naxis, gint *naxes, gint *pos)
 Public: Determine file position offset in an image.
ObitFilePos ObitAIPSTableFileOffset (ObitFilePos start, gint lrow, gint row)
 Public: Determine file position offset in a table.
ObitFilePos ObitAIPSTableEOF (ObitFilePos start, gint lrow, gint nrow)
 Public: Determine file position of the end of an AIPS table.
ObitFilePos ObitAIPSUVWonkyPad (ObitFilePos curPos)
 Public: Wonky padding for end of UV data.
void ObitAIPSEHex (gint in, gchar *out)
 Public: Convert a gint to EHex.
void ObitAIPSAssign (gchar *pgmName, gint pgmNumber, gchar *type, gint user, gint disk, gint scrNo, ObitInfoList *info, ObitErr *err)
 Public: Assign a scratch file info.
void ObitAIPSRename (ObitIO *in, ObitInfoList *info, ObitErr *err)
 Public: Rename an AIPS file.
gboolean ObitAIPSBooleanF2C (oint logical)
 Public: Convert Fortran LOGICAL to a gboolean.
oint ObitAIPSBooleanC2F (gboolean bool)
 Public: Convert a gboolean to a Fortran LOGICAL.
void ObitAIPSnoScrat (gint disk, gboolean noScrat, ObitErr *err)
 Public: Mark/Unmark AIPS directory as noScrat.
gboolean ObitAIPSisNoScrat (gint disk)
 Public: Tell if AIPS directory is noScrat.
void ObitAIPSSetnoScrat (ObitInfoList *info, ObitErr *err)
 Public: Check for "noScrat" AIPS disks.

Variables

gchar AIPS_Version = 'D'
 Current AIPS data revision code.


Detailed Description

ObitAIPS class function definitions.


Function Documentation

void ObitAIPSAssign gchar *  pgmName,
gint  pgmNumber,
gchar *  type,
gint  user,
gint  disk,
gint  scrNo,
ObitInfoList info,
ObitErr err
 

Public: Assign a scratch file info.

Deliberately does not follow AIPS conventions. name = "OBIT SCRATCH" class = "pgmName+pgmNumber" seq = scrNo Makes name "pgmName+pgmNumber+'Scr'+scrNo"

Parameters:
pgmName Program name
pgmNumber Program incarnation number
type AIPS file type ("MA", "UV").
user AIPS user number
disk AIPS disk number.
scrNo Which scratch file number
info ObitInfoList to write to
err Error stack for any error messages.

oint ObitAIPSBooleanC2F gboolean  bool  ) 
 

Public: Convert a gboolean to a Fortran LOGICAL.

Parameters:
bool boolean (TRUE or FALSE)
Returns:
Fortran LOGICAL value equivalent

gboolean ObitAIPSBooleanF2C oint  logical  ) 
 

Public: Convert Fortran LOGICAL to a gboolean.

Parameters:
logical Fortran LOGICAL value
Returns:
gboolean equivalent (TRUE or FALSE)

void ObitAIPSClassInit gint  number,
gchar *  dir[],
oint  F_TRUE,
oint  F_FALSE
 

Public: Class initializer.

Parameters:
number of disks defined [0,MAXAIPSDISK]], >=0 -> none
dir the names of the directories If NULL, check for environment variables $DA01...
F_TRUE Value of Fortran TRUE (used in Fortran interface)
F_FALSE Value of Fortran FALSE

gchar* ObitAIPSDirname gint  disk,
ObitErr err
 

Public: Get directory string.

Parameters:
disk AIPS disk number.
err Error stack for any error messages.
Returns:
directory name string, this is a pointer into a global class structure and should not be g_freeed.

void ObitAIPSEHex gint  in,
gchar *  out
 

Public: Convert a gint to EHex.

Parameters:
in integer to be converted
out preexisting string into which to write value must be at least 4 characters.

gchar* ObitAIPSFilename ObitAIPSFileType  type,
gint  disk,
gint  cno,
gint  userid,
gchar *  tabType,
gint  tabVer,
ObitErr err
 

Public: Generate name of AIPS file.

ObitAIPSClassInit must have been used to initialize.

Parameters:
type File type code
disk AIPS "disk" number. 1-rel
cno AIPS catalog slot number.
userid user number.
tabType two character code for table type, NULL if not needed.
tabVer table version number.
err Error stack for any error messages.
Returns:
file name string, should be g_freeed when done.

gint ObitAIPSGetNumDisk ObitErr err  ) 
 

Public: Get number of AIPS disks.

Parameters:
err Error stack for any error messages.
Returns:
number of disks

ObitFilePos ObitAIPSImageFileOffset gint  naxis,
gint *  naxes,
gint *  pos
 

Public: Determine file position offset in an image.

AIPS images have planes starting on an even #AIPS_NBPS byte boundry. If the row size is less than AIPS_NBPS bytes, multiple rows are stored in a sector but are not allowed to cross a sector boundry; the end of a sector is padded and the next row starts at the beginning of a new sector. Rows longer than a sector have the last sector padded and the next row starts at the beginning of a new sector. This was necessary back at the dawn of time when MODCOMP computers roamed the earth and could only start a transfer at the beginning of a disk sector. This routine patterned after the aipsish $APLSUB/COMOFF.FOR. (The original is incomprehensible).

Parameters:
naxis number of axes in image
naxes number of pixels on each axis.
pos 1-rel pixel position
Returns:
byte offset from beginning of image file

gboolean ObitAIPSisNoScrat gint  disk  ) 
 

Public: Tell if AIPS directory is noScrat.

Parameters:
disk AIPS disk number.
Returns:
True if scratch files disallowed or invalid disk

void ObitAIPSnoScrat gint  disk,
gboolean  noScrat,
ObitErr err
 

Public: Mark/Unmark AIPS directory as noScrat.

don't add scratch files on this data area

Parameters:
disk AIPS disk number.
noScrat If True don't put scratch files on disk else allow.
err Error stack for any error messages.

void ObitAIPSRename ObitIO in,
ObitInfoList info,
ObitErr err
 

Public: Rename an AIPS file.

Parameters:
in ObitIO on AIPS file
info Associated ObitInfoList
  • "Disk" OBIT_int (1,1,1) Disk number
  • "CNO" OBIT_int (1,1,1) Catalog slot number
  • "newName" OBIT_string (12,1,1) New AIPS Name absent or Blank = don't change
  • "newClass" OBIT_string (6,1,1) New AIPS Class absent or Blank = don't changeO
  • "newSeq" OBIT_int (1,1,1) New AIPS Sequence 0 => unique value
err Error stack for any error messages.

void ObitAIPSSetDirname gint  disk,
gchar *  dir,
ObitErr err
 

Public: Set directory string.

Parameters:
disk disk (1-rel) to be changed, must have been assigned at startup
dir new name of the directory

void ObitAIPSSetnoScrat ObitInfoList info,
ObitErr err
 

Public: Check for "noScrat" AIPS disks.

Parameters:
info List to check
err Error stack for any error messages.

void ObitAIPSShutdown void   ) 
 

Public: Shutdown.

ObitFilePos ObitAIPSTableEOF ObitFilePos  start,
gint  lrow,
gint  nrow
 

Public: Determine file position of the end of an AIPS table.

Tables rows are written either an integral number of sectors (#AIPS_NBPS bytes) per row, or an integral number of rows per sector. The last "sector" is padded after the last datum. This routine calculates the location of the end of this sector.

Parameters:
start Byte offset of the beginning of the row data.
lrow The length of a row in bytes.
nrow Number of rows in the table.
Returns:
byte offset from beginning of table file

ObitFilePos ObitAIPSTableFileOffset ObitFilePos  start,
gint  lrow,
gint  row
 

Public: Determine file position offset in a table.

Tables rows are written either an integral number of sectors (#AIPS_NBPS bytes) per row, or an integral number of rows per sector. The last "sector" is padded after the last datum.

Parameters:
start Byte offset of the beginning of the row data.
lrow The length of a row in bytes.
row 1-rel row number desired.
Returns:
byte offset from beginning of table file

ObitFilePos ObitAIPSUVWonkyPad ObitFilePos  curPos  ) 
 

Public: Wonky padding for end of UV data.

Must be an integral number of AIPS blocks

Parameters:
curPos The byte offset of the current end of the file.
Returns:
target file position index in bytes to be padded to.


Variable Documentation

gchar AIPS_Version = 'D'
 

Current AIPS data revision code.


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