Changeset 27610 for trunk/Ohana/src/opihi/dvo/avmatch.c
- Timestamp:
- Apr 5, 2010, 3:47:10 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/avmatch.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/avmatch.c
r27594 r27610 83 83 if ((vec[i] = SelectVector (name, ANYVECTOR, TRUE)) == NULL) goto escape; 84 84 ResetVector (vec[i], fields[i].type, NPTS); 85 for (n = 0; n < vec[i][0].Nelements; n++) { 86 if (vec[i][0].type == OPIHI_FLT) { 87 vec[i][0].elements.Flt[n] = NAN; 88 } else { 89 vec[i][0].elements.Int[n] = 0; // or NAN_INT? 90 } 91 } 85 92 } 86 93 ALLOCATE (index, off_t, NPTS); … … 103 110 } 104 111 dvo_catalog_unlock (&catalog); /// we can unlock here since this is read-only (do not block other access) 112 if (catalog.Naverage == 0) { 113 dvo_catalog_free (&catalog); 114 continue; 115 } 105 116 106 117 find_matches_by_vectors (skylist[0].regions[i], &catalog, RAvec, DECvec, RADIUS, index); … … 111 122 112 123 if (Ncat == -1) continue; 113 if (Ncat == -2) { 114 for (n = 0; n < Nfields; n++) { 115 if (vec[n][0].type == OPIHI_FLT) { 116 vec[n][0].elements.Flt[Npts] = NAN; 117 } else { 118 vec[n][0].elements.Int[Npts] = 0; // or NAN_INT? 119 } 120 } 121 continue; 122 } 124 if (Ncat == -2) continue; 125 123 126 // XXX set a 'found' vector to double check we catch everything? 124 127 m = catalog.average[Ncat].measureOffset; … … 148 151 dbFreeFields (fields, Nfields); 149 152 SkyListFree (skylist); 150 dvo_catalog_free (&catalog);151 153 return (TRUE); 152 154 … … 156 158 dbFreeFields (fields, Nfields); 157 159 SkyListFree (skylist); 158 dvo_catalog_free (&catalog);159 160 return (FALSE); 160 161
Note:
See TracChangeset
for help on using the changeset viewer.
