Changeset 27950
- Timestamp:
- May 13, 2010, 11:01:42 AM (16 years ago)
- Location:
- branches/eam_branches/psphot.20100506/src
- Files:
-
- 1 added
- 5 edited
-
Makefile.am (modified) (1 diff)
-
psphot.h (modified) (1 diff)
-
psphotExtendedSourceAnalysisByObject.c (modified) (5 diffs)
-
psphotRadialAperturesByObject.c (modified) (1 diff)
-
psphotStackObjects.c (added)
-
psphotStackReadout.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/psphot.20100506/src/Makefile.am
r27939 r27950 99 99 psphotStackMatchPSFsPrepare.c \ 100 100 psphotStackOptions.c \ 101 psphotStackObjects.c \ 101 102 psphotStackPSF.c \ 102 103 psphotCleanup.c -
branches/eam_branches/psphot.20100506/src/psphot.h
r27939 r27950 465 465 bool psphotRadialAperturesByObject (pmConfig *config, psArray *objects, const pmFPAview *view, const char *filerule); 466 466 467 bool psphotStackObjectsUnifyPosition (psArray *objects); 468 467 469 #endif -
branches/eam_branches/psphot.20100506/src/psphotExtendedSourceAnalysisByObject.c
r27939 r27950 1 1 # include "psphotInternal.h" 2 2 3 // ?? these cannot happen here --> we would need to do this in psphotExtendedSourceAnalysis4 // XXX option to choose a consistent position5 3 // XXX option to choose a consistent elliptical contour 6 4 // XXX SDSS uses the r-band petrosian radius to measure petrosian fluxes in all bands 7 // XXX consistent choice of extendedness...8 5 9 6 // aperture-like measurements for extended sources … … 64 61 65 62 // source analysis is done in S/N order (brightest first) 66 // XXX add this in (need to put S/N in pmPhotObj) :objects = psArraySort (objects, pmPhotObjSortBySN);63 objects = psArraySort (objects, pmPhotObjSortBySN); 67 64 68 65 // process the objects in order. … … 72 69 if (!object->sources) continue; 73 70 71 // we need to decide for an object if we are going to measure all sources or not 72 // simple rule : if *any* of the sources would be measured, measure the object 73 74 74 // choose the sources of interest 75 for (int j = 0; j < object->sources->n; j++) { 75 bool measureSource = false; 76 for (int j = 0; !measureSource && (j < object->sources->n); j++) { 76 77 77 78 pmSource *source = object->sources->data[j]; … … 88 89 assert (source->peak); // how can a source not have a peak? 89 90 if (source->peak->SN < SN_LIM) continue; 91 measureSource = true; 92 } 93 if (!measureSource) continue; 94 95 // choose the sources of interest 96 for (int j = 0; j < object->sources->n; j++) { 97 98 pmSource *source = object->sources->data[j]; 99 psAssert (source, "programming error"); // all entries in object->sources must exist, right? 100 psAssert (source->peak, "programming error"); // how can a source not have a peak? 90 101 91 102 // replace object in image … … 146 157 return true; 147 158 } 148 149 // sort by X (ascending)150 # if (0)151 int pmPhotObjSortBySN (const void **a, const void **b)152 {153 pmPhotObj *objA = *(pmPhotObj **)a;154 pmPhotObj *objB = *(pmPhotObj **)b;155 156 psF32 fA = objA->x;157 psF32 fB = objB->x;158 159 psF32 diff = fA - fB;160 if (diff > FLT_EPSILON) return (+1);161 if (diff < FLT_EPSILON) return (-1);162 return (0);163 }164 # endif -
branches/eam_branches/psphot.20100506/src/psphotRadialAperturesByObject.c
r27939 r27950 41 41 42 42 // source analysis is done in S/N order (brightest first) 43 // XXX are we getting the objects out of order? does it matter? 44 // XXX objects = psArraySort (objects, pmPhotObjSortBySN); 43 objects = psArraySort (objects, pmPhotObjSortBySN); 45 44 46 45 // generate look-up arrays for readouts -
branches/eam_branches/psphot.20100506/src/psphotStackReadout.c
r27939 r27950 73 73 } 74 74 75 // XXX do this now or below?76 // remove chisq image from config->file:PSPHOT.INPUT (why?)77 // psphotStackRemoveChisqFromInputs(config, STACK_RAW);78 79 75 // copy the detections from RAW to OUT 80 76 if (!psphotCopySources (config, view, STACK_OUT, STACK_RAW)) { … … 90 86 } 91 87 92 // *** generate the objects (whichunify the sources from the different images)88 // generate the objects (object unify the sources from the different images) 93 89 psArray *objects = psphotMatchSources (config, view, STACK_OUT); 94 90 … … 137 133 } 138 134 139 // include externally-supplied sources140 // XXX fix this in the new multi-input context141 // psphotLoadExtSources (config, view, "PSPHOT.INPUT"); // pass 1142 143 135 // construct an initial model for each object, set the radius to fitRadius, set circular fit mask 144 136 psphotGuessModels (config, view, STACK_OUT); … … 161 153 } 162 154 155 psphotStackObjectsUnifyPosition (objects); 163 156 psphotRadialAperturesByObject (config, objects, view, STACK_OUT); 157 164 158 psphotExtendedSourceAnalysisByObject (config, objects, view, STACK_OUT); // pass 1 (detections->allSources) 165 159 psphotExtendedSourceFits (config, view, STACK_OUT); // pass 1 (detections->allSources) … … 182 176 psphotSourceFreePixels (config, view, STACK_OUT); 183 177 184 // XXX do this now or above?185 178 // remove chisq image from config->file:PSPHOT.INPUT (why?) 186 179 psphotStackRemoveChisqFromInputs(config, STACK_RAW);
Note:
See TracChangeset
for help on using the changeset viewer.
