Changeset 112


Ignore:
Timestamp:
May 9, 2007 4:33:54 PM (15 years ago)
Author:
ajj
Message:

Added 2D Cylinder function from M Doucet to library and to XOP code.

Call in IGOR as Output = Cylinder_2D_Dist(params,Q_x[p],Q_y[q])

Call in C as dist_cylinder_2D(params,qx,qy)

Location:
sans/Analysis/branches/ajj_23APR07/XOPs/SANSAnalysis
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • sans/Analysis/branches/ajj_23APR07/XOPs/SANSAnalysis/XOP/SANSAnalysis.c

    r106 r112  
    1717#include "StructureFactor.h" 
    1818#include "ResolutionSmearing.h" 
     19#include "Func2D.h" 
    1920 
    2021static long 
     
    215216                case 58:                                                        // y =Smear_Model_76_X (utility). 
    216217                        return((long)SmearedCyl_PolyRadiusX);                   // This function is called using the direct method. 
     218                        break;   
     219                case 59:                                                        // y =Smear_Model_76_X (utility). 
     220                        return((long)Cylinder_2D_Dist);                 // This function is called using the direct method. 
    217221                        break;   
    218222        } 
  • sans/Analysis/branches/ajj_23APR07/XOPs/SANSAnalysis/XOP/SANSAnalysis.h

    r97 r112  
    1919}FitParams, *FitParamsPtr; 
    2020 
     21// Fit function parameter structure 
     22typedef struct FitParams2D { 
     23        double qy;                              // Independent variable. 
     24        double qx;                              // Independent variable. 
     25        waveHndl waveHandle;    // Coefficient wave. 
     26        double result; 
     27}FitParams2D, *FitParams2DPtr; 
    2128 
  • sans/Analysis/branches/ajj_23APR07/XOPs/SANSAnalysis/XOP/SANSAnalysis.r

    r106 r112  
    531531                }, 
    532532 
     533                "Cylinder_2D_Dist", 
     534                F_UTIL | F_EXTERNAL,                                    /* function category == UTILITY */ 
     535                NT_FP64,                                                /* return value type */                  
     536                { 
     537                        NT_FP64 + WAVE_TYPE,                            /* double precision wave (coefficient wave) */ 
     538                        NT_FP64,                                        /* double precision x */ 
     539                        NT_FP64,                                        /* double precision x */ 
     540                }, 
     541 
     542 
    533543        } 
    534544}; 
  • sans/Analysis/branches/ajj_23APR07/XOPs/SANSAnalysis/lib/libSANSAnalysis.h

    r100 r112  
    107107double FourLevel(double dp[], double q); 
    108108 
     109 
     110typedef struct { 
     111    double scale; 
     112    double radius; 
     113    double length; 
     114    double contrast; 
     115        double background;     
     116    double cyl_theta; 
     117    double cyl_phi;     
     118} CylinderParameters; 
     119 
     120typedef struct { 
     121    double scale; 
     122    double radius; 
     123    double length; 
     124    double contrast; 
     125        double background; 
     126    double cyl_theta; 
     127    double cyl_phi;  
     128    double sigma_theta; 
     129    double sigma_phi; 
     130    double sigma_radius; 
     131} SmearCylinderParameters; 
     132 
     133/// 1D scattering function 
     134double cylinder_analytical_1D(CylinderParameters *pars, double q); 
     135/// 2D scattering function 
     136double cylinder_analytical_2D(CylinderParameters *pars, double q, double phi); 
     137/// 1D scattering function 
     138double smeared_cylinder_analytical_1D(SmearCylinderParameters *pars, double q); 
     139/// 2D scattering function 
     140double dist_cylinder_2D(double pars[], double q, double phi); 
     141double smeared_cylinder_analytical_2D(SmearCylinderParameters *pars, double q, double phi); 
     142double smeared_cylinder_dist( double x, double mean, double sigma ); 
Note: See TracChangeset for help on using the changeset viewer.