IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2006, 3:24:14 PM (20 years ago)
Author:
Paul Price
Message:

ppImage now working again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppTest.c

    r6624 r6747  
    33#include "pslib.h"
    44#include "psmodules.h"
     5#include "ppMem.h"
    56
    67int main(int argc, char *argv[])
     
    9697    // Read the FPA
    9798    pmFPARead(fpa, inFile, NULL);
     99    // Copy to new camera format
     100    pmFPA *newFPA = pmFPAConstruct(config->camera);
     101    psMetadata *newFormat = psMetadataConfigParse(NULL, NULL, "mcshort_splice.config", true);
     102    pmConfigConformHeader(phu, newFormat);
     103    pmFPAview *newView = pmFPAAddSource(newFPA, phu, newFormat);
     104    printf("View chip: %d\n", newView->chip);
     105    printf("View cell: %d\n", newView->cell);
     106    pmFPACopy(newFPA, fpa);
     107    pmFPAWrite(newFPA, outFile, NULL);
     108    pmFPAPrint(newFPA, false, true);
    98109
    99     // How'd we do?
    100     pmFPAPrint(fpa, true);
    101 #if 1
    102     pmChip *chip = fpa->chips->data[13];
    103     psString chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME");
    104     printf("CELL.NAME for chip 13: %s\n", chipName);
    105     pmCell *cell = chip->cells->data[0];
    106     psMetadataPrint(cell->concepts, 10);
    107 #endif
    108 
    109 
    110     pmFPAWrite(fpa, outFile, NULL);
    111 
     110    psFree(newView);
     111    psFree(newFormat);
     112    psFree(newFPA);
     113    psFree(view);
     114    psFree(fpa);
     115    psFree(config);
    112116    psFitsClose(inFile);
    113117    psFitsClose(outFile);
    114118    psFree(phu);
    115119    psFree(cameraFormat);
    116     psFree(fpa);
     120
     121    psTimerStop();
     122    psTraceReset();
     123    pmConceptsDone();
     124    ppMemCheck();
    117125
    118126    // Pau.
Note: See TracChangeset for help on using the changeset viewer.