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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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"; 
Note: See TracChangeset for help on using the changeset viewer.