1 | /* |
---|
2 | * |
---|
3 | * Created by Steve Kline on Tue Dec 15 2009. |
---|
4 | * Copyright (c) 2009 NCNR. All rights reserved. |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | //#include <Carbon/Carbon.h> |
---|
9 | #include <stdio.h> |
---|
10 | |
---|
11 | // All structures passed to Igor are two-byte aligned. |
---|
12 | #include "XOPStructureAlignmentTwoByte.h" |
---|
13 | |
---|
14 | // Parameters passed from Igor to the function, in reverse order of the parameter list |
---|
15 | // result is the last parameter, always. |
---|
16 | typedef struct AltiParams { |
---|
17 | double grid; // effective c-to-c distance between spheres = 0.62*Rprimary |
---|
18 | double Rprimary; //primary sphere radius |
---|
19 | waveHndl rhowavH; // rho at xyz!!! |
---|
20 | waveHndl zwavH; // z coordinate. ALL are expected to be DP waves |
---|
21 | waveHndl ywavH; // y coordinate. |
---|
22 | waveHndl xwavH; // x coordinate. |
---|
23 | double qval; // q-value. |
---|
24 | void* tp; //unused void for threadsafe functions |
---|
25 | double result; |
---|
26 | }AltiParams, *AltiParamsPtr; |
---|
27 | |
---|
28 | |
---|
29 | // Parameters passed from Igor to the function, in reverse order of the parameter list |
---|
30 | // result is the last parameter, always. |
---|
31 | typedef struct DistParam { |
---|
32 | waveHndl zwavH; // z coordinate. ALL are expected to be DP waves |
---|
33 | waveHndl ywavH; // y coordinate. |
---|
34 | waveHndl xwavH; // x coordinate. |
---|
35 | void* tp; //unused void for threadsafe functions |
---|
36 | double result; |
---|
37 | }DistParam, *DistParamPtr; |
---|
38 | |
---|
39 | // Parameters passed from Igor to the function, in reverse order of the parameter list |
---|
40 | // result is the last parameter, always. |
---|
41 | typedef struct BinParam { |
---|
42 | double p2; |
---|
43 | double p1; // start and stop of the outer index |
---|
44 | double binWidth; |
---|
45 | double grid; |
---|
46 | waveHndl bwavH; // bin wave |
---|
47 | waveHndl zwavH; // z coordinate. ALL are expected to be DP waves |
---|
48 | waveHndl ywavH; // y coordinate. |
---|
49 | waveHndl xwavH; // x coordinate. |
---|
50 | void* tp; //unused void for threadsafe functions |
---|
51 | double result; |
---|
52 | }BinParam, *BinParamPtr; |
---|
53 | |
---|
54 | // Parameters passed from Igor to the function, in reverse order of the parameter list |
---|
55 | // result is the last parameter, always. |
---|
56 | typedef struct BinSLDParam { |
---|
57 | double p2; |
---|
58 | double p1; // start and stop of the outer index |
---|
59 | double binWidth; |
---|
60 | double grid; |
---|
61 | waveHndl PSFidH; // psf id matrix, this is 2D |
---|
62 | waveHndl SLDLookH; // SLD lookup wave, this is 1D |
---|
63 | waveHndl bwavH; // bin wave, this is 2D |
---|
64 | waveHndl rhowavH; //rho @ XYZ |
---|
65 | waveHndl zwavH; // z coordinate. ALL are expected to be DP waves |
---|
66 | waveHndl ywavH; // y coordinate. |
---|
67 | waveHndl xwavH; // x coordinate. |
---|
68 | void* tp; //unused void for threadsafe functions |
---|
69 | double result; |
---|
70 | }BinSLDParam, *BinSLDParamPtr; |
---|
71 | |
---|
72 | |
---|
73 | // Parameters passed from Igor to the function, in reverse order of the parameter list |
---|
74 | // result is the last parameter, always. |
---|
75 | typedef struct SobolParam { |
---|
76 | waveHndl bwavH; // result wave |
---|
77 | double nIn; // initialization, or dimension - this is really an int |
---|
78 | // void* tp; //unused void for threadsafe functions |
---|
79 | double result; |
---|
80 | }SobolParam, *SobolParamPtr; |
---|
81 | |
---|
82 | |
---|
83 | |
---|
84 | #include "XOPStructureAlignmentReset.h" |
---|
85 | |
---|
86 | |
---|
87 | double PhiQR(double qval, double rval); |
---|
88 | double XYZDistance(double x1, double x2,double y1, double y2,double z1, double z2); |
---|
89 | int DebyeSpheresX(AltiParamsPtr p); |
---|
90 | int maxDistanceX(DistParamPtr p); |
---|
91 | int binDistanceX(BinParamPtr p); |
---|
92 | int binSLDDistanceX(BinSLDParamPtr p); |
---|
93 | int SobolX(SobolParamPtr p); |
---|
94 | |
---|