source: sasview/sansmodels/src/sans/models/c_models/run.py @ 0438933

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 0438933 was fca6936, checked in by Mathieu Doucet <doucetm@…>, 16 years ago

First cut at better polydisp and averaging implementation for sans models.

  • Property mode set to 100644
File size: 769 bytes
RevLine 
[fca6936]1import sys, os, math
2from sans.models.CylinderModel import CylinderModel
3from sans.models.DisperseModel import DisperseModel
4
5os.system('gcc -c ../../../libigor/libCylinder.c -o libigor.o -I../c_extensions -I../../../libigor')
6os.system('gcc -c ../c_extensions/cylinder.c -o libcyl.o -I../c_extensions -I../../../libigor')
7os.system('g++ -mno-cygwin cylinder.cpp parameters.cpp  dispersion_visitor.cpp libigor.o libcyl.o -D__MODELS_STANDALONE__ -I../c_extensions -I../../../libigor')
8os.system('a.exe')
9
10
11cyl = CylinderModel()
12cyl.setParam('cyl_phi', 0.0)
13cyl.setParam('cyl_theta', 0.0)
14
15disp = DisperseModel(cyl, ['radius'], [5])
16disp.setParam('n_pts', 100)
17print "" 
18print "Cyl (python): ", cyl.run(0.001)
19print "Disp(pyhton): ", disp.run(0.001)
20
Note: See TracBrowser for help on using the repository browser.