/* @file  pmConceptsStandard.h
 * @brief Private functions for parsing and formatting standard concepts.
 *
 * @author Paul Price, IfA
 *
 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
 * @date $Date: 2007-03-30 21:12:56 $
 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
 */

#ifndef PM_CONCEPTS_STANDARD_H
#define PM_CONCEPTS_STANDARD_H

/// @addtogroup Concepts Data Abstraction Concepts
/// @{

/// Parse the FPA.FILTER concept to apply a lookup table
psMetadataItem *p_pmConceptParse_FPA_FILTER(const psMetadataItem *concept, ///< Concept to parse
        const psMetadataItem *pattern, ///< Pattern to use in parsing
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                           );

/// Format the FPA.FILTER concept to (reverse-)apply a lookup table
psMetadataItem *p_pmConceptFormat_FPA_FILTER(const psMetadataItem *concept, ///< Concept to format
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                            );

/// Parse the coordinates concepts: FPA.RA and FPA.DEC
psMetadataItem *p_pmConceptParse_FPA_Coords(const psMetadataItem *concept, ///< Concept to parse
        const psMetadataItem *pattern, ///< Pattern to use in parsing
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                           );

/// Format the coordinates concepts: FPA.RA and FPA.DEC
psMetadataItem *p_pmConceptFormat_FPA_Coords(const psMetadataItem *concept, ///< Concept to format
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                            );

/// Parse the CELL.TRIMSEC concept
psMetadataItem *p_pmConceptParse_CELL_TRIMSEC(const psMetadataItem *concept, ///< Concept to parse
        const psMetadataItem *pattern, ///< Pattern to use in parsing
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                             );

/// Parse the CELL.BIASSEC concept
psMetadataItem *p_pmConceptParse_CELL_BIASSEC(const psMetadataItem *concept, ///< Concept to parse
        const psMetadataItem *pattern, ///< Pattern to use in parsing
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                             );

/// Parse the cell binning concepts: CELL.XBIN, CELL.YBIN
psMetadataItem *p_pmConceptParse_CELL_Binning(const psMetadataItem *concept, ///< Concept to parse
        const psMetadataItem *pattern, ///< Pattern to use in parsing
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                             );

/// Parse the time system concepts: FPA.TIMESYS and CELL.TIMESYS
psMetadataItem *p_pmConceptParse_TIMESYS(const psMetadataItem *concept, ///< Concept to parse
        const psMetadataItem *pattern, ///< Pattern to use in parsing
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                        );

/// Parse the time concepts: FPA.TIME and CELL.TIME
psMetadataItem *p_pmConceptParse_TIME(const psMetadataItem *concept, ///< Concept to parse
                                      const psMetadataItem *pattern, ///< Pattern to use in parsing
                                            pmConceptSource source, ///< Source for concept
                                      const psMetadata *cameraFormat, ///< Camera format definition
                                      const pmFPA *fpa, ///< FPA for concept, or NULL
                                      const pmChip *chip, ///< Chip for concept, or NULL
                                      const pmCell *cell ///< Cell for concept, or NULL
                                     );

/// Parse a cell position concept, e.g., CELL.X0
psMetadataItem *p_pmConceptParse_Positions(const psMetadataItem *concept, ///< Concept to parse
        const psMetadataItem *pattern, ///< Pattern to use in parsing
                                            pmConceptSource source, ///< Source for concept
       const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                          );

/// Format the CELL.TRIMSEC concept
psMetadataItem *p_pmConceptFormat_CELL_TRIMSEC(const psMetadataItem *concept, ///< Concept to format
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                              );

/// Format the CELL.BIASSEC concept
psMetadataItem *p_pmConceptFormat_CELL_BIASSEC(const psMetadataItem *concept, ///< Concept to format
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                              );

/// Format the CELL.XBIN concept
psMetadataItem *p_pmConceptFormat_CELL_XBIN(const psMetadataItem *concept, ///< Concept to format
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                           );

/// Format the CELL.YBIN concept
psMetadataItem *p_pmConceptFormat_CELL_YBIN(const psMetadataItem *concept, ///< Concept to format
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                           );

/// Format the time system concepts: FPA.TIMESYS and CELL.TIMESYS
psMetadataItem *p_pmConceptFormat_TIMESYS(const psMetadataItem *concept, ///< Concept to format
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                         );

/// Format the time concepts: FPA.TIME and CELL.TIME
psMetadataItem *p_pmConceptFormat_TIME(const psMetadataItem *concept, ///< Concept to format
                                            pmConceptSource source, ///< Source for concept
                                       const psMetadata *cameraFormat, ///< Camera format definition
                                       const pmFPA *fpa, ///< FPA for concept, or NULL
                                       const pmChip *chip, ///< Chip for concept, or NULL
                                       const pmCell *cell ///< Cell for concept, or NULL
                                      );

/// Format a cell position concept, e.g., CELL.X0
psMetadataItem *p_pmConceptFormat_Positions(const psMetadataItem *concept, ///< Concept to format
                                            pmConceptSource source, ///< Source for concept
        const psMetadata *cameraFormat, ///< Camera format definition
        const pmFPA *fpa, ///< FPA for concept, or NULL
        const pmChip *chip, ///< Chip for concept, or NULL
        const pmCell *cell ///< Cell for concept, or NULL
                                           );
/// @}
#endif
