Changeset fd5ac0d in sasview for src/sas/models
- Timestamp:
- Feb 13, 2015 5:26:52 AM (10 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:
- 7a04dbb
- Parents:
- b9a5f0e
- Location:
- src/sas/models
- Files:
-
- 17 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/sas/models/DisperseModel.py
r79492222 rfd5ac0d 3 3 """ 4 4 from sas.models.BaseComponent import BaseComponent 5 from sa ns_extension.c_models import Disperser5 from sas_extension.c_models import Disperser 6 6 7 7 class DisperseModel(Disperser, BaseComponent): -
src/sas/models/__init__.py
r79492222 rfd5ac0d 1 1 """ 2 1D Modeling for SA NS2 1D Modeling for SAS 3 3 """ 4 4 #from sas.models import * -
src/sas/models/c_extension/Doxyfile
r79492222 rfd5ac0d 4 4 # Project related configuration options 5 5 #--------------------------------------------------------------------------- 6 PROJECT_NAME = sa nsmodeling6 PROJECT_NAME = sasmodeling 7 7 PROJECT_NUMBER = 8 8 OUTPUT_DIRECTORY = ../doc … … 114 114 EXCLUDE = build \ 115 115 dist \ 116 sa ns/models/test \116 sas/models/test \ 117 117 libigor \ 118 118 igor_wrapper \ 119 sa ns/models/prototypes119 sas/models/prototypes 120 120 EXCLUDE_SYMLINKS = NO 121 121 EXCLUDE_PATTERNS = -
src/sas/models/c_extension/c_models/c_models.cpp.template
r79492222 rfd5ac0d 1 1 /** c_models 2 2 * 3 * Module containing all SA NS model extensions3 * Module containing all SAS model extensions 4 4 * 5 5 * @author M.Doucet / UTK … … 7 7 #include <Python.h> 8 8 #include <parameters.hh> 9 #define PY_ARRAY_UNIQUE_SYMBOL PyArray_API_sa ns9 #define PY_ARRAY_UNIQUE_SYMBOL PyArray_API_sas 10 10 #include "arrayobject.h" 11 11 … … 191 191 192 192 m = Py_InitModule3("c_models", module_methods, 193 "C extension module for SA NS scattering models.");193 "C extension module for SAS scattering models."); 194 194 import_array(); 195 195 -
src/sas/models/c_extension/libigor/GaussWeights.c
r79492222 rfd5ac0d 1 1 /* 2 2 * GaussWeights.c 3 * SA NSAnalysis3 * SASAnalysis 4 4 * 5 5 * Created by Andrew Jackson on 4/23/07. -
src/sas/models/c_extension/libigor/GaussWeights.h
r79492222 rfd5ac0d 3 3 /* 4 4 * GaussWeights.h 5 * SA NSAnalysis5 * SASAnalysis 6 6 * 7 7 * Created by Andrew Jackson on 4/23/07. -
src/sas/models/c_extension/libigor/StandardHeaders.h
r79492222 rfd5ac0d 1 1 /* 2 2 * StandardHeaders.h 3 * SA NSAnalysis3 * SASAnalysis 4 4 * 5 5 * Created by Andrew Jackson on 4/23/07. -
src/sas/models/c_extension/libigor/libSASAnalysis.h
r79492222 rfd5ac0d 1 1 /* 2 * libSA NSAnalysis.h3 * SA NSAnalysis2 * libSASAnalysis.h 3 * SASAnalysis 4 4 * 5 5 * Created by Andrew Jackson on 4/24/07. -
src/sas/models/c_extension/python_wrapper/WrapperGenerator.py
r79492222 rfd5ac0d 19 19 20 20 where my_model must be replaced by the name of the 21 class that you want to import from sa ns.models.21 class that you want to import from sas.models. 22 22 (example: [PYTHONCLASS] = MyModel 23 will create a class MyModel in sa ns.models.MyModel.23 will create a class MyModel in sas.models.MyModel. 24 24 It will also create a class CMyModel in 25 sa ns_extension.c_models.)25 sas_extension.c_models.) 26 26 27 27 Also in comments, each parameter of the params -
src/sas/models/c_extension/python_wrapper/classTemplate.txt
r79492222 rfd5ac0d 23 23 */ 24 24 #define NO_IMPORT_ARRAY 25 #define PY_ARRAY_UNIQUE_SYMBOL PyArray_API_sa ns25 #define PY_ARRAY_UNIQUE_SYMBOL PyArray_API_sas 26 26 27 27 extern "C" { -
src/sas/models/c_extension/python_wrapper/modelTemplate.txt
r79492222 rfd5ac0d 24 24 """ 25 25 26 from sa ns.models.BaseComponent import BaseComponent27 from sa ns.models.sans_extension.c_models import [CPYTHONCLASS]26 from sas.models.BaseComponent import BaseComponent 27 from sas.models.sas_extension.c_models import [CPYTHONCLASS] 28 28 29 29 def create_[PYTHONCLASS](): -
src/sas/models/c_extension/python_wrapper/wrapping.py
r79492222 rfd5ac0d 24 24 25 25 def write_c_models(model_list): 26 # simultaneously generates 'sa nsmodels/installed_models.txt'27 # and 'sa nsmodels/src/c_models/c_models.cpp'26 # simultaneously generates 'sasmodels/installed_models.txt' 27 # and 'sasmodels/src/c_models/c_models.cpp' 28 28 29 29 30 template_file = open(os.path.join("src", "sa ns", "models","c_extension","c_models","c_models.cpp.template"),"r")31 write_file = open(os.path.join("src", "sa ns", "models","c_extension","c_models","c_models.cpp"),"w")30 template_file = open(os.path.join("src", "sas", "models","c_extension","c_models","c_models.cpp.template"),"r") 31 write_file = open(os.path.join("src", "sas", "models","c_extension","c_models","c_models.cpp"),"w") 32 32 buf = template_file.read() 33 33 lines = buf.split('\n') … … 63 63 if __name__ == '__main__': 64 64 header_dir = os.path.join('..', 'include') 65 generate_wrappers(header_dir, output_dir="../sa ns/models/", c_wrapper_dir='.')65 generate_wrappers(header_dir, output_dir="../sas/models/", c_wrapper_dir='.') 66 66 67 67 -
src/sas/models/c_extension/release_notes.txt
r79492222 rfd5ac0d 2 2 ============= 3 3 4 SA NS Models version 0.4.34 SAS Models version 0.4.3 5 5 6 6 Package name: sans.models -
src/sas/models/dispersion_models.py
r79492222 rfd5ac0d 22 22 23 23 Usage: 24 These classes can be used to set the dispersion model of a SA NS model24 These classes can be used to set the dispersion model of a SAS model 25 25 parameter: 26 26 … … 43 43 44 44 """ 45 import sa ns_extension.c_models as c_models45 import sas_extension.c_models as c_models 46 46 47 47 -
src/sas/models/media/pd_help.html
r79492222 rfd5ac0d 56 56 <p>This distribution is to be given 57 57 by users as a txt file where the array should be defined by two columns in the 58 order of x and f(x) values. The f(x) will be normalized by Sa nsView during the58 order of x and f(x) values. The f(x) will be normalized by SasView during the 59 59 computation.</p> 60 60 -
src/sas/models/media/smear_computation.html
r79492222 rfd5ac0d 27 27 28 28 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>The sit 29 smeared scattering intensity for SA NS is defined by</span></p>29 smeared scattering intensity for SAS is defined by</span></p> 30 30 31 31 <p class=MsoNormal><img … … 155 155 number of iteration, say at least 10000 by 10000 for each element of the matrix 156 156 W, which will take minutes and minutes to finish the calculation for a set of 157 typical SA NS data. An alternative way which is correct for slit width <<158 slit hight, is used in the SA NSView: This method is a mixed method that157 typical SAS data. An alternative way which is correct for slit width << 158 slit hight, is used in the SASView: This method is a mixed method that 159 159 combines the method 1) with the numerical integration for the slit width.</span></p> 160 160 … … 272 272 273 273 <p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>Here, the 274 current version of the SA NSVIEW uses the Eq. (11) for 2D smearing assuming that274 current version of the SASVIEW uses the Eq. (11) for 2D smearing assuming that 275 275 all the Gaussian weighting functions are aligned in the polar coordinate. </span></p> 276 276 <p> In the control panel, the higher accuracy indicates more and finer binnng points -
src/sas/models/qsmearing.py
r79492222 rfd5ac0d 34 34 :param model: sas.model instance 35 35 """ 36 # Sanity check. If we are not dealing with a SA NS Data1D36 # Sanity check. If we are not dealing with a SAS Data1D 37 37 # object, just return None 38 38 if data1D.__class__.__name__ not in ['Data1D', 'Theory1D']: … … 343 343 class SlitSmearer(_SlitSmearer): 344 344 """ 345 Adaptor for slit smearing class and SA NS data345 Adaptor for slit smearing class and SAS data 346 346 """ 347 347 def __init__(self, data1D, model = None): … … 461 461 class QSmearer(_QSmearer): 462 462 """ 463 Adaptor for Gaussian Q smearing class and SA NS data463 Adaptor for Gaussian Q smearing class and SAS data 464 464 """ 465 465 def __init__(self, data1D, model = None): -
src/sas/models/smearing_2d.py
r79492222 rfd5ac0d 19 19 class Smearer2D: 20 20 """ 21 Gaussian Q smearing class for SA NS 2d data21 Gaussian Q smearing class for SAS 2d data 22 22 """ 23 23 … … 152 152 if self._engine == 'c' and self.coords == 'polar': 153 153 try: 154 import sas.models.sas_extension.smearer2d_helper as smearer2dc154 import sas.models.sas_extension.smearer2d_helper as smearer2dc 155 155 smearc = smearer2dc.new_Smearer_helper(self.qx_data, 156 156 self.qy_data,
Note: See TracChangeset
for help on using the changeset viewer.