﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
226	FITS API suggested changes.	robert.desonia@…	eugene	"Per our discussion, here is the API I proposed on the 22nd of Oct.

psFits* psFitsAlloc(const char* filename); 
// opens a fits file and positions it to the primary HDU.

bool psFitsMoveExtName(psFits* fits, const char* extname); 
// moves the HDU to the specified extension name.  If extname does not exist,
shoul we just fail?

bool psFitsMoveExtNum(psFits* fits, int extnum, bool relative);
// moves the HDU to the specified extension number.  

int psFitsGetExtNum(psFits* fits);
// returns the current HDU number (i.e., file position)

int psFitsGetSize(psFits* fits);
// returns the number of HDUs in the file.

int psFitsCreateExt(psFits* fits, psFitsType type, const char* name);
// creates a new HDU on the end of the file with the given extname and type.
// the psFits object is positioned to the new HDU.

psFitsType psFitsGetExtType(psFits* fits);
// gets the current HDU's type (table or image).

psMetadata* psFitsReadHeader(psMetadata* out, const psFits* fits);
// reads the HDU header (returns psMetadata instead of psHash to make symetric
// with psFitsWriteHeader).  If out=NULL, a new psMetadata is created.

bool psFitsWriteHeader(psMetadata* out, psFits* fits);
// writes the values of the metadata to the current HDU header

psImage* psfitsReadImageSection(psImage* out, psFits* fits, psRegion region, int z);
// reads an image, given the desired region and z-plane.

bool psFitsWriteImageSection(psFits* fits, const psImage* input, psRegion
region, int z);
// writes an image, given the desired region and z-plane

psMetadata* psFitsReadTableRow(psFits* fits, int row);
// reads a table row, as specified.

psArray* psFitsReadTableColumn(psFits* fits, const char* colname);
// reads a table column.

psVector* psFitsReadTableColumnNum(psFits* fits, const char* colname);
// reads a table column of numbers

psArray* psFitsReadTable(psFits* fits);  
// returns a psArray of psMetadata objects representing the whole table

bool psFitsWriteTable(psFits* fits, psArray* table); 
// accepts a psArray of psMetadata and writes it to the current HDU.  If the
current HDU is not a table type, this will fail and return FALSE."	defect	closed	high		PSLib SDRS	unspecified	normal	fixed		
