IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 20, 2007, 12:31:20 PM (18 years ago)
Author:
Paul Price
Message:

Need to average concepts. Not sure I've got the cell concept averaging in the right place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeMask.c

    r15653 r15663  
    113113            roOut->data_exists = cellOut->data_exists = chipOut->data_exists = true;
    114114
     115            // Get list of cells for concepts averaging
     116            {
     117                psList *inCells = psListAlloc(NULL); // List of cells
     118                for (int i = 0; i < filenames->n; i++) {
     119                    if (! filenames->data[i] || strlen(filenames->data[i]) == 0) {
     120                        continue;
     121                    }
     122                    pmCell *cellIn = pmFPAviewThisCell(view, data->in->data[i]); // Input cell
     123                    psListAdd(inCells, PS_LIST_TAIL, cellIn);
     124                }
     125                if (!pmConceptsAverageCells(cellOut, inCells, NULL, NULL, true)) {
     126                    psError(PS_ERR_UNKNOWN, false, "Unable to average cell concepts.");
     127                    psFree(inCells);
     128                    return false;
     129                }
     130                psFree(inCells);
     131            }
     132
    115133            // Statistics on the merged cell
    116134            if (data->statsFile) {
     
    148166    }
    149167
     168    // Get list of FPAs for concepts averaging
     169    {
     170        psList *inFPAs = psListAlloc(NULL); // List of FPAs
     171        for (int i = 0; i < filenames->n; i++) {
     172            if (! filenames->data[i] || strlen(filenames->data[i]) == 0) {
     173                continue;
     174            }
     175            pmFPA *fpaIn = data->in->data[i]; // Input FPA
     176            psListAdd(inFPAs, PS_LIST_TAIL, fpaIn);
     177        }
     178
     179        if (!pmConceptsAverageFPAs(fpaOut, inFPAs)) {
     180            psError(PS_ERR_UNKNOWN, false, "Unable to average FPA concepts.");
     181            psFree(inFPAs);
     182            return false;
     183        }
     184        psFree(inFPAs);
     185    }
     186
    150187    if (fpaOut->hdu && !fpaOut->hdu->blankPHU) {
    151188        psTrace("ppMerge", 5, "Writing out FPA HDU.\n");
Note: See TracChangeset for help on using the changeset viewer.