Changes in / [bc04647:6a455cd3] in sasview
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/sphinx-docs/source/conf.py
r959eb01 r36303ee 39 39 'sphinx.ext.viewcode'] 40 40 41 #set mathjax path 42 mathjax_path="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML" 43 41 44 # Add any paths that contain templates here, relative to this directory. 42 45 templates_path = ['_templates'] … … 62 65 version = '4.1' 63 66 # The full version, including alpha/beta/rc tags. 64 release = '4.1. 0'67 release = '4.1.1' 65 68 66 69 # The language for content autogenerated by Sphinx. Refer to documentation -
sasview/README.txt
r311d00a rb61bd57 4 4 1- Features 5 5 =========== 6 - New in Version 4.1.1 7 -------------------- 8 This point release is a bug-fix release addressing: 9 10 - Fixes #948: Mathjax CDN is going away 11 - Fixes #938: Cannot read canSAS1D file output by SasView 12 - Fixes #960: Save project throws error if empty fit page 13 - Fixes #929: Problem deleting data in first fit page 14 - Fixes #918: Test folders not bundled with release 15 - Fixes an issue with the live discovery of plugin models 16 - Fixes an issue with the NXcanSAS data loader 17 - Updated tutorials for SasView 4.x.y 18 19 It is recommended that all users upgrade to this version 20 6 21 - New in Version 4.1.0 7 22 ------------------ -
sasview/__init__.py
r463e7ffc r531ac4da 1 __version__ = "4.1 "1 __version__ = "4.1.1" 2 2 __build__ = "GIT_COMMIT" 3 3 -
sasview/local_config.py
ra1b8fee r502fa73 47 47 '''This work benefited from the use of the SasView application, originally developed under NSF Award DMR-0520547. SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project Grant No 654000.''' 48 48 _acknowledgement_citation = \ 49 '''M. Doucet et al. SasView Version 4.1 , Zenodo, 10.5281/zenodo.438138'''49 '''M. Doucet et al. SasView Version 4.1.1, Zenodo, 10.5281/zenodo.825675''' 50 50 51 51 _acknowledgement = \ -
sasview/setup_exe.py
ra1b8fee ra1b8fee 179 179 test_1d_dir = os.path.join(path, "test\\1d_data") 180 180 test_2d_dir = os.path.join(path, "test\\2d_data") 181 test_sesans_dir = os.path.join(path, "test\\sesans_data") 182 test_convertible_dir = os.path.join(path, "test\\convertible_data") 181 183 test_save_dir = os.path.join(path, "test\\save_states") 182 test_upcoming_dir = os.path.join(path, "test\\upcoming_formats") 184 test_coord_dir = os.path.join(path, "test\\coordinate_data") 185 test_image_dir = os.path.join(path, "test\\image_data") 186 test_other_dir = os.path.join(path, "test\\other_files") 183 187 184 188 matplotlibdatadir = matplotlib.get_data_path() … … 273 277 # Copying the images directory to the distribution directory. 274 278 for f in findall(images_dir): 275 if not ".svn" in f: 276 data_files.append(("images", [f])) 279 data_files.append(("images", [f])) 277 280 278 281 # Copying the HTML help docs 279 282 for f in findall(media_dir): 280 if not ".svn" in f: 281 data_files.append(("media", [f])) 283 data_files.append(("media", [f])) 282 284 283 285 # Copying the sample data user data 284 286 for f in findall(test_1d_dir): 285 if not ".svn" in f: 286 data_files.append(("test\\1d_data", [f])) 287 288 # Copying the sample data user data 287 data_files.append(("test\\1d_data", [f])) 289 288 for f in findall(test_2d_dir): 290 if not ".svn" in f: 291 data_files.append(("test\\2d_data", [f])) 292 293 # Copying the sample data user data 289 data_files.append(("test\\2d_data", [f])) 294 290 for f in findall(test_save_dir): 295 if not ".svn" in f: 296 data_files.append(("test\\save_states", [f])) 297 298 # Copying the sample data user data 299 for f in findall(test_upcoming_dir): 300 if not ".svn" in f: 301 data_files.append(("test\\upcoming_formats", [f])) 291 data_files.append(("test\\save_states", [f])) 292 for f in findall(test_sesans_dir): 293 data_files.append(("test\\sesans_data", [f])) 294 for f in findall(test_convertible_dir): 295 data_files.append(("test\\convertible_files", [f])) 296 for f in findall(test_coord_dir): 297 data_files.append(("test\\coordinate_data", [f])) 298 for f in findall(test_image_dir): 299 data_files.append(("test\\image_data", [f])) 300 for f in findall(test_other_dir): 301 data_files.append(("test\\other_files", [f])) 302 302 303 303 # Copying opencl include files -
src/sas/sascalc/dataloader/readers/cansas_reader.py
r7432acb r7432acb 158 158 # If the file does not match the schema, raise this error 159 159 invalid_xml = self.find_invalid_xml() 160 invalid_xml = INVALID_XML.format(basename + extension) + invalid_xml 161 self.errors.add(invalid_xml) 160 if invalid_xml != "": 161 invalid_xml = INVALID_XML.format(basename + extension) + invalid_xml 162 self.errors.add(invalid_xml) 162 163 # Try again with an invalid CanSAS schema, that requires only a data set in each 163 164 base_name = xml_reader.__file__ … … 263 264 # I and Q - 1D data 264 265 elif tagname == 'I' and isinstance(self.current_dataset, plottable_1D): 265 unit_list = unit.split("|") 266 if len(unit_list) > 1: 267 self.current_dataset.yaxis(unit_list[0].strip(), 268 unit_list[1].strip()) 269 else: 270 self.current_dataset.yaxis("Intensity", unit) 266 self.current_dataset.yaxis("Intensity", unit) 271 267 self.current_dataset.y = np.append(self.current_dataset.y, data_point) 272 268 elif tagname == 'Idev' and isinstance(self.current_dataset, plottable_1D): 273 269 self.current_dataset.dy = np.append(self.current_dataset.dy, data_point) 274 270 elif tagname == 'Q': 275 unit_list = unit.split("|") 276 if len(unit_list) > 1: 277 self.current_dataset.xaxis(unit_list[0].strip(), 278 unit_list[1].strip()) 279 else: 280 self.current_dataset.xaxis("Q", unit) 271 self.current_dataset.xaxis("Q", unit) 281 272 self.current_dataset.x = np.append(self.current_dataset.x, data_point) 282 273 elif tagname == 'Qdev': … … 292 283 elif tagname == 'Sesans': 293 284 self.current_datainfo.isSesans = bool(data_point) 285 self.current_dataset.xaxis(attr.get('x_axis'), 286 attr.get('x_unit')) 287 self.current_dataset.yaxis(attr.get('y_axis'), 288 attr.get('y_unit')) 294 289 elif tagname == 'yacceptance': 295 290 self.current_datainfo.sample.yacceptance = (data_point, unit) … … 785 780 value_unit = local_unit 786 781 except KeyError: 787 err_msg = "CanSAS reader: unexpected " 788 err_msg += "\"{0}\" unit [{1}]; " 789 err_msg = err_msg.format(tagname, local_unit) 790 err_msg += "expecting [{0}]".format(default_unit) 782 # Do not throw an error for loading Sesans data in cansas xml 783 # This is a temporary fix. 784 if local_unit != "A" and local_unit != 'pol': 785 err_msg = "CanSAS reader: unexpected " 786 err_msg += "\"{0}\" unit [{1}]; " 787 err_msg = err_msg.format(tagname, local_unit) 788 err_msg += "expecting [{0}]".format(default_unit) 791 789 value_unit = local_unit 792 790 except: … … 1039 1037 node.append(point) 1040 1038 self.write_node(point, "Q", datainfo.x[i], 1041 {'unit': datainfo. _xaxis + " | " + datainfo._xunit})1039 {'unit': datainfo.x_unit}) 1042 1040 if len(datainfo.y) >= i: 1043 1041 self.write_node(point, "I", datainfo.y[i], 1044 {'unit': datainfo. _yaxis + " | " + datainfo._yunit})1042 {'unit': datainfo.y_unit}) 1045 1043 if datainfo.dy is not None and len(datainfo.dy) > i: 1046 1044 self.write_node(point, "Idev", datainfo.dy[i], 1047 {'unit': datainfo. _yaxis + " | " + datainfo._yunit})1045 {'unit': datainfo.y_unit}) 1048 1046 if datainfo.dx is not None and len(datainfo.dx) > i: 1049 1047 self.write_node(point, "Qdev", datainfo.dx[i], 1050 {'unit': datainfo. _xaxis + " | " + datainfo._xunit})1048 {'unit': datainfo.x_unit}) 1051 1049 if datainfo.dxw is not None and len(datainfo.dxw) > i: 1052 1050 self.write_node(point, "dQw", datainfo.dxw[i], 1053 {'unit': datainfo. _xaxis + " | " + datainfo._xunit})1051 {'unit': datainfo.x_unit}) 1054 1052 if datainfo.dxl is not None and len(datainfo.dxl) > i: 1055 1053 self.write_node(point, "dQl", datainfo.dxl[i], 1056 {'unit': datainfo. _xaxis + " | " + datainfo._xunit})1054 {'unit': datainfo.x_unit}) 1057 1055 if datainfo.isSesans: 1058 sesans = self.create_element("Sesans") 1056 sesans_attrib = {'x_axis': datainfo._xaxis, 1057 'y_axis': datainfo._yaxis, 1058 'x_unit': datainfo.x_unit, 1059 'y_unit': datainfo.y_unit} 1060 sesans = self.create_element("Sesans", attrib=sesans_attrib) 1059 1061 sesans.text = str(datainfo.isSesans) 1060 node.append(sesans)1061 self.write_node( node, "yacceptance", datainfo.sample.yacceptance[0],1062 entry_node.append(sesans) 1063 self.write_node(entry_node, "yacceptance", datainfo.sample.yacceptance[0], 1062 1064 {'unit': datainfo.sample.yacceptance[1]}) 1063 self.write_node( node, "zacceptance", datainfo.sample.zacceptance[0],1065 self.write_node(entry_node, "zacceptance", datainfo.sample.zacceptance[0], 1064 1066 {'unit': datainfo.sample.zacceptance[1]}) 1065 1067 -
src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py
rc94280c r7c24685 126 126 127 127 if isinstance(value, h5py.Group): 128 parent_class = class_name 128 129 self.parent_class = class_name 129 130 parent_list.append(key) … … 136 137 # Recursion step to access data within the group 137 138 self.read_children(value, parent_list) 139 self.parent_class = parent_class 138 140 self.add_intermediate() 139 141 parent_list.remove(key) -
src/sas/sascalc/dataloader/readers/xml_reader.py
r235f514 r235f514 130 130 first_error = schema.assertValid(self.xmldoc) 131 131 except etree.DocumentInvalid as err: 132 # Suppress errors for <'any'> elements 133 if "##other" in str(err): 134 return first_error 132 135 first_error = str(err) 133 136 return first_error -
src/sas/sasgui/guiframe/config.py
ra1b8fee rb9110ec 48 48 '''This work benefited from the use of the SasView application, originally developed under NSF Award DMR-0520547. SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project Grant No 654000.''' 49 49 _acknowledgement_citation = \ 50 '''M. Doucet et al. SasView Version 4.1 , Zenodo, 10.5281/zenodo.438138'''50 '''M. Doucet et al. SasView Version 4.1.1, Zenodo, 10.5281/zenodo.825675''' 51 51 52 52 _acknowledgement = \ -
src/sas/sasgui/guiframe/documentation_window.py
r959eb01 rd7ee5866 75 75 logger.error("Could not find Sphinx documentation at %s \ 76 76 -- has it been built?", file_path) 77 elif WX_SUPPORTS_HTML2: 78 # Complete HTML/CSS support! 79 self.view = html.WebView.New(self) 80 self.view.LoadURL(url) 81 self.Show() 77 #Commenting following 5 lines, so default browser is forced 78 #This is due to CDN mathjax discontinuation of service, intenal help 79 #browser should be back with qt version 80 #Note added by Wojtek Potrzebowski, July 4th 2017 81 # elif WX_SUPPORTS_HTML2: 82 # # Complete HTML/CSS support! 83 # self.view = html.WebView.New(self) 84 # self.view.LoadURL(url) 85 # self.Show() 82 86 else: 83 87 logger.error("No html2 support, popping up a web browser") -
src/sas/sasgui/perspectives/fitting/fitpage.py
r9a5097c r7143065 1236 1236 wx.PostEvent(self.parent, new_event) 1237 1237 # update list of plugins if new plugin is available 1238 custom_model = CUSTOM_MODEL1239 1238 mod_cat = self.categorybox.GetStringSelection() 1240 if mod_cat == custom_model: 1239 if mod_cat == CUSTOM_MODEL: 1240 temp_id = self.model.id 1241 1241 temp = self.parent.update_model_list() 1242 for v in self.parent.model_dictionary.values(): 1243 if v.id == temp_id: 1244 self.model = v() 1245 break 1242 1246 if temp: 1243 1247 self.model_list_box = temp -
src/sas/sasgui/perspectives/fitting/fitpanel.py
r67b0a99 rd79feea 92 92 # state must be cloned 93 93 state = page.get_state().clone() 94 if data is not None or page.model is not None: 94 # data_list only populated with real data 95 # Fake object in data from page.get_data() if model is selected 96 if len(page.data_list) is not 0 and page.model is not None: 95 97 new_doc = self._manager.state_reader.write_toXML(data, 96 98 state, 97 99 batch_state) 100 # Fit #2 through #n are append to first fit 98 101 if doc is not None and hasattr(doc, "firstChild"): 99 child = new_doc.firstChild.firstChild 100 doc.firstChild.appendChild(child) 102 # Only append if properly formed new_doc 103 if new_doc is not None and hasattr(new_doc, "firstChild"): 104 child = new_doc.firstChild.firstChild 105 doc.firstChild.appendChild(child) 106 # First fit defines the main document 101 107 else: 102 108 doc = new_doc … … 395 401 temp_data = page.get_data() 396 402 if temp_data is not None and temp_data.id in data: 397 self.SetSelection(pos) 398 self.on_close_page(event=None) 399 temp = self.GetSelection() 400 self.DeletePage(temp) 403 self.close_page_with_data(temp_data) 401 404 if self.sim_page is not None: 402 405 if len(self.sim_page.model_list) == 0: … … 405 408 self.on_close_page(event=None) 406 409 temp = self.GetSelection() 407 self.DeletePage( temp)410 self.DeletePage(pos) 408 411 self.sim_page = None 409 412 self.batch_on = False -
src/sas/sasgui/perspectives/fitting/models.py
r56a282c r56a282c 20 20 from sas.sasgui.guiframe.CategoryInstaller import CategoryInstaller 21 21 from sasmodels.sasview_model import load_custom_model, load_standard_models 22 from sas.sasgui.perspectives.fitting.fitpage import CUSTOM_MODEL 22 23 23 24 logger = logging.getLogger(__name__) … … 264 265 temp = {} 265 266 if self.is_changed(): 266 return _find_models() 267 temp = _findModels() 268 self.last_time_dir_modified = time.time() 269 return temp 267 270 logger.info("plugin model : %s" % str(temp)) 268 271 return temp … … 311 314 if os.path.isdir(plugin_dir): 312 315 temp = os.path.getmtime(plugin_dir) 313 if self.last_time_dir_modified !=temp:316 if self.last_time_dir_modified < temp: 314 317 is_modified = True 315 318 self.last_time_dir_modified = temp … … 322 325 new models were added else return empty dictionary 323 326 """ 327 self.plugins = [] 324 328 new_plugins = self.findModels() 325 if len(new_plugins) > 0: 326 for name, plug in new_plugins.iteritems(): 327 if name not in self.stored_plugins.keys(): 328 self.stored_plugins[name] = plug 329 self.plugins.append(plug) 330 self.model_dictionary[name] = plug 331 self.model_combobox.set_list("Plugin Models", self.plugins) 329 if new_plugins: 330 for name, plug in new_plugins.items(): 331 self.stored_plugins[name] = plug 332 self.plugins.append(plug) 333 self.model_dictionary[name] = plug 334 self.model_combobox.set_list(CUSTOM_MODEL, self.plugins) 332 335 return self.model_combobox.get_list() 333 336 else:
Note: See TracChangeset
for help on using the changeset viewer.