Changeset fd5ac0d in sasview
- Timestamp:
- Feb 13, 2015 3: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
- Files:
-
- 28 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
src/sas/calculator/sas_gen.py
r79492222 rfd5ac0d 1 1 """ 2 SA NS generic computation and sld file readers2 SAS generic computation and sld file readers 3 3 """ 4 4 from sas.models.BaseComponent import BaseComponent -
src/sas/dataloader/readers/associations.py
r79492222 rfd5ac0d 22 22 23 23 ## Format version for the XML settings file 24 VERSION = 'sa nsloader/1.0'24 VERSION = 'sasloader/1.0' 25 25 26 26 … … 54 54 55 55 # Read in the file extension associations 56 entry_list = root.xpath('/ns:Sa nsLoader/ns:FileType',56 entry_list = root.xpath('/ns:SasLoader/ns:FileType', 57 57 namespaces={'ns': VERSION}) 58 58 -
src/sas/dataloader/readers/danse_reader.py
r79492222 rfd5ac0d 35 35 type_name = "DANSE" 36 36 ## Wildcards 37 type = ["DANSE files (*.sa s)|*.sas"]37 type = ["DANSE files (*.sans)|*.sans"] 38 38 ## Extension 39 ext = ['.sa s', '.SANS']39 ext = ['.sans', '.SANS'] 40 40 41 41 def read(self, filename=None): -
src/sas/dataloader/readers/defaults.xml
r79492222 rfd5ac0d 1 1 <?xml version="1.0"?> 2 <Sa nsLoader version="1.0"3 xmlns="sa nsloader/1.0"2 <SasLoader version="1.0" 3 xmlns="sasloader/1.0" 4 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5 5 > … … 18 18 <FileType extension='.nxs' reader='nexus_reader'/> 19 19 20 </Sa nsLoader>20 </SasLoader> 21 21 -
src/sas/fit/AbstractFitEngine.py
r79492222 rfd5ac0d 65 65 class Model: 66 66 """ 67 Fit wrapper for SA NS models.68 """ 69 def __init__(self, sa ns_model, sans_data=None, **kw):70 """ 71 :param sa ns_model: the sas model to wrap using park interface72 73 """ 74 self.model = sa ns_model75 self.name = sa ns_model.name76 self.data = sa ns_data67 Fit wrapper for SAS models. 68 """ 69 def __init__(self, sas_model, sas_data=None, **kw): 70 """ 71 :param sas_model: the sas model to wrap using park interface 72 73 """ 74 self.model = sas_model 75 self.name = sas_model.name 76 self.data = sas_data 77 77 78 78 def get_params(self, fitparams): … … 128 128 class FitData1D(Data1D): 129 129 """ 130 Wrapper class for SA NS data130 Wrapper class for SAS data 131 131 FitData1D inherits from DataLoader.data_info.Data1D. Implements 132 132 a way to get residuals from data. … … 155 155 Data1D.__init__(self, x=x, y=y, dx=dx, dy=dy) 156 156 self.num_points = len(x) 157 self.sa ns_data = data157 self.sas_data = data 158 158 self.smearer = smearer 159 159 self._first_unsmeared_bin = None … … 265 265 class FitData2D(Data2D): 266 266 """ 267 Wrapper class for SA NS data268 """ 269 def __init__(self, sa ns_data2d, data=None, err_data=None):267 Wrapper class for SAS data 268 """ 269 def __init__(self, sas_data2d, data=None, err_data=None): 270 270 Data2D.__init__(self, data=data, err_data=err_data) 271 271 # Data can be initialized with a sas plottable or with vectors. … … 278 278 self.radius = 0 279 279 self.res_err_data = [] 280 self.sa ns_data = sans_data2d281 self.set_data(sa ns_data2d)282 283 def set_data(self, sa ns_data2d, qmin=None, qmax=None):280 self.sas_data = sas_data2d 281 self.set_data(sas_data2d) 282 283 def set_data(self, sas_data2d, qmin=None, qmax=None): 284 284 """ 285 285 Determine the correct qx_data and qy_data within range to fit 286 286 """ 287 self.data = sa ns_data2d.data288 self.err_data = sa ns_data2d.err_data289 self.qx_data = sa ns_data2d.qx_data290 self.qy_data = sa ns_data2d.qy_data291 self.mask = sa ns_data2d.mask292 293 x_max = max(math.fabs(sa ns_data2d.xmin), math.fabs(sans_data2d.xmax))294 y_max = max(math.fabs(sa ns_data2d.ymin), math.fabs(sans_data2d.ymax))287 self.data = sas_data2d.data 288 self.err_data = sas_data2d.err_data 289 self.qx_data = sas_data2d.qx_data 290 self.qy_data = sas_data2d.qy_data 291 self.mask = sas_data2d.mask 292 293 x_max = max(math.fabs(sas_data2d.xmin), math.fabs(sas_data2d.xmax)) 294 y_max = max(math.fabs(sas_data2d.ymin), math.fabs(sas_data2d.ymax)) 295 295 296 296 ## fitting range … … 453 453 """ 454 454 if data.__class__.__name__ == 'Data2D': 455 fitdata = FitData2D(sa ns_data2d=data, data=data.data,455 fitdata = FitData2D(sas_data2d=data, data=data.data, 456 456 err_data=data.err_data) 457 457 else: 458 458 fitdata = FitData1D(x=data.x, y=data.y, 459 459 dx=data.dx, dy=data.dy, smearer=smearer) 460 fitdata.sa ns_data = data460 fitdata.sas_data = data 461 461 462 462 fitdata.set_fit_range(qmin=qmin, qmax=qmax) -
src/sas/fit/BumpsFitting.py
r79492222 rfd5ac0d 12 12 from bumps.fitproblem import FitProblem 13 13 14 from sas import FitEngine15 from sas import FResult16 from sas import compile_constraints14 from sas.fit.AbstractFitEngine import FitEngine 15 from sas.fit.AbstractFitEngine import FResult 16 from sas.fit.expression import compile_constraints 17 17 18 18 class Progress(object): … … 91 91 # The disadvantage of this technique is that we need to copy every parameter 92 92 # back into the model each time the function is evaluated. We could instead 93 # define reference parameters for each sa ns parameter, but then we would not93 # define reference parameters for each sas parameter, but then we would not 94 94 # be able to express constraints using python expressions in the usual way 95 95 # from bumps, and would instead need to use string expressions. -
src/sas/fit/ParkFitting.py
r79492222 rfd5ac0d 3 3 4 4 """ 5 ParkFitting module contains Sa nsParameter,Model,Data5 ParkFitting module contains SasParameter,Model,Data 6 6 FitArrange, ParkFit,Parameter classes.All listed classes work together 7 7 to perform a simple fit with park optimizer. … … 25 25 from sas.fit.AbstractFitEngine import FResult 26 26 27 class Sa nsParameter(park.Parameter):28 """ 29 SA NS model parameters for use in the PARK fitting service.27 class SasParameter(park.Parameter): 28 """ 29 SAS model parameters for use in the PARK fitting service. 30 30 The parameter attribute value is redirected to the underlying 31 parameter value in the SA NS model.31 parameter value in the SAS model. 32 32 """ 33 33 def __init__(self, name, model, data): … … 100 100 class ParkModel(park.Model): 101 101 """ 102 PARK wrapper for SA NS models.103 """ 104 def __init__(self, sa ns_model, sans_data=None, **kw):105 """ 106 :param sa ns_model: the sas model to wrap using park interface102 PARK wrapper for SAS models. 103 """ 104 def __init__(self, sas_model, sas_data=None, **kw): 105 """ 106 :param sas_model: the sas model to wrap using park interface 107 107 108 108 """ 109 109 park.Model.__init__(self, **kw) 110 self.model = sa ns_model111 self.name = sa ns_model.name112 self.data = sa ns_data110 self.model = sas_model 111 self.name = sas_model.name 112 self.data = sas_data 113 113 #list of parameters names 114 self.sa nsp = sans_model.getParamList()114 self.sasp = sas_model.getParamList() 115 115 #list of park parameter 116 self.parkp = [Sa nsParameter(p, sans_model, sans_data) for p in self.sansp]116 self.parkp = [SasParameter(p, sas_model, sas_data) for p in self.sasp] 117 117 #list of parameter set 118 self.parameterset = park.ParameterSet(sa ns_model.name, pars=self.parkp)118 self.parameterset = park.ParameterSet(sas_model.name, pars=self.parkp) 119 119 self.pars = [] 120 120 … … 176 176 177 177 178 class Sa nsFitResult(fitresult.FitResult):178 class SasFitResult(fitresult.FitResult): 179 179 def __init__(self, *args, **kwrds): 180 180 fitresult.FitResult.__init__(self, *args, **kwrds) … … 182 182 self.inputs = [] 183 183 184 class Sa nsFitSimplex(FitSimplex):184 class SasFitSimplex(FitSimplex): 185 185 """ 186 186 Local minimizer using Nelder-Mead simplex algorithm. … … 216 216 # Need to make our own copy of the fit results so that the 217 217 # values don't get stomped on by the next fit iteration. 218 fitpars = [Sa nsFitParameter(pars[i].name,pars[i].range,v, pars[i].model, pars[i].data)218 fitpars = [SasFitParameter(pars[i].name,pars[i].range,v, pars[i].model, pars[i].data) 219 219 for i,v in enumerate(result.x)] 220 res = Sa nsFitResult(fitpars, result.calls, result.fx)220 res = SasFitResult(fitpars, result.calls, result.fx) 221 221 res.inputs = [(pars[i].model, pars[i].data) for i,v in enumerate(result.x)] 222 222 # Compute the parameter uncertainties from the jacobian … … 224 224 return res 225 225 226 class Sa nsFitter(Fitter):226 class SasFitter(Fitter): 227 227 """ 228 228 """ … … 243 243 handler.done = False 244 244 self.handler = handler 245 fitpars = [Sa nsFitParameter(pars[i].name, pars[i].range, v,245 fitpars = [SasFitParameter(pars[i].name, pars[i].range, v, 246 246 pars[i].model, pars[i].data) 247 247 for i,v in enumerate(x0)] … … 252 252 self._fit(fitness, x0, bounds) 253 253 254 class Sa nsFitMC(SansFitter):254 class SasFitMC(SasFitter): 255 255 """ 256 256 Monte Carlo optimizer. … … 258 258 This implements `park.fit.Fitter`. 259 259 """ 260 localfit = Sa nsFitSimplex()260 localfit = SasFitSimplex() 261 261 start_points = 10 262 262 def __init__(self, localfit, start_points=10): … … 276 276 raise ValueError, "Fit did not converge.\n" 277 277 278 class Sa nsPart(Part):278 class SasPart(Part): 279 279 """ 280 280 Part of a fitting assembly. Part holds the model itself and … … 318 318 self.model, self.data = fitness[0], fitness[1] 319 319 320 class Sa nsFitParameter(FitParameter):320 class SasFitParameter(FitParameter): 321 321 """ 322 322 Fit result for an individual parameter. … … 363 363 self.parts = [] 364 364 for m in models: 365 self.parts.append(Sa nsPart(m))365 self.parts.append(SasPart(m)) 366 366 self.curr_thread = curr_thread 367 367 self.chisq = None … … 390 390 # Convert to fitparameter a object 391 391 392 fitpars = [Sa nsFitParameter(p.path,p.range,p.value, p.model, p.data)392 fitpars = [SasFitParameter(p.path,p.range,p.value, p.model, p.data) 393 393 for p in self._fitparameters] 394 394 #print "fitpars", fitpars … … 399 399 Extend result from the fit with the calculated parameters. 400 400 """ 401 calcpars = [Sa nsFitParameter(p.path,p.range,p.value, p.model, p.data)401 calcpars = [SasFitParameter(p.path,p.range,p.value, p.model, p.data) 402 402 for p in self.parameterset.computed] 403 403 result.parameters += calcpars … … 493 493 def create_assembly(self, curr_thread, reset_flag=False): 494 494 """ 495 Extract sa nsmodel and sansdata from495 Extract sasmodel and sasdata from 496 496 self.FitArrangelist ={Uid:FitArrange} 497 497 Create parkmodel and park data ,form a list couple of parkmodel … … 562 562 """ 563 563 self.create_assembly(curr_thread=curr_thread, reset_flag=reset_flag) 564 localfit = Sa nsFitSimplex()564 localfit = SasFitSimplex() 565 565 localfit.ftol = ftol 566 566 localfit.xtol = 1e-6 567 567 568 568 # See `park.fitresult.FitHandler` for details. 569 fitter = Sa nsFitMC(localfit=localfit, start_points=1)569 fitter = SasFitMC(localfit=localfit, start_points=1) 570 570 if handler == None: 571 571 handler = fitresult.ConsoleUpdate(improvement_delta=0.1) … … 584 584 for m in self.problem.parts: 585 585 residuals, theory = m.fitness.residuals() 586 small_result = FResult(model=m.model, data=m.data.sa ns_data)586 small_result = FResult(model=m.model, data=m.data.sas_data) 587 587 small_result.fitter_id = self.fitter_id 588 588 small_result.theory = theory -
src/sas/fit/ScipyFitting.py
r79492222 rfd5ac0d 14 14 _SMALLVALUE = 1.0e-10 15 15 16 class Sa nsAssembly:17 """ 18 Sa ns Assembly class a class wrapper to be call in optimizer.leastsq method16 class SasAssembly: 17 """ 18 Sas Assembly class a class wrapper to be call in optimizer.leastsq method 19 19 """ 20 20 def __init__(self, paramlist, model=None, data=None, fitresult=None, … … 212 212 if handler is not None: 213 213 handler.set_result(result=result) 214 functor = Sa nsAssembly(paramlist=pars,214 functor = SasAssembly(paramlist=pars, 215 215 model=model, 216 216 data=data, -
src/sas/guiframe/CategoryInstaller.py
r79492222 rfd5ac0d 33 33 returns the dir where installed_models.txt should be 34 34 """ 35 import sas.dataloader.readers35 import sas.dataloader.readers 36 36 return sas.dataloader.readers.get_data_path() 37 37 … … 41 41 returns the dir where models.py should be 42 42 """ 43 import sas.perspectives.fitting.models43 import sas.perspectives.fitting.models 44 44 return sas.perspectives.fitting.models.get_model_python_path() 45 45 … … 52 52 # when deploying using py2app (it will be in Contents/Resources), or 53 53 # py2exe (it will be in the exec dir). 54 import sas.sansview54 import sas.sasview 55 55 cat_file = "default_categories.json" 56 56 57 57 possible_cat_file_paths = [ 58 os.path.join(os.path.split(sas.sa nsview.__file__)[0], cat_file), # Source58 os.path.join(os.path.split(sas.sasview.__file__)[0], cat_file), # Source 59 59 os.path.join(os.path.dirname(sys.executable), '..', 'Resources', cat_file), # Mac 60 60 os.path.join(os.path.dirname(sys.executable), cat_file) # Windows … … 70 70 def _get_home_dir(): 71 71 """ 72 returns the users sa nsview config dir72 returns the users sasview config dir 73 73 """ 74 74 return os.path.join(os.path.expanduser("~"), ".sasview") -
src/sas/guiframe/config.py
r79492222 rfd5ac0d 11 11 __download_page__ = 'http://sourceforge.net/projects/sasview/files/' 12 12 __update_URL__ = ['svn.code.sf.net', 13 '/p/sasview/code/trunk/sa nsview.latestversion']13 '/p/sasview/code/trunk/sasview.latestversion'] 14 14 15 15 … … 60 60 _copyright = "(c) 2008, University of Tennessee" 61 61 #edit the lists below of file state your plugin can read 62 #for sa nsview this how you can edit these lists62 #for sasview this how you can edit these lists 63 63 #PLUGIN_STATE_EXTENSIONS = ['.prv','.fitv', '.inv'] 64 64 #APPLICATION_STATE_EXTENSION = '.svs' … … 66 66 # 'Fitting files (*.fitv)|*.fitv', 67 67 # 'Invariant files (*.inv)|*.inv'] 68 #APPLICATION_WLIST = 'Sa nsView files (*.svs)|*.svs'68 #APPLICATION_WLIST = 'SasView files (*.svs)|*.svs' 69 69 APPLICATION_WLIST = '' 70 70 APPLICATION_STATE_EXTENSION = None -
src/sas/guiframe/dummyapp.py
r79492222 rfd5ac0d 101 101 "self._on_context_do_something"]] 102 102 103 class Sa nsView():103 class SasView(): 104 104 105 105 def __init__(self): … … 124 124 from multiprocessing import freeze_support 125 125 freeze_support() 126 sa nsview = SansView()126 sasview = SasView() -
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, -
src/sas/perspectives/fitting/fitting.py
rb9a5f0e rfd5ac0d 51 51 52 52 MAX_NBR_DATA = 4 53 SA NS_F_TOL = 5e-0553 SAS_F_TOL = 5e-05 54 54 55 55 (PageInfoEvent, EVT_PAGE_INFO) = wx.lib.newevent.NewEvent() … … 94 94 self._gui_engine = None 95 95 ## Relative error desired in the sum of squares (float); scipy only 96 self.ftol = SA NS_F_TOL96 self.ftol = SAS_F_TOL 97 97 self.batch_reset_flag = True 98 98 #List of selected data … … 291 291 msg += "Please manually remove the files (.py, .pyc) " 292 292 msg += "in the 'plugin_models' folder \n" 293 msg += "inside of the Sa nsView application, "293 msg += "inside of the SasView application, " 294 294 msg += "and try it again." 295 295 wx.MessageBox(msg, 'Info') … … 817 817 except: 818 818 # default 819 f_tol = SA NS_F_TOL819 f_tol = SAS_F_TOL 820 820 821 821 self.ftol = f_tol … … 1373 1373 if model is not None and hasattr(model, "model"): 1374 1374 model = model.model 1375 if data is not None and hasattr(data, "sa ns_data"):1376 data = data.sa ns_data1375 if data is not None and hasattr(data, "sas_data"): 1376 data = data.sas_data 1377 1377 1378 1378 is_data2d = issubclass(data.__class__, Data2D)
Note: See TracChangeset
for help on using the changeset viewer.