Changeset 7b0dd55 in sasview for sansmodels
- Timestamp:
- Aug 28, 2009 12:26:40 PM (15 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 25baf31
- Parents:
- a50ef5e
- Location:
- sansmodels/src/libigor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/libigor/libStructureFactor.c
rff85cc5 r7b0dd55 1 /* SimpleFit.c1 /* SimpleFit.c 2 2 3 3 A simplified project designed to act as a template for your curve fitting function. … … 7 7 #include "StandardHeaders.h" // Include ANSI headers, Mac headers, IgorXOP.h, XOP.h and XOPSupport.h 8 8 #include "libStructureFactor.h" 9 10 11 9 //Hard Sphere Structure Factor 12 10 // … … 188 186 QQ= q; 189 187 190 diam=dp[0]; //in �188 diam=dp[0]; //in dp[0] coming from python is radius : cahnged on Mar. 30, 2009 191 189 zz = dp[1]; //# of charges 192 190 VolFrac=dp[2]; … … 651 649 652 650 // called as DiamCyl(hcyl,rcyl) 651 //modified from Igor NIST package XOP 653 652 double 654 653 DiamCyl(double hcyl, double rcyl) 655 654 { 656 657 655 double diam,a,b,t1,t2,ddd; 658 656 double pi; 659 657 660 658 pi = 4.0*atan(1.0); 661 659 if (rcyl == 0 || hcyl == 0) { 660 return 0.0; 661 } 662 662 a = rcyl; 663 663 b = hcyl/2.0; … … 677 677 //returns DIAMETER 678 678 // called as DiamEllip(aa,bb) 679 680 //modified from Igor NIST package XOP 679 681 double 680 682 DiamEllip(double aa, double bb) 681 683 { 682 683 684 double ee,e1,bd,b1,bL,b2,del,ddd,diam; 684 685 686 if (aa == 0 || bb == 0) { 687 return 0.0; 688 } 689 if (aa == bb) { 690 return aa; 691 } 685 692 if(aa>bb) { 686 693 ee = (aa*aa - bb*bb)/(aa*aa); -
sansmodels/src/libigor/libStructureFactor.h
ra50ef5e r7b0dd55 6 6 double StickyHS_Struct(double dp[], double q); 7 7 double HayterPenfoldMSA(double dp[], double q); 8 double DiamCyl(double a , doubleb);9 double DiamEllip(double a, double b);8 double DiamCyl(double aa, double bb); 9 double DiamEllip(double hcyl, double rcyl); 10 10 11 11 static double gMSAWave[17]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
Note: See TracChangeset
for help on using the changeset viewer.