Changeset 33604
- Timestamp:
- Mar 24, 2012, 3:16:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/psastro/src/psastroLoadRefstars.c
r27659 r33604 174 174 } 175 175 176 // apply a color correction 177 { 178 // from Tonry 179 // (w-r)_obs = 0.042 + 0.166 (r-i)_obs - 0.398 (r-i)_obs^2, (r-i)_obs < 0.5 180 // (w-r)_obs = 0.268 - 0.435 (r-i)_obs - 0.078 (r-i)_obs^2, (r-i)_obs > 0.5 181 // thus, for (r-i < 0.5): 182 // (r - i < 0.5) : w = r + 0.042 + 0.166*(r-i) - 0.398(r-i)^2 183 // (r - i > 0.5) : w = r + 0.268 - 0.435 (r-i) - 0.078(r-i)^2 184 185 // apply a color correction 186 // XXX this is very GPC1 specific and hard-wired -- be very afraid! 187 if (!strcmp(photcode, "w")) { 188 for (int i = 0; i < refstars->n; i++) { 189 pmAstromObj *ref = refstars->data[i]; 190 float r = ref->Mag; 191 float ri = ref->Color; 192 // saturate at some valid range limits 193 ri = PS_MAX (PS_MIN(r, 2.0), -0.2); 194 float w = NAN; 195 if (ri < 0.5) { 196 w = r + 0.042 + 0.166*(ri) - 0.398*PS_SQR(ri); 197 } else { 198 w = r + 0.268 - 0.435*(ri) - 0.078*PS_SQR(ri); 199 } 200 ref->Mag = w; 201 } 202 } 203 } 204 176 205 psLogMsg ("psastro", 3, "loaded %ld reference stars : %f sec\n", refstars->n, psTimerMark ("psastro")); 177 206
Note:
See TracChangeset
for help on using the changeset viewer.
