IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 9, 2006, 10:18:58 AM (20 years ago)
Author:
Paul Price
Message:

Adding camera name to pmConfig.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfig.c

    r8815 r9410  
    33 *  @author PAP, IfA
    44 *
    5  *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2006-09-15 09:49:01 $
     5 *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-10-09 20:18:58 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3535    psFree(config->files);
    3636    psFree(config->camera);
     37    psFree(config->cameraName);
    3738    psFree(config->recipes);
    3839    psFree(config->recipesSource);
     
    4950    config->site = NULL;
    5051    config->camera = NULL;
     52    config->cameraName = NULL;
    5153    config->recipes = psMetadataAlloc();
    5254    config->recipesRead = P_PM_RECIPE_SOURCE_NONE;
     
    578580            if (formatFromHeader(&format, testCamera, header, camerasItem->name)) {
    579581                config->camera = psMemIncrRefCounter(testCamera);
     582                config->cameraName = psStringCopy(camerasItem->name);
    580583            }
    581584            psFree(testCamera);
     
    595598
    596599    // Otherwise, try the specific camera
    597     if (!formatFromHeader(&format, config->camera, header, "specified camera")) {
    598         psError(PS_ERR_IO, true, "Unable to find a format with the specified camera that matches the "
    599                 "given header.\n");
     600    if (!formatFromHeader(&format, config->camera, header, config->cameraName)) {
     601        psError(PS_ERR_IO, true, "Unable to find a format with the specified camera (%s) that matches the "
     602                "given header.\n", config->cameraName);
    600603        return NULL;
    601604    }
     
    603606}
    604607
    605 // Work out what camera we have, based on the FITS header and a set of rules specified in the IPP
    606 // configuration; return the camera configuration and format
     608// Return the requested camera configuration
    607609psMetadata *pmConfigCameraByName(
    608610    pmConfig *config,                   // The configuration
Note: See TracChangeset for help on using the changeset viewer.