IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 9, 2007, 3:09:20 PM (19 years ago)
Author:
eugene
Message:

updating all changes from from eam_branch_20071023

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmAstrometryTable.c

    r15357 r15562  
    11/** @file  pmAstrometryObjects.c
    2 *
    3 *  @brief This file defines the basic types for matching objects
    4 *  based on their astrometry.
    5 *
    6 *  @ingroup AstroImage
    7 *
    8 *  @author EAM, IfA
    9 *
    10 *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2007-10-23 20:52:42 $
    12 *
    13 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    14 */
     2 *
     3 *  @brief This file defines the basic types for matching objects
     4 *  based on their astrometry.
     5 *
     6 *  @ingroup AstroImage
     7 *
     8 *  @author EAM, IfA
     9 *
     10 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2007-11-10 01:09:20 $
     12 *
     13 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     14 */
    1515
    1616#ifdef HAVE_CONFIG_H
     
    2929#include <pslib.h>
    3030
     31#include "pmConfig.h"
     32#include "pmDetrendDB.h"
    3133#include "pmHDU.h"
    3234#include "pmFPA.h"
    33 #include "pmAstrometryObjects.h"
     35#include "pmFPALevel.h"
     36#include "pmFPAview.h"
     37#include "pmFPAfile.h"
     38#include "pmAstrometryTable.h"
     39
    3440
    3541/********************* CheckDataStatus functions *****************************/
     
    179185bool pmAstromWriteChip (pmChip *chip, const pmFPAview *view, pmFPAfile *file, const pmConfig *config)
    180186{
    181     // define the EXTNAME values used for the table data, and residual image segments
    182     {
    183         // lookup the EXTNAME values used for table data and image header segments
    184         char *rule = NULL;
    185 
    186         // Menu of EXTNAME rules
    187         psMetadata *menu = psMetadataLookupMetadata(&status, file->camera, "EXTNAME.RULES");
    188         if (!menu) {
    189             psError(PS_ERR_UNKNOWN, true, "missing EXTNAME.RULES in camera.config");
    190             return false;
    191         }
    192 
    193         // EXTNAME for image header
    194         rule = psMetadataLookupStr(&status, menu, "ASTROMETRY");
    195         if (!rule) {
    196             psError(PS_ERR_UNKNOWN, false, "missing entry for ASTROMETRY in EXTNAME.RULES in camera.config");
    197             return false;
    198         }
    199         extname = pmFPAfileNameFromRule (rule, file, view);
    200     }
     187    bool status;
     188    // *** define the EXTNAME values used for the table data, and residual image segments ***
     189
     190    // lookup the EXTNAME values used for table data and image header segments
     191    char *rule = NULL;
     192
     193    // Menu of EXTNAME rules
     194    psMetadata *menu = psMetadataLookupMetadata(&status, file->camera, "EXTNAME.RULES");
     195    if (!menu) {
     196        psError(PS_ERR_UNKNOWN, true, "missing EXTNAME.RULES in camera.config");
     197        return false;
     198    }
     199
     200    // EXTNAME for image header
     201    rule = psMetadataLookupStr(&status, menu, "ASTROMETRY");
     202    if (!rule) {
     203        psError(PS_ERR_UNKNOWN, false, "missing entry for ASTROMETRY in EXTNAME.RULES in camera.config");
     204        return false;
     205    }
     206
     207    // XXX need to finish this: uncomment when used
     208    # if (0)
     209    char *extname = pmFPAfileNameFromRule (rule, file, view);
     210    # endif
    201211
    202212    // write the chip elements in the following form:
     
    244254bool pmAstromReadChip (pmChip *chip, const pmFPAview *view, pmFPAfile *file, const pmConfig *config)
    245255{
    246     // define the EXTNAME values used for the table data, and residual image segments
    247     {
    248         // lookup the EXTNAME values used for table data and image header segments
    249         char *rule = NULL;
    250 
    251         // Menu of EXTNAME rules
    252         psMetadata *menu = psMetadataLookupMetadata(&status, file->camera, "EXTNAME.RULES");
    253         if (!menu) {
    254             psError(PS_ERR_UNKNOWN, true, "missing EXTNAME.RULES in camera.config");
    255             return false;
    256         }
    257 
    258         // EXTNAME for image header
    259         rule = psMetadataLookupStr(&status, menu, "ASTROMETRY");
    260         if (!rule) {
    261             psError(PS_ERR_UNKNOWN, false, "missing entry for ASTROMETRY in EXTNAME.RULES in camera.config");
    262             return false;
    263         }
    264         extname = pmFPAfileNameFromRule (rule, file, view);
    265     }
     256    bool status;
     257
     258    // lookup the EXTNAME values used for table data and image header segments
     259    char *rule = NULL;
     260
     261    // Menu of EXTNAME rules
     262    psMetadata *menu = psMetadataLookupMetadata(&status, file->camera, "EXTNAME.RULES");
     263    if (!menu) {
     264        psError(PS_ERR_UNKNOWN, true, "missing EXTNAME.RULES in camera.config");
     265        return false;
     266    }
     267
     268    // EXTNAME for image header
     269    rule = psMetadataLookupStr(&status, menu, "ASTROMETRY");
     270    if (!rule) {
     271        psError(PS_ERR_UNKNOWN, false, "missing entry for ASTROMETRY in EXTNAME.RULES in camera.config");
     272        return false;
     273    }
     274
     275    // XXX finish this: uncomment when used
     276    # if (0)
     277    char *extname = pmFPAfileNameFromRule (rule, file, view);
     278    # endif
    266279
    267280    // read the chip elements in the following form:
Note: See TracChangeset for help on using the changeset viewer.