Changes in / [920928f:48153283] in sasview
- Files:
-
- 23 added
- 2 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
build_tools/conda/bumps/meta.yaml
rf479ac3 rb75079b 1 about: {home: 'http://www.reflectometry.org/danse/software.html', license: UNKNOWN, 2 summary: Data fitting with bayesian uncertainty analysis} 3 build: 4 entry_points: [] 5 features: [] 6 string: '' 7 track_features: [] 8 package: {name: bumps, version: 0.7.5.3} 1 package: 2 name: bumps 3 version: !!str 0.7.5.4 4 5 source: 6 fn: bumps-0.7.5.4.tar.gz 7 url: https://pypi.python.org/packages/source/b/bumps/bumps-0.7.5.4.tar.gz 8 md5: a47c035fbb18afa5ca53067506a5ff1c 9 # patches: 10 # List any patch files here 11 # - fix.patch 12 13 # build: 14 #preserve_egg_dir: True 15 #entry_points: 16 # Put any entry points (scripts to be generated automatically) here. The 17 # syntax is module:function. For example 18 # 19 # - bumps = bumps:main 20 # 21 # Would create an entry point called bumps that calls bumps.main() 22 23 24 # If this is a new build for the same version, increment the build 25 # number. If you do not include this key, it defaults to 0. 26 # number: 1 27 9 28 requirements: 10 build: [python, setuptools, six] 11 conflicts: [] 12 run: [python, six] 13 source: 14 fn: bumps-0.7.5.3.tar.gz 15 git_rev: '' 16 md5: f17b41412c3c8ad6432a42e42cb926d5 17 patches: [] 18 path: '' 19 svn_rev: '' 20 url: https://pypi.python.org/packages/source/b/bumps/bumps-0.7.5.3.tar.gz 29 build: 30 - python 31 - setuptools 32 - six 33 34 run: 35 - python 36 - six 37 21 38 test: 22 commands: [] 23 files: [] 24 imports: [bumps, bumps.dream, bumps.gui, bumps.gui.resources, bumps.mystic, bumps.mystic.examples, 25 bumps.mystic.optimizer] 26 requires: [] 39 # Python imports 40 imports: 41 - bumps 42 - bumps.dream 43 - bumps.gui 44 - bumps.gui.resources 45 - bumps.mystic 46 - bumps.mystic.examples 47 - bumps.mystic.optimizer 48 49 #commands: 50 # You can put test commands to be run here. Use this to test that the 51 # entry points work. 52 53 54 # You can also put a file called run_test.py in the recipe that will be run 55 # at test time. 56 57 requires: 58 - numpy 59 - scipy 60 - matplotlib 61 62 about: 63 home: http://www.reflectometry.org/danse/software.html 64 license: UNKNOWN 65 summary: 'Data fitting with bayesian uncertainty analysis' 66 67 # See 68 # http://docs.continuum.io/conda/build.html for 69 # more information about meta.yaml -
build_tools/conda/periodictable/meta.yaml
rf479ac3 r55bde35 1 about: {home: 'http://www.reflectometry.org/danse/elements.html', license: public 2 domain, summary: Extensible periodic table of the elements} 3 build: 4 entry_points: [] 5 features: [] 6 string: '' 7 track_features: [] 8 package: {name: periodictable, version: 1.4.1} 9 requirements: 10 build: [python, setuptools, pyparsing, numpy] 11 conflicts: [] 12 run: [python, pyparsing, numpy] 1 package: 2 name: periodictable 3 version: !!str 1.4.1 4 13 5 source: 14 6 fn: periodictable-1.4.1.tar.gz 15 git_rev: ''7 url: https://pypi.python.org/packages/source/p/periodictable/periodictable-1.4.1.tar.gz 16 8 md5: 7246b63cc0b6b1be6e86b6616f9e866e 17 patches: [] 18 path: '' 19 svn_rev: '' 20 url: https://pypi.python.org/packages/source/p/periodictable/periodictable-1.4.1.tar.gz 9 # patches: 10 # List any patch files here 11 # - fix.patch 12 13 # build: 14 #preserve_egg_dir: True 15 #entry_points: 16 # Put any entry points (scripts to be generated automatically) here. The 17 # syntax is module:function. For example 18 # 19 # - periodictable = periodictable:main 20 # 21 # Would create an entry point called periodictable that calls periodictable.main() 22 23 24 # If this is a new build for the same version, increment the build 25 # number. If you do not include this key, it defaults to 0. 26 # number: 1 27 28 requirements: 29 build: 30 - python 31 - setuptools 32 - pyparsing 33 - numpy 34 35 run: 36 - python 37 - pyparsing 38 - numpy 39 21 40 test: 22 commands: [] 23 files: [] 24 imports: [periodictable] 25 requires: [] 41 # Python imports 42 imports: 43 - periodictable 44 45 #commands: 46 # You can put test commands to be run here. Use this to test that the 47 # entry points work. 48 49 50 # You can also put a file called run_test.py in the recipe that will be run 51 # at test time. 52 53 # requires: 54 # Put any additional test requirements here. For example 55 # - nose 56 57 about: 58 home: http://www.reflectometry.org/danse/elements.html 59 license: public domain 60 summary: 'Extensible periodic table of the elements' 61 62 # See 63 # http://docs.continuum.io/conda/build.html for 64 # more information about meta.yaml -
build_tools/conda/unittest-xml-reporting/meta.yaml
rf479ac3 r55bde35 1 about: {home: 'http://github.com/xmlrunner/unittest-xml-reporting/tree/master/', license: BSD 2 License, summary: unittest-based test runner with Ant/JUnit like XML reporting.} 3 build: 4 entry_points: [] 5 features: [] 6 string: '' 7 track_features: [] 8 package: {name: unittest-xml-reporting, version: 1.10.0} 9 requirements: 10 build: [python, setuptools, six >=1.4.0] 11 conflicts: [] 12 run: [python, six >=1.4.0] 1 package: 2 name: unittest-xml-reporting 3 version: !!str 1.10.0 4 13 5 source: 14 6 fn: unittest-xml-reporting-1.10.0.tar.gz 15 git_rev: ''7 url: https://pypi.python.org/packages/source/u/unittest-xml-reporting/unittest-xml-reporting-1.10.0.tar.gz 16 8 md5: f0d04be2b9bff5b744677b576c326620 17 patches: [] 18 path: '' 19 svn_rev: '' 20 url: https://pypi.python.org/packages/source/u/unittest-xml-reporting/unittest-xml-reporting-1.10.0.tar.gz 9 # patches: 10 # List any patch files here 11 # - fix.patch 12 13 # build: 14 #preserve_egg_dir: True 15 #entry_points: 16 # Put any entry points (scripts to be generated automatically) here. The 17 # syntax is module:function. For example 18 # 19 # - unittest-xml-reporting = unittest-xml-reporting:main 20 # 21 # Would create an entry point called unittest-xml-reporting that calls unittest-xml-reporting.main() 22 23 24 # If this is a new build for the same version, increment the build 25 # number. If you do not include this key, it defaults to 0. 26 # number: 1 27 28 requirements: 29 build: 30 - python 31 - setuptools 32 - six >=1.4.0 33 34 run: 35 - python 36 - six >=1.4.0 37 21 38 test: 22 commands: [] 23 files: [] 24 imports: [xmlrunner, xmlrunner.extra, xmlrunner.tests] 25 requires: [] 39 # Python imports 40 imports: 41 - xmlrunner 42 - xmlrunner.extra 43 - xmlrunner.tests 44 45 #commands: 46 # You can put test commands to be run here. Use this to test that the 47 # entry points work. 48 49 50 # You can also put a file called run_test.py in the recipe that will be run 51 # at test time. 52 53 # requires: 54 # Put any additional test requirements here. For example 55 # - nose 56 57 about: 58 home: http://github.com/xmlrunner/unittest-xml-reporting/tree/master/ 59 license: BSD License 60 summary: 'unittest-based test runner with Ant/JUnit like XML reporting.' 61 62 # See 63 # http://docs.continuum.io/conda/build.html for 64 # more information about meta.yaml -
docs/sphinx-docs/build_sphinx.py
rf620870 r296f290 10 10 import fnmatch 11 11 import shutil 12 import imp 12 13 13 14 from distutils.dir_util import copy_tree … … 17 18 18 19 CURRENT_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 20 21 run = imp.load_source('run', os.path.join(CURRENT_SCRIPT_DIR, '..', '..', 'run.py')) 22 run.prepare() 19 23 20 24 SASVIEW_SRC = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "src") … … 108 112 build() 109 113 110 print "=== Done ==="114 print "=== Done ===" -
sasview/setup_exe.py
r3a39c2e r4172557 307 307 # 308 308 packages = [ 309 'matplotlib', 'scipy', ' pytz', 'encodings', 'comtypes',309 'matplotlib', 'scipy', 'encodings', 'comtypes', 310 310 'win32com', 'ho.pisa', 'bumps', 311 311 ] … … 326 326 327 327 # Exclude packages that are not needed but are often found on build systems 328 excludes = ['Tkinter', 'PyQt4', '_ssl', '_tkagg', 'sip' ]328 excludes = ['Tkinter', 'PyQt4', '_ssl', '_tkagg', 'sip', 'pytz'] 329 329 330 330 -
setup.py
ra6d2e3b rd8c4019 8 8 from distutils.command.build_ext import build_ext 9 9 from distutils.core import Command 10 11 sys.path.append("docs/sphinx-docs")12 import build_sphinx13 10 14 11 try: … … 158 155 self.cwd = os.getcwd() 159 156 160 def run(self): 157 def run(self): 158 sys.path.append("docs/sphinx-docs") 159 import build_sphinx 160 161 161 build_sphinx.clean() 162 162 build_sphinx.retrieve_user_docs() -
src/sas/data_util/nxsunit.py
r79492222 rb3efb7d 128 128 temperature = _build_metric_units('kelvin','K') 129 129 temperature.update(_build_metric_units('Kelvin','K')) 130 130 temperature.update(_build_metric_units('Celcius', 'C')) 131 temperature.update(_build_metric_units('celcius', 'C')) 132 131 133 charge = _build_metric_units('coulomb','C') 132 134 charge.update({'microAmp*hour':0.0036}) … … 146 148 """ 147 149 Unit converter for NeXus style units. 148 149 150 """ 150 151 # Define the units, using both American and European spelling. -
src/sas/dataloader/data_info.py
r79492222 rb3efb7d 338 338 ## Transmission [float] [fraction] 339 339 transmission = None 340 ## Temperature [float] [ C]340 ## Temperature [float] [No Default] 341 341 temperature = None 342 temperature_unit = 'C'342 temperature_unit = None 343 343 ## Position [Vector] [mm] 344 344 position = None -
src/sas/dataloader/readers/associations.py
rfd5ac0d r5dfdfa7 17 17 import sys 18 18 import logging 19 from lxml import etree 20 # Py2exe compatibility: import _elementpath to ensure that py2exe finds it 21 from lxml import _elementpath 19 import json 22 20 23 ## Format version for the XML settings file 24 VERSION = 'sasloader/1.0' 21 FILE_NAME = 'defaults.json' 25 22 26 27 def read_associations(loader, settings='defaults.xml'): 23 def read_associations(loader, settings=FILE_NAME): 28 24 """ 29 25 Read the specified settings file to associate … … 31 27 32 28 :param loader: Loader object 33 :param settings: path to the XMLsettings file [string]29 :param settings: path to the json settings file [string] 34 30 """ 35 31 reader_dir = os.path.dirname(__file__) … … 47 43 path = "./%s" % settings 48 44 if os.path.isfile(path): 49 tree = etree.parse(path, parser=etree.ETCompatXMLParser()) 50 51 # Check the format version number 52 # Specifying the namespace will take care of the file format version 53 root = tree.getroot() 45 with open(path) as fh: 46 json_tree = json.load(fh) 54 47 55 48 # Read in the file extension associations 56 entry_list = root.xpath('/ns:SasLoader/ns:FileType', 57 namespaces={'ns': VERSION}) 49 entry_list = json_tree['SasLoader']['FileType'] 58 50 59 51 # For each FileType entry, get the associated reader and extension 60 52 for entry in entry_list: 61 reader = entry .get('reader')62 ext = entry .get('extension')53 reader = entry['-reader'] 54 ext = entry['-extension'] 63 55 64 56 if reader is not None and ext is not None: -
src/sas/dataloader/readers/cansas_reader.py
r79492222 rb3efb7d 307 307 if 'unit' in attr and new_current_level.get('unit') is not None: 308 308 try: 309 local_unit = attr['unit'] 309 310 if isinstance(node_value, float) is False: 310 311 exec("node_value = float({0})".format(node_value)) … … 312 313 unitname = new_current_level.get("unit") 313 314 exec "default_unit = data1d.{0}".format(unitname) 314 local_unit = attr['unit'] 315 if local_unit.lower() != default_unit.lower() and \ 316 local_unit is not None and local_unit.lower() != "none" \ 317 and default_unit is not None: 315 if local_unit is not None and default_unit is not None and \ 316 local_unit.lower() != default_unit.lower() \ 317 and local_unit.lower() != "none": 318 318 if HAS_CONVERTER == True: 319 try: 320 ## Check local units - bad units raise KeyError 321 Converter(local_unit) 322 data_conv_q = Converter(attr['unit']) 323 value_unit = default_unit 324 i_string = "node_value = data_conv_q" 325 i_string += "(node_value, units=data1d.{0})" 326 exec i_string.format(unitname) 327 except KeyError: 328 err_msg = "CanSAS reader: could not convert " 329 err_msg += "{0} unit {1}; " 330 err_msg = err_msg.format(tagname, local_unit) 331 intermediate = "err_msg += " + \ 332 "\"expecting [{1}] {2}\"" + \ 333 ".format(data1d.{0}, " + \ 334 "sys.exc_info()[1])" 335 exec intermediate.format(unitname, "{0}", "{1}") 336 self.errors.append(err_msg) 337 raise ValueError(err_msg) 338 except: 339 err_msg = \ 340 "CanSAS reader: could not convert the units" 341 self.errors.append(err_msg) 342 return 319 ## Check local units - bad units raise KeyError 320 data_conv_q = Converter(local_unit) 321 value_unit = default_unit 322 i_string = "node_value = data_conv_q" 323 i_string += "(node_value, units=data1d.{0})" 324 exec i_string.format(unitname) 343 325 else: 344 326 value_unit = local_unit 345 err_msg = "CanSAS reader: unrecognized %s unit [%s];"\ 346 % (node_value, default_unit) 347 err_msg += " expecting [%s]" % local_unit 327 err_msg = "Unit converter is not available.\n" 348 328 self.errors.append(err_msg) 349 raise ValueError, err_msg350 329 else: 351 330 value_unit = local_unit 331 except KeyError: 332 err_msg = "CanSAS reader: unexpected " 333 err_msg += "\"{0}\" unit [{1}]; " 334 err_msg = err_msg.format(tagname, local_unit) 335 intermediate = "err_msg += " + \ 336 "\"expecting [{1}]\"" + \ 337 ".format(data1d.{0})" 338 exec intermediate.format(unitname, "{0}", "{1}") 339 self.errors.append(err_msg) 340 value_unit = local_unit 352 341 except: 353 err_msg = "CanSAS reader: could not convert " 354 err_msg += "Q unit [%s]; " % attr['unit'] 355 intermediate = "err_msg += \"expecting [%s]\n %s\" % " + \ 356 "(data1d.{0}, sys.exc_info()[1])" 357 exec intermediate.format(unitname) 342 print sys.exc_info() 343 err_msg = "CanSAS reader: unknown error converting " 344 err_msg += "\"{0}\" unit [{1}]" 345 err_msg = err_msg.format(tagname, local_unit) 358 346 self.errors.append(err_msg) 359 raise ValueError, err_msg347 value_unit = local_unit 360 348 elif 'unit' in attr: 361 349 value_unit = attr['unit'] … … 488 476 data1d, tagname) 489 477 cansas_attrib = \ 490 cs_values.current_level.get("attributes").get(key)478 cs_values.current_level.get("attributes").get(key) 491 479 attrib_variable = cansas_attrib.get("variable") 492 480 if key == 'unit' and unit != '': -
src/sas/guiframe/gui_manager.py
rb9a5f0e r9bbb627 24 24 import logging 25 25 import httplib 26 import webbrowser 27 26 28 27 29 from sas.guiframe.events import EVT_CATEGORY … … 1325 1327 def _add_help_menu(self): 1326 1328 """ 1327 add help menu 1329 add help menu to menu bar. Includes welcome page, about page, 1330 tutorial PDF and documentation pages. 1328 1331 """ 1329 1332 # Help menu … … 1336 1339 id = wx.NewId() 1337 1340 self._help_menu.Append(id, '&Welcome', '') 1338 self._help_menu.AppendSeparator()1339 1341 wx.EVT_MENU(self, id, self.show_welcome_panel) 1340 1342 1341 # Look for help item in plug-ins 1342 for item in self.plugins: 1343 if hasattr(item, "help"): 1344 id = wx.NewId() 1345 self._help_menu.Append(id,'&%s Help' % item.sub_menu, '') 1346 wx.EVT_MENU(self, id, item.help) 1347 1348 # Only show new Sphinx docs link if version of wx supports displaying 1349 # it correctly. 1350 show_sphinx_docs = float(wx.__version__[:3]) >= 2.9 1351 if show_sphinx_docs: 1352 self._help_menu.AppendSeparator() 1353 id = wx.NewId() 1354 self._help_menu.Append(id, '&Sphinx Documentation', '') 1355 wx.EVT_MENU(self, id, self._onSphinxDocs) 1343 self._help_menu.AppendSeparator() 1344 id = wx.NewId() 1345 self._help_menu.Append(id, '&Documentation', '') 1346 wx.EVT_MENU(self, id, self._onSphinxDocs) 1356 1347 1357 1348 if config._do_tutorial and (IS_WIN or sys.platform =='darwin'): … … 2162 2153 def _onSphinxDocs(self, evt): 2163 2154 """ 2164 Pop up a Sphinx Documentation dialog. 2155 Bring up Sphinx Documentation. If Wx 2.9 or higher is installed 2156 with proper HTML support then Pop up a Sphinx Documentation dialog 2157 locally. If not pop up a new tab in the default system browser 2158 calling the documentation website. 2165 2159 2166 2160 :param evt: menu event … … 2168 2162 # Running SasView "in-place" using run.py means the docs will be in a 2169 2163 # different place than they would otherwise. 2170 SPHINX_DOC_ENV = "SASVIEW_DOC_PATH" 2171 if SPHINX_DOC_ENV in os.environ: 2172 docs_path = os.path.join(os.environ[SPHINX_DOC_ENV], "index.html") 2164 2165 show_sphinx_docs = float(wx.__version__[:3]) >= 2.9 2166 if show_sphinx_docs: 2167 SPHINX_DOC_ENV = "SASVIEW_DOC_PATH" 2168 if SPHINX_DOC_ENV in os.environ: 2169 docs_path = os.path.join(os.environ[SPHINX_DOC_ENV], "index.html") 2170 else: 2171 docs_path = os.path.join(PATH_APP, "..", "..", "doc", "index.html") 2172 2173 if os.path.exists(docs_path): 2174 from documentation_window import DocumentationWindow 2175 2176 sphinx_doc_viewer = DocumentationWindow(None, -1, docs_path) 2177 sphinx_doc_viewer.Show() 2178 else: 2179 logging.error("Could not find Sphinx documentation at '%' -- has it been built?" % docs_path) 2173 2180 else: 2174 docs_path = os.path.join(PATH_APP, "..", "..", "doc", "index.html") 2175 2176 if os.path.exists(docs_path): 2177 from documentation_window import DocumentationWindow 2178 2179 sphinx_doc_viewer = DocumentationWindow(None, -1, docs_path) 2180 sphinx_doc_viewer.Show() 2181 else: 2182 logging.error("Could not find Sphinx documentation at '%' -- has it been built?" % docs_path) 2181 #For red hat and maybe others who do not have Wx 3.0 2182 #just send to webpage of documentation 2183 webbrowser.open_new_tab('http://www.sasview.org/sasview') 2183 2184 2184 2185 def set_manager(self, manager): -
src/sas/guiframe/gui_statusbar.py
r79492222 rb3efb7d 315 315 if msg == "error": 316 316 e_msg = "Error(s) Occurred:\n" 317 e_msg += event.status 317 e_msg += "\t" + event.status + "\n\n" 318 e_msg += "Further information might be available in " 319 e_msg += "the Console log (bottom right corner)." 318 320 wx.MessageBox(e_msg, style=wx.ICON_ERROR) 319 321 -
src/sas/guiframe/local_perspectives/data_loader/data_loader.py
r7a04dbb rb3efb7d 171 171 file) for file in os.listdir(path)] 172 172 173 def _process_data_and_errors(self, item, p_file, output, message): 174 """ 175 Check to see if data set loaded with any errors. If so, append to 176 error message to be sure user knows the issue. 177 """ 178 data_error = False 179 for error_data in item.errors: 180 data_error = True 181 message += "\tError: {0}\n".format(error_data) 182 data = self.parent.create_gui_data(item, p_file) 183 output[data.id] = data 184 return output, message, data_error 185 173 186 def get_data(self, path, format=None): 174 187 """ … … 178 191 output = {} 179 192 any_error = False 193 data_error = False 180 194 error_message = "" 181 195 for p_file in path: 182 196 info = "info" 183 197 basename = os.path.basename(p_file) 184 root, extension = os.path.splitext(basename)198 _, extension = os.path.splitext(basename) 185 199 if extension.lower() in EXTENSIONS: 186 200 any_error = True … … 194 208 195 209 try: 210 message = "Loading Data... " + str(p_file) + "\n" 211 self.load_update(output=output, message=message, info=info) 196 212 temp = self.loader.load(p_file, format) 197 213 if temp.__class__.__name__ == "list": 198 214 for item in temp: 199 data = self.parent.create_gui_data(item, p_file) 200 output[data.id] = data 215 output, error_message, data_error = \ 216 self._process_data_and_errors(item, 217 p_file, 218 output, 219 error_message) 201 220 else: 202 data = self.parent.create_gui_data(temp, p_file) 203 output[data.id] = data 204 message = "Loading Data..." + str(p_file) + "\n" 205 self.load_update(output=output, message=message, info=info) 221 output, error_message, data_error = \ 222 self._process_data_and_errors(temp, 223 p_file, 224 output, 225 error_message) 206 226 except: 207 227 any_error = True 208 if error_message == "": 209 error = "Error: " + str(sys.exc_value) + "\n" 210 error += "while loading Data: \n%s\n" % str(p_file) 211 error_message = "The data file you selected could not be loaded.\n" 212 error_message += "Make sure the content of your file" 213 error_message += " is properly formatted.\n\n" 214 error_message += "When contacting the DANSE team, mention the" 215 error_message += " following:\n%s" % str(error) 216 else: 217 error_message += "%s\n"% str(p_file) 218 info = "error" 219 self.load_update(output=output, message=error_message, 228 if any_error or error_message != "": 229 if error_message == "": 230 error = "Error: " + str(sys.exc_value) + "\n" 231 error += "while loading Data: \n%s\n" % str(p_file) 232 error_message = "The data file you selected could not be loaded.\n" 233 error_message += "Make sure the content of your file" 234 error_message += " is properly formatted.\n\n" 235 error_message += "When contacting the DANSE team, mention the" 236 error_message += " following:\n%s" % str(error) 237 elif data_error: 238 base_message = "Errors occurred while loading {0}\n".format(p_file) 239 base_message += "The data file loaded but with errors.\n" 240 error_message = base_message + error_message 241 else: 242 error_message += "%s\n"% str(p_file) 243 info = "error" 244 self.load_update(output=output, message=error_message, 220 245 info=info) 221 246 222 message = "Loading Data Complete! " 247 else: 248 message = "Loading Data Complete! " 223 249 message += log_msg 224 if error_message != "":225 info = 'error'226 250 self.load_complete(output=output, error_message=error_message, 227 251 message=message, path=path, info=info) -
src/sas/models/c_extension/python_wrapper/modelTemplate.txt
rfd5ac0d r8836849 26 26 from sas.models.BaseComponent import BaseComponent 27 27 from sas.models.sas_extension.c_models import [CPYTHONCLASS] 28 from numpy import inf 28 29 29 30 def create_[PYTHONCLASS](): -
src/sas/models/include/cylinder.h
r79492222 r8836849 34 34 35 35 /// Radius of the cylinder [A] 36 // [DEFAULT]=radius=20.0 [A] 36 // [DEFAULT]=radius=20.0 [A] 0.0 inf 37 37 Parameter radius; 38 38 39 39 /// Length of the cylinder [A] 40 // [DEFAULT]=length=400.0 [A] 40 // [DEFAULT]=length=400.0 [A] 0.0 inf 41 41 Parameter length; 42 42 -
src/sas/perspectives/fitting/fitpage.py
rb9a5f0e r22ae2f7 1492 1492 after fitting 1493 1493 """ 1494 1494 1495 if self.is_mac: 1495 1496 return … … 1500 1501 for item in self.parameters: 1501 1502 if item[0].IsShown(): 1502 #Skip t ifhe angle parameters if 1D data1503 #Skip the angle parameters if 1D data 1503 1504 if self.data.__class__.__name__ != "Data2D" and \ 1504 1505 not self.enable2D: … … 1519 1520 for item in self.fittable_param: 1520 1521 if item[0].IsShown(): 1521 #Skip t ifhe angle parameters if 1D data1522 #Skip the angle parameters if 1D data 1522 1523 if self.data.__class__.__name__ != "Data2D" and \ 1523 1524 not self.enable2D: … … 2076 2077 2077 2078 """ 2079 2078 2080 # make sure stop button to fit button all the time 2079 2081 self._on_fit_complete() … … 2112 2114 i = 0 2113 2115 #Set the panel when fit result are list 2116 2114 2117 for item in self.param_toFit: 2115 2118 if len(item) > 5 and item != None: 2119 2116 2120 if item[0].IsShown(): 2117 2121 ## reset error value to initial state … … 2144 2148 item[3].Show(True) 2145 2149 item[4].Show(True) 2150 item[4].SetForegroundColour(wx.BLACK) 2151 item[4].SetValue(val_err) 2152 has_error = True 2153 else: 2154 val_err = 'NaN' 2155 if not self.is_mac: 2156 item[3].Show(True) 2157 item[4].Show(True) 2158 item[4].SetForegroundColour(wx.RED) 2146 2159 item[4].SetValue(val_err) 2147 2160 has_error = True … … 2831 2844 2832 2845 keys = self.model.getParamList() 2833 #list of dispersion paramaters 2846 2847 #list of dispersion parameters 2834 2848 self.disp_list = self.model.getDispParamList() 2835 2849 … … 2925 2939 CHECK_STATE = self.cb1.GetValue() 2926 2940 for item in keys: 2941 2927 2942 if not item in self.disp_list and not item in \ 2928 2943 self.model.orientation_params: … … 2998 3013 if not self.is_mac: 2999 3014 ctl2.Hide() 3000 3015 3001 3016 ix += 1 3002 3017 ctl3 = self.ModelTextCtrl(self, -1, … … 3004 3019 style=wx.TE_PROCESS_ENTER, 3005 3020 text_enter_callback=self._onparamRangeEnter) 3006 3021 min_bound = self.model.details[item][1] 3022 if min_bound is not None: 3023 ctl3.SetValue(format_number(min_bound, True)) 3024 3007 3025 sizer.Add(ctl3, (iy, ix), (1, 1), 3008 3026 wx.EXPAND | wx.ADJUST_MINSIZE, 0) … … 3013 3031 style=wx.TE_PROCESS_ENTER, 3014 3032 text_enter_callback=self._onparamRangeEnter) 3033 max_bound = self.model.details[item][2] 3034 if max_bound is not None: 3035 ctl4.SetValue(format_number(max_bound, True)) 3015 3036 sizer.Add(ctl4, (iy, ix), (1, 1), 3016 3037 wx.EXPAND | wx.FIXED_MINSIZE, 0) -
src/sas/perspectives/fitting/pagestate.py
rb9a5f0e rd06ae30 472 472 Get the values (strings) from __str__ for report 473 473 """ 474 # Dictionary of t ehreport strings474 # Dictionary of the report strings 475 475 repo_time = "" 476 476 model_name = "" … … 508 508 if name == "value": 509 509 param_string += value + ',' 510 if name == "selected": 511 if value == u' False': 512 fixed_parameter = True 513 else: 514 fixed_parameter = False 510 515 if name == "error value": 511 param_string += value + ',' 516 if fixed_parameter: 517 param_string += '(fixed),' 518 else: 519 param_string += value + ',' 512 520 if name == "parameter unit": 513 521 param_string += value + ':' -
src/sas/perspectives/fitting/report_dialog.py
r79492222 rd06ae30 1 1 """ 2 2 Dialog report panel to show and summarize the results of 3 the invariantcalculation.3 the fitting calculation. 4 4 """ 5 5 ################################################################################ -
test/sasdataloader/test/utest_abs_reader.py
r35ec279 rb3efb7d 345 345 self.assertEqual(self.data.filename, filename) 346 346 # The followed should not have been loaded 347 self.assertEqual(self.data.sample.thickness, None)347 self.assertEqual(self.data.sample.thickness, 0.00103) 348 348 # This one should 349 349 self.assertEqual(self.data.sample.transmission, 0.327) 350 350 351 351 self.assertEqual(self.data.meta_data['loader'], "CanSAS 1D") 352 self.assertEqual(len(self.data.errors), 1) 352 print self.data.errors 353 self.assertEqual(len(self.data.errors), 2) 353 354 354 355
Note: See TracChangeset
for help on using the changeset viewer.