IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5583


Ignore:
Timestamp:
Nov 23, 2005, 9:13:06 AM (20 years ago)
Author:
Paul Price
Message:

Worked out some memory leaks and bugs for GPC1 test data

Location:
trunk/archive/scripts/src/phase2
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/scripts/src/phase2/ipprc.config

    r5564 r5583  
    88### Setups for each camera system
    99CAMERAS         METADATA
     10#       MEGACAM_SINGLE  STR     megacam_single.config
    1011        MEGACAM_RAW     STR     megacam_raw.config
    11 #       MEGACAM_SPLICE  STR     megacam_splice.config
    12 #       GPC1_RAW        STR     gpc1_raw.config
     12        MEGACAM_SPLICE  STR     megacam_splice.config
     13        GPC1_RAW        STR     gpc1_raw.config
    1314#       LRIS_BLUE       STR     lris_blue.config
    1415#       LRIS_RED        STR     lris_red.config
  • trunk/archive/scripts/src/phase2/megacam_raw.config

    r5564 r5583  
    165165        MASK.SOURCE     STR     FILE            # Source type for mask: EXT | FILE
    166166        MASK.NAME       STR     %a_mask.fits    # Name for mask extension or filename
    167         WEIGHT.SOURCE   STR     EXT             # Source type for weight: EXT | FILE
    168         WEIGHT.NAME     STR     %f-weight       # Name for weight extension or filename
     167        WEIGHT.SOURCE   STR     FILE            # Source type for weight: EXT | FILE
     168        WEIGHT.NAME     STR     %a_weight.fits  # Name for weight extension or filename
    169169END
  • trunk/archive/scripts/src/phase2/papPhase2.c

    r5564 r5583  
    149149    }
    150150
    151 #if 0
    152     psString outputMaskName = psStringCopy(outputName);
    153     (void)psStringAppend(&outputMaskName, ".mask");
    154 #ifdef PRODUCTION
    155     psFits *outputMaskFile = psFitsOpen(outputMaskName, "w");
    156 #else
    157     psFits *outputMaskFile = psFitsAlloc(outputMaskName);
    158 #endif
    159     if (! outputMaskFile) {
    160         psErrorStackPrint(stderr, "Can't open output mask image: %s\n", outputMaskName);
    161         exit(EXIT_FAILURE);
    162     }
    163     psFree(outputMaskName);
    164 #endif
    165 
    166151    // Get camera configuration from header if not already defined
    167152    if (! camera) {
     
    298283        exit(EXIT_FAILURE);
    299284    }
     285
    300286#ifdef PRODUCTION
    301287    psFitsClose(inputFile);
     
    304290#endif
    305291
    306 
    307 #if 1
     292#if 0
     293    pmFPAReadMask(input, inputFile);
     294    pmFPAReadWeight(input, inputFile);
     295#else
    308296    {
    309297        // Generate mask and weight frame
     
    353341#endif
    354342
    355     //pmFPAPrint(input);
     343#if 0
     344    pmFPAPrint(input);
     345#endif
    356346
    357347    // Load the calibration frames, if required
     
    825815#ifdef PRODUCTION
    826816    psFitsClose(outputFile);
    827 //    psFitsClose(outputMaskFile);
    828817#else
    829818    psFree(outputFile);
    830 //    psFree(outputMaskFile);
    831819#endif
    832820
  • trunk/archive/scripts/src/phase2/pmConfig.c

    r5462 r5583  
    177177        if (! headerItem || headerItem->type != ruleItem->type) {
    178178            match = false;
     179            break;
    179180        }
    180181
  • trunk/archive/scripts/src/phase2/pmFPAConceptsSet.c

    r5564 r5583  
    621621                    while (biassec = psListGetAndIncrement(biassecsIter)) {
    622622                        psListIteratorSet(checkListIter, PS_LIST_HEAD);
    623                         psRegion *checkRegion = NULL; // Region from iteration
     623                        psString checkRegionString = NULL; // Region string from iteration
    624624                        int i = 0;              // Counter
    625                         while (checkRegion = psListGetAndIncrement(checkListIter)) {
    626                             if (COMPARE_REGIONS(biassec, checkRegion)) {
     625                        while (checkRegionString = psListGetAndIncrement(checkListIter)) {
     626                            psRegion checkRegion = psRegionFromString(checkRegionString);
     627                            psTrace(__func__, 7, "Checking [%.0f:%.0f,%.0f:%.0f] against "
     628                                    "[%.0f:%.0f,%.0f:%.0f]\n", biassec->x0, biassec->x1, biassec->y0,
     629                                    biassec->y1, checkRegion.x0, checkRegion.x1, checkRegion.y0,
     630                                    checkRegion.y1);
     631                            if (COMPARE_REGIONS(biassec, &checkRegion)) {
    627632                                check->data.U8[i] = 1;
    628633                                i++;
     
    707712            psMetadataItem *binItem = psMetadataItemAllocStr(xKeyword, "Binning factor in x and y",
    708713                                                             binString);
     714            psFree(binString);
    709715            psMetadata *header = NULL; // The FITS header
    710716            if (cell->hdu) {
  • trunk/archive/scripts/src/phase2/pmFPAConstruct.c

    r5564 r5583  
    141141                    }
    142142                    // The cell
    143                     psArray *images = NULL;
    144                     psMetadata *header = NULL;
    145143                    psMetadata *cellData = getCellData(camera, cellType);
    146144                    pmCell *cell = pmCellAlloc(chip, cellData, extName); // The cell
     
    242240                const char *cellType = contentItem->data.V; // The type of cell
    243241                psTrace(__func__, 5, "Cell type is %s\n", cellType);
    244                 psArray *images = NULL;
    245                 psMetadata *header = NULL;
    246242                psMetadata *cellData = getCellData(camera, cellType);
    247243                pmCell *cell = pmCellAlloc(chip, cellData, extName); // The cell
    248244//              psFree(cellData);
    249245                cell->hdu = p_pmHDUAlloc(extName); // Prepare cell to receive FITS data
     246
     247                psFree(cell);
    250248            } // Iterating through contents
    251249            psFree(contentsIter);
     
    256254            return NULL;
    257255        }
     256        psFree(chipName);
     257        psFree(chip);
    258258
    259259    } else {
  • trunk/archive/scripts/src/phase2/pmFPARead.h

    r5564 r5583  
    1515
    1616bool pmFPAReadMask(pmFPA *fpa,          // FPA to read into
    17                      psFits *source     // Source FITS file (for the original data)
     17                   psFits *source       // Source FITS file (for the original data)
    1818    );
    1919
  • trunk/archive/scripts/src/phase2/pmFPAWrite.c

    r5564 r5583  
    6464        status &= writeHDU(fits, fpa->hdu);
    6565    }
     66
     67
    6668
    6769    return status;
Note: See TracChangeset for help on using the changeset viewer.