00001 /* @file pmFPAview.h 00002 * @brief Tools to manipulate the FPA structure elements. 00003 * 00004 * @author EAM, IfA 00005 * 00006 * @version $Revision: 1.8 $ $Name: $ 00007 * @date $Date: 2007/01/24 02:54:14 $ 00008 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii 00009 */ 00010 00011 #include <pmDetrendDB.h> 00012 00013 /// @addtogroup Camera Camera Layout 00014 /// @{ 00015 00016 #ifndef PM_FPA_FILE_DEFINE_H 00017 #define PM_FPA_FILE_DEFINE_H 00018 00019 // load the pmFPAfile information from the camera configuration data 00020 // 00021 // Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only 00022 // reference count is held by the config->files metadata. 00023 pmFPAfile *pmFPAfileDefineInput (pmConfig *config, pmFPA *fpa, const char *name); 00024 00025 // load the pmFPAfile information from the camera configuration data 00026 // 00027 // Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only 00028 // reference count is held by the config->files metadata. 00029 pmFPAfile *pmFPAfileDefineOutput (pmConfig *config, pmFPA *fpa, const char *name); 00030 00031 // look for the given argname on the argument list. find the give filename from the file rules 00032 // 00033 // Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only 00034 // reference count is held by the config->files metadata. 00035 pmFPAfile *pmFPAfileDefineFromArgs (bool *found, pmConfig *config, const char *filename, const char *argname); 00036 00037 // look for the given argname on the argument list; bind the associated files to the specified 00038 // fpa. these are, eg, mask or weight images. 00039 // Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only 00040 // reference count is held by the config->files metadata. 00041 pmFPAfile *pmFPAfileBindFromArgs (bool *found, pmFPAfile *input, pmConfig *config, const char *filename, const char *argname); 00042 00043 // look for the given argname on the argument list. find the give filename from the file rules 00044 // 00045 // Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only 00046 // reference count is held by the config->files metadata. 00047 pmFPAfile *pmFPAfileDefineFromConf (bool *found, pmConfig *config, const char *filename); 00048 00049 // look for the given argname on the argument list. find the give filename from the file rules 00050 // 00051 // Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only 00052 // reference count is held by the config->files metadata. 00053 pmFPAfile *pmFPAfileDefineFromDetDB (bool *found, pmConfig *config, const char *filename, 00054 pmFPA *input, pmDetrendType type); 00055 00056 // create a new output pmFPAfile based on an existing FPA 00057 // 00058 // Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only 00059 // reference count is held by the config->files metadata. 00060 pmFPAfile *pmFPAfileDefineFromFPA (pmConfig *config, pmFPA *src, int xBin, int yBin, const char *filename); 00061 00062 // create a new output pmFPAfile based on an existing FPA 00063 // only valid for pmFPAfile->mode == WRITE (or internal?) 00064 // 00065 // Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only 00066 // reference count is held by the config->files metadata. 00067 pmFPAfile *pmFPAfileDefineNewCamera (pmConfig *config, const char *filename); 00068 00069 /// Create a new output pmFPAfile based upon a chip mosaic of an existing FPA 00070 /// 00071 /// The new pmFPAfile is inserted into the config->files metadata, freed and returned; so that the user does 00072 /// not have to (and should not!) free the result. 00073 pmFPAfile *pmFPAfileDefineChipMosaic(pmConfig *config, ///< Configuration data 00074 pmFPA *src, ///< Source FPA 00075 const char *filename ///< Output (root) filename 00076 ); 00077 00078 /// Create a new output pmFPAfile based upon an FPA mosaic of an existing FPA 00079 /// 00080 /// The new pmFPAfile is inserted into the config->files metadata, freed and returned; so that the user does 00081 /// not have to (and should not!) free the result. 00082 pmFPAfile *pmFPAfileDefineFPAMosaic(pmConfig *config, ///< Configuration data 00083 pmFPA *src, ///< Source FPA 00084 const char *filename ///< Output (root) filename 00085 ); 00086 00087 // create a file with the given name, assign it type "INTERNAL", and supply it with an image 00088 // of the requested dimensions. (image only, mask and weight are ignored) 00089 pmReadout *pmFPAfileDefineInternal (psMetadata *files, const char *name, int Nx, int Ny, int type); 00090 00091 // delete the INTERNAL file of the given name (if it exists) 00092 bool pmFPAfileDropInternal (psMetadata *files, const char *name); 00093 00094 // look for the given argname on the argument list. find the give filename from the file rules 00095 // 00096 // Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only 00097 // reference count is held by the config->files metadata. 00098 pmFPAfile *pmFPAfileDefineSingleFromArgs (bool *found, pmConfig *config, const char *filename, 00099 const char *argname, int entry); 00100 /// @} 00101 # endif
1.5.1