IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 4, 2008, 4:16:06 PM (18 years ago)
Author:
Paul Price
Message:

Adding functions to dump configuration to an MDC file on disk, so we can record what parameters we used.

File:
1 edited

Legend:

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

    r15972 r18905  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2008-01-02 20:33:14 $
     5 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2008-08-05 02:16:06 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    374374}
    375375
     376pmFPAview *pmFPAviewTop(const pmFPA *fpa)
     377{
     378    PS_ASSERT_PTR_NON_NULL(fpa, NULL);
     379
     380    pmFPAview *view = pmFPAviewAlloc(0);// View to top
     381
     382    int numChips = 0;                   // Number of active chips
     383    psArray *chips = fpa->chips;        // Chips of interest
     384    for (int i = 0; i < chips->n; i++) {
     385        pmChip *chip = chips->data[i];  // Chip of interest
     386        if (!chip || !chip->file_exists) {
     387            continue;
     388        }
     389        numChips++;
     390        view->chip = i;
     391
     392        int numCells = 0;               // Number of active cells
     393        psArray *cells = chip->cells;   // Cells of interest
     394        for (int j = 0; j < cells->n; j++) {
     395            pmCell *cell = cells->data[j]; // Cell of interest
     396            if (!cell || !cell->file_exists) {
     397                continue;
     398            }
     399            numCells++;
     400            view->cell = j;
     401        }
     402
     403        if (numCells > 1) {
     404            if (numCells != cells->n) {
     405                psWarning("More than one, but not all cells are active.");
     406            }
     407            view->cell = -1;
     408        }
     409    }
     410
     411    if (numChips > 1) {
     412        if (numChips != chips->n) {
     413            psWarning("More than one, but not all chips are active.");
     414        }
     415        view->chip = -1;
     416        view->cell = -1;
     417    }
     418
     419    return view;
     420}
     421
Note: See TracChangeset for help on using the changeset viewer.