/** @file  pmSourceIO.h
 *
 *  @author EAM, IfA; GLG, MHPCC
 *
 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
 *  @date $Date: 2006-04-17 18:01:05 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
 *
 */

# ifndef PM_SOURCE_IO_H
# define PM_SOURCE_IO_H

int pmSourceDophotType (pmSource *source);

bool pmSourcesWriteRAW (psArray *sources, char *filename);
bool pmSourcesWriteOBJ (psArray *sources, char *filename);
bool pmSourcesWriteSX (psArray *sources, char *filename);
bool pmSourcesWriteCMP (psArray *sources, char *filename, psMetadata *header);
bool pmSourcesWriteCMF (psFits *fits, psArray *sources, psMetadata *header, char *extname);

psArray *pmSourcesReadCMP (char *filename, psMetadata *header);
psArray *pmSourcesReadCMF (psFits *fits, psMetadata *header);

bool pmSourcesWritePSFs (psArray *sources, char *filename);
bool pmSourcesWriteEXTs (psArray *sources, char *filename);
bool pmSourcesWriteNULLs (psArray *sources, char *filename);
bool pmMomentsWriteText (psArray *sources, char *filename);
bool pmPeaksWriteText (psArray *peaks, char *filename);

bool pmFPAviewReadObjects (const pmFPAview *view, pmFPAfile *file);
bool pmFPAReadObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
bool pmChipReadObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
bool pmCellReadObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
bool pmReadoutReadObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);

bool pmFPAviewWriteObjects (const pmFPAview *view, pmFPAfile *file);
bool pmFPAWriteObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
bool pmChipWriteObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
bool pmCellWriteObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
bool pmReadoutWriteObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);

# endif /* PM_SOURCE_IO_H */
