Changeset 51a4d78 in sasview for src/sas/sasgui/guiframe
- Timestamp:
- Oct 8, 2016 3:33:04 PM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 1fac6c0
- Parents:
- 7988501 (diff), f7bc948 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/sas/sasgui/guiframe
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/CategoryInstaller.py
r50008e3 r212bfc2 11 11 import os 12 12 import sys 13 import shutil14 13 import json 15 from collections import defaultdict 14 import logging 15 from collections import defaultdict, OrderedDict 16 16 17 17 USER_FILE = 'categories.json' … … 23 23 Note - class is entirely static! 24 24 """ 25 26 25 27 26 def __init__(self): … … 43 42 import sas.sasgui.perspectives.fitting.models 44 43 return sas.sasgui.perspectives.fitting.models.get_model_python_path() 45 44 46 45 @staticmethod 47 46 def _get_default_cat_file_dir(): … … 54 53 import sas.sasview 55 54 cat_file = "default_categories.json" 56 55 57 56 possible_cat_file_paths = [ 58 57 os.path.join(os.path.split(sas.sasview.__file__)[0], cat_file), # Source … … 64 63 if os.path.isfile(path): 65 64 return os.path.dirname(path) 66 65 67 66 raise RuntimeError('CategoryInstaller: Could not find folder containing default categories') 68 67 … … 89 88 by_model_dict[model].append(category) 90 89 model_enabled_dict[model] = enabled 91 90 92 91 return (by_model_dict, model_enabled_dict) 93 94 92 95 93 @staticmethod … … 105 103 master_category_dict[category].append(\ 106 104 (model, model_enabled_dict[model])) 107 108 return master_category_dict 105 return OrderedDict(sorted(master_category_dict.items(), key=lambda t: t[0])) 109 106 110 107 @staticmethod … … 113 110 returns the user data file, eg .sasview/categories.json.json 114 111 """ 115 return os.path.join(CategoryInstaller._get_home_dir(), 116 USER_FILE) 112 return os.path.join(CategoryInstaller._get_home_dir(), USER_FILE) 117 113 118 114 @staticmethod 119 115 def get_default_file(): 120 """ 121 returns the path of the default file 122 e.g. blahblah/default_categories.json 123 """ 124 return os.path.join(\ 125 CategoryInstaller._get_default_cat_file_dir(), "default_categories.json") 126 116 logging.warning("CategoryInstaller.get_default_file is deprecated.") 117 127 118 @staticmethod 128 119 def check_install(homedir = None, model_list=None): … … 134 125 :param model_list: List of model names except customized models 135 126 """ 136 #model_list = [] 137 default_file = CategoryInstaller.get_default_file() 127 _model_dict = { model.name: model for model in model_list} 128 _model_list = _model_dict.keys() 129 138 130 serialized_file = None 139 master_category_dict = defaultdict(list)140 131 if homedir == None: 141 132 serialized_file = CategoryInstaller.get_user_file() … … 143 134 serialized_file = os.path.join(homedir, USER_FILE) 144 135 if os.path.isfile(serialized_file): 145 cat_file = open(serialized_file, 'rb') 136 with open(serialized_file, 'rb') as f: 137 master_category_dict = json.load(f) 146 138 else: 147 cat_file = open(default_file, 'rb') 148 master_category_dict = json.load(cat_file) 149 # master_category_dict = pickle.Unpickler(cat_file).load() 139 master_category_dict = defaultdict(list) 140 150 141 (by_model_dict, model_enabled_dict) = \ 151 142 CategoryInstaller._regenerate_model_dict(master_category_dict) 152 cat_file.close() 153 add_list = model_list 143 add_list = _model_list 154 144 del_name = False 155 145 for cat in master_category_dict.keys(): 156 146 for ind in range(len(master_category_dict[cat])): 157 147 model_name, enabled = master_category_dict[cat][ind] 158 if model_name not in model_list:148 if model_name not in _model_list: 159 149 del_name = True 160 150 try: … … 162 152 model_enabled_dict.pop(model_name) 163 153 except: 164 pass154 logging.error("CategoryInstaller: %s", sys.exc_value) 165 155 else: 166 156 add_list.remove(model_name) … … 168 158 for model in add_list: 169 159 model_enabled_dict[model]= True 170 by_model_dict[model].append('Uncategorized') 171 160 if _model_dict[model].category is None or len(str(_model_dict[model].category.capitalize())) == 0: 161 by_model_dict[model].append('Uncategorized') 162 else: 163 category = _model_dict[model].category 164 toks = category.split(':') 165 category = toks[-1] 166 toks = category.split('-') 167 capitalized_words = [t.capitalize() for t in toks] 168 category = ' '.join(capitalized_words) 169 170 by_model_dict[model].append(category) 171 172 172 master_category_dict = \ 173 173 CategoryInstaller._regenerate_master_dict(by_model_dict, 174 174 model_enabled_dict) 175 176 json.dump( master_category_dict, 177 open(serialized_file, 'wb') ) 175 176 json.dump(master_category_dict, open(serialized_file, 'wb')) -
src/sas/sasgui/guiframe/CategoryManager.py
r80b1df3 r212bfc2 13 13 import sys 14 14 import os 15 import logging 15 16 from wx.lib.mixins.listctrl import CheckListCtrlMixin, ListCtrlAutoWidthMixin 16 17 from collections import defaultdict … … 366 367 """ 367 368 try: 368 file = CategoryInstaller.get_user_file() 369 if os.path.isfile(file): 370 cat_file = open(file, 'rb') 371 # self.master_category_dict = pickle.load(cat_file) 372 self.master_category_dict = json.load(cat_file) 373 else: 374 cat_file = open(CategoryInstaller.get_default_file(), 'rb') 375 # self.master_category_dict = pickle.load(cat_file) 376 self.master_category_dict = json.load(cat_file) 377 cat_file.close() 369 cat_file = CategoryInstaller.get_user_file() 370 self.master_category_dict = {} 371 if os.path.isfile(cat_file): 372 with open(cat_file, 'rb') as f: 373 self.master_category_dict = json.load(f) 378 374 except IOError: 379 print 'Problem reading in category file. Please review' 380 375 logging.error('Problem reading in category file.') 381 376 382 377 self._regenerate_model_dict() -
src/sas/sasgui/guiframe/customdir.py
rd85c194 r212bfc2 1 1 # Setup and find Custom config dir 2 import sys3 2 import os.path 4 3 import shutil 5 from sas.sasgui.guiframe.CategoryInstaller import CategoryInstaller6 4 7 5 CONF_DIR = 'config' … … 12 10 Find and return user/.sasview dir 13 11 """ 14 dir = os.path.join(os.path.expanduser("~"), 15 ("." + APPLICATION_NAME)) 16 return dir 12 return os.path.join(os.path.expanduser("~"), ("." + APPLICATION_NAME)) 17 13 18 14 def _find_customconf_dir(): … … 22 18 """ 23 19 u_dir = _find_usersasview_dir() 24 dir = os.path.join(u_dir, CONF_DIR) 25 26 return dir 20 return os.path.join(u_dir, CONF_DIR) 27 21 28 22 def _setup_conf_dir(path): … … 30 24 Setup the custom config dir and cat file 31 25 """ 32 dir = _find_customconf_dir()26 conf_dir = _find_customconf_dir() 33 27 # If the plugin directory doesn't exist, create it 34 if not os.path.isdir(dir): 35 os.makedirs(dir) 36 file = os.path.join(dir, "custom_config.py") 37 cat_file = CategoryInstaller.get_user_file() 38 # If the user category file doesn't exist copy the default to 39 # the user directory 40 if not os.path.isfile(cat_file): 41 try: 42 default_cat_file = CategoryInstaller.get_default_file() 43 if os.path.isfile(default_cat_file): 44 shutil.copyfile(default_cat_file, cat_file) 45 else: 46 print "Unable to find/copy default cat file" 47 except: 48 print "Unable to copy default cat file to the user dir." 28 if not os.path.isdir(conf_dir): 29 os.makedirs(conf_dir) 30 config_file = os.path.join(conf_dir, "custom_config.py") 49 31 50 32 # Place example user models as needed 51 33 try: 52 if not os.path.isfile( file):53 shutil.copyfile(os.path.join(path, "custom_config.py"),file)34 if not os.path.isfile(config_file): 35 shutil.copyfile(os.path.join(path, "custom_config.py"), config_file) 54 36 except: 55 37 # Check for data path next to exe/zip file. … … 63 45 temp_path = os.path.join(f_dir, "custom_config.py") 64 46 if os.path.isfile(temp_path): 65 shutil.copyfile(temp_path, file)47 shutil.copyfile(temp_path, config_file) 66 48 is_dir = True 67 49 break 68 50 if not is_dir: 69 51 raise 70 71 return dir 72 73 52 return conf_dir 53 54 74 55 class SetupCustom(object): 75 56 """ … … 81 62 def setup_dir(self, path): 82 63 return _setup_conf_dir(path) 83 84 85 86 87 -
src/sas/sasgui/guiframe/dataFitting.py
r7988501 r51a4d78 378 378 _str = "%s\n" % LoadData2D.__str__(self) 379 379 return _str 380 381 def _validity_check(self, other): 382 """ 383 Checks that the data lengths are compatible. 384 Checks that the x vectors are compatible. 385 Returns errors vectors equal to original 386 errors vectors if they were present or vectors 387 of zeros when none was found. 388 389 :param other: other data set for operation 390 391 :return: dy for self, dy for other [numpy arrays] 392 393 :raise ValueError: when lengths are not compatible 394 395 """ 396 err_other = None 397 if isinstance(other, Data2D): 398 # Check that data lengths are the same 399 if len(self.data) != len(other.data) or \ 400 len(self.qx_data) != len(other.qx_data) or \ 401 len(self.qy_data) != len(other.qy_data): 402 msg = "Unable to perform operation: data length are not equal" 403 raise ValueError, msg 404 #if len(self.data) < 1: 405 # msg = "Incompatible data sets: I-values do not match" 406 # raise ValueError, msg 407 for ind in range(len(self.data)): 408 if self.qx_data[ind] != other.qx_data[ind]: 409 msg = "Incompatible data sets: qx-values do not match" 410 raise ValueError, msg 411 if self.qy_data[ind] != other.qy_data[ind]: 412 msg = "Incompatible data sets: qy-values do not match" 413 raise ValueError, msg 414 415 # Check that the scales match 416 err_other = other.err_data 417 if other.err_data == None or \ 418 (len(other.err_data) != len(other.data)): 419 err_other = numpy.zeros(len(other.data)) 420 421 # Check that we have errors, otherwise create zero vector 422 err = self.err_data 423 if self.err_data == None or \ 424 (len(self.err_data) != len(self.data)): 425 err = numpy.zeros(len(other.data)) 426 427 return err, err_other 428 429 def _validity_check_union(self, other): 430 """ 431 Checks that the data lengths are compatible. 432 Checks that the x vectors are compatible. 433 Returns errors vectors equal to original 434 errors vectors if they were present or vectors 435 of zeros when none was found. 436 437 :param other: other data set for operation 438 439 :return: bool 440 441 :raise ValueError: when data types are not compatible 442 443 """ 444 if not isinstance(other, Data2D): 445 msg = "Unable to perform operation: different types of data set" 446 raise ValueError, msg 447 return True 448 380 449 381 def _perform_operation(self, other, operation): 450 382 """ -
src/sas/sasgui/guiframe/data_panel.py
re767897 r998ca90 890 890 891 891 892 def on_remove(self, event ):892 def on_remove(self, event, msg=""): 893 893 """ 894 894 Get a list of item checked and remove them from the treectrl 895 895 Ask the parent to remove reference to this item 896 896 """ 897 msg = "This operation will delete the data sets checked " 898 msg += "and all the dependents." 897 if msg == "": 898 msg = "This operation will delete the data sets checked " 899 msg += "and all the dependents." 899 900 msg_box = wx.MessageDialog(None, msg, 'Warning', wx.OK|wx.CANCEL) 900 901 if msg_box.ShowModal() != wx.ID_OK: 901 return 902 return True 902 903 903 904 data_to_remove, theory_to_remove, _ = self.set_data_helper() -
src/sas/sasgui/guiframe/gui_manager.py
r3fac0df ra4c2445 677 677 update edit menu if available 678 678 """ 679 if event !=None:679 if event is not None: 680 680 self.panel_on_focus = event.panel 681 681 if self.panel_on_focus is not None: 682 #Disable save application if the current panel is in batch mode 683 flag = self.panel_on_focus.get_save_flag() 684 if self._save_appl_menu != None: 685 self._save_appl_menu.Enable(flag) 686 687 if self.panel_on_focus not in self.plot_panels.values(): 688 for ID in self.panels.keys(): 689 if self.panel_on_focus != self.panels[ID]: 690 self.panels[ID].on_kill_focus(None) 691 692 if self._data_panel is not None and \ 693 self.panel_on_focus is not None: 694 self.set_panel_on_focus_helper() 695 #update toolbar 696 self._update_toolbar_helper() 697 #update edit menu 698 self.enable_edit_menu() 682 # Disable save application if the current panel is in batch mode 683 try: 684 flag = self.panel_on_focus.get_save_flag() 685 if self._save_appl_menu != None: 686 self._save_appl_menu.Enable(flag) 687 688 if self.panel_on_focus not in self.plot_panels.values(): 689 for ID in self.panels.keys(): 690 if self.panel_on_focus != self.panels[ID]: 691 self.panels[ID].on_kill_focus(None) 692 693 if self._data_panel is not None and \ 694 self.panel_on_focus is not None: 695 self.set_panel_on_focus_helper() 696 #update toolbar 697 self._update_toolbar_helper() 698 #update edit menu 699 self.enable_edit_menu() 700 except wx._core.PyDeadObjectError: 701 pass 699 702 700 703 def disable_app_menu(self, p_panel=None): … … 1152 1155 self.delete_panel(ID) 1153 1156 break 1154 self.cpanel_on_focus.SetFocus() 1157 if self.cpanel_on_focus is not None: 1158 self.cpanel_on_focus.SetFocus() 1155 1159 1156 1160 … … 1333 1337 self._applications_menu_name = name 1334 1338 1339 def _on_marketplace_click(self, event): 1340 """ 1341 Click event for the help menu item linking to the Marketplace. 1342 """ 1343 import webbrowser 1344 webbrowser.open_new(config.marketplace_url) 1345 1335 1346 def _add_help_menu(self): 1336 1347 """ … … 1338 1349 tutorial PDF and documentation pages. 1339 1350 """ 1340 # Help menu1341 1351 self._help_menu = wx.Menu() 1342 style = self.__gui_style & GUIFRAME.WELCOME_PANEL_ON1343 1352 1344 1353 wx_id = wx.NewId() 1345 1354 self._help_menu.Append(wx_id, '&Documentation', '') 1346 1355 wx.EVT_MENU(self, wx_id, self._onSphinxDocs) 1347 self._help_menu.AppendSeparator()1348 1356 1349 1357 if config._do_tutorial and (IS_WIN or sys.platform == 'darwin'): … … 1351 1359 self._help_menu.Append(wx_id, '&Tutorial', 'Software tutorial') 1352 1360 wx.EVT_MENU(self, wx_id, self._onTutorial) 1353 self._help_menu.AppendSeparator()1354 1355 1361 1356 1362 if config._do_acknowledge: … … 1358 1364 self._help_menu.Append(wx_id, '&Acknowledge', 'Acknowledging SasView') 1359 1365 wx.EVT_MENU(self, wx_id, self._onAcknowledge) 1360 self._help_menu.AppendSeparator()1361 1362 1366 1363 1367 if config._do_aboutbox: … … 1366 1370 self._help_menu.Append(wx_id, '&About', 'Software information') 1367 1371 wx.EVT_MENU(self, wx_id, self._onAbout) 1368 self._help_menu.AppendSeparator() 1369 1372 1373 if config.marketplace_url: 1374 wx_id = wx.NewId() 1375 self._help_menu.Append(wx_id, '&Model marketplace', '') 1376 wx.EVT_MENU(self, wx_id, self._on_marketplace_click) 1370 1377 1371 1378 # Checking for updates … … 1900 1907 def _on_open_state_project(self, event): 1901 1908 """ 1909 Load in a .svs project file after removing all data from SasView 1902 1910 """ 1903 1911 path = None 1904 1912 if self._default_save_location == None: 1905 1913 self._default_save_location = os.getcwd() 1906 wx.PostEvent(self, StatusEvent(status="Loading Project file...")) 1907 dlg = wx.FileDialog(self, 1914 msg = "This operation will set remove all data, plots and analyses from" 1915 msg += " SasView before loading the project. Do you wish to continue?" 1916 self._data_panel.selection_cbox.SetValue('Select all Data') 1917 self._data_panel._on_selection_type(None) 1918 for _, theory_dict in self._data_panel.list_cb_theory.iteritems(): 1919 for key, value in theory_dict.iteritems(): 1920 item, _, _ = value 1921 item.Check(True) 1922 if not self._data_panel.on_remove(None, msg): 1923 wx.PostEvent(self, StatusEvent(status="Loading Project file...")) 1924 dlg = wx.FileDialog(self, 1908 1925 "Choose a file", 1909 1926 self._default_save_location, "", 1910 1927 APPLICATION_WLIST) 1911 if dlg.ShowModal() == wx.ID_OK:1912 path = dlg.GetPath()1928 if dlg.ShowModal() == wx.ID_OK: 1929 path = dlg.GetPath() 1913 1930 if path is not None: 1914 1931 self._default_save_location = os.path.dirname(path) 1915 dlg.Destroy() 1916 1917 self.load_state(path=path, is_project=True) 1932 dlg.Destroy() 1933 # Reset to a base state 1934 self._on_reset_state() 1935 # Load the project file 1936 self.load_state(path=path, is_project=True) 1937 1938 def _on_reset_state(self): 1939 """ 1940 Resets SasView to its freshly opened state. 1941 :return: None 1942 """ 1943 # Reset all plugins to their base state 1944 self._data_panel.set_panel_on_focus() 1945 # Remove all loaded data 1946 for plugin in self.plugins: 1947 plugin.clear_panel() 1948 # Reset plot number to 0 1949 self.graph_num = 0 1918 1950 1919 1951 def _on_save_application(self, event): … … 2063 2095 except: 2064 2096 logging.info("Failed to connect to www.sasview.org") 2065 self._process_version(version_info, standalone=event == None) 2066 2067 2068 2069 # 2070 # try: 2071 # req = urllib2.Request(config.__update_URL__) 2072 # res = urllib2.urlopen(req) 2073 # content = res.read().strip() 2074 # logging.info("Connected to www.sasview.org. Latest version: %s" 2075 # % (content)) 2076 # version_info = json.loads(content) 2077 # except: 2078 # logging.info("Failed to connect to www.sasview.org") 2079 # version_info = {"version": "0.0.0"} 2080 # self._process_version(version_info, standalone=event == None) 2097 self._process_version(version_info, standalone=event == None) 2081 2098 2082 2099 def _process_version(self, version_info, standalone=True): -
src/sas/sasgui/guiframe/media/data_formats_help.rst
r280f929 r48b8f6d 10 10 ============ 11 11 12 SasView reads several different 1D (I(Q) vs Q), 2D SANS(I(Qx,Qy) vs (Qx,Qy)) 13 and SESANS (P(z) vs z) 14 data files. But please note that SasView does not at present load data where 15 the Q and I(Q) data are in separate files. 12 SasView reads several different 1D SAS (*I(Q) vs Q*), 2D SAS(*I(Qx,Qy) vs (Qx,Qy)*) and 1D SESANS (*P(z) vs z*) data files. From SasView 4.1 onwards, a :ref:`File_Converter_Tool` allows some legacy formats to be converted into modern formats that SasView will read. 16 13 17 1D Formats SANS18 -------------- -14 1D SAS Formats 15 -------------- 19 16 20 SasView will read files with 2 to 4 columns of numbers in the following order:17 SasView will read ASCII ('text') files with 2 to 4 columns of numbers in the following order: 21 18 22 Q, I(Q), (dI(Q), dQ(Q))19 *Q, I(Q), ( dI(Q), dQ(Q) )* 23 20 24 where dQ(Q) is the instrumental resolution in Qand assumed to have originated21 where *dQ(Q)* is the instrumental resolution in *Q* and assumed to have originated 25 22 from pinhole geometry. 26 23 27 24 Numbers can be separated by spaces or commas. 28 25 29 SasView recognises the following file extensions :26 SasView recognises the following file extensions which are not case-sensitive: 30 27 31 28 * .TXT … … 34 31 * .XML (in canSAS format v1.0 and 1.1) 35 32 36 If using CSV output from, for example, a spreadsheet, ensure that it is not 37 using commas as delimiters for thousands. 33 If using CSV output from, for example, a spreadsheet, ensure that it is not using commas as delimiters for thousands. 34 35 The SasView :ref:`File_Converter_Tool` available in SasView 4.1 onwards can be used to convert data sets with separated *I(Q)* and *Q* files (for example, BSL/OTOKO, and some output from FIT2D and other SAXS-oriented software) into either the canSAS SASXML (XML) format or the NeXus NXcanSAS (HDF5) format. 38 36 39 37 For a description of the CanSAS/SASXML format see: 40 38 http://www.cansas.org/formats/canSAS1d/1.1/doc/ 41 39 40 For a description of the ISIS 1D format see: 41 http://www.isis.stfc.ac.uk/instruments/loq/software/colette-ascii-file-format-descriptions9808.pdf 42 43 For a description of the NXcanSAS format see: 44 http://cansas-org.github.io/NXcanSAS/classes/contributed_definitions/NXcanSAS.html 45 46 All the above formats are written by the `Mantid Framework <http://www.mantidproject.org/>`_. 47 42 48 For a description of the NIST 1D format see: 43 49 http://danse.chem.utk.edu/trac/wiki/NCNROutput1D_IQ 44 50 45 For a description of the ISIS 1D format see:46 http://www. isis.stfc.ac.uk/instruments/loq/software/colette-ascii-file-format-descriptions9808.pdf51 For a description of the BSL/OTOKO format see: 52 http://www.diamond.ac.uk/Beamlines/Soft-Condensed-Matter/small-angle/SAXS-Software/CCP13/BSL.html 47 53 48 54 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 49 55 50 2D Formats SANS51 -------------- -56 2D SAS Formats 57 -------------- 52 58 53 SasView will only read files in the NIST 2D format with the extensions 54 .ASC or .DAT 59 SasView will read ASCII ('text') files in the NIST 2D format (with the extensions .ASC or .DAT) or files in the NeXus NXcanSAS (HDF5) format (with the extension .H5). File extensions are not case-sensitive. Both of these formats are written by the `Mantid Framework <http://www.mantidproject.org/>`_. 55 60 56 Most of the header lines can be removed except the last line, and only the 57 first three columns (Qx, Qy, and I(Qx,Qy)) are actually required. 61 Most of the header lines in the NIST 2D format can actually be removed except the last line, and only the first three columns (*Qx, Qy,* and *I(Qx,Qy)*) are actually required. 62 63 The SasView :ref:`File_Converter_Tool` available in SasView 4.1 onwards can be used to convert data sets in the 2D BSL/OTOKO format into the NeXus NXcanSAS (HDF5) format. 58 64 59 65 For a description of the NIST 2D format see: 60 66 http://danse.chem.utk.edu/trac/wiki/NCNROutput1D_2DQxQy 61 67 62 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 68 For a description of the NXcanSAS format see: 69 http://cansas-org.github.io/NXcanSAS/classes/contributed_definitions/NXcanSAS.html 63 70 64 SESANS Format 65 ------------- 66 67 The current file extension is .ses or .sesans (not case sensitive). 68 69 The file format is to have a list of name-value pairs as a header at the top of the file, detailing general experimental parameters necessary for fitting and analyzing data. This list should contain all information necessary for the file to be 'portable' between users. 70 71 Following that is a 6 column list of instrument experimental variables: 72 73 - Spin echo length (z, in Angstroms) 74 - Spin echo length error (:math:`\Delta` z, in Angstroms) (experimental resolution) 75 - neutron wavelength (:math:`\lambda`, in Angstroms) (essential for ToF instruments) 76 - neutron wavelength error (:math:`\Delta \lambda`, in Angstroms) 77 - Normalized polarization (:math:`P/P_0`, unitless) 78 - Normalized polarization error (:math:`\Delta(P/P_0)`, unitless) (measurement error) 71 For a description of the BSL/OTOKO format see: For a description of the BSL/OTOKO format see: 72 http://www.diamond.ac.uk/Beamlines/Soft-Condensed-Matter/small-angle/SAXS-Software/CCP13/BSL.html 79 73 80 74 81 75 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 82 76 83 .. note:: This help document was last changed by Wim Bouwman, 05Oct2016 77 1D SESANS Format 78 ---------------- 79 80 SasView version 4.1 onwards will read ASCII ('text') files in a prototype SESANS standard format (with the extensions .SES or .SESANS). The file extensions are not case-sensitive. 81 82 The file format has a list of name-value pairs at the top of the file which detail the general experimental parameters necessary for fitting and analyzing data. This list should contain all the information necessary for the file to be 'portable' between users. 83 84 Following the header is a 6 column list of instrument experimental variables: 85 86 - Spin echo length (z, in Angstroms) 87 - Spin echo length error (:math:`\Delta`\ z, in Angstroms) (experimental resolution) 88 - Neutron wavelength (:math:`\lambda`, in Angstroms) (essential for ToF instruments) 89 - Neutron wavelength error (:math:`\Delta \lambda`, in Angstroms) 90 - Normalized polarization (:math:`P/P_0`, unitless) 91 - Normalized polarization error (:math:`\Delta(P/P_0)`, unitless) (measurement error) 92 93 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 94 95 .. note:: This help document was last changed by Steve King, 07Oct2016 -
src/sas/sasgui/guiframe/panel_base.py
rd85c194 r18b7ecb9 317 317 """ 318 318 return self._drag_flag 319 319 320 def _set_analysis(self, flag): 321 """ 322 Set the Analysis Save state flag and informs the manager 323 so it refreshes the menu/whole panel 324 """ 325 self._set_save_flag(flag) 326 if self._manager is not None: 327 wx.PostEvent(self._manager.parent, PanelOnFocusEvent(panel=self)) 328 320 329 def _set_reset_flag(self, flag=True): 321 330 """
Note: See TracChangeset
for help on using the changeset viewer.