Changeset 4215 for trunk/psphot/src/source_moments.c
- Timestamp:
- Jun 11, 2005, 5:43:47 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/source_moments.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/source_moments.c
r4129 r4215 1 1 # include "psphot.h" 2 2 3 psArray *source_moments (psImage *image, psMetadata *config, psArray *allpeaks)3 psArray *source_moments (psImageData *imdata, psMetadata *config, psArray *allpeaks) 4 4 { 5 5 bool status = false; … … 8 8 9 9 psTimerStart ("psphot"); 10 11 // reduce the initial peaks to a subset of the better peaks12 // is this the appropriate place for this culling?13 14 float XBORDER = psMetadataLookupF32 (&status, config, "XBORDER");15 float YBORDER = psMetadataLookupF32 (&status, config, "YBORDER");16 float SATURATE = psMetadataLookupF32 (&status, config, "SATURATE");17 18 psRegion *keep = psRegionAlloc (XBORDER, -XBORDER, YBORDER, -YBORDER);19 keep = psRegionForImage (keep, image, keep);20 // I need to exclude the saturated objects here, but include them again later...?21 peaks = pmPeaksSubset (allpeaks, 100000, keep);22 10 23 11 // determine properties (sky, moments) of initial sources … … 32 20 for (int i = 0; i < peaks->n; i++) { 33 21 // provide the user arguments as metadata? 34 psSource *source = pmSource LocalSky (image, (psPeak *)peaks->data[i], PS_STAT_SAMPLE_MEDIAN, INNER, OUTER);22 psSource *source = pmSourceDefinePixels (imdata, (psPeak *)peaks->data[i], OUTER); 35 23 if (source == NULL) continue; 36 pmSourceMaskRegion (source, keep); 24 25 pmSourceLocalSky_EAM (source, PS_STAT_SAMPLE_MEDIAN, INNER); 37 26 pmSourceMoments (source, RADIUS); 38 27 psArrayAdd (sources, 100, source);
Note:
See TracChangeset
for help on using the changeset viewer.
