Changeset 34896
- Timestamp:
- Jan 9, 2013, 10:55:18 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20121219/Ohana/src
- Files:
-
- 9 edited
-
libautocode/def/measure-ps1-v4.d (modified) (1 diff)
-
libautocode/def/measure.d (modified) (1 diff)
-
libdvo/include/dvodb.h (modified) (1 diff)
-
libdvo/src/dbExtractMeasures.c (modified) (1 diff)
-
libdvo/src/dbFields.c (modified) (1 diff)
-
libdvo/src/dvo_catalog.c (modified) (1 diff)
-
libdvo/src/dvo_convert_PS1_V4.c (modified) (2 diffs)
-
uniphot/src/astrom_correction.c (modified) (1 diff)
-
uniphot/src/update_catalog_setastrom.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/Ohana/src/libautocode/def/measure-ps1-v4.d
r34871 r34896 27 27 28 28 # new field elements needed for Pan-STARRS: 29 FIELD Xccd, X_CCD, float, X coord on chip ,pixels30 FIELD Yccd, Y_CCD, float, Y coord on chip ,pixels29 FIELD Xccd, X_CCD, float, X coord on chip (raw value), pixels 30 FIELD Yccd, Y_CCD, float, Y coord on chip (raw value), pixels 31 31 32 FIELD X raw, X_RAW, float, X coord beforecorrection, pixels33 FIELD Y raw, Y_RAW, float, Y coord beforecorrection, pixels32 FIELD Xfix, X_FIX, float, X coord after correction, pixels 33 FIELD Yfix, Y_FIX, float, Y coord after correction, pixels 34 34 35 35 # could these be packed into fewer bits? -
branches/eam_branches/ipp-20121219/Ohana/src/libautocode/def/measure.d
r34871 r34896 27 27 28 28 # new field elements needed for Pan-STARRS: 29 FIELD Xccd, X_CCD, float, X coord on chip ,pixels30 FIELD Yccd, Y_CCD, float, Y coord on chip ,pixels29 FIELD Xccd, X_CCD, float, X coord on chip (raw value), pixels 30 FIELD Yccd, Y_CCD, float, Y coord on chip (raw value), pixels 31 31 32 FIELD X raw, X_RAW, float, X coord beforecorrection, pixels33 FIELD Y raw, Y_RAW, float, Y coord beforecorrection, pixels32 FIELD Xfix, X_FIX, float, X coord after correction, pixels 33 FIELD Yfix, Y_FIX, float, Y coord after correction, pixels 34 34 35 35 # could these be packed into fewer bits? -
branches/eam_branches/ipp-20121219/Ohana/src/libdvo/include/dvodb.h
r34891 r34896 122 122 MEAS_XCCD_ERR, 123 123 MEAS_YCCD_ERR, 124 MEAS_X RAW,125 MEAS_Y RAW,124 MEAS_XFIX, 125 MEAS_YFIX, 126 126 MEAS_POS_SYS_ERR, 127 127 MEAS_XMOSAIC, -
branches/eam_branches/ipp-20121219/Ohana/src/libdvo/src/dbExtractMeasures.c
r34871 r34896 443 443 # endif 444 444 break; 445 case MEAS_X RAW: /* OK */446 value.Flt = measure[0].X raw;447 break; 448 case MEAS_Y RAW: /* OK */449 value.Flt = measure[0].Y raw;445 case MEAS_XFIX: /* OK */ 446 value.Flt = measure[0].Xfix; 447 break; 448 case MEAS_YFIX: /* OK */ 449 value.Flt = measure[0].Yfix; 450 450 break; 451 451 case MEAS_XCCD_ERR: /* OK */ -
branches/eam_branches/ipp-20121219/Ohana/src/libdvo/src/dbFields.c
r34891 r34896 217 217 if (!strcasecmp (fieldName, "XCCD:ERR")) ESCAPE (MEAS_XCCD_ERR, MAG_NONE, OPIHI_FLT); 218 218 if (!strcasecmp (fieldName, "YCCD:ERR")) ESCAPE (MEAS_YCCD_ERR, MAG_NONE, OPIHI_FLT); 219 if (!strcasecmp (fieldName, "X RAW")) ESCAPE (MEAS_XRAW, MAG_NONE, OPIHI_FLT);220 if (!strcasecmp (fieldName, "Y RAW")) ESCAPE (MEAS_YRAW, MAG_NONE, OPIHI_FLT);219 if (!strcasecmp (fieldName, "XFIX")) ESCAPE (MEAS_XFIX, MAG_NONE, OPIHI_FLT); 220 if (!strcasecmp (fieldName, "YFIX")) ESCAPE (MEAS_YFIX, MAG_NONE, OPIHI_FLT); 221 221 if (!strcasecmp (fieldName, "POS_SYS_ERR")) ESCAPE (MEAS_POS_SYS_ERR, MAG_NONE, OPIHI_FLT); 222 222 if (!strcasecmp (fieldName, "XMOSAIC")) ESCAPE (MEAS_XMOSAIC, MAG_NONE, OPIHI_FLT); -
branches/eam_branches/ipp-20121219/Ohana/src/libdvo/src/dvo_catalog.c
r34871 r34896 161 161 measure->Xccd = NAN; 162 162 measure->Yccd = NAN; 163 measure->X raw= NAN;164 measure->Y raw= NAN;163 measure->Xfix = NAN; 164 measure->Yfix = NAN; 165 165 166 166 measure->Sky = NAN; -
branches/eam_branches/ipp-20121219/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c
r34871 r34896 31 31 out[i].Xccd = in[i].Xccd; 32 32 out[i].Yccd = in[i].Yccd; 33 out[i].X raw = in[i].Xraw;34 out[i].Y raw = in[i].Yraw;33 out[i].Xfix = in[i].Xfix; 34 out[i].Yfix = in[i].Yfix; 35 35 out[i].Sky = in[i].Sky; 36 36 out[i].dSky = in[i].dSky; … … 94 94 out[i].Xccd = in[i].Xccd; 95 95 out[i].Yccd = in[i].Yccd; 96 out[i].X raw = in[i].Xraw;97 out[i].Y raw = in[i].Yraw;96 out[i].Xfix = in[i].Xfix; 97 out[i].Yfix = in[i].Yfix; 98 98 out[i].Sky = in[i].Sky; 99 99 out[i].dSky = in[i].dSky; -
branches/eam_branches/ipp-20121219/Ohana/src/uniphot/src/astrom_correction.c
r34871 r34896 151 151 double dx, a, b, value; 152 152 153 // saturate correction at high and low ends 154 if (X < x[0]) return y[0]; 155 if (X > x[N-1]) return y[N-1]; 156 153 157 /* find correct element in array (x must be sorted) */ 154 158 lo = 0; -
branches/eam_branches/ipp-20121219/Ohana/src/uniphot/src/update_catalog_setastrom.c
r34871 r34896 15 15 for (i = 0; i < catalog[0].Nmeasure; i++) { 16 16 17 Measure *measure = &catalog[0].measure[i]; 18 17 19 // XXX only do GPC1 data for now 18 if ( catalog[0].measure[i].photcode < 10000) continue;19 if ( catalog[0].measure[i].photcode > 10600) continue;20 if (measure[0].photcode < 10000) continue; 21 if (measure[0].photcode > 10600) continue; 20 22 21 double Xccd = catalog[0].measure[i].Xccd; 22 double Yccd = catalog[0].measure[i].Yccd; 23 double pltScale = fabs(catalog[0].measure[i].pltscale); 23 // XXX hardwire the list of chips to correct 24 // some notes: 25 // XY24 surpisingly does not need correction 26 // XY27 has poor astrometry with a weird correction for all mags 27 // XY36 surpisingly does not need correction 28 // XY67 has poor astrometry with a weird correction for all mags 29 30 int chipID = measure[0].photcode % 100; 31 switch (chipID) { 32 case 4: 33 case 5: 34 case 6: 35 case 14: 36 case 15: 37 case 16: 38 case 17: 39 case 25: 40 case 26: 41 case 34: 42 case 35: 43 case 37: 44 case 40: 45 case 41: 46 case 42: 47 case 43: 48 case 50: 49 case 51: 50 case 52: 51 case 53: 52 case 60: 53 case 61: 54 case 62: 55 case 63: 56 case 71: 57 case 72: 58 case 73: 59 break; 60 default: 61 measure[0].Xfix = measure[0].Xccd; 62 measure[0].Yfix = measure[0].Yccd; 63 continue; 64 } 65 66 double Xccd = measure[0].Xccd; 67 double Yccd = measure[0].Yccd; 68 double pltScale = fabs(measure[0].pltscale); 24 69 25 70 // this is not needed, is it? 26 // double posAngle = FromShortDegrees( catalog[0].measure[i].posangle);71 // double posAngle = FromShortDegrees(measure[0].posangle); 27 72 28 73 // I need to know which chip we have. use photcode assuming range 29 int chip = catalog[0].measure[i].photcode % 100;74 int chip = measure[0].photcode % 100; 30 75 31 float Minst = PhotInst (&catalog[0].measure[i]); 76 // correction may be Minst or Minst + 5.0*log(fwhm 77 float fwhm_maj = FromShortPixels(measure[0].FWx); 78 float Minst = PhotInst (measure); 79 float MinstSB = Minst + 5.0*log10(fwhm_maj); 80 81 // I should validate that the spline I'm using is SB corrected not Minst... 82 83 // XXX this is very ad hoc. the splines are measured based on an extraction from dvo 84 // the dvo values of fwhm_maj are sigmas (NOT FWHM!) in pixels. 85 86 // saturate fwhm_maj in the range 1.0 < fwhm_maj < 5.0 87 // (images with really odd psf probably have poor astrometry anyway...) 88 fwhm_maj = MIN(fwhm_maj,5.0); 89 fwhm_maj = MAX(fwhm_maj,1.0); 32 90 33 91 double dX; … … 35 93 36 94 // correction is in arcseconds 37 if ( catalog[0].measure[i].t < timeRef) {38 get_astrom_correction (0, chip, &dX, &dY, Minst );95 if (measure[0].t < timeRef) { 96 get_astrom_correction (0, chip, &dX, &dY, MinstSB); 39 97 } else { 40 get_astrom_correction (1, chip, &dX, &dY, Minst); 98 // XXX do not correct new data 99 // get_astrom_correction (1, chip, &dX, &dY, MinstSB); 100 dX = 0.0; 101 dY = 0.0; 41 102 } 42 103 43 myAssert(!isfinite(catalog[0].measure[i].Xraw), "error: Xraw is not NAN, did we already correct?"); 44 myAssert(!isfinite(catalog[0].measure[i].Yraw), "error: Yraw is not NAN, did we already correct?"); 45 catalog[0].measure[i].Xraw = Xccd; 46 catalog[0].measure[i].Yraw = Yccd; 47 48 catalog[0].measure[i].Xccd = Xccd + dX / pltScale; 49 catalog[0].measure[i].Yccd = Yccd + dY / pltScale; 104 // do not modify the original Xccd,Yccd values 105 measure[0].Xfix = Xccd + dX / pltScale; 106 measure[0].Yfix = Yccd + dY / pltScale; 50 107 51 108 found ++;
Note:
See TracChangeset
for help on using the changeset viewer.
