IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25701


Ignore:
Timestamp:
Sep 30, 2009, 5:07:19 PM (17 years ago)
Author:
Paul Price
Message:

Need to deal with the case that input contains multiple chips and/or cells.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/src/ppstampMakeStamp.c

    r25688 r25701  
    7171
    7272    // copy the fpa concepts
    73     pmConceptsCopyFPA(output->fpa, input->fpa, true, true);
    74     // Need to fix up the trimsec and biassec to correspond to the output
     73    pmConceptsCopyFPA(output->fpa, input->fpa, false, false);
     74    pmConceptsCopyChip(outChip, inChip, false);
    7575    pmCell *outCell = outChip->cells->data[0]; // The only output cell
    76     psMetadataItem *trimsec = psMetadataLookup(outCell->concepts, "CELL.TRIMSEC");
    77     psFree(trimsec->data.V);
    78     trimsec->data.V = NULL;
    79     psMetadataItem *biassec = psMetadataLookup(outCell->concepts, "CELL.BIASSEC");
    80     psFree(biassec->data.V);
    81     trimsec->data.V = psListAlloc(NULL);
     76
     77    if (inChip->cells->n == 1) {
     78        pmConceptsCopyCell(outCell, inChip->cells->data[0]);
     79        // Need to fix up the trimsec and biassec to correspond to the output
     80        psMetadataItem *trimsec = psMetadataLookup(outCell->concepts, "CELL.TRIMSEC");
     81        psFree(trimsec->data.V);
     82        trimsec->data.V = NULL;
     83        psMetadataItem *biassec = psMetadataLookup(outCell->concepts, "CELL.BIASSEC");
     84        psFree(biassec->data.V);
     85        trimsec->data.V = psListAlloc(NULL);
     86    } else {
     87        psList *inCells = psArrayToList(inChip->cells); // Input cells
     88        pmConceptsAverageCells(outCell, inCells, NULL, NULL, false);
     89        psFree(inCells);
     90    }
    8291
    8392    // If input had WCS convert it for stamp
Note: See TracChangeset for help on using the changeset viewer.