Changeset e08bd5b in sasview for sansmodels/src/python_wrapper


Ignore:
Timestamp:
Feb 29, 2012 8:48:08 AM (13 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:
2d6f1f1
Parents:
6319646
Message:

c models fix: scale fix for P*S

Location:
sansmodels/src/python_wrapper
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/python_wrapper/classTemplate.txt

    re63a411 re08bd5b  
    331331} 
    332332/** 
     333 * Function to call to cal the ratio shell volume/ total volume 
     334 * @return: the ratio shell volume/ total volume  
     335 */ 
     336static PyObject * calculate_VR([PYTHONCLASS] *self) { 
     337 
     338        // Get parameters 
     339         
     340        [READDICTIONARY] 
     341                 
     342        return Py_BuildValue("d",(*(self->model)).calculate_VR()); 
     343 
     344} 
     345/** 
    333346 * Function to call to evaluate model in cartesian coordinates 
    334347 * @param args: input q or [qx, qy]] 
     
    416429    {"calculate_ER",      (PyCFunction)calculate_ER     , METH_VARARGS, 
    417430      "Evaluate the model at a given Q or Q, phi"}, 
    418        
     431    {"calculate_VR",      (PyCFunction)calculate_VR     , METH_VARARGS, 
     432      "Evaluate VR"},     
    419433    {"evalDistribution",  (PyCFunction)evalDistribution , METH_VARARGS, 
    420434      "Evaluate the model at a given Q or Qx, Qy vector "}, 
  • sansmodels/src/python_wrapper/modelTemplate.txt

    r67424cd re08bd5b  
    129129        return [CPYTHONCLASS].calculate_ER(self) 
    130130         
     131    def calculate_VR(self): 
     132        """  
     133        Calculate the volf ratio for P(q)*S(q) 
     134         
     135        :return: the value of the volf ratio 
     136         
     137        """        
     138        return [CPYTHONCLASS].calculate_VR(self) 
     139               
    131140    def set_dispersion(self, parameter, dispersion): 
    132141        """ 
Note: See TracChangeset for help on using the changeset viewer.