Changeset 592cb156 in sasview
- Timestamp:
- Jan 10, 2012 3:16:21 PM (13 years ago)
- 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:
- 62dc94b
- Parents:
- 70ec588d
- Files:
-
- 1 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/setup.py
r503a972 r592cb156 12 12 from distutils.core import Extension, setup 13 13 from distutils.command.build_ext import build_ext 14 15 # Manage version number ###################################### 16 sys.path.append(os.path.join("src", "sans")) 17 import models 18 VERSION = models.__version__ 19 print "Building models v%s" % VERSION 20 ############################################################## 14 21 15 22 # Options to enable OpenMP … … 53 60 smear_dir = os.path.join("src", "c_smearer") 54 61 wrapper_dir = os.path.join("src", "python_wrapper", "generated") 55 print "Installing SANS models" 62 if not os.path.isdir(wrapper_dir): 63 os.makedirs(wrapper_dir) 56 64 57 65 sys.path.append(os.path.join("src", "python_wrapper")) … … 101 109 dist = setup( 102 110 name="sansmodels", 103 version = "1.0.0",111 version = VERSION, 104 112 description = "Python module for SANS scattering models", 105 113 author = "SANS/DANSE", 106 114 author_email = "sansdanse@gmail.gov", 107 url = "http:// danse.us/trac/sans",115 url = "http://sansviewproject.svn.sourceforge.net", 108 116 109 117 # Place this module under the sans package … … 113 121 package_dir = {"sans":os.path.join("src", "sans"), 114 122 "sans.models":os.path.join("src", "sans", "models"), 115 "sans.models.sans_extension": includedir,123 "sans.models.sans_extension":os.path.join("src", "sans", "models", "sans_extension"), 116 124 }, 117 125 package_data={'sans.models': [os.path.join('media', "*")]}, -
sansmodels/src/sans/models/__init__.py
r0abf7bf r592cb156 2 2 1D Modeling for SANS 3 3 """ 4 ## \mainpage Analytical Modeling for SANS 5 # 6 # \section intro_sec Introduction 7 # This module provides theoretical models for the scattering 8 # intensity for SANS. 9 # 10 # Documentation can be found here: 11 # http://danse.us/trac/sans/wiki/8_2_2_1DModelFitting 12 # http://danse.us/trac/sans/wiki/8_2_3_2DModeling 13 # 14 # \section install_sec Installation 15 # 16 # \subsection obtain Obtaining the Code 17 # 18 # The code is available here: 19 # \verbatim 20 #$ svn co svn://danse.us/sans/sansmodels 21 # \endverbatim 22 # 23 # \subsection depends External Dependencies 24 # None 25 # 26 # \subsection build Building the code 27 # The standard python package can be built with distutils. 28 # \verbatim 29 #$ python setup.py build 30 #$ python setup.py install 31 # \endverbatim 32 # 33 # \section overview_sec Package Overview 34 # 35 # \subsection class Class Diagram: 36 # \image html class_diag.png 37 # Note that the CCylinderModel is written as C code. 38 # CylinderModel acts as an adaptor class for the C extension. 39 # Most model classes will be written that way. 40 # 41 # \subsection behav Behavior enumeration for pyre-level architecture: 42 # \image html behavior_pyre.png 43 # 44 # \subsection behav Behavior enumeration for under-lying architecture: 45 # \image html behavior.jpg 46 # 47 # \subsection Tutorial 48 # To create a model: 49 # \verbatim 50 #from sans.models.CylinderModel import CylinderModel 51 # cyl = CylinderModel() 52 # \endverbatim 53 # 54 # To evaluate a model (at x=0.1 in this example): 55 # \verbatim 56 # output = cyl.run(0.1) 57 # \endverbatim 58 # 59 # To change a parameter: 60 # \verbatim 61 # cyl.setParam('scale', 0.1) 62 # \endverbatim 63 # 64 # To get the value of a parameter: 65 # \verbatim 66 # cyl.getParam('scale') 67 # \endverbatim 68 # 69 # Other examples are available as unit tests under sans.models.test. 70 # 71 # \section help_sec Contact Info 72 # Code and Documentation by Mathieu Doucet as part of the DANSE project. 73 #PLUGIN_ID = "models plug-in 0.4" 74 from sans.models import * 4 #from sans.models import * 75 5 76 6 import os 77 7 from distutils.filelist import findall 8 9 __version__ = "1.1.0" 78 10 79 11 def get_data_path(media): -
setup.py
r503a972 r592cb156 263 263 package_dir["sans"] = os.path.join("sansmodels", "src", "sans") 264 264 package_dir["sans.models"] = os.path.join("sansmodels", "src", "sans", "models") 265 package_dir["sans.models.sans_extension"] = includedir265 package_dir["sans.models.sans_extension"] = os.path.join("sansmodels", "src", "sans", "models", "sans_extension") 266 266 267 267 package_data['sans.models'] = [os.path.join('media', "*")]
Note: See TracChangeset
for help on using the changeset viewer.