Changeset 20450
- Timestamp:
- Oct 28, 2008, 2:02:16 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotVisual.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotVisual.c
r20251 r20450 694 694 psImageInit (psfMosaic, 0.0); 695 695 696 psImage *funMosaic = psImageAlloc (3*DX, 3*DY, PS_TYPE_F32); 697 psImageInit (funMosaic, 0.0); 698 699 psImage *resMosaic = psImageAlloc (3*DX, 3*DY, PS_TYPE_F32); 700 psImageInit (resMosaic, 0.0); 701 696 702 pmModel *modelRef = pmModelAlloc(psf->type); 697 703 … … 700 706 for (int y = -1; y <= +1; y ++) { 701 707 // use the center of the center pixel of the image 702 float xc = ( 0.5 + 0.45*x)*readout->image->numCols + readout->image->col0;703 float yc = ( 0.5 + 0.45*y)*readout->image->numRows + readout->image->row0;708 float xc = (int)((0.5 + 0.45*x)*readout->image->numCols) + readout->image->col0 + 0.5; 709 float yc = (int)((0.5 + 0.45*y)*readout->image->numRows) + readout->image->row0 + 0.5; 704 710 705 711 // assign the x and y coords to the image center … … 718 724 // XXX should we measure this for the analytical model only or the full model? 719 725 pmModelAddWithOffset (psfMosaic, NULL, model, PM_MODEL_OP_FULL | PM_MODEL_OP_CENTER, 0, -x*DX, -y*DY); 726 pmModelAddWithOffset (funMosaic, NULL, model, PM_MODEL_OP_FUNC | PM_MODEL_OP_CENTER, 0, -x*DX, -y*DY); 727 pmModelAddWithOffset (resMosaic, NULL, model, PM_MODEL_OP_RES0 | PM_MODEL_OP_RES1 | PM_MODEL_OP_CENTER, 0, -x*DX, -y*DY); 728 720 729 psFree (model); 721 730 } … … 723 732 724 733 psImage *psfLogFlux = (psImage *) psUnaryOp (NULL, psfMosaic, "log"); 725 psphotVisualRangeImage (kapa2, psfLogFlux, "psf_mosaic", 1, -2.0, 3.0); 734 psphotVisualRangeImage (kapa2, psfLogFlux, "psf_mosaic", 0, -2.0, 3.0); 735 psphotVisualRangeImage (kapa2, funMosaic, "psf_analytical", 1, -10.0, 100.0); 736 psphotVisualRangeImage (kapa2, resMosaic, "psf_residual", 2, -10.0, 100.0); 726 737 727 738 psFree (psfMosaic); 739 psFree (funMosaic); 740 psFree (resMosaic); 728 741 psFree (psfLogFlux); 729 742 psFree (modelRef);
Note:
See TracChangeset
for help on using the changeset viewer.
