Changeset 3275c13 in sasview for sansmodels/src
- Timestamp:
- Mar 31, 2009 5:52:28 PM (16 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:
- be28027
- Parents:
- db1dcef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/libigor/libStructureFactor.c
r87b0d78 r3275c13 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 // … … 650 648 } 651 649 652 // called as DiamCyl(hcyl,rcyl) 650 // called as DiamCyl(hcyl,rcyl) 651 //modified from Igor NIST package XOP 653 652 double 654 DiamCyl(double hcyl, double rcyl)653 DiamCyl(double dp[], double q) 655 654 { 656 655 double hcyl, rcyl; 657 656 double diam,a,b,t1,t2,ddd; 658 657 double pi; 659 658 659 rcyl = dp[0]; 660 hcyl = dp[1]; 660 661 pi = 4.0*atan(1.0); 661 662 if (rcyl == 0 || hcyl == 0) { 663 return 0.0; 664 } 662 665 a = rcyl; 663 666 b = hcyl/2.0; … … 667 670 diam = pow(ddd,(1.0/3.0)); 668 671 669 return(diam );672 return(diam/2); //return radius 670 673 } 671 674 … … 677 680 //returns DIAMETER 678 681 // called as DiamEllip(aa,bb) 682 683 //modified from Igor NIST package XOP 679 684 double 680 DiamEllip(double aa, double bb)685 DiamEllip(double dp[], double q) 681 686 { 682 687 double aa, bb; 683 688 double ee,e1,bd,b1,bL,b2,del,ddd,diam; 684 689 690 aa = dp[0]; 691 bb = dp[1]; 692 if (aa == 0 || bb == 0) { 693 return 0.0; 694 } 695 if (aa == bb) { 696 return aa; 697 } 685 698 if(aa>bb) { 686 699 ee = (aa*aa - bb*bb)/(aa*aa); … … 699 712 diam = pow(ddd,(1.0/3.0)); 700 713 701 return(diam );714 return(diam/2); //return radius 702 715 } 703 716
Note: See TracChangeset
for help on using the changeset viewer.