7 #define LO_DTERM 0.2500 // low decay-term point (1/4)
30 return QwtDoubleInterval(
zmin,
zmax );
43 return QwtDoubleInterval(
xmin,
xmax );
49 return QwtDoubleInterval(
ymin,
ymax );
54 double a_reso,
double a_zfloor, QwtDoubleRect a_drecti )
82 int jr1 = jy *
nxpsc + jx;
85 if ( jr1 < 0 || jr1 > mxr )
90 double rv1 =
rdata.at( jr1 );
92 double dx = rx - (double)jx;
93 double dy = ry - (double)jy;
95 if ( dx > 0.1 || dy > 0.1 )
98 int jr3 = jr1 +
nxpsc;
100 jr2 = ( jr2 > mxr ) ? jr1 : jr2;
101 jr3 = ( jr3 > mxr ) ? jr2 : jr3;
102 jr4 = ( jr4 > mxr ) ? jr3 : jr4;
103 double rv2 =
rdata.at( jr2 );
104 double rv3 =
rdata.at( jr3 );
105 double rv4 =
rdata.at( jr4 );
108 rv2 = ( dx * rv2 ) + ( ( 1.0 - dx ) * rv1 );
109 rv4 = ( dx * rv4 ) + ( ( 1.0 - dx ) * rv3 );
110 rv1 = ( dy * rv4 ) + ( ( 1.0 - dy ) * rv2 );
123 int nsol = solu->size();
132 xmin = solu->at( 0 ).s;
133 ymin = solu->at( 0 ).k;
134 zmin = solu->at( 0 ).c;
141 for (
int ii = 1; ii < nsol; ii++ )
143 xval = solu->at( ii ).s;
144 yval = solu->at( ii ).k;
145 zval = solu->at( ii ).c;
160 ymin = (double)( qFloor( ymin * 100.0 ) ) * 0.01;
165 xmin -= ( 4.0 /
xinc );
167 ymin -= ( 4.0 /
yinc );
193 setBoundingRect( QwtDoubleRect( xmin, ymin,
xrng,
yrng ) );
198 for (
int ii = 0; ii <
nxypt; ii++ )
208 double sssc = -1.0 / ( 4.0 * ssig * ssig );
209 double fssc = -1.0 / ( 4.0 * fsig * fsig );
212 double dmin = sqrt( -log( 1.0e-5 ) ) * 2.0;
213 double xdif = dmin * ssig *
xinc;
214 double ydif = dmin * fsig *
yinc;
215 int nxd = qRound( xdif ) + 2;
216 int nyd = qRound( ydif ) + 2;
217 int hixd =
nxpsc / 4;
218 int hiyd =
nyscn / 4;
219 nxd = ( nxd < 10 ) ? 10 : ( ( nxd > hixd ) ? hixd : nxd );
220 nyd = ( nyd < 10 ) ? 10 : ( ( nyd > hiyd ) ? hiyd : nyd );
222 if (
resol != 100.0 )
224 for (
int kk = 0; kk < nsol; kk++ )
226 xval = solu->at( kk ).s;
227 yval = solu->at( kk ).k;
228 zval = solu->at( kk ).c -
zminr;
230 int rx = (int)( ( xval - xmin ) *
xinc );
233 fx = ( fx > 0 ) ? fx : 0;
235 int ry = (int)( (
ymax - yval ) *
yinc );
238 fy = ( fy > 0 ) ? fy : 0;
241 for (
int ii = fy; ii < ly; ii++ )
243 double yras =
ymax - ( (double)ii / yinc );
244 double ydif = yras - yval;
245 double yterm = exp( ydif * ydif * fssc );
246 double zterm = zval * yterm;
247 int kr = ii *
nxpsc + fx;
249 for (
int jj = fx; jj < lx; jj++ )
251 double xras = (double)jj / xinc + xmin;
252 double xdif = xras - xval;
253 double xterm = exp( xdif * xdif * sssc );
255 double zin =
rdata.at( kr );
262 double zout =
zmin + zterm * xterm;
266 rdata.replace( kr, zout );
275 for (
int kk = 0; kk < nsol; kk++ )
277 xval = solu->at( kk ).s;
278 yval = solu->at( kk ).k;
279 zval = solu->at( kk ).c;
281 int rx = (int)( ( xval - xmin ) *
xinc );
284 fx = ( fx > 0 ) ? fx : 0;
286 int ry = (int)( (
ymax - yval ) *
yinc );
289 fy = ( fy > 0 ) ? fy : 0;
292 for (
int ii = fy; ii < ly; ii++ )
294 double yras =
ymax - ( (double)ii / yinc );
295 double ydif = yras - yval;
296 double yterm = exp( ydif * ydif * fssc );
297 int kr = ii *
nxpsc + fx;
299 for (
int jj = fx; jj < lx; jj++ )
301 double xras = (double)jj / xinc + xmin;
302 double xdif = xras - xval;
303 double xterm = exp( xdif * xdif * sssc );
305 double zin =
rdata.at( kr );
306 double zdecay = yterm * xterm;
309 if ( zdecay >
LO_DTERM && zval > zin)
310 rdata.replace( kr, zval );