Changeset 23212 for trunk/ppStack
- Timestamp:
- Mar 6, 2009, 12:48:29 PM (17 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 2 edited
-
ppStackArguments.c (modified) (2 diffs)
-
ppStackSources.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackArguments.c
r22733 r23212 168 168 "Play safe with small numbers of pixels to combine?", false); 169 169 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-radius", 0, "Radius (pixels) for matching sources", NAN); 170 psMetadataAddS32(arguments, PS_LIST_TAIL, "-zp-iter", 0, "Maximum iterations for zero point", 0); 170 psMetadataAddS32(arguments, PS_LIST_TAIL, "-zp-iter-1", 0, "Maximum iterations for zero point; pass 1", 0); 171 psMetadataAddS32(arguments, PS_LIST_TAIL, "-zp-iter-2", 0, "Maximum iterations for zero point; pass 2", 0); 171 172 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-tol", 0, "Tolerance for zero point iterations", NAN); 172 173 psMetadataAddS32(arguments, PS_LIST_TAIL, "-zp-trans-iter", 0, "Iterations for transparency determination", 0); 173 174 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-trans-rej", 0, "Rejection threshold for transparency determination", NAN); 174 175 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-trans-thresh", 0, "Threshold for transparency determination", NAN); 175 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-rej", 0, "Rejection threshold for stars", NAN); 176 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-rej-1", 0, "Rejection threshold for stars; pass 1", NAN); 177 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-rej-2", 0, "Rejection threshold for stars; pass 2", NAN); 176 178 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-limit", 0, "Limit on star rejection fraction for successful iteration", NAN); 177 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-sys", 0, "Estimated systematic error", NAN); 179 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-sys-1", 0, "Estimated systematic error; pass 1", NAN); 180 psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-sys-2", 0, "Estimated systematic error; pass 2", NAN); 178 181 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-image", 0, "Suffix for temporary images", NULL); 179 182 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-mask", 0, "Suffix for temporary masks", NULL); … … 242 245 243 246 VALUE_ARG_RECIPE_FLOAT("-zp-radius", "ZP.RADIUS", F32); 244 VALUE_ARG_RECIPE_INT("-zp-iter", "ZP.ITER", S32, 0); 247 VALUE_ARG_RECIPE_INT("-zp-iter-1", "ZP.ITER.1", S32, 0); 248 VALUE_ARG_RECIPE_INT("-zp-iter-2", "ZP.ITER.2", S32, 0); 245 249 VALUE_ARG_RECIPE_FLOAT("-zp-tol", "ZP.TOL", F32); 246 250 VALUE_ARG_RECIPE_INT("-zp-trans-iter", "ZP.TRANS.ITER", S32, 0); 247 251 VALUE_ARG_RECIPE_FLOAT("-zp-trans-rej", "ZP.TRANS.REJ", F32); 248 252 VALUE_ARG_RECIPE_FLOAT("-zp-trans-thresh", "ZP.TRANS.THRESH", F32); 249 VALUE_ARG_RECIPE_FLOAT("-zp-star-rej", "ZP.STAR.REJ", F32); 253 VALUE_ARG_RECIPE_FLOAT("-zp-star-rej-1", "ZP.STAR.REJ.1", F32); 254 VALUE_ARG_RECIPE_FLOAT("-zp-star-rej-2", "ZP.STAR.REJ.2", F32); 250 255 VALUE_ARG_RECIPE_FLOAT("-zp-star-limit", "ZP.STAR.LIMIT", F32); 251 VALUE_ARG_RECIPE_FLOAT("-zp-star-sys", "ZP.STAR.SYS", F32); 256 VALUE_ARG_RECIPE_FLOAT("-zp-star-sys-1", "ZP.STAR.SYS.1", F32); 257 VALUE_ARG_RECIPE_FLOAT("-zp-star-sys-2", "ZP.STAR.SYS.2", F32); 252 258 253 259 VALUE_ARG_RECIPE_INT("-psf-instances", "PSF.INSTANCES", S32, 0); -
trunk/ppStack/src/ppStackSources.c
r23211 r23212 81 81 82 82 float radius = psMetadataLookupF32(NULL, recipe, "ZP.RADIUS"); // Radius (pixels) for matching sources 83 int iter = psMetadataLookupS32(NULL, recipe, "ZP.ITER"); // Maximum iterations 83 int iter1 = psMetadataLookupS32(NULL, recipe, "ZP.ITER.1"); // Maximum iterations for pass 1 84 int iter2 = psMetadataLookupS32(NULL, recipe, "ZP.ITER.2"); // Maximum iterations for pass 2 84 85 float tol = psMetadataLookupF32(NULL, recipe, "ZP.TOL"); // Tolerance for zero point iterations 85 86 int transIter = psMetadataLookupS32(NULL, recipe, "ZP.TRANS.ITER"); // Iterations for transparency 86 87 float transRej = psMetadataLookupF32(NULL, recipe, "ZP.TRANS.REJ");// Rejection threshold for transparency 87 88 float transThresh = psMetadataLookupF32(NULL, recipe, "ZP.TRANS.THRESH"); // Threshold for transparency 88 float starRej = psMetadataLookupF32(NULL, recipe, "ZP.STAR.REJ"); // Rejection threshold for stars 89 90 float starRej1 = psMetadataLookupF32(NULL, recipe, "ZP.STAR.REJ.1"); // Rejection threshold for stars 91 float starSys1 = psMetadataLookupF32(NULL, recipe, "ZP.STAR.SYS.1"); // Estimated systematic error 92 float starRej2 = psMetadataLookupF32(NULL, recipe, "ZP.STAR.REJ.2"); // Rejection threshold for stars 93 float starSys2 = psMetadataLookupF32(NULL, recipe, "ZP.STAR.SYS.2"); // Estimated systematic error 94 89 95 float starLimit = psMetadataLookupF32(NULL, recipe, "ZP.STAR.LIMIT"); // Limit on star rejection fraction 90 float starSys = psMetadataLookupF32(NULL, recipe, "ZP.STAR.SYS"); // Estimated systematic error 96 97 float fracMatch = psMetadataLookupF32(NULL, recipe, "ZP.MATCH"); // Fraction of images to match for star 91 98 92 99 psMetadata *airmassZP = psMetadataLookupMetadata(NULL, recipe, "ZP.AIRMASS"); // Airmass terms … … 164 171 #endif 165 172 166 psVector *trans = pmSourceMatchRelphot(matches, zp, iter, tol, starLimit, transIter, transRej, 167 transThresh, starRej, starSys); // Transparencies for each image 173 psVector *trans = pmSourceMatchRelphot(matches, zp, tol, iter1, starRej1, starSys1, 174 iter2, starRej2, starSys2, starLimit, 175 transIter, transRej, transThresh); // Transparencies for each image 168 176 if (!trans) { 169 177 psError(PS_ERR_UNKNOWN, false, "Unable to measure transparencies"); … … 184 192 // XXX this is a really poor output location; clean up the pmFPAfiles used in ppStack 185 193 pmCell *sourcesCell = pmFPAfileThisCell(config->files, view, "PPSTACK.OUTPUT"); 186 psArray *sourcesBest = psArrayAllocEmpty (100);187 188 // XXX something of a hack: require at least 2 detections or 1/2of the max possible189 int minMatches = PS_MAX(2, 0.3*num);// Minimum number of matches required194 psArray *sourcesBest = psArrayAllocEmpty(matches->n); 195 196 // XXX something of a hack: require at least 2 detections or the nominated fraction of the max possible 197 int minMatches = PS_MAX(2, fracMatch * num);// Minimum number of matches required 190 198 for (int i = 0; i < matches->n; i++) { 191 199 pmSourceMatch *match = matches->data[i]; // Match of interest … … 200 208 pmSource *source = sources->data[index]; // Source of interest 201 209 202 psArrayAdd(sourcesBest, 100, source);210 psArrayAdd(sourcesBest, sourcesBest->n, source); 203 211 } 204 212 psMetadataAdd(sourcesCell->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY | PS_META_REPLACE,
Note:
See TracChangeset
for help on using the changeset viewer.
