IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9588


Ignore:
Timestamp:
Oct 16, 2006, 2:55:01 PM (20 years ago)
Author:
Paul Price
Message:

Documenting pmFPAConstruct.[ch]. Added const to pmFPAPrint().

Location:
trunk/psModules/src/camera
Files:
2 edited

Legend:

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

    r9584 r9588  
    250250    }
    251251
    252     // MORE SUBSTITUTION OPTIONS HERE!
     252    // XXX: MORE SUBSTITUTION OPTIONS HERE!
    253253
    254254    psTrace("psModules.camera", 5, "Looking up %s in the CONTENTS.\n", contentKey);
     
    385385}
    386386
     387// Return the level at which EXTENSIONS go, from the FILE metadata within the camera format
    387388static pmFPALevel hduLevel(const psMetadata *format // The camera format configuration
    388389                          )
     
    420421//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    421422
    422 // Construct an FPA instance on the basis of a camera configuration
    423 pmFPA *pmFPAConstruct(const psMetadata *camera // The camera configuration
    424                      )
     423pmFPA *pmFPAConstruct(const psMetadata *camera)
    425424{
    426425    PS_ASSERT_PTR_NON_NULL(camera, NULL);
     
    464463
    465464
    466 // This is the engine for the pmFPAAddSourceFrom{Header,View} functions
     465// This is the engine for the pmFPAAddSourceFrom{Header,View} functions.
     466// It uses the camera format configuration information to determine where HDUs go in the FPA.
    467467// It returns a view corresponding to the PHU
    468468static pmFPAview *addSource(pmFPA *fpa,       // The FPA
     
    555555    // In cases 2 and 3, the CONTENTS is of type METADATA, and is either a menu (if EXTENSIONS=NONE), or a
    556556    // list of extensions otherwise.
    557     psMetadata *contents = psMetadataLookupMetadata(&mdok, format, "CONTENTS"); // The contents of the FITS file
     557    psMetadata *contents = psMetadataLookupMetadata(&mdok, format, "CONTENTS"); // The contents of the file
    558558    if (!mdok || !contents) {
    559559        if (mdok && !contents) {
     
    751751
    752752
    753 bool pmFPAAddSourceFromView(pmFPA *fpa,   // The FPA
    754                             const pmFPAview *phuView, // The view, corresponding to the PHU
    755                             const psMetadata *format // Format of file
    756                            )
     753bool pmFPAAddSourceFromView(pmFPA *fpa, const pmFPAview *phuView, const psMetadata *format)
    757754{
    758755    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    762759    pmFPAview *view = addSource(fpa, phuView, NULL, format);
    763760    bool status = (view == NULL);
    764     psFree (view);
     761    psFree(view);
    765762    return status;
    766763}
    767764
    768 // Add an input file to the FPA
    769 pmFPAview *pmFPAAddSourceFromHeader(pmFPA *fpa, // The FPA
    770                                     psMetadata *phu, // Primary header of file
    771                                     const psMetadata *format // Format of file
    772                                    )
     765pmFPAview *pmFPAAddSourceFromHeader(pmFPA *fpa, psMetadata *phu, const psMetadata *format)
    773766{
    774767    PS_ASSERT_PTR_NON_NULL(fpa, NULL);
     
    790783    }
    791784
    792     // is FPAname already defined, new name must match it; otherwise, warn the user that something potentially
     785    // If FPAname already defined, new name must match it; otherwise, warn the user that something potentially
    793786    // bad is happening.
    794787    const char *currentFPAname = psMetadataLookupStr(&mdok, fpa->concepts, "FPA.NAME"); // Current name
     
    804797
    805798
    806 // Print out the focal plane structure
    807 void pmFPAPrint(FILE *fd,               // File descriptor to which to print
    808                 pmFPA *fpa,             // FPA to print
    809                 bool header,            // Print headers?
    810                 bool concepts           // Print concepts?
    811                )
     799void pmFPAPrint(FILE *fd, const pmFPA *fpa, bool header, bool concepts)
    812800{
    813801    PS_ASSERT_PTR_NON_NULL(fpa,);
  • trunk/psModules/src/camera/pmFPAConstruct.h

    r7589 r9588  
     1/// @file pmFPAConstruct.h
     2///
     3/// @brief Functions to create an FPA, and add data sources to it.
     4///
     5/// @ingroup Camera
     6///
     7/// @author Paul Price, IfA
     8///
     9/// @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     10/// @date $Date: 2006-10-17 00:55:01 $
     11///
     12/// Copyright 2005-2006 Institute for Astronomy, University of Hawaii
     13///
     14
    115#ifndef PM_FPA_CONSTRUCT_H
    216#define PM_FPA_CONSTRUCT_H
    317
    4 #include "pslib.h"
     18#include <pslib.h>
    519#include "pmFPA.h"
    620#include "pmFPAview.h"
    721
    8 // Construct an FPA instance on the basis of a camera configuration
    9 pmFPA *pmFPAConstruct(const psMetadata *camera // The camera configuration
     22/// Construct an FPA instance on the basis of a camera configuration
     23///
     24/// This is the function that creates the FPA hierarchy on the basis of the camera configuration.  The "FPA"
     25/// entry in the camera configuration specifies the chips (each of type STR) with their component cells listed
     26/// as the corresponding values (whitespace separated).  The FPA hierarchy is created devoid of any
     27/// input/output sources (i.e., HDUs).
     28pmFPA *pmFPAConstruct(const psMetadata *camera ///< The camera configuration
    1029                     );
    1130
    12 bool pmFPAAddSourceFromView(pmFPA *fpa,   // The FPA
    13                             const pmFPAview *phuView, // The view, corresponding to the PHU
    14                             const psMetadata *format // Format of file
     31/// Add an (input or output) source to the focal plane hierarchy, specified by a view
     32///
     33/// Given an FPA, add an HDU by specifying where it goes (i.e., by an FPAview).  The camera format
     34/// configuration is required in order to describe how the FPA is laid out in terms of disk files.
     35bool pmFPAAddSourceFromView(pmFPA *fpa,   ///< The FPA
     36                            const pmFPAview *phuView, ///< The view, corresponding to the PHU
     37                            const psMetadata *format ///< Format of file
    1538                           );
    1639
    17 pmFPAview *pmFPAAddSourceFromHeader(pmFPA *fpa, // The FPA
    18                                     psMetadata *phu, // Primary header of file
    19                                     const psMetadata *format // Format of file
     40/// Add an (input or output) source to the focal plane hierarchy, specified by a (primary) header
     41///
     42/// Given an FPA, add an HDU by specifying a primary header, which is used to determine the FITS file
     43/// contents, and therefore the proper location for the HDU.  The camera format configuration is required in
     44/// order to describe how the FPA is laid out in terms of disk files.
     45pmFPAview *pmFPAAddSourceFromHeader(pmFPA *fpa, ///< The FPA
     46                                    psMetadata *phu, ///< Primary header of file
     47                                    const psMetadata *format ///< Format of file
    2048                                   );
    2149
    22 // Print out the FPA
    23 void pmFPAPrint(FILE *fd,               // File descriptor to which to print
    24                 pmFPA *fpa,             // FPA to print
    25                 bool header,            // Print headers?
    26                 bool concepts           // Print concepts?
     50/// Print a representation of the FPA, including its headers and concepts.
     51///
     52/// This function is intended for testing and development purposes.
     53void pmFPAPrint(FILE *fd,               ///< File descriptor to which to print
     54                const pmFPA *fpa,       ///< FPA to print
     55                bool header,            ///< Print headers?
     56                bool concepts           ///< Print concepts?
    2757               );
    2858
Note: See TracChangeset for help on using the changeset viewer.