IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 23, 2006, 5:33:37 PM (20 years ago)
Author:
Paul Price
Message:

Fixing code after pushing argc,argv into pmConfig.

File:
1 edited

Legend:

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

    r7494 r7677  
    1111// ppImageConfig.c
    1212//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    13     pmConfig *config = pmConfigRead(&argc, argv);
     13    pmConfig *config = pmConfigRead(argc, argv);
    1414    if (! config) {
    1515        psErrorStackPrint(stderr, "Can't find site configuration!\n");
     
    2727    psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-chip", 0, "Chip number to process (if positive)", -1);
    2828
    29     if (! psArgumentParse(config->arguments, &argc, argv) || argc != 3) {
     29    if (! psArgumentParse(config->arguments, &config->argc, config->argv) || argc != 3) {
    3030        printf("\nPan-STARRS Phase 2 processing\n\n");
    31         printf("Usage: %s INPUT.fits OUTPUT.fits\n\n", argv[0]);
     31        printf("Usage: %s INPUT.fits OUTPUT.fits\n\n", config->argv[0]);
    3232        psArgumentHelp(config->arguments);
    3333        psFree(config->arguments);
     
    3636
    3737    // Add the input and output images (which remain on the command-line) to the arguments list
    38     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-input",  0, "Name of the input image",  argv[1]);
    39     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image", argv[2]);
     38    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-input",  0, "Name of the input image",
     39                     config->argv[1]);
     40    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image",
     41                     config->argv[2]);
    4042
    4143    // Define database handle, if used
     
    103105    pmFPAview *mosaicView = pmFPAviewAlloc(0);
    104106    pmFPAAddSourceFromView(mosaicFPA, mosaicView, mosaicFormat);
     107    psFree(mosaicView);
    105108#endif
    106109
     
    110113#if 0
    111114    psArray *chips = fpa->chips;
    112     //pmFPAWrite(fpa, outFile, NULL, false);
     115    pmFPAWrite(fpa, outFile, NULL, false, false);
    113116    for (int i = 0; i < chips->n; i++) {
     117        printf("Chip %d\n", i);
    114118        pmChip *chip = chips->data[i];
     119        pmChipRead(chip, inFile, NULL);
     120#if 0
    115121        //pmChipRead(chip, inFile, NULL);
    116122        //pmChipWrite(chip, outFile, NULL, false);
     
    129135            psFree(readout);
    130136        }
    131         pmChipMosaic(mosaicFPA->chips->data[0], chip);
     137#endif
     138        pmChipMosaic(mosaicFPA->chips->data[i], chip);
     139        pmChipWrite(mosaicFPA->chips->data[i], outFile, NULL, true, true);
     140        pmChipFreeData(chip);
     141        pmChipFreeData(mosaicFPA->chips->data[i]);
    132142    }
    133143#endif
    134144
     145#if 1
    135146    pmFPAMosaic(mosaicFPA, fpa);
    136 
    137 #if 1
    138147    pmFPAWrite(mosaicFPA, outFile, NULL, true, true);
    139     pmFPAPrint(stdout, mosaicFPA, true, true);
     148    //pmFPAPrint(stdout, mosaicFPA, true, true);
    140149    psFree(mosaicCamera);
    141150    psFree(mosaicFormat);
    142151    psFree(mosaicView);
    143     psFree(mosaicFPA);
     152    //psFree(mosaicFPA);
    144153#endif
    145154
Note: See TracChangeset for help on using the changeset viewer.