- Timestamp:
- May 11, 2016 3:39:58 PM (7 years ago)
- Location:
- sans/XOP_Dev/SANSAnalysis
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/XOP_Dev/SANSAnalysis/XOP/Func2D.c
r834 r998 16 16 #include <math.h> 17 17 #include "Func2D.h" // declarations for the 2D functions in this file 18 #include "c_disperser.h" // declaration of weight_dispersion function 18 19 19 20 int … … 136 137 // will produce a NAN at phi_cyl=0 and 45 degrees 137 138 pars[5] = acos(-1.0)/n_slices * i_theta; 138 if( fabs(i_theta / n_slices) - 0.5 < 0.000001 ) {139 if( abs(i_theta / n_slices) - 0.5 < 0.000001 ) { 139 140 //continue; 140 141 pars[5] += 0.00001; … … 264 265 // TODO: integrate from 0 to pi/2 instead of 0 to pi 265 266 pars[8] = acos(-1.0)/n_slices * i_theta; 266 if( fabs(i_theta / n_slices) - 0.5 < 0.000001 ) {267 if( abs(i_theta / n_slices) - 0.5 < 0.000001 ) { 267 268 //continue; 268 269 pars[8] += 0.00001; … … 404 405 // will produce a NAN at phi_cyl=0 and 45 degrees 405 406 pars[5] = acos(-1.0)/n_slices * i_theta; 406 if( fabs(i_theta / n_slices) - 0.5 < 0.000001 ) {407 if( abs(i_theta / n_slices) - 0.5 < 0.000001 ) { 407 408 //continue; 408 409 pars[5] += 0.00001; … … 551 552 pars[6] = acos(-1.0)/n_slices * i_theta; 552 553 553 if( fabs(i_theta / n_slices) - 0.5 < 0.000001 ) {554 if( abs(i_theta / n_slices) - 0.5 < 0.000001 ) { 554 555 //continue; 555 556 pars[6] += 0.00001; -
sans/XOP_Dev/SANSAnalysis/XOP/SANSAnalysis.c
r834 r998 18 18 #include "Func2D.h" 19 19 20 static long20 static XOPIORecResult 21 21 RegisterFunction() 22 22 { 23 23 int funcIndex; 24 24 25 funcIndex = GetXOPItem(0); // Which function invoked ?25 funcIndex = (int)GetXOPItem(0); // Which function invoked ? 26 26 switch (funcIndex) { 27 27 // … … 29 29 // 30 30 case 0: // y = MultiShellX(w,x) (curve fitting function). 31 return(( long)MultiShellSphereX); // This function is called using the direct method.31 return((XOPIORecResult)MultiShellSphereX); // This function is called using the direct method. 32 32 break; 33 33 case 1: // y = PolyMultiShellX(w,x) (curve fitting function). 34 return(( long)PolyMultiShellX); // This function is called using the direct method.34 return((XOPIORecResult)PolyMultiShellX); // This function is called using the direct method. 35 35 break; 36 36 case 2: // y = SphereFormX(w,x) (curve fitting function). 37 return(( long)SphereFormX); // This function is called using the direct method.37 return((XOPIORecResult)SphereFormX); // This function is called using the direct method. 38 38 break; 39 39 case 3: // y = CoreShellX(w,x) (curve fitting function). 40 return(( long)CoreShellSphereX); // This function is called using the direct method.40 return((XOPIORecResult)CoreShellSphereX); // This function is called using the direct method. 41 41 break; 42 42 case 4: // y = PolyCoreX(w,x) (curve fitting function). 43 return(( long)PolyCoreFormX); // This function is called using the direct method.43 return((XOPIORecResult)PolyCoreFormX); // This function is called using the direct method. 44 44 break; 45 45 case 5: // y = PolyCoreShellRatioX(w,x) (curve fitting function). 46 return(( long)PolyCoreShellRatioX); // This function is called using the direct method.46 return((XOPIORecResult)PolyCoreShellRatioX); // This function is called using the direct method. 47 47 break; 48 48 case 6: // y = Vesicle_ULX(w,x) (curve fitting function). 49 return(( long)VesicleFormX); // This function is called using the direct method.49 return((XOPIORecResult)VesicleFormX); // This function is called using the direct method. 50 50 break; 51 51 case 7: // y = SchulzSpheresX(w,x) (curve fitting function). 52 return(( long)SchulzSpheresX); // This function is called using the direct method.52 return((XOPIORecResult)SchulzSpheresX); // This function is called using the direct method. 53 53 break; 54 54 case 8: // y = PolyRectSpheresX(w,x) (curve fitting function). 55 return(( long)PolyRectSpheresX); // This function is called using the direct method.55 return((XOPIORecResult)PolyRectSpheresX); // This function is called using the direct method. 56 56 break; 57 57 case 9: // y = PolyHardSphereIntensityX(w,x) (curve fitting function). 58 return(( long)PolyHardSpheresX); // This function is called using the direct method.58 return((XOPIORecResult)PolyHardSpheresX); // This function is called using the direct method. 59 59 break; 60 60 case 10: // y = BimodalSchulzSpheresX(w,x) (curve fitting function). 61 return(( long)BimodalSchulzSpheresX); // This function is called using the direct method.61 return((XOPIORecResult)BimodalSchulzSpheresX); // This function is called using the direct method. 62 62 break; 63 63 case 11: // y = GaussPolySphereX(w,x) (curve fitting function). 64 return(( long)GaussSpheresX); // This function is called using the direct method.64 return((XOPIORecResult)GaussSpheresX); // This function is called using the direct method. 65 65 break; 66 66 case 12: // y = LogNormalPolySphereX(w,x) (curve fitting function). 67 return(( long)LogNormalSphereX); // This function is called using the direct method.67 return((XOPIORecResult)LogNormalSphereX); // This function is called using the direct method. 68 68 break; 69 69 case 13: // y = BinaryHSX(w,x) (curve fitting function). 70 return(( long)BinaryHSX); // This function is called using the direct method.70 return((XOPIORecResult)BinaryHSX); // This function is called using the direct method. 71 71 break; 72 72 case 14: // y = BinaryHS_PSF11X(w,x) (curve fitting function). 73 return(( long)BinaryHS_PSF11X); // This function is called using the direct method.73 return((XOPIORecResult)BinaryHS_PSF11X); // This function is called using the direct method. 74 74 break; 75 75 case 15: // y = BinaryHS_PSF12X(w,x) (curve fitting function). 76 return(( long)BinaryHS_PSF12X); // This function is called using the direct method.76 return((XOPIORecResult)BinaryHS_PSF12X); // This function is called using the direct method. 77 77 break; 78 78 case 16: // y = BinaryHS_PSF22X(w,x) (curve fitting function). 79 return(( long)BinaryHS_PSF22X); // This function is called using the direct method.79 return((XOPIORecResult)BinaryHS_PSF22X); // This function is called using the direct method. 80 80 break; 81 81 // … … 83 83 // 84 84 case 17: // y = CylinderFormX(w,x) (curve fitting function). 85 return(( long)CylinderFormX); // This function is called using the direct method.85 return((XOPIORecResult)CylinderFormX); // This function is called using the direct method. 86 86 break; 87 87 case 18: // y = EllipCylFit76X(w,x) (curve fitting function). 88 return(( long)EllipCyl76X); // This function is called using the direct method.88 return((XOPIORecResult)EllipCyl76X); // This function is called using the direct method. 89 89 break; 90 90 case 19: // y = EllipCylFit20X(w,x) (curve fitting function). 91 return(( long)EllipticalCylinderX); // This function is called using the direct method.91 return((XOPIORecResult)EllipticalCylinderX); // This function is called using the direct method. 92 92 break; 93 93 case 20: // y = TriaxialEllipsoidX(w,x) (curve fitting function). 94 return(( long)TriaxialEllipsoidX); // This function is called using the direct method.94 return((XOPIORecResult)TriaxialEllipsoidX); // This function is called using the direct method. 95 95 break; 96 96 case 21: // y = ParallelepipedX(w,x) (curve fitting function). 97 return(( long)ParallelepipedX); // This function is called using the direct method.97 return((XOPIORecResult)ParallelepipedX); // This function is called using the direct method. 98 98 break; 99 99 case 22: // y = HollowCylinderX(w,x) (curve fitting function). 100 return(( long)HollowCylinderX); // This function is called using the direct method.100 return((XOPIORecResult)HollowCylinderX); // This function is called using the direct method. 101 101 break; 102 102 case 23: // y = EllipsoidFormX(w,x) (curve fitting function). 103 return(( long)EllipsoidFormX); // This function is called using the direct method.103 return((XOPIORecResult)EllipsoidFormX); // This function is called using the direct method. 104 104 break; 105 105 case 24: // y = Cyl_PolyRadiusX(w,x) (curve fitting function). 106 return(( long)Cyl_PolyRadiusX); // This function is called using the direct method.106 return((XOPIORecResult)Cyl_PolyRadiusX); // This function is called using the direct method. 107 107 break; 108 108 case 25: // y = Cyl_PolyLengthX(w,x) (curve fitting function). 109 return(( long)Cyl_PolyLengthX); // This function is called using the direct method.109 return((XOPIORecResult)Cyl_PolyLengthX); // This function is called using the direct method. 110 110 break; 111 111 case 26: // y = CoreShellCylinderX(w,x) (curve fitting function). 112 return(( long)CoreShellCylinderX); // This function is called using the direct method.112 return((XOPIORecResult)CoreShellCylinderX); // This function is called using the direct method. 113 113 break; 114 114 case 27: // y = OblateFormX(w,x) (curve fitting function). 115 return(( long)OblateFormX); // This function is called using the direct method.115 return((XOPIORecResult)OblateFormX); // This function is called using the direct method. 116 116 break; 117 117 case 28: // y = ProlateFormX(w,x) (curve fitting function). 118 return(( long)ProlateFormX); // This function is called using the direct method.118 return((XOPIORecResult)ProlateFormX); // This function is called using the direct method. 119 119 break; 120 120 case 29: // y = FlexExclVolCylX(w,x) (curve fitting function). 121 return(( long)FlexExclVolCylX); // This function is called using the direct method.121 return((XOPIORecResult)FlexExclVolCylX); // This function is called using the direct method. 122 122 break; 123 123 case 30: // y = FlexCyl_PolyLenX(w,x) (curve fitting function). 124 return(( long)FlexCyl_PolyLenX); // This function is called using the direct method.124 return((XOPIORecResult)FlexCyl_PolyLenX); // This function is called using the direct method. 125 125 break; 126 126 case 31: // y = FlexCyl_PolyRadX(w,x) (curve fitting function). 127 return(( long)FlexCyl_PolyRadX); // This function is called using the direct method.127 return((XOPIORecResult)FlexCyl_PolyRadX); // This function is called using the direct method. 128 128 break; 129 129 case 32: // y = FlexCyl_EllipX(w,x) (curve fitting function). 130 return(( long)FlexCyl_EllipX); // This function is called using the direct method.130 return((XOPIORecResult)FlexCyl_EllipX); // This function is called using the direct method. 131 131 break; 132 132 case 33: // y = PolyCoShCylinderX(w,x) (curve fitting function). 133 return(( long)PolyCoShCylinderX); // This function is called using the direct method.133 return((XOPIORecResult)PolyCoShCylinderX); // This function is called using the direct method. 134 134 break; 135 135 case 34: // y = StackedDisksX(w,x) (curve fitting function). 136 return(( long)StackedDiscsX); // This function is called using the direct method.136 return((XOPIORecResult)StackedDiscsX); // This function is called using the direct method. 137 137 break; 138 138 case 35: // y = LamellarFFX(w,x) (curve fitting function). 139 return(( long)LamellarFFX); // This function is called using the direct method.139 return((XOPIORecResult)LamellarFFX); // This function is called using the direct method. 140 140 break; 141 141 case 36: // y = LamellarFF_HGX(w,x) (curve fitting function). 142 return(( long)LamellarFF_HGX); // This function is called using the direct method.142 return((XOPIORecResult)LamellarFF_HGX); // This function is called using the direct method. 143 143 break; 144 144 case 37: // y = LamellarPSX(w,x) (curve fitting function). 145 return(( long)LamellarPSX); // This function is called using the direct method.145 return((XOPIORecResult)LamellarPSX); // This function is called using the direct method. 146 146 break; 147 147 case 38: // y = LamellarPS_HGX(w,x) (curve fitting function). 148 return(( long)LamellarPS_HGX); // This function is called using the direct method.148 return((XOPIORecResult)LamellarPS_HGX); // This function is called using the direct method. 149 149 break; 150 150 // … … 152 152 // 153 153 case 39: // y = TeubnerStreyModelX(w,x) (curve fitting function). 154 return(( long)TeubnerStreyModelX); // This function is called using the direct method.154 return((XOPIORecResult)TeubnerStreyModelX); // This function is called using the direct method. 155 155 break; 156 156 case 40: // y = Power_Law_ModelX(w,x) (curve fitting function). 157 return(( long)Power_Law_ModelX); // This function is called using the direct method.157 return((XOPIORecResult)Power_Law_ModelX); // This function is called using the direct method. 158 158 break; 159 159 case 41: // y = Peak_Lorentz_ModelX(w,x) (curve fitting function). 160 return(( long)Peak_Lorentz_ModelX); // This function is called using the direct method.160 return((XOPIORecResult)Peak_Lorentz_ModelX); // This function is called using the direct method. 161 161 break; 162 162 case 42: // y = Peak_Gauss_ModelX(w,x) (curve fitting function). 163 return(( long)Peak_Gauss_ModelX); // This function is called using the direct method.163 return((XOPIORecResult)Peak_Gauss_ModelX); // This function is called using the direct method. 164 164 break; 165 165 case 43: // y = Lorentz_ModelX(w,x) (curve fitting function). 166 return(( long)Lorentz_ModelX); // This function is called using the direct method.166 return((XOPIORecResult)Lorentz_ModelX); // This function is called using the direct method. 167 167 break; 168 168 case 44: // y = FractalX(w,x) (curve fitting function). 169 return(( long)FractalX); // This function is called using the direct method.169 return((XOPIORecResult)FractalX); // This function is called using the direct method. 170 170 break; 171 171 case 45: // y = DAB_ModelX(w,x) (curve fitting function). 172 return(( long)DAB_ModelX); // This function is called using the direct method.172 return((XOPIORecResult)DAB_ModelX); // This function is called using the direct method. 173 173 break; 174 174 case 46: // y = OneLevelX(w,x) (curve fitting function). 175 return(( long)OneLevelX); // This function is called using the direct method.175 return((XOPIORecResult)OneLevelX); // This function is called using the direct method. 176 176 break; 177 177 case 47: // y = TwoLevelX(w,x) (curve fitting function). 178 return(( long)TwoLevelX); // This function is called using the direct method.178 return((XOPIORecResult)TwoLevelX); // This function is called using the direct method. 179 179 break; 180 180 case 48: // y = ThreeLevelX(w,x) (curve fitting function). 181 return(( long)ThreeLevelX); // This function is called using the direct method.181 return((XOPIORecResult)ThreeLevelX); // This function is called using the direct method. 182 182 break; 183 183 case 49: // y = FourLevelX(w,x) (curve fitting function). 184 return(( long)FourLevelX); // This function is called using the direct method.184 return((XOPIORecResult)FourLevelX); // This function is called using the direct method. 185 185 break; 186 186 // … … 188 188 // 189 189 case 50: // y = HardSphereStructX(w,x) (curve fitting function). 190 return(( long)HardSphereStructX); // This function is called using the direct method.190 return((XOPIORecResult)HardSphereStructX); // This function is called using the direct method. 191 191 break; 192 192 case 51: // y = SquareWellStructX(w,x) (curve fitting function). 193 return(( long)SquareWellStructX); // This function is called using the direct method.193 return((XOPIORecResult)SquareWellStructX); // This function is called using the direct method. 194 194 break; 195 195 case 52: // y = StickyHS_StructX(w,x) (curve fitting function). 196 return(( long)StickyHS_StructX); // This function is called using the direct method.196 return((XOPIORecResult)StickyHS_StructX); // This function is called using the direct method. 197 197 break; 198 198 case 53: // y = HayterPenfoldMSAX(w,x) (curve fitting function). 199 return(( long)HayterPenfoldMSAX); // This function is called using the direct method.199 return((XOPIORecResult)HayterPenfoldMSAX); // This function is called using the direct method. 200 200 break; 201 201 case 54: // y = DiamCylX(a,b) (utility). 202 return(( long)DiamCylX); // This function is called using the direct method.202 return((XOPIORecResult)DiamCylX); // This function is called using the direct method. 203 203 break; 204 204 case 55: // y = DiamEllipX(a,b) (utility). 205 return(( long)DiamEllipX); // This function is called using the direct method.205 return((XOPIORecResult)DiamEllipX); // This function is called using the direct method. 206 206 break; 207 207 // 208 208 // Resolution Smearing Functions 209 209 case 56: // y = Smear_Model_20_X (utility). 210 return(( long)Smear_Model_20_X); // This function is called using the direct method.210 return((XOPIORecResult)Smear_Model_20_X); // This function is called using the direct method. 211 211 break; 212 212 case 57: // y =Smear_Model_76_X (utility). 213 return(( long)Smear_Model_76_X); // This function is called using the direct method.213 return((XOPIORecResult)Smear_Model_76_X); // This function is called using the direct method. 214 214 break; 215 215 case 58: // y =Smear_Model_76_X (utility). 216 return(( long)SmearedCyl_PolyRadiusX); // This function is called using the direct method.216 return((XOPIORecResult)SmearedCyl_PolyRadiusX); // This function is called using the direct method. 217 217 break; 218 218 // 2D Functions from DANSE 219 219 case 59: // y = f(c,y,x) 220 return(( long)Cylinder_2D); // This function is called using the direct method.220 return((XOPIORecResult)Cylinder_2D); // This function is called using the direct method. 221 221 break; 222 222 case 60: // y = f(c,y,x) 223 return(( long)Cylinder_2D_Weight2D); // This function is called using the direct method.223 return((XOPIORecResult)Cylinder_2D_Weight2D); // This function is called using the direct method. 224 224 break; 225 225 case 61: // y = f(c,y,x) 226 return(( long)CoreShellCylinder_2D); // This function is called using the direct method.226 return((XOPIORecResult)CoreShellCylinder_2D); // This function is called using the direct method. 227 227 break; 228 228 case 62: // y = f(c,y,x) 229 return(( long)CoreShellCylinder_2D_Weight2D); // This function is called using the direct method.229 return((XOPIORecResult)CoreShellCylinder_2D_Weight2D); // This function is called using the direct method. 230 230 break; 231 231 case 63: // y = f(c,y,x) 232 return(( long)Ellipsoid_2D); // This function is called using the direct method.232 return((XOPIORecResult)Ellipsoid_2D); // This function is called using the direct method. 233 233 break; 234 234 case 64: // y = f(c,y,x) 235 return(( long)Ellipsoid_2D_Weight2D); // This function is called using the direct method.235 return((XOPIORecResult)Ellipsoid_2D_Weight2D); // This function is called using the direct method. 236 236 break; 237 237 case 65: // y = f(c,y,x) 238 return(( long)EllipticalCylinder_2D); // This function is called using the direct method.238 return((XOPIORecResult)EllipticalCylinder_2D); // This function is called using the direct method. 239 239 break; 240 240 case 66: // y = f(c,y,x) 241 return(( long)EllipticalCylinder_2D_Weight2D); // This function is called using the direct method.241 return((XOPIORecResult)EllipticalCylinder_2D_Weight2D); // This function is called using the direct method. 242 242 break; 243 243 case 67: // y = f(c,y,x) 244 return(( long)Sphere_2D); // This function is called using the direct method.244 return((XOPIORecResult)Sphere_2D); // This function is called using the direct method. 245 245 break; 246 246 /// new models added in 2008 247 247 case 68: // y = f(c,y,x) 248 return(( long)SpherocylinderX); // This function is called using the direct method.248 return((XOPIORecResult)SpherocylinderX); // This function is called using the direct method. 249 249 break; 250 250 case 69: // y = f(c,y,x) 251 return(( long)ConvexLensX); // This function is called using the direct method.251 return((XOPIORecResult)ConvexLensX); // This function is called using the direct method. 252 252 break; 253 253 case 70: // y = f(c,y,x) 254 return(( long)DumbbellX); // This function is called using the direct method.254 return((XOPIORecResult)DumbbellX); // This function is called using the direct method. 255 255 break; 256 256 case 71: // y = f(c,y,x) 257 return(( long)CappedCylinderX); // This function is called using the direct method.257 return((XOPIORecResult)CappedCylinderX); // This function is called using the direct method. 258 258 break; 259 259 case 72: // y = f(c,y,x) 260 return(( long)BarbellX); // This function is called using the direct method.260 return((XOPIORecResult)BarbellX); // This function is called using the direct method. 261 261 break; 262 262 case 73: // y = f(c,y,x) 263 return(( long)Lamellar_ParaCrystalX); // This function is called using the direct method.263 return((XOPIORecResult)Lamellar_ParaCrystalX); // This function is called using the direct method. 264 264 break; 265 265 // 266 266 case 74: // y = f(c,y,x) 267 return(( long)BCC_ParaCrystalX); // This function is called using the direct method.267 return((XOPIORecResult)BCC_ParaCrystalX); // This function is called using the direct method. 268 268 break; 269 269 case 75: // y = f(c,y,x) 270 return(( long)FCC_ParaCrystalX); // This function is called using the direct method.270 return((XOPIORecResult)FCC_ParaCrystalX); // This function is called using the direct method. 271 271 break; 272 272 case 76: // y = f(c,y,x) 273 return(( long)SC_ParaCrystalX); // This function is called using the direct method.273 return((XOPIORecResult)SC_ParaCrystalX); // This function is called using the direct method. 274 274 break; 275 275 case 77: // y = f(c,y,x) 276 return(( long)OneShellX); // This function is called using the direct method.276 return((XOPIORecResult)OneShellX); // This function is called using the direct method. 277 277 break; 278 278 case 78: // y = f(c,y,x) 279 return(( long)TwoShellX); // This function is called using the direct method.279 return((XOPIORecResult)TwoShellX); // This function is called using the direct method. 280 280 break; 281 281 case 79: // y = f(c,y,x) 282 return(( long)ThreeShellX); // This function is called using the direct method.282 return((XOPIORecResult)ThreeShellX); // This function is called using the direct method. 283 283 break; 284 284 case 80: // y = f(c,y,x) 285 return(( long)FourShellX); // This function is called using the direct method.285 return((XOPIORecResult)FourShellX); // This function is called using the direct method. 286 286 break; 287 287 case 81: // y = f(c,y,x) 288 return(( long)PolyOneShellX); // This function is called using the direct method.288 return((XOPIORecResult)PolyOneShellX); // This function is called using the direct method. 289 289 break; 290 290 case 82: // y = f(c,y,x) 291 return(( long)PolyTwoShellX); // This function is called using the direct method.291 return((XOPIORecResult)PolyTwoShellX); // This function is called using the direct method. 292 292 break; 293 293 case 83: // y = f(c,y,x) 294 return(( long)PolyThreeShellX); // This function is called using the direct method.294 return((XOPIORecResult)PolyThreeShellX); // This function is called using the direct method. 295 295 break; 296 296 case 84: // y = f(c,y,x) 297 return(( long)PolyFourShellX); // This function is called using the direct method.297 return((XOPIORecResult)PolyFourShellX); // This function is called using the direct method. 298 298 break; 299 299 // 300 300 case 85: // y = f(c,y,x) 301 return(( long)BroadPeakX); // This function is called using the direct method.301 return((XOPIORecResult)BroadPeakX); // This function is called using the direct method. 302 302 break; 303 303 case 86: // y = f(c,y,x) 304 return(( long)CorrLengthX); // This function is called using the direct method.304 return((XOPIORecResult)CorrLengthX); // This function is called using the direct method. 305 305 break; 306 306 case 87: // y = f(c,y,x) 307 return(( long)TwoLorentzianX); // This function is called using the direct method.307 return((XOPIORecResult)TwoLorentzianX); // This function is called using the direct method. 308 308 break; 309 309 case 88: // y = f(c,y,x) 310 return(( long)TwoPowerLawX); // This function is called using the direct method.310 return((XOPIORecResult)TwoPowerLawX); // This function is called using the direct method. 311 311 break; 312 312 case 89: // y = f(c,y,x) 313 return(( long)PolyGaussCoilX); // This function is called using the direct method.313 return((XOPIORecResult)PolyGaussCoilX); // This function is called using the direct method. 314 314 break; 315 315 case 90: // y = f(c,y,x) 316 return(( long)GaussLorentzGelX); // This function is called using the direct method.316 return((XOPIORecResult)GaussLorentzGelX); // This function is called using the direct method. 317 317 break; 318 318 case 91: // y = f(c,y,x) 319 return(( long)GaussianShellX); // This function is called using the direct method.319 return((XOPIORecResult)GaussianShellX); // This function is called using the direct method. 320 320 break; 321 321 case 92: // y = f(c,y,x) 322 return(( long)FuzzySpheresX); // This function is called using the direct method.322 return((XOPIORecResult)FuzzySpheresX); // This function is called using the direct method. 323 323 break; 324 324 case 93: // y = f(c,y,x) 325 return(( long)PolyCoreBicelleX); // This function is called using the direct method.325 return((XOPIORecResult)PolyCoreBicelleX); // This function is called using the direct method. 326 326 break; 327 327 case 94: // y = f(c,y,x) 328 return(( long)CSParallelepipedX); // This function is called using the direct method.328 return((XOPIORecResult)CSParallelepipedX); // This function is called using the direct method. 329 329 break; 330 330 case 95: //One Yukawa 331 return(( long)OneYukawaX); // This function is called using the direct method.331 return((XOPIORecResult)OneYukawaX); // This function is called using the direct method. 332 332 break; 333 333 case 96: // Two Yukawa 334 return(( long)TwoYukawaX); // This function is called using the direct method.334 return((XOPIORecResult)TwoYukawaX); // This function is called using the direct method. 335 335 break; 336 336 } 337 return NIL;337 return 0; 338 338 } 339 339 … … 346 346 XOPEntry(void) 347 347 { 348 longresult = 0;348 XOPIORecResult result = 0; 349 349 350 350 switch (GetXOPMessage()) { … … 366 366 */ 367 367 HOST_IMPORT int // was void 368 main(IORecHandle ioRecHandle)368 XOPMain(IORecHandle ioRecHandle) 369 369 { 370 370 XOPInit(ioRecHandle); // Do standard XOP initialization. 371 371 SetXOPEntry(XOPEntry); // Set entry point for future calls. 372 372 373 if (igorVersion < 6 00) { // checks required for ThreadSafe declarations374 SetXOPResult( IGOR_OBSOLETE);373 if (igorVersion < 620) { // checks required for ThreadSafe declarations 374 SetXOPResult(OLD_IGOR); 375 375 return EXIT_FAILURE; // added for TK6 376 376 } -
sans/XOP_Dev/SANSAnalysis/XOP/SANSAnalysis.h
r834 r998 6 6 /* Prototypes */ 7 7 // for TK6 8 HOST_IMPORT int main(IORecHandle ioRecHandle);8 HOST_IMPORT int XOPMain(IORecHandle ioRecHandle); 9 9 10 10 // Custom error codes 11 //#define REQUIRES_IGOR_2001 + FIRST_XOP_ERR11 #define OLD_IGOR 1 + FIRST_XOP_ERR 12 12 #define NON_EXISTENT_WAVE 2 + FIRST_XOP_ERR 13 13 #define REQUIRES_SP_OR_DP_WAVE 3 + FIRST_XOP_ERR -
sans/XOP_Dev/SANSAnalysis/XOP/SANSAnalysis.r
r756 r998 6 6 7 7 resource 'vers' (1) { /* XOP version info */ 8 0x01, 0x02, final, 0x00, 0, /* version bytes and country integer */9 "1.1",10 "1.1, NIST Center for Neutron Research"8 0x01, 0x02, final, 0x00, 0, /* version bytes and country integer */ 9 "1.1", 10 "1.1, NIST Center for Neutron Research" 11 11 }; 12 12 13 13 resource 'vers' (2) { /* Igor version info */ 14 0x02, 0x00, release, 0x00, 0, /* version bytes and country integer */15 "6.00",16 "(for Igor 6.00 or later)"14 0x06, 0x20, release, 0x00, 0, /* version bytes and country integer */ 15 "6.20", 16 "(for Igor 6.20 or later)" 17 17 }; 18 18 … … 20 20 { 21 21 /* [1] */ 22 "SANS Analysis requires Igor Pro 6. 0or later",22 "SANS Analysis requires Igor Pro 6.2 or later", 23 23 /* [2] */ 24 24 "Wave does not exist.", -
sans/XOP_Dev/SANSAnalysis/XOP/StructureFactor.c
r834 r998 197 197 double *qw; //pointer to q wave 198 198 double *cw; //pointer to coef wave 199 longnpnts,i; //number of points in waves199 CountInt npnts,i; //number of points in waves 200 200 201 201 … … 224 224 qw = (double*)WaveData(p->QHandle); 225 225 cw = (double*)WaveData(p->CoefHandle); 226 npnts = WavePoints(p->QHandle); // Number of points in q wave.226 npnts = (CountInt)WavePoints(p->QHandle); // Number of points in q wave. 227 227 228 228 phi = cw[0]; … … 283 283 double *qw; //pointer to q wave 284 284 double *cw; //pointer to coef wave 285 longnpnts,i; //number of points in waves285 CountInt npnts,i; //number of points in waves 286 286 287 287 … … 310 310 qw = (double*)WaveData(p->QHandle); 311 311 cw = (double*)WaveData(p->CoefHandle); 312 npnts = WavePoints(p->QHandle); // Number of points in q wave.312 npnts = (CountInt)WavePoints(p->QHandle); // Number of points in q wave. 313 313 314 314 phi = cw[0]; -
sans/XOP_Dev/SANSAnalysis/lib/2Y_PairCorrelation.c
r761 r998 112 112 { 113 113 double* data = malloc( sizeof(double) * N * 2); 114 int n ,error,k;114 int nn,error,k; 115 115 double alpha,real,imag; 116 116 double Pi = 3.14159265358979323846264338327950288; /* pi */ 117 117 118 118 119 for ( n = 0; n < N;n++ ) {120 data[2*n ] = n * ( Sq[n] - 1 );121 data[2*n +1] = 0;119 for ( nn = 0; nn < N; nn++ ) { 120 data[2*nn] = nn * ( Sq[nn] - 1 ); 121 data[2*nn+1] = 0; 122 122 } 123 123 // printf("start of new fft\n");
Note: See TracChangeset
for help on using the changeset viewer.