- Timestamp:
- 06/23/14 20:14:08 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PlotHelper.cpp
r2719 r2951 24 24 #include "PlotHelper.h" 25 25 26 //#ifndef KS_DEBUG 27 //#define KS_DEBUG 28 //#endif 26 #define SMALL_ANGLE 1.0e-7 27 28 // #ifndef KS_DEBUG 29 // #define KS_DEBUG 30 // #endif 29 31 30 32 using namespace std ; … … 101 103 incx = abs(xmax - xmin) / (double) nx * cos(centy); 102 104 incy = abs(ymax - ymin) / (double) ny; 105 // Direction coordinate seems not work well with inc=0. set very small value. 106 if (incx == 0.) incx = SMALL_ANGLE; 107 if (incy == 0.) incy = SMALL_ANGLE; 103 108 // Generate a temporal direction coordinte 104 109 coord = DirectionCoordinate(mdt, ptype, … … 266 271 cout << "- got centpix [" << centpix[0] << ", " << centpix[1] << "]" <<endl; 267 272 #endif 268 Double wx = max( abs(stxmax-centpix[0]), abs(stxmin-centpix[0]) ) 273 // Direction coordinate seems not work well with inc=0. set very small value. 274 Double wx = max( max( abs(stxmax-centpix[0]), abs(stxmin-centpix[0]) ), 0.5 ) 269 275 * 2 * stincx.getValue("rad"); 270 Double wy = max( abs(stymax-centpix[1]), abs(stymin-centpix[1]))276 Double wy = max( max( abs(stymax-centpix[1]), abs(stymin-centpix[1]) ), 0.5 ) 271 277 * 2 * stincy.getValue("rad"); 272 278 incx = wx / max(nx - 1., 1.);
Note:
See TracChangeset
for help on using the changeset viewer.