/** @file  pmFPAview.h
*
*  @brief Tools to manipulate the FPA structure elements.
*
*  @ingroup AstroImage
*
*  @author EAM, IfA
*
*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
*  @date $Date: 2006-06-28 19:23:20 $
*
*  Copyright 2004-2005 Institute for Astronomy, University of Hawaii
*/

#include <pmDetrendDB.h>

#ifndef PM_FPA_FILE_DEFINE_H
#define PM_FPA_FILE_DEFINE_H

// load the pmFPAfile information from the camera configuration data
pmFPAfile *pmFPAfileDefineInput (pmConfig *config, pmFPA *fpa, char *name);

// load the pmFPAfile information from the camera configuration data
pmFPAfile *pmFPAfileDefineOutput (pmConfig *config, pmFPA *fpa, char *name);

// look for the given argname on the argument list.  find the give filename from the file rules
pmFPAfile *pmFPAfileDefineFromArgs (bool *found, pmConfig *config, char *filename, char *argname);

// look for the given argname on the argument list.  find the give filename from the file rules
pmFPAfile *pmFPAfileDefineFromConf (bool *found, pmConfig *config, char *filename);

// look for the given argname on the argument list.  find the give filename from the file rules
pmFPAfile *pmFPAfileDefineFromDetDB (bool *found, pmConfig *config, char *filename, pmFPA *input, pmDetrendType type);

// create a new output pmFPAfile based on an existing FPA
pmFPAfile *pmFPAfileDefineFromFPA (pmConfig *config, pmFPA *src, int xBin, int yBin, char *filename);

// create a new output pmFPAfile based on an existing FPA
// only valid for pmFPAfile->mode == WRITE (or internal?)
pmFPAfile *pmFPAfileDefineNewCamera (pmConfig *config, char *filename);

// create a file with the given name, assign it type "INTERNAL", and supply it with an image
// of the requested dimensions. (image only, mask and weight are ignored)
pmReadout *pmFPAfileDefineInternal (psMetadata *files, char *name, int Nx, int Ny, int type);

// delete the INTERNAL file of the given name (if it exists)
bool pmFPAfileDropInternal (psMetadata *files, char *name);

// look for the given argname on the argument list.  find the give filename from the file rules
pmFPAfile *pmFPAfileDefineSingleFromArgs (bool *found, pmConfig *config, char *filename, char *argname, int entry);
# endif
