IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20710


Ignore:
Timestamp:
Nov 12, 2008, 3:14:57 PM (17 years ago)
Author:
Paul Price
Message:

Combine with weights based on the background noise in the image after convolution.

Location:
trunk/ppStack/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackCamera.c

    r19744 r20710  
    101101        psString psf = psMetadataLookupStr(&mdok, input, "PSF"); // Name of PSF
    102102        psString sources = psMetadataLookupStr(&mdok, input, "SOURCES"); // Name of sources
    103 
    104         float weighting = psMetadataLookupF32(&mdok, input, "WEIGHTING"); // Relative weighting
    105         if (!mdok || isnan(weighting) || weighting == 0.0) {
    106             psWarning("Component %s lacks WEIGHTING of type F32 --- assuming 1.0", item->name);
    107             weighting = 1.0;
    108         }
    109103
    110104        // Add the image file
     
    258252#endif
    259253
    260         psMetadataAddF32(imageFile->fpa->analysis, PS_LIST_TAIL, "PPSTACK.WEIGHTING", 0,
    261                          "Relative weighting for image", weighting);
    262 
    263254        i++;
    264255    }
  • trunk/ppStack/src/ppStackMatch.c

    r20654 r20710  
    384384        (void)psBinaryOp(readout->image, readout->image, "+",
    385385                         psScalarAlloc(- psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), PS_TYPE_F32));
     386        psMetadataAddF32(readout->analysis, PS_LIST_TAIL, "PPSTACK.WEIGHTING", 0,
     387                         "Weighting by 1/noise^2 for stack",
     388                         1.0 / PS_SQR(psStatsGetValue(bg, PS_STAT_ROBUST_STDEV)));
    386389    }
    387390    psFree(bg);
  • trunk/ppStack/src/ppStackReadout.c

    r20499 r20710  
    117117            continue;
    118118        }
    119         pmFPA *fpa = ro->parent->parent->parent; // Parent FPA
    120 
    121         float weighting = psMetadataLookupF32(&mdok, fpa->analysis, "PPSTACK.WEIGHTING"); // Relative weight
     119
     120        float weighting = psMetadataLookupF32(&mdok, ro->analysis, "PPSTACK.WEIGHTING"); // Relative weight
    122121        if (!mdok || !isfinite(weighting)) {
    123             psWarning("No WEIGHTING supplied for image %d --- set to unity.", i);
     122            psWarning("No weighting supplied for image %d --- set to unity.", i);
    124123            weighting = 1.0;
     124        } else {
     125            psLogMsg("ppStack", PS_LOG_INFO, "Weighting for image %d is %f", i, weighting);
    125126        }
    126127
     
    210211        pmReadout *ro = readouts->data[i];
    211212        assert(ro);
    212         pmFPA *fpa = ro->parent->parent->parent; // Parent FPA
    213213
    214214        bool mdok;                      // Status of MD lookup
    215         float weighting = psMetadataLookupF32(&mdok, fpa->analysis, "PPSTACK.WEIGHTING"); // Relative weight
     215        float weighting = psMetadataLookupF32(&mdok, ro->analysis, "PPSTACK.WEIGHTING"); // Relative weight
    216216        if (!mdok || !isfinite(weighting)) {
    217217            psWarning("No WEIGHTING supplied for image %d --- set to unity.", i);
Note: See TracChangeset for help on using the changeset viewer.