IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25362


Ignore:
Timestamp:
Sep 13, 2009, 4:58:15 PM (17 years ago)
Author:
eugene
Message:

save psRegion on regionMD, add comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/psphot/src/psphotRoughClass.c

    r23989 r25362  
    2626        for (int iy = 0; iy < NY; iy ++) {
    2727
    28             psRegion region = psRegionSet (ix*dX, (ix + 1)*dX, iy*dY, (iy + 1)*dY);
    29             if (!psphotRoughClassRegion (nRegion, &region, sources, recipe, havePSF)) {
     28            psRegion *region = psRegionAlloc (ix*dX, (ix + 1)*dX, iy*dY, (iy + 1)*dY);
     29            if (!psphotRoughClassRegion (nRegion, region, sources, recipe, havePSF)) {
    3030                psLogMsg ("psphot", 4, "Failed to determine rough classification for region %f,%f - %f,%f\n",
    31                          region.x0, region.y0, region.x1, region.y1);
     31                         region->x0, region->y0, region->x1, region->y1);
     32                psFree (region);
    3233                continue;
    3334            }
    34            
     35            psFree (region);
    3536            nRegion ++;
    3637        }
     
    4546    psphotVisualPlotMoments (recipe, sources);
    4647    psphotVisualShowRoughClass (sources);
    47     psphotVisualShowFlags (sources);
     48    // XXX better visualization: psphotVisualShowFlags (sources);
    4849
    4950    return true;
     
    6364    psMetadata *regionMD = psMetadataLookupPtr (&status, recipe, regionName);
    6465    if (!regionMD) {
     66        // allocate the region metadata folder and add this region to it.
    6567        regionMD = psMetadataAlloc();
    6668        psMetadataAddMetadata (recipe, PS_LIST_TAIL, regionName, PS_META_REPLACE, "psf clump region", regionMD);
    6769        psFree (regionMD);
    6870    }
     71    psMetadataAddPtr (regionMD, PS_LIST_TAIL, "REGION", PS_DATA_REGION | PS_META_REPLACE, "psf clump region", region);
    6972
    7073    if (!havePSF) {
    7174        // determine the PSF parameters from the source moment values
     75        // XXX why not save the psfClump as a PTR?
    7276        psfClump = pmSourcePSFClump (region, sources, recipe);
    7377        psMetadataAddF32 (regionMD, PS_LIST_TAIL, "PSF.CLUMP.X",  PS_META_REPLACE, "psf clump center", psfClump.X);
Note: See TracChangeset for help on using the changeset viewer.