Changeset 33540
- Timestamp:
- Mar 15, 2012, 3:23:29 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20111122/Ohana/src/relastro/src
- Files:
-
- 3 edited
-
GetAstromError.c (modified) (2 diffs)
-
UpdateObjects.c (modified) (1 diff)
-
high_speed_objects.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/GetAstromError.c
r33448 r33540 30 30 31 31 code = GetPhotcodebyCode (measure[0].photcode); 32 33 // do not raise an exception, just send back the result 34 if (isnan(code[0].astromErrSys)) return NAN; 35 32 36 AS = code[0].astromErrScale; 33 37 MS = code[0].astromErrMagScale; … … 68 72 69 73 code = GetPhotcodebyCode (measure[0].photcode); 74 75 // do not raise an exception, just send back the result 76 if (isnan(code[0].astromErrSys)) return NAN; 77 70 78 AS = code[0].astromErrScale; 71 79 MS = code[0].astromErrMagScale; -
branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/UpdateObjects.c
r33537 r33540 131 131 dY[N] = GetAstromErrorTiny (&measure[k], ERROR_MODE_DEC); 132 132 133 // XXX this is a bit hackish --allow a given photcode or measurement to be134 // ignored by ignoring excessively bad errors135 if ( dX[N] > 10.0) continue;136 if ( dY[N] > 10.0) continue;133 // allow a given photcode or measurement to be 134 // ignored if the error is NAN (for photcode, set astromErrSys to NaN) 135 if (isnan(dX[N])) continue; 136 if (isnan(dY[N])) continue; 137 137 138 138 // add systematic error in quadrature, if desired -
branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/high_speed_objects.c
r33537 r33540 287 287 } 288 288 289 // return TRUE if any measure->photcodes match the photcodeSet 289 // return TRUE if measure->photcode match any in the photcodeSet 290 // (but, return FALSE if the measurement is bad) 290 291 int MeasMatchesPhotcode(Measure *measure, PhotCode **photcodeSet, int Nset) { 291 292 292 293 int found, k; 293 294 294 assert (Nset > 0); 295 296 if (!finite(measure[0].dR) || !finite(measure[0].dD)) return FALSE; 297 if (!finite(measure[0].M)) return FALSE; 295 if (!Nset) return TRUE; 296 // XXX require a set or not? assert (Nset > 0); 297 298 if (!finite(measure[0].dR)) return FALSE; 299 if (!finite(measure[0].dD)) return FALSE; 300 if (!finite(measure[0].M)) return FALSE; 298 301 302 float dX = GetAstromError (measure, ERROR_MODE_RA); 303 if (isnan(dX)) return FALSE; 304 305 float dY = GetAstromError (measure, ERROR_MODE_DEC); 306 if (isnan(dY)) return FALSE; 307 299 308 /* select measurements by photcode, or equiv photcode, if specified */ 300 if (Nset > 0) { 301 found = FALSE; 302 for (k = 0; (k < Nset) && !found; k++) { 303 if (photcodeSet[k][0].code == measure[0].photcode) found = TRUE; 304 if (photcodeSet[k][0].code == GetPhotcodeEquivCodebyCode(measure[0].photcode)) found = TRUE; 305 } 306 if (!found) return FALSE; 307 } 308 309 return TRUE; 309 found = FALSE; 310 for (k = 0; (k < Nset) && !found; k++) { 311 if (photcodeSet[k][0].code == measure[0].photcode) found = TRUE; 312 if (photcodeSet[k][0].code == GetPhotcodeEquivCodebyCode(measure[0].photcode)) found = TRUE; 313 } 314 315 return found; 310 316 }
Note:
See TracChangeset
for help on using the changeset viewer.
