Changeset 849 for sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_FillMatrixShapes.ipf
 Timestamp:
 Mar 26, 2012 11:26:28 AM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_FillMatrixShapes.ipf
r840 r849 286 286 numx=DimSize(mat,0) 287 287 numy=DimSize(mat,1) 288 for(ii=0;ii<numx;ii+=1) 289 for(jj=0;jj<numy;jj+=1) 288 289 Variable x1,x2,y1,y2 290 x1 = xc  trunc(rad/grid)  2 291 x2 = xc + trunc(rad/grid) + 2 292 y1 = yc  trunc(rad/grid)  2 293 y2 = yc + trunc(rad/grid) + 2 294 295 296 y1 = y1 < 0 ? 0 : y1 297 x1 = x1 < 0 ? 0 : x1 298 299 y2 = y2 > numy ? numy : y2 300 x2 = x2 > numx ? numx : x2 301 302 for(ii=x1;ii<x2;ii+=1) 303 for(jj=y1;jj<y2;jj+=1) 290 304 dik=sqrt( (iixc)^2+(jjyc)^2)*grid 291 305 if(dik<=rad) … … 294 308 endfor 295 309 endfor 310 311 // for(ii=0;ii<numx;ii+=1) 312 // for(jj=0;jj<numy;jj+=1) 313 // dik=sqrt( (iixc)^2+(jjyc)^2)*grid 314 // if(dik<=rad) 315 // mat[ii][jj][zloc] = fill 316 // endif 317 // endfor 318 // endfor 296 319 297 320 return(0) … … 307 330 WAVE mat 308 331 Variable grid,rad,xc,yc,zc,len,fill 309 332 333 // Variable tref = startMSTimer 334 310 335 Variable ii,pts 311 336 //put half the length above  half below … … 314 339 FillYZCircle(mat,grid,rad,yc,zc,ii,fill) 315 340 endfor 316 341 342 // Variable ms = stopMSTimer(tref) 343 // print "Time elapsed = ", ms/1e6, "s" 344 317 345 return(0) 318 346 End … … 328 356 numy=DimSize(mat,0) 329 357 numz=DimSize(mat,1) 330 for(ii=0;ii<numy;ii+=1) 331 for(jj=0;jj<numz;jj+=1) 358 359 Variable y1,y2,z1,z2 360 y1 = yc  trunc(rad/grid)  2 361 y2 = yc + trunc(rad/grid) + 2 362 z1 = zc  trunc(rad/grid)  2 363 z2 = zc + trunc(rad/grid) + 2 364 365 y1 = y1 < 0 ? 0 : y1 366 z1 = z1 < 0 ? 0 : z1 367 368 y2 = y2 > numy ? numy : y2 369 z2 = z2 > numz ? numz : z2 370 371 372 for(ii=y1;ii<y2;ii+=1) 373 for(jj=z1;jj<z2;jj+=1) 332 374 dik=sqrt( (iiyc)^2+(jjzc)^2)*grid 333 375 if(dik<=rad) … … 336 378 endfor 337 379 endfor 338 380 381 382 ////slow way 383 // for(ii=0;ii<numy;ii+=1) 384 // for(jj=0;jj<numz;jj+=1) 385 // dik=sqrt( (iiyc)^2+(jjzc)^2)*grid 386 // if(dik<=rad) 387 // mat[xloc][ii][jj] = fill 388 // endif 389 // endfor 390 // endfor 391 339 392 return(0) 340 393 End … … 371 424 numx=DimSize(mat,0) 372 425 numz=DimSize(mat,1) 373 for(ii=0;ii<numx;ii+=1) 374 for(jj=0;jj<numz;jj+=1) 426 427 Variable x1,x2,z1,z2 428 x1 = xc  trunc(rad/grid)  2 429 x2 = xc + trunc(rad/grid) + 2 430 z1 = zc  trunc(rad/grid)  2 431 z2 = zc + trunc(rad/grid) + 2 432 433 434 z1 = z1 < 0 ? 0 : z1 435 x1 = x1 < 0 ? 0 : x1 436 437 z2 = z2 > numz ? numz : z2 438 x2 = x2 > numx ? numx : x2 439 440 for(ii=x1;ii<x2;ii+=1) 441 for(jj=z1;jj<z2;jj+=1) 375 442 dik=sqrt( (iixc)^2+(jjzc)^2)*grid 376 443 if(dik<=rad) … … 379 446 endfor 380 447 endfor 448 449 // for(ii=0;ii<numx;ii+=1) 450 // for(jj=0;jj<numz;jj+=1) 451 // dik=sqrt( (iixc)^2+(jjzc)^2)*grid 452 // if(dik<=rad) 453 // mat[ii][yloc][jj] = fill 454 // endif 455 // endfor 456 // endfor 381 457 382 458 return(0) … … 564 640 Function ParseMatrix3D_rho(mat) 565 641 Wave mat 566 642 643 // Variable tref = startMSTimer 644 567 645 Variable nptx,npty,nptz,ii,jj,kk,num 568 646 … … 589 667 endfor 590 668 endfor 591 669 670 671 // Variable ms = stopMSTimer(tref) 672 // print "Time elapsed = ", ms/1e6, "s" 673 592 674 return(0) 593 675 End
Note: See TracChangeset
for help on using the changeset viewer.