IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 13, 2006, 5:10:19 PM (21 years ago)
Author:
Paul Price
Message:

Reworked the \'concepts\'; altered FPA hierarchy slightly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_rel9_p0/psModules/src/astrom/pmAstrometry.c

    r5795 r5974  
    1313* XXX: Should we implement non-linear cell->chip transforms?
    1414*
    15 *  @version $Revision: 1.11.2.1 $ $Name: not supported by cvs2svn $
    16 *  @date $Date: 2005-12-17 03:18:38 $
     15*  @version $Revision: 1.11.2.1.2.1 $ $Name: not supported by cvs2svn $
     16*  @date $Date: 2006-01-14 03:10:19 $
    1717*
    1818*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2525#include <math.h>
    2626#include "pslib.h"
     27
    2728#include "pmAstrometry.h"
     29#include "pmConcepts.h"
    2830
    2931/*****************************************************************************
     
    201203        chip->cells = psArrayAdd(chip->cells, 1, (psPtr) tmpCell);
    202204    }
    203     tmpCell->valid = true;              // All cells are valid by default
     205    tmpCell->process = true;            // All cells are processed by default
     206    tmpCell->exists = false;            // Not yet read in
    204207    tmpCell->hdu = NULL;
     208
     209    pmConceptsBlankCell(tmpCell);
    205210
    206211    psMemSetDeallocator(tmpCell, (psFreeFunc) cellFree);
     
    231236        fpa->chips = psArrayAdd(fpa->chips, 1, (psPtr) tmpChip);
    232237    }
    233     tmpChip->valid = true;              // Work on all chips, by default
     238    tmpChip->process = true;            // Work on all chips, by default
     239    tmpChip->exists = false;            // Not read in yet
    234240    tmpChip->hdu = NULL;
     241
     242    pmConceptsBlankChip(tmpChip);
    235243
    236244    psMemSetDeallocator(tmpChip, (psFreeFunc) chipFree);
     
    251259    tmpFPA->hdu = NULL;
    252260    tmpFPA->phu = NULL;
     261
     262    pmConceptsBlankFPA(tmpFPA);
    253263
    254264    psMemSetDeallocator(tmpFPA, (psFreeFunc) FPAFree);
     
    817827 *****************************************************************************/
    818828
    819 // Set cells within a chip to a specified validity
    820 static bool setCellsValid(const pmChip *chip, // Chip of interest
    821                           bool valid    // Valid?
    822                          )
     829// Set cells within a chip to be processed or not
     830static bool setCellsProcess(const pmChip *chip, // Chip of interest
     831                            bool process  // Process this chip?
     832                           )
    823833{
    824834    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    831841        pmCell *tmpCell = cells->data[i]; // Cell of interest
    832842        if (tmpCell) {
    833             tmpCell->valid = valid;
     843            tmpCell->process = process;
    834844        }
    835845    }
     
    857867        }
    858868        if (i == chipNum) {
    859             tmpChip->valid = true;
    860             setCellsValid(tmpChip, true);
     869            tmpChip->process = true;
     870            setCellsProcess(tmpChip, true);
    861871        } else {
    862             tmpChip->valid = false;
    863             setCellsValid(tmpChip, false);
     872            tmpChip->process = false;
     873            setCellsProcess(tmpChip, false);
    864874        }
    865875
     
    872882/*****************************************************************************
    873883XXX: The SDRS is ambiguous on a few things:
    874     Whether or not the other chips should be set valid=true. [PAP: No]
    875     Should we return the number of chip valid=true before or after they're set, [PAP: After]
     884    Whether or not the other chips should be set process=true. [PAP: No]
     885    Should we return the number of chip process=true before or after they're set, [PAP: After]
    876886 *****************************************************************************/
    877887/**
    878888 *
    879  * pmFPAExcludeChip shall set valid to false only for the specified chip
     889 * pmFPAExcludeChip shall set process to false only for the specified chip
    880890 * number (chipNum). In the event that the specified chip number does not exist
    881891 * within the fpa, the function shall generate a warning, and perform no action.
    882  * The function shall return the number of chips within the fpa that have valid
     892 * The function shall return the number of chips within the fpa that have process
    883893 * set to true.
    884894 *
     
    900910    }
    901911
    902     int numChips = 0;                   // Number of valid chips
     912    int numChips = 0;                   // Number of chips to be processed
    903913    for (int i = 0 ; i < chips->n ; i++) {
    904914        pmChip *tmpChip = (pmChip *) chips->data[i]; // Chip of interest
    905915        if (tmpChip != NULL) {
    906916            if (i == chipNum) {
    907                 tmpChip->valid = false;
    908                 setCellsValid(tmpChip, false); // Wipe out the cell as well
    909             } else if (tmpChip->valid) {
     917                tmpChip->process = false;
     918                setCellsProcess(tmpChip, false); // Wipe out the cell as well
     919            } else if (tmpChip->process) {
    910920                numChips++;
    911921            }
Note: See TracChangeset for help on using the changeset viewer.