- Timestamp:
- Aug 30, 2012, 6:10:52 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120805/psphot/src/psphotVisual.c
r34360 r34368 1273 1273 } 1274 1274 1275 staticvoid plotline (int myKapa, Graphdata *graphdata, float x0, float y0, float x1, float y1)1275 void plotline (int myKapa, Graphdata *graphdata, float x0, float y0, float x1, float y1) 1276 1276 { 1277 1277 float x[2], y[2]; … … 1285 1285 } 1286 1286 1287 bool psphotVisualPlotRadialProfile (int myKapa, pmSource *source, psImageMaskType maskVal ) {1287 bool psphotVisualPlotRadialProfile (int myKapa, pmSource *source, psImageMaskType maskVal, pmSourceMode showmode) { 1288 1288 1289 1289 Graphdata graphdata; 1290 1291 float Rmax = (showmode & PM_SOURCE_MODE_SATSTAR) ? 100.0 : 30.0; 1290 1292 1291 1293 bool subtracted = (source->tmpFlags & PM_SOURCE_TMPF_SUBTRACTED); … … 1310 1312 Yo = source->modelPSF->params->data.F32[PM_PAR_YPOS] - source->pixels->row0; 1311 1313 } else { 1312 Xo = source->moments->Mx ;1313 Yo = source->moments->My ;1314 Xo = source->moments->Mx - source->pixels->col0; 1315 Yo = source->moments->My - source->pixels->row0; 1314 1316 } 1315 1317 1316 1318 for (int iy = 0; iy < source->pixels->numRows; iy++) { 1317 1319 for (int ix = 0; ix < source->pixels->numCols; ix++) { 1318 if ( source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix]) {1320 if ((source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] & maskVal)) { 1319 1321 rb->data.F32[nb] = hypot (ix + 0.5 - Xo, iy + 0.5 - Yo) ; 1320 1322 // rb->data.F32[nb] = hypot (ix - Xo, iy - Yo) ; … … 1339 1341 // examine sources to set data range 1340 1342 graphdata.xmin = -0.05; 1341 graphdata.xmax = +30.05;1343 graphdata.xmax = Rmax + 0.05; 1342 1344 graphdata.ymin = -0.05; 1343 1345 graphdata.ymax = +8.05; … … 1370 1372 // examine sources to set data range 1371 1373 graphdata.xmin = -1.51; 1372 graphdata.xmax = +1.51;1374 graphdata.xmax = log10(Rmax) + 0.02; 1373 1375 graphdata.ymin = -0.05; 1374 1376 graphdata.ymax = +8.05; … … 1422 1424 params->data.F32[PM_PAR_YPOS] = 0.0; 1423 1425 1424 psVector *rmod = psVectorAlloc( 300, PS_TYPE_F32);1425 psVector *fmaj = psVectorAlloc( 300, PS_TYPE_F32);1426 psVector *fmin = psVectorAlloc( 300, PS_TYPE_F32);1426 psVector *rmod = psVectorAlloc(Rmax*10, PS_TYPE_F32); 1427 psVector *fmaj = psVectorAlloc(Rmax*10, PS_TYPE_F32); 1428 psVector *fmin = psVectorAlloc(Rmax*10, PS_TYPE_F32); 1427 1429 1428 1430 psVector *coord = psVectorAlloc(2, PS_TYPE_F32); … … 1569 1571 if (!(source->mode & showmode)) continue; 1570 1572 1571 psphotVisualPlotRadialProfile (myKapa, source, maskVal); 1573 psphotVisualPlotRadialProfile (myKapa, source, maskVal, showmode); 1574 1575 if (pmVisualTestLevel("psphot.image", 1)) { 1576 int display = psphotKapaChannel (1); 1577 KiiCenter (display, source->peak->xf, source->peak->yf, 1); 1578 KiiOverlay overlay; 1579 overlay.x = source->peak->xf; 1580 overlay.y = source->peak->yf; 1581 overlay.dx = 5; 1582 overlay.dy = 5; 1583 overlay.angle = 0.0; 1584 overlay.type = KiiOverlayTypeByName ("circle"); 1585 KiiLoadOverlay (display, &overlay, 1, "red"); 1586 overlay.x = source->moments->Mx; 1587 overlay.y = source->moments->My; 1588 overlay.dx = 8; 1589 overlay.dy = 8; 1590 overlay.angle = 0.0; 1591 overlay.type = KiiOverlayTypeByName ("circle"); 1592 KiiLoadOverlay (display, &overlay, 1, "blue"); 1593 } 1572 1594 1573 1595 // pause and wait for user input:
Note:
See TracChangeset
for help on using the changeset viewer.
