Changeset 15509 for trunk/Ohana/src/addstar
- Timestamp:
- Nov 7, 2007, 6:28:03 PM (19 years ago)
- Location:
- trunk/Ohana/src/addstar/src
- Files:
-
- 12 edited
-
FilterStars.c (modified) (1 diff)
-
ReadImageHeader.c (modified) (1 diff)
-
ReadStarsFITS.c (modified) (5 diffs)
-
ReadStarsTEXT.c (modified) (2 diffs)
-
SEDfit.c (modified) (4 diffs)
-
calibrate.c (modified) (1 diff)
-
fakeimage.c (modified) (2 diffs)
-
find_matches.c (modified) (4 diffs)
-
find_matches_closest.c (modified) (3 diffs)
-
find_matches_refstars.c (modified) (4 diffs)
-
load2mass_catalog.c (modified) (4 diffs)
-
replace_match.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/src/FilterStars.c
r15487 r15509 49 49 } 50 50 51 if (stars[N].M >= 0.001*NO_MAG) { 52 stars[N].M = 0.001*NO_MAG; 53 } else { 54 stars[N].M = stars[N].M + MTIME; 51 // stars->M is either NAN or a valid inst magnitude 52 // stars->dM is either NAN or a valid error 53 54 dMs = 0.0; 55 dMx = 0.0; 56 if (SUBPIX) { 57 dMs = get_subpix (stars[N].X, stars[N].Y); 58 dMx = scat_subpix (stars[N].X, stars[N].Y); 59 if (!isnan(stars[N].dM)) { 60 stars[N].dM = hypot (stars[N].dM, dMx); 61 } 55 62 } 56 63 57 if ( stars[N].M > 32.77) {58 fprintf (stderr, "*");64 if (!isnan(stars[N].M)) { 65 stars[N].M += MTIME - dMs; 59 66 } 60 61 stars[N].dM = MIN (stars[N].dM, NO_ERR); 62 63 stars[N].Mgal = MIN (stars[N].Mgal + MTIME, 0.001*NO_MAG); 67 if (!isnan(stars[N].Mgal)) { 68 stars[N].Mgal += MTIME - dMs; 69 } 70 if (!isnan(stars[N].Map)) { 71 stars[N].Map += MTIME - dMs; 72 } 64 73 65 if (SUBPIX) {66 dMs = get_subpix (stars[N].X, stars[N].Y);67 stars[N].M -= dMs;68 stars[N].Mgal -= dMs;69 stars[N].Map -= dMs;70 dMs = scat_subpix (stars[N].X, stars[N].Y);71 stars[N].dM = hypot (stars[N].dM, dMs);72 }73 74 N ++; 74 75 } -
trunk/Ohana/src/addstar/src/ReadImageHeader.c
r15036 r15509 135 135 image[0].trate = 10000 * tmp; 136 136 137 tmp = 0; 138 gfits_scan (header, AirmassKeyword, "%lf", 1, &tmp); 139 image[0].secz = MIN (NO_MAG, tmp); 137 image[0].secz = NAN; 138 if (gfits_scan (header, AirmassKeyword, "%lf", 1, &tmp)) { 139 image[0].secz = tmp; 140 } 140 141 141 142 if (!gfits_scan (header, CCDNumKeyword, "%d", 1, &ccdnum)) { -
trunk/Ohana/src/addstar/src/ReadStarsFITS.c
r15487 r15509 54 54 55 55 int i, Nstars, swapped; 56 double ZeroPt; 56 57 Stars *stars = NULL; 57 58 SMPData *smpdata = NULL; … … 59 60 swapped = FALSE; 60 61 smpdata = gfits_table_get_SMPData (table, &Nstars, &swapped); 62 ZeroPt = GetZeroPoint(); 63 61 64 /* XXX we need to check at least the size of the loaded table */ 62 63 65 // XXX use memset to zero-out the elements before setting 66 64 67 ALLOCATE (stars, Stars, Nstars); 65 68 for (i = 0; i < Nstars; i++) { 66 69 stars[i].X = smpdata[i].X; 67 70 stars[i].Y = smpdata[i].Y; 68 stars[i].M = smpdata[i].M; 71 72 if ((smpdata[i].M >= ZeroPt) || isnan(smpdata[i].M)) { 73 stars[i].M = NAN; 74 stars[i].Mgal = NAN; 75 stars[i].Map = NAN; 76 } else { 77 stars[i].M = smpdata[i].M; 78 stars[i].Mgal = smpdata[i].M; 79 stars[i].Map = smpdata[i].M; 80 } 81 69 82 stars[i].dM = smpdata[i].dM*0.001; 70 83 stars[i].dophot = smpdata[i].dophot; 71 84 72 stars[i].Mgal = smpdata[i].M;73 stars[i].Map = smpdata[i].dM;74 85 stars[i].fx = smpdata[i].fx; 75 86 stars[i].fy = smpdata[i].fy; … … 88 99 89 100 ps1data = gfits_table_get_PS1_DEV_0 (table, &Nstars, NULL); 101 ZeroPt = GetZeroPoint(); 102 103 ALLOCATE (stars, Stars, Nstars); 104 for (i = 0; i < Nstars; i++) { 105 stars[i].X = ps1data[i].X; 106 stars[i].Y = ps1data[i].Y; 107 stars[i].dX = ps1data[i].dX; 108 stars[i].dY = ps1data[i].dY; 109 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 110 stars[i].M = NAN; 111 } else { 112 stars[i].M = ps1data[i].M + ZeroPt; 113 } 114 stars[i].dM = ps1data[i].dM; 115 stars[i].Mpeak = ps1data[i].Mpeak; 116 117 stars[i].sky = ps1data[i].sky; 118 stars[i].dsky = ps1data[i].dSky; 119 120 stars[i].fx = ps1data[i].fx; 121 stars[i].fy = ps1data[i].fy; 122 stars[i].df = ps1data[i].df; 123 124 stars[i].psfProb = ps1data[i].psfProb; 125 stars[i].psfQual = ps1data[i].psfQual; 126 127 stars[i].detID = ps1data[i].detID; 128 129 /* these are set elsewhere */ 130 stars[i].R = 0.0; 131 stars[i].D = 0.0; 132 stars[i].dR = 0.0; 133 stars[i].dD = 0.0; 134 135 stars[i].uR = 0.0; 136 stars[i].uD = 0.0; 137 stars[i].duR = 0.0; 138 stars[i].duD = 0.0; 139 140 stars[i].P = 0.0; 141 stars[i].dP = 0.0; 142 143 stars[i].Mcal = 0; 144 stars[i].t = 0; 145 stars[i].dt = 0; 146 stars[i].airmass = 0; 147 stars[i].code = 0; 148 stars[i].found = 0; 149 150 /* these are not used */ 151 stars[i].Map = NAN; 152 stars[i].Mgal = NAN; 153 stars[i].dophot = 0; 154 } 155 *nstars = Nstars; 156 return (stars); 157 } 158 159 // XXX I need to make the IPP I/O functions and these functions 160 // consistent wrt ZERO_POINT.... 161 Stars *Convert_PS1_DEV_1 (FTable *table, int *nstars) { 162 163 int i, Nstars; 164 double ZeroPt; 165 Stars *stars; 166 PS1_DEV_1 *ps1data; 167 168 ps1data = gfits_table_get_PS1_DEV_1 (table, &Nstars, NULL); 90 169 ZeroPt = GetZeroPoint(); 91 170 … … 111 190 stars[i].df = ps1data[i].df; 112 191 113 stars[i].psfProb = ps1data[i].psfProb;114 stars[i].psfQual = ps1data[i].psfQual;115 116 stars[i].detID = ps1data[i].detID;117 118 /* these are set elsewhere */119 stars[i].R = 0.0;120 stars[i].D = 0.0;121 stars[i].dR = 0.0;122 stars[i].dD = 0.0;123 124 stars[i].uR = 0.0;125 stars[i].uD = 0.0;126 stars[i].duR = 0.0;127 stars[i].duD = 0.0;128 129 stars[i].P = 0.0;130 stars[i].dP = 0.0;131 132 stars[i].Mcal = 0;133 stars[i].t = 0;134 stars[i].dt = 0;135 stars[i].airmass = 0;136 stars[i].code = 0;137 stars[i].found = 0;138 139 /* these are not used */140 stars[i].Map = 0.001*NO_MAG;141 stars[i].Mgal = 0.001*NO_MAG;142 stars[i].dophot = 0;143 }144 *nstars = Nstars;145 return (stars);146 }147 148 // XXX I need to make the IPP I/O functions and these functions149 // consistent wrt ZERO_POINT....150 Stars *Convert_PS1_DEV_1 (FTable *table, int *nstars) {151 152 int i, Nstars;153 double ZeroPt;154 Stars *stars;155 PS1_DEV_1 *ps1data;156 157 ps1data = gfits_table_get_PS1_DEV_1 (table, &Nstars, NULL);158 ZeroPt = GetZeroPoint();159 160 ALLOCATE (stars, Stars, Nstars);161 for (i = 0; i < Nstars; i++) {162 stars[i].X = ps1data[i].X;163 stars[i].Y = ps1data[i].Y;164 stars[i].dX = ps1data[i].dX;165 stars[i].dY = ps1data[i].dY;166 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) {167 stars[i].M = 0.001*NO_MAG;168 } else {169 stars[i].M = ps1data[i].M + ZeroPt;170 }171 stars[i].dM = ps1data[i].dM;172 stars[i].Mpeak = ps1data[i].Mpeak;173 174 stars[i].sky = ps1data[i].sky;175 stars[i].dsky = ps1data[i].dSky;176 177 stars[i].fx = ps1data[i].fx;178 stars[i].fy = ps1data[i].fy;179 stars[i].df = ps1data[i].df;180 181 192 stars[i].psfProb = ps1data[i].psfProb; 182 193 stars[i].psfQual = ps1data[i].psfQual; … … 213 224 214 225 /* these are not used */ 215 stars[i].Map = 0.001*NO_MAG;216 stars[i].Mgal = 0.001*NO_MAG;226 stars[i].Map = NAN; 227 stars[i].Mgal = NAN; 217 228 stars[i].dophot = 0; 218 229 } -
trunk/Ohana/src/addstar/src/ReadStarsTEXT.c
r15036 r15509 10 10 char *buffer, *c, *c2; 11 11 double tmp; 12 double ZeroPt; 12 13 Stars *stars; 13 14 15 ZeroPt = GetZeroPoint(); 16 14 17 /* load in stars by blocks of 1000 */ 15 18 N = 0; … … 66 69 dparse (&stars[N].Y, 2, &buffer[j*BYTES_STAR]); 67 70 dparse (&stars[N].M, 3, &buffer[j*BYTES_STAR]); 71 if ((stars[N].M > ZeroPt) || isnan(stars[N].M)) { 72 stars[N].M = NAN; 73 } 68 74 69 75 /* cmp files carry dM in millimags */ -
trunk/Ohana/src/addstar/src/SEDfit.c
r15038 r15509 161 161 outcat[0].average[Nave].Nm = 0; 162 162 outcat[0].average[Nave].Nn = 0; 163 outcat[0].average[Nave].Xp = N O_MAG;163 outcat[0].average[Nave].Xp = NAN_S_SHORT; 164 164 outcat[0].average[Nave].offset = Nmeas; 165 165 outcat[0].average[Nave].missing = -1; … … 167 167 168 168 for (j = 0; j < Nsec; j++) { 169 outcat[0].secfilt[Nave*Nsec+j].M = N O_MAG;170 outcat[0].secfilt[Nave*Nsec+j].dM = N O_MAG;171 outcat[0].secfilt[Nave*Nsec+j].Xm = NO_MAG;169 outcat[0].secfilt[Nave*Nsec+j].M = NAN; 170 outcat[0].secfilt[Nave*Nsec+j].dM = NAN; 171 outcat[0].secfilt[Nave*Nsec+j].Xm = NAN_S_SHORT; 172 172 } 173 173 … … 183 183 outcat[0].measure[Nmeas].dR = 0.0; 184 184 outcat[0].measure[Nmeas].dD = 0.0; 185 outcat[0].measure[Nmeas].M = MIN (table[0].row[minFit.row][0].mags[n] + minFit.Md, NO_MAG);185 outcat[0].measure[Nmeas].M = table[0].row[minFit.row][0].mags[n] + minFit.Md; 186 186 outcat[0].measure[Nmeas].dM = 0.0; 187 187 outcat[0].measure[Nmeas].Mcal = 0; … … 193 193 outcat[0].measure[Nmeas].dt = 0xffff; 194 194 195 outcat[0].measure[Nmeas].Mgal = N O_MAG;195 outcat[0].measure[Nmeas].Mgal = NAN; 196 196 outcat[0].measure[Nmeas].airmass = 0; 197 outcat[0].measure[Nmeas].FWx = NO_MAG;198 outcat[0].measure[Nmeas].FWy = NO_ERR;199 outcat[0].measure[Nmeas].theta = NO_ERR;197 outcat[0].measure[Nmeas].FWx = NAN_S_SHORT; 198 outcat[0].measure[Nmeas].FWy = NAN_S_SHORT; 199 outcat[0].measure[Nmeas].theta = NAN_S_SHORT; 200 200 201 201 outcat[0].average[Nave].Nm++; -
trunk/Ohana/src/addstar/src/calibrate.c
r15036 r15509 54 54 55 55 found0 = found1 = found2 = FALSE; 56 CalM0 = CalM1 = CalM2 = dCalM = N O_MAG;56 CalM0 = CalM1 = CalM2 = dCalM = NAN; 57 57 58 58 // we have two options here: -
trunk/Ohana/src/addstar/src/fakeimage.c
r15036 r15509 128 128 129 129 image[i+1].Mcal = 0.0; 130 image[i+1].Xm = N O_MAG;130 image[i+1].Xm = NAN_S_SHORT; 131 131 image[i+1].code = 0; 132 132 memset (image[i+1].dummy, 0, sizeof(image[i+1].dummy)); … … 187 187 image[0].ccdnum = 0xff; 188 188 image[0].Mcal = 0.0; 189 image[0].Xm = N O_MAG;189 image[0].Xm = NAN_S_SHORT; 190 190 image[0].code = 0; 191 191 memset (image[0].dummy, 0, sizeof(image[0].dummy)); -
trunk/Ohana/src/addstar/src/find_matches.c
r15038 r15509 194 194 195 195 catalog[0].measure[Nmeas].Mgal = stars[N].Mgal; 196 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG);197 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG);198 catalog[0].measure[Nmeas].theta = MIN ((0xffff/360.0)*stars[N].df, NO_MAG);196 catalog[0].measure[Nmeas].FWx = 100*stars[N].fx; 197 catalog[0].measure[Nmeas].FWy = 100*stars[N].fy; 198 catalog[0].measure[Nmeas].theta = (0xffff/360.0)*stars[N].df; 199 199 200 200 /* adds the measurement to the calibration if appropriate color terms are found */ … … 207 207 /* in UPDATE mode, this value is not saved; use relphot to recalculate */ 208 208 if (Nsec > -1) { 209 if (catalog[0].secfilt[n*Nsecfilt+Nsec].M != NO_MAG) {210 catalog[0].secfilt[n*Nsecfilt+Nsec].M = PhotCat (&catalog[0].measure[Nmeas]);211 }209 if (isnan(catalog[0].secfilt[n*Nsecfilt+Nsec].M)) { 210 catalog[0].secfilt[n*Nsecfilt+Nsec].M = PhotCat (&catalog[0].measure[Nmeas]); 211 } 212 212 } 213 213 … … 282 282 283 283 for (j = 0; j < Nsecfilt; j++) { 284 catalog[0].secfilt[Nave*Nsecfilt+j].M = N O_MAG;285 catalog[0].secfilt[Nave*Nsecfilt+j].dM = N O_MAG;286 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = N O_MAG;284 catalog[0].secfilt[Nave*Nsecfilt+j].M = NAN; 285 catalog[0].secfilt[Nave*Nsecfilt+j].dM = NAN; 286 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = NAN_S_SHORT; 287 287 } 288 288 … … 320 320 321 321 catalog[0].measure[Nmeas].Mgal = stars[N].Mgal; 322 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG);323 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG);324 catalog[0].measure[Nmeas].theta = MIN ((0xffff/360.0)*stars[N].df, NO_MAG);322 catalog[0].measure[Nmeas].FWx = 100*stars[N].fx; 323 catalog[0].measure[Nmeas].FWy = 100*stars[N].fy; 324 catalog[0].measure[Nmeas].theta = (0xffff/360.0)*stars[N].df; 325 325 /* XXX replace df here with theta, right? */ 326 326 -
trunk/Ohana/src/addstar/src/find_matches_closest.c
r15038 r15509 214 214 215 215 catalog[0].measure[Nmeas].Mgal = stars[N].Mgal; 216 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG); 217 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG); 218 catalog[0].measure[Nmeas].theta = MIN ((0xffff/360.0)*stars[N].df, NO_MAG); 216 217 // XXX saturate range for FWx, FWy, theta 218 // XXX convert to unsigned int for these... 219 catalog[0].measure[Nmeas].FWx = 100*stars[N].fx; 220 catalog[0].measure[Nmeas].FWy = 100*stars[N].fy; 221 catalog[0].measure[Nmeas].theta = (0xffff/360.0)*stars[N].df; 219 222 220 223 /* set the average magnitude if not already set and the photcode.equiv is not 0 */ 221 224 /* in UPDATE mode, this value is not saved; use relphot to recalculate */ 222 225 if (Nsec > -1) { 223 if (catalog[0].secfilt[n*Nsecfilt+Nsec].M != NO_MAG) {224 catalog[0].secfilt[n*Nsecfilt+Nsec].M = PhotCat (&catalog[0].measure[Nmeas]);225 }226 if (isnan(catalog[0].secfilt[n*Nsecfilt+Nsec].M)) { 227 catalog[0].secfilt[n*Nsecfilt+Nsec].M = PhotCat (&catalog[0].measure[Nmeas]); 228 } 226 229 } 227 230 … … 281 284 282 285 for (j = 0; j < Nsecfilt; j++) { 283 catalog[0].secfilt[Nave*Nsecfilt+j].M = N O_MAG;284 catalog[0].secfilt[Nave*Nsecfilt+j].dM = N O_MAG;285 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = NO_MAG;286 catalog[0].secfilt[Nave*Nsecfilt+j].M = NAN; 287 catalog[0].secfilt[Nave*Nsecfilt+j].dM = NAN; 288 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = NAN_S_SHORT; 286 289 } 287 290 … … 319 322 320 323 catalog[0].measure[Nmeas].Mgal = stars[N].Mgal; 321 catalog[0].measure[Nmeas].FWx = MIN (100*stars[N].fx, NO_MAG);322 catalog[0].measure[Nmeas].FWy = MIN (100*stars[N].fy, NO_MAG);323 catalog[0].measure[Nmeas].theta = MIN ((0xffff/360.0)*stars[N].df, NO_ERR);324 catalog[0].measure[Nmeas].FWx = 100*stars[N].fx; 325 catalog[0].measure[Nmeas].FWy = 100*stars[N].fy; 326 catalog[0].measure[Nmeas].theta = (0xffff/360.0)*stars[N].df; 324 327 325 328 /* set the average magnitude if not already set and the photcode.equiv is not 0 */ -
trunk/Ohana/src/addstar/src/find_matches_refstars.c
r15038 r15509 133 133 catalog[0].measure[Nmeas].dR = 3600.0*(catalog[0].average[n].R - stars[N][0].R); 134 134 catalog[0].measure[Nmeas].dD = 3600.0*(catalog[0].average[n].D - stars[N][0].D); 135 catalog[0].measure[Nmeas].M = MIN (stars[N][0].M, NO_MAG);136 catalog[0].measure[Nmeas].dM = MIN (stars[N][0].dM, NO_ERR);135 catalog[0].measure[Nmeas].M = stars[N][0].M; 136 catalog[0].measure[Nmeas].dM = stars[N][0].dM; 137 137 catalog[0].measure[Nmeas].Mcal = 0; 138 138 catalog[0].measure[Nmeas].t = (TIMEREF == 0) ? stars[N][0].t : TIMEREF; /** careful : time_t vs e_time **/ … … 143 143 catalog[0].measure[Nmeas].dt = 0xffff; 144 144 145 catalog[0].measure[Nmeas].Mgal = N O_MAG;145 catalog[0].measure[Nmeas].Mgal = NAN; 146 146 catalog[0].measure[Nmeas].airmass = 0; 147 catalog[0].measure[Nmeas].FWx = N O_MAG;148 catalog[0].measure[Nmeas].FWy = N O_MAG;149 catalog[0].measure[Nmeas].theta = N O_MAG;147 catalog[0].measure[Nmeas].FWx = NAN_S_SHORT; 148 catalog[0].measure[Nmeas].FWy = NAN_S_SHORT; 149 catalog[0].measure[Nmeas].theta = NAN_S_SHORT; 150 150 151 151 catalog[0].measure[Nmeas].photFlags = 0; … … 254 254 255 255 for (j = 0; j < Nsecfilt; j++) { 256 catalog[0].secfilt[Nave*Nsecfilt+j].M = N O_MAG;257 catalog[0].secfilt[Nave*Nsecfilt+j].dM = N O_MAG;258 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = N O_MAG;256 catalog[0].secfilt[Nave*Nsecfilt+j].M = NAN; 257 catalog[0].secfilt[Nave*Nsecfilt+j].dM = NAN; 258 catalog[0].secfilt[Nave*Nsecfilt+j].Xm = NAN_S_SHORT; 259 259 } 260 260 261 261 catalog[0].measure[Nmeas].dR = 0.0; 262 262 catalog[0].measure[Nmeas].dD = 0.0; 263 catalog[0].measure[Nmeas].M = MIN (stars[N][0].M, NO_MAG);264 catalog[0].measure[Nmeas].dM = MIN (stars[N][0].dM, NO_ERR);263 catalog[0].measure[Nmeas].M = stars[N][0].M; 264 catalog[0].measure[Nmeas].dM = stars[N][0].dM; 265 265 catalog[0].measure[Nmeas].Mcal = 0; 266 266 catalog[0].measure[Nmeas].t = (stars[N][0].t == 0) ? TIMEREF : stars[N][0].t; /** careful : time_t vs e_time **/ … … 291 291 292 292 catalog[0].measure[Nmeas].airmass = 0; 293 catalog[0].measure[Nmeas].Mgal = N O_MAG;294 catalog[0].measure[Nmeas].FWx = N O_MAG;295 catalog[0].measure[Nmeas].FWy = N O_MAG;296 catalog[0].measure[Nmeas].theta = N O_MAG;293 catalog[0].measure[Nmeas].Mgal = NAN; 294 catalog[0].measure[Nmeas].FWx = NAN_S_SHORT; 295 catalog[0].measure[Nmeas].FWy = NAN_S_SHORT; 296 catalog[0].measure[Nmeas].theta = NAN_S_SHORT; 297 297 298 298 catalog[0].measure[Nmeas].Xccd = 0.0; -
trunk/Ohana/src/addstar/src/load2mass_catalog.c
r15038 r15509 34 34 catalog[0].average[Nave].Nm = 0; 35 35 catalog[0].average[Nave].Nn = 0; 36 catalog[0].average[Nave].Xp = N O_MAG;36 catalog[0].average[Nave].Xp = NAN_S_SHORT; 37 37 catalog[0].average[Nave].offset = Nmeas; 38 38 catalog[0].average[Nave].missing = -1; … … 40 40 41 41 for (j = 0; j < Nsec; j++) { 42 catalog[0].secfilt[Nave*Nsec+j].M = N O_MAG;43 catalog[0].secfilt[Nave*Nsec+j].dM = N O_MAG;44 catalog[0].secfilt[Nave*Nsec+j].Xm = NO_MAG;42 catalog[0].secfilt[Nave*Nsec+j].M = NAN; 43 catalog[0].secfilt[Nave*Nsec+j].dM = NAN; 44 catalog[0].secfilt[Nave*Nsec+j].Xm = NAN_S_SHORT; 45 45 } 46 46 … … 49 49 catalog[0].measure[Nmeas].dR = 0.0; 50 50 catalog[0].measure[Nmeas].dD = 0.0; 51 catalog[0].measure[Nmeas].M = MIN (stars[i+j].M, NO_MAG);52 catalog[0].measure[Nmeas].dM = MIN (stars[i+j].dM, NO_ERR);51 catalog[0].measure[Nmeas].M = stars[i+j].M; 52 catalog[0].measure[Nmeas].dM = stars[i+j].dM; 53 53 catalog[0].measure[Nmeas].Mcal = 0; 54 54 catalog[0].measure[Nmeas].t = stars[i+j].t; … … 59 59 catalog[0].measure[Nmeas].dt = 0xffff; 60 60 61 catalog[0].measure[Nmeas].Mgal = N O_MAG;61 catalog[0].measure[Nmeas].Mgal = NAN; 62 62 catalog[0].measure[Nmeas].airmass = 0; 63 catalog[0].measure[Nmeas].FWx = NO_MAG;64 catalog[0].measure[Nmeas].FWy = NO_ERR;65 catalog[0].measure[Nmeas].theta = NO_ERR;63 catalog[0].measure[Nmeas].FWx = NAN_S_SHORT; 64 catalog[0].measure[Nmeas].FWy = NAN_S_SHORT; 65 catalog[0].measure[Nmeas].theta = NAN_S_SHORT; 66 66 67 67 catalog[0].average[Nave].Nm++; -
trunk/Ohana/src/addstar/src/replace_match.c
r12332 r15509 8 8 for (i = 0; i < average[0].Nm; i++) { 9 9 if (measure[i].photcode != star[0].code) continue; 10 measure[i].dR = 3600.0*(average[0].R - star[0].R);11 measure[i].dD = 3600.0*(average[0].D - star[0].D);12 measure[i].M = MIN (star[0].M, NO_MAG);13 measure[i].dM = MIN (star[0].dM, NO_ERR);14 star[0].found = average[0].offset + i;10 measure[i].dR = 3600.0*(average[0].R - star[0].R); 11 measure[i].dD = 3600.0*(average[0].D - star[0].D); 12 measure[i].M = star[0].M; 13 measure[i].dM = star[0].dM; 14 star[0].found = average[0].offset + i; 15 15 return (TRUE); 16 16 }
Note:
See TracChangeset
for help on using the changeset viewer.
