Changeset fbd09fa0 in sasview for sansmodels/src/sans/models


Ignore:
Timestamp:
Oct 12, 2010 6:33:14 PM (14 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:
4cc8285c
Parents:
20f00bed
Message:

added missing models

Location:
sansmodels/src/sans/models/c_models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_models/COnionModel.cpp

    r35aface rfbd09fa0  
    9494        PyDict_SetItemString(self->params,"thick_shell9",Py_BuildValue("d",50.000000000000)); 
    9595        PyDict_SetItemString(self->params,"thick_shell7",Py_BuildValue("d",50.000000000000)); 
     96        PyDict_SetItemString(self->params,"sld_core0",Py_BuildValue("d",0.000001000000)); 
     97        PyDict_SetItemString(self->params,"rad_core0",Py_BuildValue("d",200.000000000000)); 
    9698        PyDict_SetItemString(self->params,"A_shell10",Py_BuildValue("d",1.000000000000)); 
    9799        PyDict_SetItemString(self->params,"thick_shell1",Py_BuildValue("d",50.000000000000)); 
     
    103105        PyDict_SetItemString(self->params,"thick_shell10",Py_BuildValue("d",50.000000000000)); 
    104106        PyDict_SetItemString(self->params,"func_shell3",Py_BuildValue("d",2.000000000000)); 
    105         PyDict_SetItemString(self->params,"rad_core",Py_BuildValue("d",200.000000000000)); 
    106         PyDict_SetItemString(self->params,"thick_shell3",Py_BuildValue("d",50.000000000000)); 
    107107        PyDict_SetItemString(self->params,"func_shell8",Py_BuildValue("d",2.000000000000)); 
    108108        PyDict_SetItemString(self->params,"func_shell9",Py_BuildValue("d",2.000000000000)); 
     
    118118        PyDict_SetItemString(self->params,"sld_in_shell8",Py_BuildValue("d",0.000005200000)); 
    119119        PyDict_SetItemString(self->params,"thick_shell2",Py_BuildValue("d",50.000000000000)); 
    120         PyDict_SetItemString(self->params,"sld_core",Py_BuildValue("d",0.000001000000)); 
     120        PyDict_SetItemString(self->params,"thick_shell3",Py_BuildValue("d",50.000000000000)); 
    121121        PyDict_SetItemString(self->params,"sld_out_shell1",Py_BuildValue("d",0.000002000000)); 
    122         PyDict_SetItemString(self->params,"sld_in_shell1",Py_BuildValue("d",0.000001700000)); 
     122        PyDict_SetItemString(self->params,"sld_out_shell5",Py_BuildValue("d",0.000004000000)); 
    123123        PyDict_SetItemString(self->params,"sld_out_shell3",Py_BuildValue("d",0.000003000000)); 
    124124        PyDict_SetItemString(self->params,"sld_in_shell6",Py_BuildValue("d",0.000004200000)); 
    125         PyDict_SetItemString(self->params,"sld_out_shell5",Py_BuildValue("d",0.000004000000)); 
     125        PyDict_SetItemString(self->params,"sld_in_shell1",Py_BuildValue("d",0.000001700000)); 
    126126        PyDict_SetItemString(self->params,"sld_out_shell4",Py_BuildValue("d",0.000003500000)); 
    127127        PyDict_SetItemString(self->params,"sld_in_shell3",Py_BuildValue("d",0.000002700000)); 
     
    150150        PyObject * disp_dict; 
    151151        disp_dict = PyDict_New(); 
    152         self->model->rad_core.dispersion->accept_as_source(visitor, self->model->rad_core.dispersion, disp_dict); 
    153         PyDict_SetItemString(self->dispersion, "rad_core", disp_dict); 
     152        self->model->rad_core0.dispersion->accept_as_source(visitor, self->model->rad_core0.dispersion, disp_dict); 
     153        PyDict_SetItemString(self->dispersion, "rad_core0", disp_dict); 
    154154        disp_dict = PyDict_New(); 
    155155        self->model->thick_shell1.dispersion->accept_as_source(visitor, self->model->thick_shell1.dispersion, disp_dict); 
     
    315315    self->model->thick_shell9 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell9") ); 
    316316    self->model->thick_shell7 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell7") ); 
     317    self->model->sld_core0 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core0") ); 
     318    self->model->rad_core0 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "rad_core0") ); 
    317319    self->model->A_shell10 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "A_shell10") ); 
    318320    self->model->thick_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell1") ); 
     
    324326    self->model->thick_shell10 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell10") ); 
    325327    self->model->func_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell3") ); 
    326     self->model->rad_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "rad_core") ); 
    327     self->model->thick_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell3") ); 
    328328    self->model->func_shell8 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell8") ); 
    329329    self->model->func_shell9 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell9") ); 
     
    339339    self->model->sld_in_shell8 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell8") ); 
    340340    self->model->thick_shell2 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell2") ); 
    341     self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 
     341    self->model->thick_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell3") ); 
    342342    self->model->sld_out_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell1") ); 
    343     self->model->sld_in_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell1") ); 
     343    self->model->sld_out_shell5 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell5") ); 
    344344    self->model->sld_out_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell3") ); 
    345345    self->model->sld_in_shell6 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell6") ); 
    346     self->model->sld_out_shell5 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell5") ); 
     346    self->model->sld_in_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell1") ); 
    347347    self->model->sld_out_shell4 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell4") ); 
    348348    self->model->sld_in_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell3") ); 
     
    370370    PyObject* disp_dict; 
    371371    DispersionVisitor* visitor = new DispersionVisitor(); 
    372     disp_dict = PyDict_GetItemString(self->dispersion, "rad_core"); 
    373     self->model->rad_core.dispersion->accept_as_destination(visitor, self->model->rad_core.dispersion, disp_dict); 
     372    disp_dict = PyDict_GetItemString(self->dispersion, "rad_core0"); 
     373    self->model->rad_core0.dispersion->accept_as_destination(visitor, self->model->rad_core0.dispersion, disp_dict); 
    374374    disp_dict = PyDict_GetItemString(self->dispersion, "thick_shell1"); 
    375375    self->model->thick_shell1.dispersion->accept_as_destination(visitor, self->model->thick_shell1.dispersion, disp_dict); 
     
    458458    self->model->thick_shell9 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell9") ); 
    459459    self->model->thick_shell7 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell7") ); 
     460    self->model->sld_core0 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core0") ); 
     461    self->model->rad_core0 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "rad_core0") ); 
    460462    self->model->A_shell10 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "A_shell10") ); 
    461463    self->model->thick_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell1") ); 
     
    467469    self->model->thick_shell10 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell10") ); 
    468470    self->model->func_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell3") ); 
    469     self->model->rad_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "rad_core") ); 
    470     self->model->thick_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell3") ); 
    471471    self->model->func_shell8 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell8") ); 
    472472    self->model->func_shell9 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell9") ); 
     
    482482    self->model->sld_in_shell8 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell8") ); 
    483483    self->model->thick_shell2 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell2") ); 
    484     self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 
     484    self->model->thick_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell3") ); 
    485485    self->model->sld_out_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell1") ); 
    486     self->model->sld_in_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell1") ); 
     486    self->model->sld_out_shell5 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell5") ); 
    487487    self->model->sld_out_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell3") ); 
    488488    self->model->sld_in_shell6 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell6") ); 
    489     self->model->sld_out_shell5 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell5") ); 
     489    self->model->sld_in_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell1") ); 
    490490    self->model->sld_out_shell4 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell4") ); 
    491491    self->model->sld_in_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell3") ); 
     
    513513    PyObject* disp_dict; 
    514514    DispersionVisitor* visitor = new DispersionVisitor(); 
    515     disp_dict = PyDict_GetItemString(self->dispersion, "rad_core"); 
    516     self->model->rad_core.dispersion->accept_as_destination(visitor, self->model->rad_core.dispersion, disp_dict); 
     515    disp_dict = PyDict_GetItemString(self->dispersion, "rad_core0"); 
     516    self->model->rad_core0.dispersion->accept_as_destination(visitor, self->model->rad_core0.dispersion, disp_dict); 
    517517    disp_dict = PyDict_GetItemString(self->dispersion, "thick_shell1"); 
    518518    self->model->thick_shell1.dispersion->accept_as_destination(visitor, self->model->thick_shell1.dispersion, disp_dict); 
     
    588588    self->model->thick_shell9 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell9") ); 
    589589    self->model->thick_shell7 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell7") ); 
     590    self->model->sld_core0 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core0") ); 
     591    self->model->rad_core0 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "rad_core0") ); 
    590592    self->model->A_shell10 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "A_shell10") ); 
    591593    self->model->thick_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell1") ); 
     
    597599    self->model->thick_shell10 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell10") ); 
    598600    self->model->func_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell3") ); 
    599     self->model->rad_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "rad_core") ); 
    600     self->model->thick_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell3") ); 
    601601    self->model->func_shell8 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell8") ); 
    602602    self->model->func_shell9 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell9") ); 
     
    612612    self->model->sld_in_shell8 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell8") ); 
    613613    self->model->thick_shell2 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell2") ); 
    614     self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 
     614    self->model->thick_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell3") ); 
    615615    self->model->sld_out_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell1") ); 
    616     self->model->sld_in_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell1") ); 
     616    self->model->sld_out_shell5 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell5") ); 
    617617    self->model->sld_out_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell3") ); 
    618618    self->model->sld_in_shell6 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell6") ); 
    619     self->model->sld_out_shell5 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell5") ); 
     619    self->model->sld_in_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell1") ); 
    620620    self->model->sld_out_shell4 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell4") ); 
    621621    self->model->sld_in_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell3") ); 
     
    643643    PyObject* disp_dict; 
    644644    DispersionVisitor* visitor = new DispersionVisitor(); 
    645     disp_dict = PyDict_GetItemString(self->dispersion, "rad_core"); 
    646     self->model->rad_core.dispersion->accept_as_destination(visitor, self->model->rad_core.dispersion, disp_dict); 
     645    disp_dict = PyDict_GetItemString(self->dispersion, "rad_core0"); 
     646    self->model->rad_core0.dispersion->accept_as_destination(visitor, self->model->rad_core0.dispersion, disp_dict); 
    647647    disp_dict = PyDict_GetItemString(self->dispersion, "thick_shell1"); 
    648648    self->model->thick_shell1.dispersion->accept_as_destination(visitor, self->model->thick_shell1.dispersion, disp_dict); 
     
    687687    self->model->thick_shell9 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell9") ); 
    688688    self->model->thick_shell7 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell7") ); 
     689    self->model->sld_core0 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core0") ); 
     690    self->model->rad_core0 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "rad_core0") ); 
    689691    self->model->A_shell10 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "A_shell10") ); 
    690692    self->model->thick_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell1") ); 
     
    696698    self->model->thick_shell10 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell10") ); 
    697699    self->model->func_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell3") ); 
    698     self->model->rad_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "rad_core") ); 
    699     self->model->thick_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell3") ); 
    700700    self->model->func_shell8 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell8") ); 
    701701    self->model->func_shell9 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "func_shell9") ); 
     
    711711    self->model->sld_in_shell8 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell8") ); 
    712712    self->model->thick_shell2 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell2") ); 
    713     self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 
     713    self->model->thick_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "thick_shell3") ); 
    714714    self->model->sld_out_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell1") ); 
    715     self->model->sld_in_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell1") ); 
     715    self->model->sld_out_shell5 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell5") ); 
    716716    self->model->sld_out_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell3") ); 
    717717    self->model->sld_in_shell6 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell6") ); 
    718     self->model->sld_out_shell5 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell5") ); 
     718    self->model->sld_in_shell1 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell1") ); 
    719719    self->model->sld_out_shell4 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_out_shell4") ); 
    720720    self->model->sld_in_shell3 = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_in_shell3") ); 
     
    742742    PyObject* disp_dict; 
    743743    DispersionVisitor* visitor = new DispersionVisitor(); 
    744     disp_dict = PyDict_GetItemString(self->dispersion, "rad_core"); 
    745     self->model->rad_core.dispersion->accept_as_destination(visitor, self->model->rad_core.dispersion, disp_dict); 
     744    disp_dict = PyDict_GetItemString(self->dispersion, "rad_core0"); 
     745    self->model->rad_core0.dispersion->accept_as_destination(visitor, self->model->rad_core0.dispersion, disp_dict); 
    746746    disp_dict = PyDict_GetItemString(self->dispersion, "thick_shell1"); 
    747747    self->model->thick_shell1.dispersion->accept_as_destination(visitor, self->model->thick_shell1.dispersion, disp_dict); 
     
    819819        // Ugliness necessary to go from python to C 
    820820            // TODO: refactor this 
    821     if (!strcmp(par_name, "rad_core")) { 
    822         self->model->rad_core.dispersion = dispersion; 
     821    if (!strcmp(par_name, "rad_core0")) { 
     822        self->model->rad_core0.dispersion = dispersion; 
    823823    } else    if (!strcmp(par_name, "thick_shell1")) { 
    824824        self->model->thick_shell1.dispersion = dispersion; 
  • sansmodels/src/sans/models/c_models/c_models.cpp

    raaad3098 rfbd09fa0  
    1212 
    1313void addCCylinderModel(PyObject *module); 
     14void addCBarBellModel(PyObject *module); 
     15void addCCappedCylinderModel(PyObject *module); 
    1416void addCTriaxialEllipsoidModel(PyObject *module); 
    1517void addCParallelepipedModel(PyObject *module); 
     
    3638void addCLamellarPSModel(PyObject *module); 
    3739void addCLamellarPSHGModel(PyObject *module); 
    38 //void addCLamellarPCrystalModel(PyObject *module); 
     40void addCLamellarPCrystalModel(PyObject *module); 
    3941void addCCoreShellEllipsoidModel(PyObject *module); 
    4042void addCDiamEllipFunc(PyObject *module); 
     
    222224 
    223225        addCCylinderModel(m); 
     226        addCBarBellModel(m); 
     227        addCCappedCylinderModel(m); 
    224228        addCParallelepipedModel(m); 
    225229        addCCoreShellCylinderModel(m); 
     
    245249        addCLamellarPSModel(m); 
    246250        addCLamellarPSHGModel(m); 
    247         //addCLamellarPCrystalModel(m); 
     251        addCLamellarPCrystalModel(m); 
    248252        addCCoreShellEllipsoidModel(m); 
    249253        addCDiamEllipFunc(m); 
Note: See TracChangeset for help on using the changeset viewer.