source: sans/XOP_Dev/MonteCarlo/DebyeSpheres.h @ 996

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

Changes to the XOP code to upgrade to ToolKit? v6. Changes are the ones outlined in the Appendix A of the TK6 manual. SOme of the XOP support routines and the #pragma for 2-byte structures have changed. Per Howard Rodstein, there is no need to change the c files to cpp. c should work and compile just fine.

These changes work correctly on my mac. Next is to make sure that they work correctly on the two build machines.

File size: 3.1 KB
Line 
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#pragma pack(2)
13
14// Parameters passed from Igor to the function, in reverse order of the parameter list
15// result is the last parameter, always.
16typedef 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.
31typedef struct DistParam {
32        double p2;
33        double p1;              // start and stop of the outer index
34        waveHndl zwavH; // z coordinate. ALL are expected to be DP waves
35        waveHndl ywavH; // y coordinate.
36        waveHndl xwavH; // x coordinate.
37        void* tp;                       //unused void for threadsafe functions
38        double result;
39}DistParam, *DistParamPtr;   
40
41// Parameters passed from Igor to the function, in reverse order of the parameter list
42// result is the last parameter, always.
43typedef struct BinParam {
44        double p2;
45        double p1;              // start and stop of the outer index
46        double binWidth;
47        double grid;
48        waveHndl bwavH; // bin wave
49        waveHndl zwavH; // z coordinate. ALL are expected to be DP waves
50        waveHndl ywavH; // y coordinate.
51        waveHndl xwavH; // x coordinate.
52        void* tp;                       //unused void for threadsafe functions
53        double result;
54}BinParam, *BinParamPtr;   
55
56// Parameters passed from Igor to the function, in reverse order of the parameter list
57// result is the last parameter, always.
58typedef struct BinSLDParam {
59        double p2;
60        double p1;              // start and stop of the outer index
61        double binWidth;
62        double grid;
63        double minSLD;
64        waveHndl PSFidH;        // psf id matrix, this is 2D
65        waveHndl SLDLookH;      // SLD lookup wave, this is 1D
66        waveHndl bwavH; // bin wave, this is 2D
67        waveHndl rhowavH;               //rho @ XYZ
68        waveHndl zwavH; // z coordinate. ALL are expected to be DP waves
69        waveHndl ywavH; // y coordinate.
70        waveHndl xwavH; // x coordinate.
71        void* tp;                       //unused void for threadsafe functions
72        double result;
73}BinSLDParam, *BinSLDParamPtr;   
74
75
76// Parameters passed from Igor to the function, in reverse order of the parameter list
77// result is the last parameter, always.
78typedef struct SobolParam {
79        waveHndl bwavH; // result wave
80        double nIn;             // initialization, or dimension - this is really an int
81        //      void* tp;                       //unused void for threadsafe functions
82        double result;
83}SobolParam, *SobolParamPtr;   
84
85
86
87#pragma pack()          // return to default structure packing
88
89
90double PhiQR(double qval, double rval);
91double XYZDistance(double x1, double x2,double y1, double y2,double z1, double z2);
92int DebyeSpheresX(AltiParamsPtr p);
93int maxDistanceX(DistParamPtr p);
94int binDistanceX(BinParamPtr p);
95int binSLDDistanceX(BinSLDParamPtr p);
96int SobolX(SobolParamPtr p);
97
Note: See TracBrowser for help on using the repository browser.