Changeset 26802
- Timestamp:
- Feb 6, 2010, 1:56:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/ppSub/src/ppSubMakePSF.c
r26784 r26802 87 87 psArray *sources = detections->allSources; 88 88 psAssert(sources, "missing sources?"); 89 89 90 90 // XXX filter sources? limit the total number and return only brighter objects? 91 91 // use flags to toss totally bogus entries? … … 98 98 ppSubDataQuality(data, PSPHOT_ERR_PSF, PPSUB_FILES_PHOT_SUB | PPSUB_FILES_PHOT_INV); 99 99 psFree(view); 100 psFree(goodSources);100 psFree(goodSources); 101 101 return true; 102 102 } … … 166 166 return false; 167 167 } 168 168 169 psMetadataAddPtr(outputChip->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_UNKNOWN | PS_META_REPLACE, "PSF from ppSubMakePSF", psf); 169 170 … … 175 176 # define MAX_NPSF 500 176 177 177 psArray *ppSubSelectPSFSources(psArray *sources){ 178 psArray *ppSubSelectPSFSources(psArray *sources){ 178 179 179 180 sources = psArraySort (sources, pmSourceSortBySN); … … 184 185 for (int i = 0; (nPSF < MAX_NPSF) && (i < sources->n); i++) { 185 186 186 pmSource *source = sources->data[i];187 if (!source) continue;188 189 // skip non-astronomical objects (very likely defects)190 if (source->type == PM_SOURCE_TYPE_DEFECT) continue;191 if (source->type == PM_SOURCE_TYPE_SATURATED) continue;192 if (source->mode & PM_SOURCE_MODE_SATSTAR) continue;193 194 psArrayAdd (subset, 100, source);195 nPSF++;196 } 197 187 pmSource *source = sources->data[i]; 188 if (!source) continue; 189 190 // skip non-astronomical objects (very likely defects) 191 if (source->type == PM_SOURCE_TYPE_DEFECT) continue; 192 if (source->type == PM_SOURCE_TYPE_SATURATED) continue; 193 if (source->mode & PM_SOURCE_MODE_SATSTAR) continue; 194 195 psArrayAdd (subset, 100, source); 196 nPSF++; 197 } 198 198 199 return subset; 199 200 }
Note:
See TracChangeset
for help on using the changeset viewer.
