Ignore:
Timestamp:
Nov 2, 2007 11:04:05 AM (17 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
5a2070e
Parents:
7e845ea
Message:

Added error estimation for 2D simulation

Location:
realSpaceModeling/pointsmodelpy/pointsmodelpymodule
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • realSpaceModeling/pointsmodelpy/pointsmodelpymodule/bindings.cc

    r2bb0b26 r41e8114  
    121121        METH_VARARGS, pypointsmodelpy_get_complex_Iqxy__doc__}, 
    122122 
     123        //ComplexModel calculateIQ_2D_Error(pts,Qx,Qy) 
     124        {pypointsmodelpy_get_complex_Iqxy_err__name__, pypointsmodelpy_get_complex_Iqxy_err, 
     125         METH_VARARGS, pypointsmodelpy_get_complex_Iqxy_err__doc__}, 
     126 
    123127    //ComplexModel calculateIQ 
    124128    {pypointsmodelpy_get_complex_iq__name__, pypointsmodelpy_get_complex_iq, 
  • realSpaceModeling/pointsmodelpy/pointsmodelpymodule/misc.cc

    r2bb0b26 r41e8114  
    554554} 
    555555 
     556//LORESModel method CalculateIQ_2D_Error(points,qx,qy)  
     557char pypointsmodelpy_get_complex_Iqxy_err__name__[] = "get_complex_iq_2D_err"; 
     558char pypointsmodelpy_get_complex_Iqxy_err__doc__[] = "calculate averaged scattering intensity from a single q"; 
     559 
     560PyObject * pypointsmodelpy_get_complex_Iqxy_err(PyObject *, PyObject *args) 
     561{ 
     562  PyObject *pylores = 0, *pypoint3dvec = 0; 
     563  double qx = 0, qy = 0; 
     564  int ok = PyArg_ParseTuple(args, "OOdd", &pylores, &pypoint3dvec, &qx, &qy); 
     565  if(!ok) return NULL; 
     566 
     567  void *temp = PyCObject_AsVoidPtr(pylores); 
     568  ComplexModel * thiscomplex = static_cast<ComplexModel *>(temp); 
     569  void *temp2 = PyCObject_AsVoidPtr(pypoint3dvec); 
     570  vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2); 
     571 
     572  double I = thiscomplex->CalculateIQ_2D_Error(*thisvec,qx,qy); 
     573 
     574  return Py_BuildValue("d",I); 
     575} 
     576 
    556577//LORESModel method CalculateIQ(q)  
    557578char pypointsmodelpy_get_complex_i__name__[] = "get_complex_i"; 
  • realSpaceModeling/pointsmodelpy/pointsmodelpymodule/misc.h

    r2bb0b26 r41e8114  
    182182PyObject * pypointsmodelpy_get_complex_Iqxy(PyObject *, PyObject *); 
    183183 
     184// ComplexModel method calculateIQ_2D_Error(pts,qx,qy) 
     185extern char pypointsmodelpy_get_complex_Iqxy_err__name__[]; 
     186extern char pypointsmodelpy_get_complex_Iqxy_err__doc__[]; 
     187extern "C" 
     188PyObject * pypointsmodelpy_get_complex_Iqxy_err(PyObject *, PyObject *); 
     189 
    184190// ComplexModel method calculateIQ(iq) 
    185191extern char pypointsmodelpy_get_complex_iq__name__[]; 
Note: See TracChangeset for help on using the changeset viewer.