SasView / sasmodels

Package for calculation of small angle scattering models using OpenCL.
BSD 3-Clause "New" or "Revised" License
15 stars 27 forks source link

pure python models do not support magnetism or orientation (Trac #1048) #247

Open pkienzle opened 5 years ago

pkienzle commented 5 years ago

Code from kernel_iq.c has not been ported to kernelpy.py. In particular, the new orientation and magnetism algorithms do not apply to pure python models.

Migrated from http://trac.sasview.org/ticket/1048

{
    "status": "new",
    "changetime": "2017-12-14T20:30:08",
    "_ts": "2017-12-14 20:30:08.097184+00:00",
    "description": "Code from kernel_iq.c has not been ported to kernelpy.py.  In particular, the new orientation and magnetism algorithms do not apply to pure python models.\n",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "",
    "workpackage": "SasView Bug Fixing",
    "time": "2017-12-14T20:30:08",
    "component": "SasView",
    "summary": "pure python models do not support magnetism or orientation",
    "priority": "major",
    "keywords": "",
    "milestone": "sasmodels Next Release +1",
    "owner": "",
    "type": "defect"
}
butlerpd commented 3 years ago

@dehoni or @pkienzle - this is an old ticket. Does it still apply? I'm suspecting yest but just wanted to make sure that it should not be closed.

dehoni commented 2 years ago

Most of the shape-independent model fall under this ticket. It is relatively easy to extract the calculations in a c file, which should resolve the issue.

pkienzle commented 2 years ago

PR #58 is another possibility: automatically translate python models to c.

dehoni commented 2 years ago

PR #58 is another possibility: automatically translate python models to c.

The PR 247-pure-python-models-do-not-support-magnetism-or-orientation-trac-1048 will only touch models that had an embedded c code. For pure Python models, I second the idea to automatically translate python models to c. Not imposing to write c code for even a simple model definition also lower a scaring hurdle for normal users. Many people have some experience with python and would be willing to write a model in the language. The discussion about how to go forward and handle Python models is already part of the discussion in PR #58.

pkienzle commented 2 years ago

Shape-based user models will not support magnetism or orientation unless they are automatically converted to C using #58 or kernelpy.py is updated to handle magnetism and orientation.