- Timestamp:
- Dec 17, 2015, 8:53:07 PM (11 years ago)
- Location:
- trunk/Ohana/src/relastro/src
- Files:
-
- 1 added
- 5 edited
-
FitPM.c (modified) (2 diffs)
-
FitPosPMfixed_IRLS.c (added)
-
ImageOps.c (modified) (6 diffs)
-
UpdateObjects.c (modified) (1 diff)
-
bcatalog.c (modified) (8 diffs)
-
fitpm.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relastro/src/FitPM.c
r38986 r39287 13 13 14 14 for (i = 0; i < Npoints; i++) { 15 if (points[i].mask) continue; // respect the mask if set 16 fit->Nfit ++; 17 15 18 /* handle case where dX or dY = 0.0 */ 16 19 wx = 1.0 / SQ(points[i].dX); … … 64 67 fit->dp = 0.0; 65 68 66 fit->Nfit = Npoints;67 68 69 return (TRUE); 69 70 } -
trunk/Ohana/src/relastro/src/ImageOps.c
r39262 r39287 1195 1195 } 1196 1196 1197 # define SUPER_VERBOSE 0 1198 1197 1199 /** Determine whether a measurement should be included in the analysis, based on supplied filter criteria */ 1198 1200 // we only optionally apply the sigma limit: for object averages, this should not be used (should it?) … … 1203 1205 float mag; 1204 1206 1205 if (!finite(measure[0].R) || !finite(measure[0].D)) return FALSE;1206 if (!finite(measure[0].M)) return FALSE; //XXX is this necessary for all relastro tasks?1207 if (!finite(measure[0].dM)) return FALSE; //XXX is this necessary for all relastro tasks?1207 if (!finite(measure[0].R) || !finite(measure[0].D)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 1\n"); return FALSE; }; 1208 if (!finite(measure[0].M)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 2\n"); return FALSE; }; //XXX is this necessary for all relastro tasks? 1209 if (!finite(measure[0].dM)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 3\n"); return FALSE; }; //XXX is this necessary for all relastro tasks? 1208 1210 1209 1211 /* select measurements by photcode, or equiv photcode, if specified */ … … 1214 1216 if (photcodesKeep[k][0].code == GetPhotcodeEquivCodebyCode(measure[0].photcode)) found = TRUE; 1215 1217 } 1216 if (!found) return FALSE;1218 if (!found) { if (SUPER_VERBOSE) fprintf (stderr, "filter 4\n"); return FALSE; }; 1217 1219 } 1218 1220 … … 1223 1225 if (photcodesSkip[k][0].code == GetPhotcodeEquivCodebyCode(measure[0].photcode)) found = TRUE; 1224 1226 } 1225 if (found) return FALSE;1227 if (found) { if (SUPER_VERBOSE) fprintf (stderr, "filter 5\n"); return FALSE; }; 1226 1228 } 1227 1229 1228 1230 if ((MinBadQF > 0.0) && isGPC1chip(measure[0].photcode)) { 1229 if (!isfinite(measure[0].psfQF)) return FALSE;1230 if (measure[0].psfQF < MinBadQF) return FALSE;1231 if (!isfinite(measure[0].psfQF)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 6\n"); return FALSE; }; 1232 if (measure[0].psfQF < MinBadQF) { if (SUPER_VERBOSE) fprintf (stderr, "filter 7\n"); return FALSE; }; 1231 1233 } 1232 1234 1233 1235 /* select measurements by time */ 1234 1236 if (TimeSelect) { 1235 if (measure[0].t < TSTART) return FALSE;1236 if (measure[0].t > TSTOP) return FALSE;1237 if (measure[0].t < TSTART) { if (SUPER_VERBOSE) fprintf (stderr, "filter 8\n"); return FALSE; }; 1238 if (measure[0].t > TSTOP) { if (SUPER_VERBOSE) fprintf (stderr, "filter 9\n"); return FALSE; }; 1237 1239 } 1238 1240 … … 1243 1245 } else { 1244 1246 code = GetPhotcodebyCode (measure[0].photcode); 1245 if (!code) return FALSE;1247 if (!code) { if (SUPER_VERBOSE) fprintf (stderr, "filter 10\n"); return FALSE; }; 1246 1248 mask = code[0].astromBadMask; 1247 1249 } 1248 if (mask & measure[0].photFlags) return FALSE;1250 if (mask & measure[0].photFlags) { if (SUPER_VERBOSE) fprintf (stderr, "filter 11\n"); return FALSE; }; 1249 1251 } 1250 1252 1251 1253 /* select measurements by measurement error */ 1252 1254 if (applySigmaLim && (SIGMA_LIM > 0) && (measure[0].dM > SIGMA_LIM)) { 1253 return FALSE;1255 { if (SUPER_VERBOSE) fprintf (stderr, "filter 12\n"); return FALSE; }; 1254 1256 } 1255 1257 … … 1257 1259 if (ImagSelect) { 1258 1260 mag = PhotInst (measure, MAG_CLASS_PSF); 1259 if (mag < ImagMin || mag > ImagMax) return FALSE;1261 if (mag < ImagMin || mag > ImagMax) { if (SUPER_VERBOSE) fprintf (stderr, "filter 13\n"); return FALSE; }; 1260 1262 } 1261 1263 -
trunk/Ohana/src/relastro/src/UpdateObjects.c
r39246 r39287 211 211 212 212 if (average[0].flags & ID_STAR_USE_PAR) { 213 // get the best pm fit and chisq given the set of points (mask is respected) 213 214 if (!FitPM (&fitPM, fitStats->fitdataPM, fitStats->points, fitStats->Npoints)) { 214 215 myAbort ("oops"); -
trunk/Ohana/src/relastro/src/bcatalog.c
r39225 r39287 61 61 } 62 62 63 int myNskip1 = 0, myNskip2 = 0, myNskip3 = 0, myNskip4 = 0, myNskip5 = 0, myNskip6 = 0; 64 63 65 /* exclude stars not in range or with too few measurements */ 64 66 for (i = 0; i < catalog[0].Naverage; i++) { 65 67 if (catalog[0].average[i].Nmeasure <= SRC_MEAS_TOOFEW) { 68 myNskip1 ++; 66 69 continue; 67 70 } … … 108 111 REALLOCATE (subcatalog[0].secfilt, SecFilt, NAVERAGE*Nsecfilt); 109 112 } 113 myNskip2 ++; 110 114 continue; 111 115 } … … 146 150 Nskip1 ++; 147 151 } 152 myNskip3 ++; 148 153 continue; 149 154 } … … 159 164 Nskip2 ++; 160 165 } 166 myNskip4 ++; 161 167 continue; 162 168 } … … 180 186 free (date); 181 187 } 188 myNskip5 ++; 182 189 continue; 183 190 } … … 220 227 if (Nm <= SRC_MEAS_TOOFEW) { 221 228 Nmeasure -= Nm; 229 myNskip6 ++; 222 230 continue; 223 231 } … … 230 238 } 231 239 } 240 fprintf (stderr, "skips: %d %d %d %d %d %d\n", myNskip1, myNskip2, myNskip3, myNskip4, myNskip5, myNskip6); 232 241 REALLOCATE (subcatalog[0].average, Average, MAX (Naverage, 1)); 233 242 REALLOCATE (subcatalog[0].measureT, MeasureTiny, MAX (Nmeasure, 1)); … … 244 253 LimitDensityCatalog_ByNmeasureGrid (subcatalog, catalog); 245 254 } else { 246 if (VERBOSE 2) {255 if (VERBOSE) { 247 256 char *basename = filebasename (catalog[0].filename); 248 257 fprintf (stderr, "subset of "OFF_T_FMT" ("OFF_T_FMT" total) stars, "OFF_T_FMT" ("OFF_T_FMT" total) measures for catalog %s\n", -
trunk/Ohana/src/relastro/src/fitpm.c
r39248 r39287 14 14 # define N_STARS 3000 15 15 # define N_POINTS 100 16 # define N_OUTLIERS 10016 # define N_OUTLIERS 5 17 17 # define N_BOOTSTRAP 100 18 18
Note:
See TracChangeset
for help on using the changeset viewer.
