# source:sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_Plane_Fills.ipf@798

Last change on this file since 798 was 798, checked in by srkline, 11 years ago

I'm not sure this is a great idea, but I'm putting the FFT / Debye sphere work that I have completed into SVN. It's all really rough - the math, I believe is correct, but the interface if really, really rough. But it's not going to develop without help.

File size: 822 bytes
Line
1#pragma rtGlobals=1             // Use modern global access method.
2
3
4
5Function GridOfLines(m)
6        Wave m
7
8        Variable num=DimSize(m,0),ii=0
9
10        for(ii=0;ii<num;ii+=10)
11                m[][ii][ii] = 1
12                m[ii][][ii] = 1
13                m[ii][ii][] = 1
14        endfor
15
16
17End
18
19
20
21Function PlanesInMatrix(m)
22        Wave m
23
24        Variable num=DimSize(m,0),ii=0
25
26        for(ii=0;ii<num;ii+=10)
27                m[][][ii] = 1                           //fill the XY plane
28//              m[ii][][] = 1                           //fill the YZ plane
29//              m[][ii][] = 1                           //fill the XZ plane
30        endfor
31
32
33End
34
35Function MakeTactoid()
36
37        WAVE mat=mat
38        Variable ii,trim=10
39        Variable num=DimSize(mat,0)
40
41        PlanesInMatrix(mat)             //the whole YZ plane (gives INF FFT)
42
43        //chop the planes down
44        for(ii=0;ii<trim;ii+=1)
45                mat[][][ii] = 0
46                mat[ii][][] = 0
47                mat[][ii][] = 0
48        endfor
49        for(ii=num-1;ii>(num-1-trim);ii-=1)
50                mat[][][ii] = 0
51                mat[ii][][] = 0
52                mat[][ii][] = 0
53        endfor
54end
Note: See TracBrowser for help on using the repository browser.