source: sans/XOP_Dev/MonteCarlo/MonteCarlo.r @ 974

Last change on this file since 974 was 974, checked in by srkline, 7 years ago

adding the function for the basic metropolis algorithm.

File size: 5.0 KB
Line 
1#include "XOPStandardHeaders.r"
2
3resource 'vers' (1) {                                           /* XOP version info */
4        0x01, 0x00, final, 0x00, 0,                             /* version bytes and country integer */
5        "1.00",
6        "1.00, ᅵ 1993 WaveMetrics, Inc., all rights reserved."
7};
8
9resource 'vers' (2) {                                           /* Igor version info */
10        0x05, 0x00, release, 0x00, 0,                   /* version bytes and country integer */
11        "5.00",
12        "(for Igor 5.00 or later)"
13};
14
15resource 'STR#' (1100) {                                        /* custom error messages */
16        {
17                /* [1] */
18                "SANSMonteCarlo requires Igor Pro 6.1 or later.",
19                /* [2] */
20                "Wave does not exist.",
21                /* [3] */
22                "This function requires a 3D wave.",
23        }
24};
25
26/* no menu item */
27
28resource 'XOPI' (1100) {
29        XOP_VERSION,                                                    // XOP protocol version.
30        DEV_SYS_CODE,                                                   // Development system information.
31        0,                                                                              // Obsolete - set to zero.
32        0,                                                                              // Obsolete - set to zero.
33        XOP_TOOLKIT_VERSION,                                    // XOP Toolkit version.
34};
35
36resource 'XOPF' (1100) {
37        {
38                "Monte_SANSX",          /* function name */
39                F_UTIL | F_THREADSAFE | F_EXTERNAL,                                     /* function category == UTILITY */
40                NT_FP64,                                                        /* return value type */                 
41                {
42                        NT_FP64 + WAVE_TYPE,
43                        NT_FP64 + WAVE_TYPE,
44                        NT_FP64 + WAVE_TYPE,
45                        NT_FP64 + WAVE_TYPE,
46                        NT_FP64 + WAVE_TYPE,
47                        NT_FP64 + WAVE_TYPE,
48                        NT_FP64 + WAVE_TYPE,
49                        NT_FP64 + WAVE_TYPE,
50                },
51               
52                "Monte_SANSX2",         /* function name */
53                F_UTIL | F_THREADSAFE | F_EXTERNAL,                                     /* function category == UTILITY */
54                NT_FP64,                                                        /* return value type */                 
55                {
56                        NT_FP64 + WAVE_TYPE,
57                        NT_FP64 + WAVE_TYPE,
58                        NT_FP64 + WAVE_TYPE,
59                        NT_FP64 + WAVE_TYPE,
60                        NT_FP64 + WAVE_TYPE,
61                        NT_FP64 + WAVE_TYPE,
62                        NT_FP64 + WAVE_TYPE,
63                        NT_FP64 + WAVE_TYPE,
64                },
65               
66                "DebyeSpheresX",                                                /* function name */
67                F_UTIL | F_THREADSAFE | F_EXTERNAL,                             /* function category == Utility */
68                NT_FP64,                                                        /* return value type */ 
69                {
70                                                NT_FP64,                        /* single precision wave (q-wave) */
71                        NT_FP64 + WAVE_TYPE,                            /* single precision wave (x coordinates) */
72                        NT_FP64 + WAVE_TYPE,                            /* single precision wave (y coordinates) */
73                        NT_FP64 + WAVE_TYPE,                            /* single precision wave (z coordinates) */
74                        NT_FP64 + WAVE_TYPE,                            /* single precision wave (rho at xyz) */
75                        NT_FP64,                                // Rprimary, the primary sphere radius
76                        NT_FP64,                                // grid, should be passed as 0.62*Rprimary
77                },
78               
79                "Monte_SANSX3",         /* function name */
80                F_UTIL | F_THREADSAFE | F_EXTERNAL,                                     /* function category == UTILITY */
81                NT_FP64,                                                        /* return value type */                 
82                {
83                        NT_FP64 + WAVE_TYPE,
84                        NT_FP64 + WAVE_TYPE,
85                        NT_FP64 + WAVE_TYPE,
86                        NT_FP64 + WAVE_TYPE,
87                        NT_FP64 + WAVE_TYPE,
88                        NT_FP64 + WAVE_TYPE,
89                        NT_FP64 + WAVE_TYPE,
90                        NT_FP64 + WAVE_TYPE,
91                },
92               
93                "Monte_SANSX4",         /* function name */
94                F_UTIL | F_THREADSAFE | F_EXTERNAL,                                     /* function category == UTILITY */
95                NT_FP64,                                                        /* return value type */                 
96                {
97                        NT_FP64 + WAVE_TYPE,
98                        NT_FP64 + WAVE_TYPE,
99                        NT_FP64 + WAVE_TYPE,
100                        NT_FP64 + WAVE_TYPE,
101                        NT_FP64 + WAVE_TYPE,
102                        NT_FP64 + WAVE_TYPE,
103                        NT_FP64 + WAVE_TYPE,
104                        NT_FP64 + WAVE_TYPE,
105                },
106               
107                "maxDistanceX",         /* function name */
108                F_UTIL | F_THREADSAFE | F_EXTERNAL,                                     /* function category == UTILITY */
109                NT_FP64,                                                        /* return value type */                 
110                {
111                        NT_FP64 + WAVE_TYPE,
112                        NT_FP64 + WAVE_TYPE,
113                        NT_FP64 + WAVE_TYPE,
114                        NT_FP64,                                                // start index
115                        NT_FP64,                                                // stop index
116                },
117               
118                "binDistanceX",         /* function name */
119                F_UTIL | F_THREADSAFE | F_EXTERNAL,                                     /* function category == UTILITY */
120                NT_FP64,                                                        /* return value type */                 
121                {
122                        NT_FP64 + WAVE_TYPE,                    // XYZ waves
123                        NT_FP64 + WAVE_TYPE,
124                        NT_FP64 + WAVE_TYPE,
125                        NT_FP64 + WAVE_TYPE,                    // distance Bin wave (this is returned)
126                        NT_FP64,                                                // grid
127                        NT_FP64,                                                // bin width
128                        NT_FP64,                                                // start index
129                        NT_FP64,                                                // stop index
130                },
131               
132                "SobolX",               /* function name */
133                F_UTIL | F_EXTERNAL,                                    /* function category == UTILITY */
134                NT_FP64,                                                        /* return value type */                 
135                {
136                        NT_FP64,                                                // requested dimension (this is really an integer)
137                        NT_FP64 + WAVE_TYPE,                    // result wave
138                },
139               
140                "binSLDDistanceX",              /* function name */
141                F_UTIL | F_THREADSAFE | F_EXTERNAL,                                     /* function category == UTILITY */
142                NT_FP64,                                                        /* return value type */                 
143                {
144                        NT_FP64 + WAVE_TYPE,                    // XYZ waves
145                        NT_FP64 + WAVE_TYPE,
146                        NT_FP64 + WAVE_TYPE,
147                        NT_FP64 + WAVE_TYPE,                    // rho wave
148                        NT_FP64 + WAVE_TYPE,                    // distance Bin wave, 2D (this is returned)
149                        NT_FP64 + WAVE_TYPE,                    // SLD lookup
150                        NT_FP64 + WAVE_TYPE,                    // PSF id matrix
151                        NT_FP64,                                                // abs(minSLD) for lookup table
152                        NT_FP64,                                                // grid
153                        NT_FP64,                                                // bin width
154                        NT_FP64,                                                // start index
155                        NT_FP64,                                                // stop index
156                },
157       
158                "MetropolisX",          /* function name */
159                F_UTIL | F_THREADSAFE | F_EXTERNAL,                                     /* function category == UTILITY */
160                NT_FP64,                                                        /* return value type */                 
161                {
162                        NT_FP64 + WAVE_TYPE,                    // UofR
163                        NT_FP64 + WAVE_TYPE,                    // XYZ waves
164                        NT_FP64 + WAVE_TYPE,
165                        NT_FP64 + WAVE_TYPE,
166                        NT_FP64 + WAVE_TYPE,                    // energy wave
167                        NT_FP64,                                                // radius
168                        NT_FP64,                                                // tVox
169                        NT_FP64,                                                // nVox
170                        NT_FP64,                                                // nIterations
171                        NT_FP64,                                                // gCount
172                },
173        }
174};
Note: See TracBrowser for help on using the repository browser.