IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12716


Ignore:
Timestamp:
Apr 3, 2007, 10:28:26 AM (19 years ago)
Author:
magnier
Message:

adding option to pmConfigCameraFormatFromHeader to load recipe or not

Location:
trunk/psModules/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfileDefine.c

    r12696 r12716  
    288288    // determine the current format from the header
    289289    // determine camera if not specified already
    290     format = pmConfigCameraFormatFromHeader (config, phu);
     290    format = pmConfigCameraFormatFromHeader (config, phu, true);
    291291    if (!format) {
    292292        psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", realName);
     
    565565    // on first call to this function, config->camera is not set.
    566566    // later calls will give an error if the cameras do not match
    567     format = pmConfigCameraFormatFromHeader (config, phu);
     567    format = pmConfigCameraFormatFromHeader (config, phu, true);
    568568    if (!format) {
    569569        psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", (char *)infiles->data[0]);
  • trunk/psModules/src/camera/pmFPAfileIO.c

    r12696 r12716  
    719719    psMetadata *phu = psFitsReadHeader (NULL, file->fits);
    720720    if (!file->format) {
    721         file->format = pmConfigCameraFormatFromHeader (config, phu);
     721        // XXX do we need to read the recipe here?  these files are supplemental, and probably
     722        // do not need to re-load the recipes
     723        file->format = pmConfigCameraFormatFromHeader (config, phu, false);
    722724        if (!file->format) {
    723725            psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", file->filename);
  • trunk/psModules/src/config/pmConfig.c

    r12702 r12716  
    44 *  @author EAM (IfA)
    55 *
    6  *  @version $Revision: 1.83 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2007-03-31 03:01:08 $
     6 *  @version $Revision: 1.84 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2007-04-03 20:28:26 $
    88 *
    99 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    786786}
    787787
    788 
    789 psMetadata *pmConfigCameraFormatFromHeader(pmConfig *config, const psMetadata *header)
     788// we only need to read the recipe for the main camera images.  for additional images (eg, sky
     789// cells) do not need to re-read the recipe files!
     790psMetadata *pmConfigCameraFormatFromHeader(pmConfig *config, const psMetadata *header, bool readRecipes)
    790791{
    791792    PS_ASSERT_PTR_NON_NULL(config, NULL);
     
    840841
    841842        // Now we have the camera, we can read the recipes
    842         if (!pmConfigReadRecipes(config, PM_RECIPE_SOURCE_CAMERA | PM_RECIPE_SOURCE_CL)) {
     843        if (readRecipes && !pmConfigReadRecipes(config, PM_RECIPE_SOURCE_CAMERA | PM_RECIPE_SOURCE_CL)) {
    843844            psError(PS_ERR_IO, false, "Error reading recipes from camera config for %s", config->cameraName);
    844845            return NULL;
  • trunk/psModules/src/config/pmConfig.h

    r11292 r12716  
    55 *  @author Eugene Magnier, IfA
    66 *
    7  *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-01-26 00:05:18 $
     7 *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-04-03 20:28:26 $
    99 *  Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    1010 */
     
    108108/// configuration.  The accepted format is returned.
    109109psMetadata *pmConfigCameraFormatFromHeader(pmConfig *config, ///< The configuration
    110         const psMetadata *header ///< The FITS header
    111                                           );
     110                                           const psMetadata *header, ///< The FITS header
     111                                           bool readRecipes ///< optionally read the recipes as well as the format
     112    );
    112113
    113114/// Return the camera configuration specified by name
Note: See TracChangeset for help on using the changeset viewer.