IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34896


Ignore:
Timestamp:
Jan 9, 2013, 10:55:18 AM (14 years ago)
Author:
eugene
Message:

change Xraw,Yraw to Xfix,Yfix (Xccd is never modified)

Location:
branches/eam_branches/ipp-20121219/Ohana/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/Ohana/src/libautocode/def/measure-ps1-v4.d

    r34871 r34896  
    2727
    2828# new field elements needed for Pan-STARRS:
    29 FIELD Xccd,           X_CCD,        float,          X coord on chip,               pixels
    30 FIELD Yccd,           Y_CCD,        float,          Y coord on chip,               pixels
     29FIELD Xccd,           X_CCD,        float,          X coord on chip (raw value),  pixels
     30FIELD Yccd,           Y_CCD,        float,          Y coord on chip (raw value),  pixels
    3131
    32 FIELD Xraw,           X_RAW,        float,          X coord before correction,     pixels
    33 FIELD Yraw,           Y_RAW,        float,          Y coord before correction,     pixels
     32FIELD Xfix,           X_FIX,        float,          X coord after correction,     pixels
     33FIELD Yfix,           Y_FIX,        float,          Y coord after correction,     pixels
    3434
    3535# could these be packed into fewer bits?
  • branches/eam_branches/ipp-20121219/Ohana/src/libautocode/def/measure.d

    r34871 r34896  
    2727
    2828# new field elements needed for Pan-STARRS:
    29 FIELD Xccd,           X_CCD,        float,          X coord on chip,                pixels
    30 FIELD Yccd,           Y_CCD,        float,          Y coord on chip,                pixels
     29FIELD Xccd,           X_CCD,        float,          X coord on chip (raw value),  pixels
     30FIELD Yccd,           Y_CCD,        float,          Y coord on chip (raw value),  pixels
    3131
    32 FIELD Xraw,           X_RAW,        float,          X coord before correction,     pixels
    33 FIELD Yraw,           Y_RAW,        float,          Y coord before correction,     pixels
     32FIELD Xfix,           X_FIX,        float,          X coord after correction,     pixels
     33FIELD Yfix,           Y_FIX,        float,          Y coord after correction,     pixels
    3434
    3535# could these be packed into fewer bits?
  • branches/eam_branches/ipp-20121219/Ohana/src/libdvo/include/dvodb.h

    r34891 r34896  
    122122      MEAS_XCCD_ERR,
    123123      MEAS_YCCD_ERR,
    124       MEAS_XRAW,
    125       MEAS_YRAW,
     124      MEAS_XFIX,
     125      MEAS_YFIX,
    126126      MEAS_POS_SYS_ERR,
    127127      MEAS_XMOSAIC,
  • branches/eam_branches/ipp-20121219/Ohana/src/libdvo/src/dbExtractMeasures.c

    r34871 r34896  
    443443# endif
    444444      break;
    445     case MEAS_XRAW: /* OK */
    446       value.Flt = measure[0].Xraw;
    447       break;
    448     case MEAS_YRAW: /* OK */
    449       value.Flt = measure[0].Yraw;
     445    case MEAS_XFIX: /* OK */
     446      value.Flt = measure[0].Xfix;
     447      break;
     448    case MEAS_YFIX: /* OK */
     449      value.Flt = measure[0].Yfix;
    450450      break;
    451451    case MEAS_XCCD_ERR: /* OK */
  • branches/eam_branches/ipp-20121219/Ohana/src/libdvo/src/dbFields.c

    r34891 r34896  
    217217  if (!strcasecmp (fieldName, "XCCD:ERR"))       ESCAPE (MEAS_XCCD_ERR,       MAG_NONE, OPIHI_FLT);
    218218  if (!strcasecmp (fieldName, "YCCD:ERR"))       ESCAPE (MEAS_YCCD_ERR,       MAG_NONE, OPIHI_FLT);
    219   if (!strcasecmp (fieldName, "XRAW"))           ESCAPE (MEAS_XRAW,           MAG_NONE, OPIHI_FLT);
    220   if (!strcasecmp (fieldName, "YRAW"))           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);
    221221  if (!strcasecmp (fieldName, "POS_SYS_ERR"))    ESCAPE (MEAS_POS_SYS_ERR,    MAG_NONE, OPIHI_FLT);
    222222  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  
    161161 measure->Xccd      = NAN;
    162162 measure->Yccd      = NAN;
    163  measure->Xraw      = NAN;
    164  measure->Yraw      = NAN;
     163 measure->Xfix      = NAN;
     164 measure->Yfix      = NAN;
    165165
    166166 measure->Sky       = NAN;
  • branches/eam_branches/ipp-20121219/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c

    r34871 r34896  
    3131    out[i].Xccd       = in[i].Xccd;
    3232    out[i].Yccd       = in[i].Yccd;
    33     out[i].Xraw       = in[i].Xraw;
    34     out[i].Yraw       = in[i].Yraw;
     33    out[i].Xfix       = in[i].Xfix;
     34    out[i].Yfix       = in[i].Yfix;
    3535    out[i].Sky        = in[i].Sky;
    3636    out[i].dSky       = in[i].dSky;
     
    9494    out[i].Xccd       = in[i].Xccd;
    9595    out[i].Yccd       = in[i].Yccd;
    96     out[i].Xraw       = in[i].Xraw;
    97     out[i].Yraw       = in[i].Yraw;
     96    out[i].Xfix       = in[i].Xfix;
     97    out[i].Yfix       = in[i].Yfix;
    9898    out[i].Sky        = in[i].Sky;
    9999    out[i].dSky       = in[i].dSky;
  • branches/eam_branches/ipp-20121219/Ohana/src/uniphot/src/astrom_correction.c

    r34871 r34896  
    151151  double dx, a, b, value;
    152152 
     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
    153157  /* find correct element in array (x must be sorted) */
    154158  lo = 0;
  • branches/eam_branches/ipp-20121219/Ohana/src/uniphot/src/update_catalog_setastrom.c

    r34871 r34896  
    1515  for (i = 0; i < catalog[0].Nmeasure; i++) {
    1616
     17    Measure *measure = &catalog[0].measure[i];
     18
    1719    // 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;
    2022     
    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);
    2469
    2570    // this is not needed, is it?
    26     // double posAngle = FromShortDegrees(catalog[0].measure[i].posangle);
     71    // double posAngle = FromShortDegrees(measure[0].posangle);
    2772
    2873    // 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;
    3075
    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);
    3290
    3391    double dX;
     
    3593
    3694    // 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);
    3997    } 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;
    41102    }
    42103
    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;
    50107
    51108    found ++;
Note: See TracChangeset for help on using the changeset viewer.