IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 1, 2009, 2:20:33 PM (17 years ago)
Author:
eugene
Message:

adjust plot scaling to use refstars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmAstrometryVisual.c

    r24818 r25729  
    12091209    KapaClearPlots (kapa2);
    12101210
    1211     graphdata.color = KapaColorByName ("black");
    1212     graphdata.ptype = 2;
     1211    KapaSendLabel (kapa2, "X", KAPA_LABEL_XM);
     1212    KapaSendLabel (kapa2, "Y", KAPA_LABEL_YM);
     1213    KapaSendLabel (kapa2, "Chip Coordinates. Black = Raw Stars. Red = Ref Stars. Blue = Matched Stars", KAPA_LABEL_XP);
     1214
     1215    // X vs Y by mag (ref)
     1216    graphdata.color = KapaColorByName ("red");
     1217    graphdata.ptype = 7;
    12131218    graphdata.style = 2;
    12141219
     
    12171222    psFree (zVec);
    12181223
    1219     xVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
    1220     yVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
    1221     zVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
    1222 
    1223     // X vs Y by mag (raw)
    1224     n = 0;
    1225     for (int i = 0; i < rawstars->n; i++) {
    1226         pmAstromObj *raw = rawstars->data[i];
    1227         if (!isfinite(raw->Mag)) continue;
    1228         if (raw->Mag < iMagMin) continue;
    1229         if (raw->Mag > iMagMax) continue;
    1230 
    1231         xVec->data.F32[n] = raw->chip->x;
    1232         yVec->data.F32[n] = raw->chip->y;
    1233         zVec->data.F32[n] = raw->Mag;
    1234         n++;
    1235     }
    1236     xVec->n = yVec->n = zVec->n = n;
    1237 
    1238     KapaSendLabel (kapa2, "X", KAPA_LABEL_XM);
    1239     KapaSendLabel (kapa2, "Y", KAPA_LABEL_YM);
    1240     KapaSendLabel (kapa2,
    1241                    "Chip Coordinates. Black = Raw Stars. Red = Ref Stars. Blue = Matched Stars"
    1242                    , KAPA_LABEL_XP);
    1243     pmVisualTriplePlot (kapa2, &graphdata, xVec, yVec, zVec, false);
    1244 
    1245     // X vs Y by mag (ref)
    1246     psFree (xVec);
    1247     psFree (yVec);
    1248     psFree (zVec);
    1249 
    12501224    xVec = psVectorAlloc (refstars->n, PS_TYPE_F32);
    12511225    yVec = psVectorAlloc (refstars->n, PS_TYPE_F32);
    12521226    zVec = psVectorAlloc (refstars->n, PS_TYPE_F32);
    1253 
    1254     graphdata.color = KapaColorByName ("red");
    1255     graphdata.ptype = 7;
    1256     graphdata.style = 2;
    12571227
    12581228    n = 0;
     
    12691239    }
    12701240    xVec->n = yVec->n = zVec->n = n;
    1271     pmVisualTripleOverplot (kapa2, &graphdata, xVec, yVec, zVec, false);
     1241    pmVisualTriplePlot (kapa2, &graphdata, xVec, yVec, zVec, false);
    12721242
    12731243    //rescale the graph to include all points
     
    12821252    graphdata.ymax = PS_MAX(ymax, graphdata.ymax);
    12831253    KapaSetLimits (kapa2, &graphdata);
     1254
     1255    bool plotTweak;
     1256    pmVisualAskUser(&plotTweak);
     1257
     1258    // X vs Y by mag (raw)
     1259    graphdata.color = KapaColorByName ("black");
     1260    graphdata.ptype = 2;
     1261    graphdata.style = 2;
     1262
     1263    psFree (xVec);
     1264    psFree (yVec);
     1265    psFree (zVec);
     1266
     1267    xVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
     1268    yVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
     1269    zVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
     1270
     1271    n = 0;
     1272    for (int i = 0; i < rawstars->n; i++) {
     1273        pmAstromObj *raw = rawstars->data[i];
     1274        if (!isfinite(raw->Mag)) continue;
     1275        if (raw->Mag < iMagMin) continue;
     1276        if (raw->Mag > iMagMax) continue;
     1277
     1278        xVec->data.F32[n] = raw->chip->x;
     1279        yVec->data.F32[n] = raw->chip->y;
     1280        zVec->data.F32[n] = raw->Mag;
     1281        n++;
     1282    }
     1283    xVec->n = yVec->n = zVec->n = n;
     1284    pmVisualTripleOverplot (kapa2, &graphdata, xVec, yVec, zVec, false);
    12841285
    12851286    //overplot matched stars in blue
Note: See TracChangeset for help on using the changeset viewer.