Changeset 13eb1c4 in sasview for sansmodels/src/sans


Ignore:
Timestamp:
Apr 15, 2010 6:41:29 PM (15 years ago)
Author:
Jae Cho <jhjcho@…>
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:
8426622
Parents:
2339249f
Message:

updated sld parameters according to the changes in NIST lib: missed it in the last commit

Location:
sansmodels/src/sans/models
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/TriaxialEllipsoidModel.py

    rf9a1279 r13eb1c4  
    3636         semi_axisB      = 100.0 [A] 
    3737         semi_axisC      = 400.0 [A] 
    38          contrast        = 5.3e-006 [1/A^(2)] 
     38         sldEll          = 1e-006 [1/A^(2)] 
     39         sldSolv         = 6.3e-006 [1/A^(2)] 
    3940         background      = 0.0 [1/cm] 
    4041         axis_theta      = 1.0 [rad] 
     
    6465        self.details['semi_axisB'] = ['[A]', None, None] 
    6566        self.details['semi_axisC'] = ['[A]', None, None] 
    66         self.details['contrast'] = ['[1/A^(2)]', None, None] 
     67        self.details['sldEll'] = ['[1/A^(2)]', None, None] 
     68        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    6769        self.details['background'] = ['[1/cm]', None, None] 
    6870        self.details['axis_theta'] = ['[rad]', None, None] 
  • sansmodels/src/sans/models/c_extensions/triaxial_ellipsoid.c

    r3c102d4 r13eb1c4  
    1818 */ 
    1919double triaxial_ellipsoid_analytical_1D(TriaxialEllipsoidParameters *pars, double q) { 
    20         double dp[6]; 
     20        double dp[7]; 
    2121 
    2222        // Fill paramater array 
     
    2525        dp[2] = pars->semi_axisB; 
    2626        dp[3] = pars->semi_axisC; 
    27         dp[4] = pars->contrast; 
    28         dp[5] = pars->background; 
     27        dp[4] = pars->sldEll; 
     28        dp[5] = pars->sldSolv; 
     29        dp[6] = pars->background; 
    2930 
    3031        // Call library function to evaluate model 
     
    133134 
    134135        // Multiply by contrast^2 
    135         answer *= pars->contrast*pars->contrast; 
     136        answer *= (pars->sldEll- pars->sldSolv)*(pars->sldEll- pars->sldSolv); 
    136137 
    137138        //normalize by cylinder volume 
  • sansmodels/src/sans/models/c_extensions/triaxial_ellipsoid.h

    r27972c1d r13eb1c4  
    2424    //  [DEFAULT]=semi_axisC=400.0 [A] 
    2525    double semi_axisC; 
    26     /// Contrast [1/A^(2)] 
    27     //  [DEFAULT]=contrast=5.3e-6 [1/A^(2)] 
    28     double contrast; 
     26    /// sldEll [1/A^(2)] 
     27    //  [DEFAULT]=sldEll=1.0e-6 [1/A^(2)] 
     28    double sldEll; 
     29    /// sldSolv [1/A^(2)] 
     30    //  [DEFAULT]=sldSolv=6.3e-6 [1/A^(2)] 
     31    double sldSolv; 
    2932        /// Incoherent Background [1/cm] 0.00 
    3033        //  [DEFAULT]=background=0.0 [1/cm] 
  • sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp

    rc724ccd r13eb1c4  
    9797        PyDict_SetItemString(self->params,"semi_axisC",Py_BuildValue("d",400.00000000)); 
    9898        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",1.00000000)); 
     99        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.00000630)); 
    99100        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.00000000)); 
    100         PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.00000530)); 
     101        PyDict_SetItemString(self->params,"sldEll",Py_BuildValue("d",0.00000100)); 
    101102        // Initialize dispersion / averaging parameter dict 
    102103        DispersionVisitor* visitor = new DispersionVisitor(); 
     
    247248    self->model->semi_axisC = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisC") ); 
    248249    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     250    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    249251    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    250     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     252    self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 
    251253    // Read in dispersion parameters 
    252254    PyObject* disp_dict; 
     
    327329    self->model->semi_axisC = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisC") ); 
    328330    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     331    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    329332    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    330     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     333    self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 
    331334    // Read in dispersion parameters 
    332335    PyObject* disp_dict; 
     
    394397    self->model->semi_axisC = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisC") ); 
    395398    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     399    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    396400    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    397     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     401    self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 
    398402    // Read in dispersion parameters 
    399403    PyObject* disp_dict; 
     
    430434    self->model->semi_axisC = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisC") ); 
    431435    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     436    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    432437    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    433     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     438    self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 
    434439    // Read in dispersion parameters 
    435440    PyObject* disp_dict; 
  • sansmodels/src/sans/models/c_models/models.hh

    r261b864 r13eb1c4  
    342342        Parameter semi_axisB; 
    343343        Parameter semi_axisC; 
    344         Parameter contrast; 
     344        Parameter sldEll; 
     345        Parameter sldSolv; 
    345346        Parameter background; 
    346347        Parameter axis_theta; 
  • sansmodels/src/sans/models/c_models/triaxialellipsoid.cpp

    rc451be9 r13eb1c4  
    4141        semi_axisC  = Parameter(400.0, true); 
    4242        semi_axisC.set_min(0.0); 
    43         contrast   = Parameter(5.3e-6); 
     43        sldEll   = Parameter(1.0e-6); 
     44        sldSolv   = Parameter(6.3e-6); 
    4445        background = Parameter(0.0); 
    4546        axis_theta  = Parameter(1.0, true); 
     
    5556 */ 
    5657double TriaxialEllipsoidModel :: operator()(double q) { 
    57         double dp[6]; 
     58        double dp[7]; 
    5859 
    5960        // Fill parameter array for IGOR library 
     
    6364        dp[2] = semi_axisB(); 
    6465        dp[3] = semi_axisC(); 
    65         dp[4] = contrast(); 
    66         dp[5] = 0.0; 
     66        dp[4] = sldEll(); 
     67        dp[5] = sldSolv(); 
     68        dp[6] = 0.0; 
    6769 
    6870        // Get the dispersion points for the semi axis A 
     
    128130        dp.semi_axisB     = semi_axisB(); 
    129131        dp.semi_axisC     = semi_axisC(); 
    130         dp.contrast   = contrast(); 
     132        dp.sldEll   = sldEll(); 
     133        dp.sldSolv   = sldSolv(); 
    131134        dp.background = 0.0; 
    132135        dp.axis_theta  = axis_theta(); 
Note: See TracChangeset for help on using the changeset viewer.