Changes in / [a95ae9a:ef3e09b] in sasview
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/sphinx-docs/source/user/opencl_installation.rst
r6e0c7b2 r6673d2f 14 14 15 15 * Go to: Start -> Control Panel -> Administrative Tools 16 * Double Click on Computer Manag ment16 * Double Click on Computer Management 17 17 * Click on Device Manager 18 18 * Click open Display Adapters … … 32 32 Windows 33 33 ========= 34 Depen eding on the graphic card on your system, drivers34 Depending on the graphic card on your system, drivers 35 35 can be obtained from different sources: 36 36 -
docs/sphinx-docs/source/user/sasgui/guiframe/data_formats_help.rst
r49148bb r756f288 3 3 .. This is a port of the original SasView html help file to ReSTructured text 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 .. WG Bouwman, DUT, added during CodeCamp-V in Oct 2016 the SESANS data format 5 6 6 7 .. _Formats: … … 9 10 ============ 10 11 11 SasView reads several different 1D (I(Q) vs Q) and 2D (I(Qx,Qy) vs (Qx,Qy)) 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) 12 14 data files. But please note that SasView does not at present load data where 13 15 the Q and I(Q) data are in separate files. 14 16 15 1D Formats 16 ---------- 17 1D Formats SANS 18 --------------- 17 19 18 20 SasView will read files with 2 to 4 columns of numbers in the following order: … … 46 48 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 47 49 48 2D Formats 49 ---------- 50 2D Formats SANS 51 --------------- 50 52 51 53 SasView will only read files in the NIST 2D format with the extensions … … 60 62 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 61 63 62 .. note:: This help document was last changed by Steve King, 01May2015 64 Format SESANS 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) 79 80 81 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 82 83 .. note:: This help document was last changed by Wim Bouwman, 05Oct2016 -
docs/sphinx-docs/source/user/user.rst
r20a3c55 rbdae317 7 7 :maxdepth: 1 8 8 9 SasView Model Documentation <index> 9 Model Documentation <index> 10 11 Menu Bar <menu_bar> 10 12 11 13 Analysis <analysis> … … 14 16 15 17 Working with SasView <working> 16 17 Computations with GPU <gpu_computations> -
docs/sphinx-docs/source/user/working.rst
r3a6b10d rc43953ef 16 16 17 17 Tutorial <tutorial.rst> 18 19 Computations with a GPU <gpu_computations> 20 -
src/sas/sasgui/guiframe/gui_manager.py
rc8a641e8 r3fac0df 1345 1345 self._help_menu.Append(wx_id, '&Documentation', '') 1346 1346 wx.EVT_MENU(self, wx_id, self._onSphinxDocs) 1347 self._help_menu.AppendSeparator() 1347 1348 1348 1349 if config._do_tutorial and (IS_WIN or sys.platform == 'darwin'): 1349 self._help_menu.AppendSeparator()1350 1350 wx_id = wx.NewId() 1351 1351 self._help_menu.Append(wx_id, '&Tutorial', 'Software tutorial') 1352 1352 wx.EVT_MENU(self, wx_id, self._onTutorial) 1353 self._help_menu.AppendSeparator() 1354 1353 1355 1354 1356 if config._do_acknowledge: 1355 self._help_menu.AppendSeparator()1356 1357 wx_id = wx.NewId() 1357 1358 self._help_menu.Append(wx_id, '&Acknowledge', 'Acknowledging SasView') 1358 1359 wx.EVT_MENU(self, wx_id, self._onAcknowledge) 1360 self._help_menu.AppendSeparator() 1361 1359 1362 1360 1363 if config._do_aboutbox: 1364 logging.info("Doing help menu") 1365 wx_id = wx.NewId() 1366 self._help_menu.Append(wx_id, '&About', 'Software information') 1367 wx.EVT_MENU(self, wx_id, self._onAbout) 1361 1368 self._help_menu.AppendSeparator() 1362 self._help_menu.Append(wx.ID_ABOUT, '&About', 'Software information') 1363 wx.EVT_MENU(self, wx.ID_ABOUT, self._onAbout) 1369 1364 1370 1365 1371 # Checking for updates -
src/sas/sasgui/perspectives/fitting/basepage.py
r6c382da rc65a265 1521 1521 self.fitrange = False 1522 1522 1523 if not self.data.is_data:1524 is_modified = True1525 1526 1523 ## if any value is modify draw model with new value 1527 1524 if not self.fitrange: … … 1539 1536 self._draw_model() 1540 1537 self.Refresh() 1538 1539 logging.info("is_modified flag set to %g",is_modified) 1541 1540 return is_modified 1542 1541 -
src/sas/sasgui/perspectives/fitting/fitting.py
r7673ecd rca4d985 313 313 """ 314 314 event_id = event.GetId() 315 self.update_custom_combo() 315 self.update_custom_combo() 316 316 317 317 def update_custom_combo(self): … … 342 342 page.formfactorbox.SetLabel(current_val) 343 343 except: 344 pass 345 344 logging.error("update_custom_combo: %s", sys.exc_value) 346 345 347 346 def set_edit_menu(self, owner): … … 1666 1665 wx.PostEvent(self.parent, StatusEvent(status=msg, type="update")) 1667 1666 1667 def create_theory_1D(self, x, y, page_id, model, data, state, 1668 data_description, data_id, dy=None): 1669 """ 1670 Create a theory object associate with an existing Data1D 1671 and add it to the data manager. 1672 @param x: x-values of the data 1673 @param y: y_values of the data 1674 @param page_id: fit page ID 1675 @param model: model used for fitting 1676 @param data: Data1D object to create the theory for 1677 @param state: model state 1678 @param data_description: title to use in the data manager 1679 @param data_id: unique data ID 1680 """ 1681 new_plot = Data1D(x=x, y=y) 1682 if dy is None: 1683 new_plot.is_data = False 1684 new_plot.dy = numpy.zeros(len(y)) 1685 # If this is a theory curve, pick the proper symbol to make it a curve 1686 new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM 1687 else: 1688 new_plot.is_data = True 1689 new_plot.dy = dy 1690 new_plot.interactive = True 1691 new_plot.dx = None 1692 new_plot.dxl = None 1693 new_plot.dxw = None 1694 _yaxis, _yunit = data.get_yaxis() 1695 _xaxis, _xunit = data.get_xaxis() 1696 new_plot.title = data.name 1697 new_plot.group_id = data.group_id 1698 if new_plot.group_id == None: 1699 new_plot.group_id = data.group_id 1700 new_plot.id = data_id 1701 # Find if this theory was already plotted and replace that plot given 1702 # the same id 1703 self.page_finder[page_id].get_theory_data(fid=data.id) 1704 1705 if data.is_data: 1706 data_name = str(data.name) 1707 else: 1708 data_name = str(model.__class__.__name__) 1709 1710 new_plot.name = data_description + " [" + data_name + "]" 1711 new_plot.xaxis(_xaxis, _xunit) 1712 new_plot.yaxis(_yaxis, _yunit) 1713 self.page_finder[page_id].set_theory_data(data=new_plot, 1714 fid=data.id) 1715 self.parent.update_theory(data_id=data.id, theory=new_plot, 1716 state=state) 1717 return new_plot 1718 1668 1719 def _complete1D(self, x, y, page_id, elapsed, index, model, 1669 1720 weight=None, fid=None, 1670 1721 toggle_mode_on=False, state=None, 1671 1722 data=None, update_chisqr=True, 1672 source='model', plot_result=True): 1673 """ 1674 Complete plotting 1D data 1723 source='model', plot_result=True, 1724 unsmeared_model=None, unsmeared_data=None, 1725 unsmeared_error=None, sq_model=None, pq_model=None): 1726 """ 1727 Complete plotting 1D data 1728 @param unsmeared_model: fit model, without smearing 1729 @param unsmeared_data: data, rescaled to unsmeared model 1730 @param unsmeared_error: data error, rescaled to unsmeared model 1675 1731 """ 1676 1732 try: 1677 1733 numpy.nan_to_num(y) 1678 1679 new_plot = Data1D(x=x, y=y) 1680 new_plot.is_data = False 1681 new_plot.dy = numpy.zeros(len(y)) 1682 new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM 1683 _yaxis, _yunit = data.get_yaxis() 1684 _xaxis, _xunit = data.get_xaxis() 1685 new_plot.title = data.name 1686 1687 new_plot.group_id = data.group_id 1688 if new_plot.group_id == None: 1689 new_plot.group_id = data.group_id 1690 new_plot.id = str(page_id) + " " + data.name 1691 #if new_plot.id in self.color_dict: 1692 # new_plot.custom_color = self.color_dict[new_plot.id] 1693 #find if this theory was already plotted and replace that plot given 1694 #the same id 1695 self.page_finder[page_id].get_theory_data(fid=data.id) 1696 1697 if data.is_data: 1698 data_name = str(data.name) 1699 else: 1700 data_name = str(model.__class__.__name__) 1701 1702 new_plot.name = model.name + " [" + data_name + "]" 1703 new_plot.xaxis(_xaxis, _xunit) 1704 new_plot.yaxis(_yaxis, _yunit) 1705 self.page_finder[page_id].set_theory_data(data=new_plot, 1706 fid=data.id) 1707 self.parent.update_theory(data_id=data.id, theory=new_plot, 1708 state=state) 1734 new_plot = self.create_theory_1D(x, y, page_id, model, data, state, 1735 data_description=model.name, 1736 data_id=str(page_id) + " " + data.name) 1737 if unsmeared_model is not None: 1738 self.create_theory_1D(x, unsmeared_model, page_id, model, data, state, 1739 data_description=model.name + " unsmeared", 1740 data_id=str(page_id) + " " + data.name + " unsmeared") 1741 1742 self.create_theory_1D(x, unsmeared_data, page_id, model, data, state, 1743 data_description="Data unsmeared", 1744 data_id="Data " + data.name + " unsmeared", 1745 dy=unsmeared_error) 1746 1747 if sq_model is not None and pq_model is not None: 1748 self.create_theory_1D(x, sq_model, page_id, model, data, state, 1749 data_description=model.name + " S(q)", 1750 data_id=str(page_id) + " " + data.name + " S(q)") 1751 self.create_theory_1D(x, pq_model, page_id, model, data, state, 1752 data_description=model.name + " P(q)", 1753 data_id=str(page_id) + " " + data.name + " P(q)") 1754 1755 1709 1756 current_pg = self.fit_panel.get_page_by_id(page_id) 1710 1757 title = new_plot.title -
src/sas/sasgui/perspectives/fitting/media/plugin.rst
re925f61 rcbbb6a4 48 48 - If necessary use underscore to separate words (i.e. barbell not BarBell or 49 49 broad_peak not BroadPeak) 50 - Do not include âmodelâin the name (i.e. barbell not BarBellModel)50 - Do not include ââ¬Åmodelââ¬ï¿œ in the name (i.e. barbell not BarBellModel) 51 51 52 52 … … 644 644 - a dictionary of parameter values. This can be {} using the default 645 645 parameters, or filled with some parameters that will be different 646 from the default, such as { âradiusâ:10.0, âsldâ:4}. Unlisted parameters646 from the default, such as {ââ¬Ëradiusââ¬â¢:10.0, ââ¬Ësldââ¬â¢:4}. Unlisted parameters 647 647 will be given the default values. 648 648 - the input $q$ value or tuple of $(q_x, q_y)$ values. … … 664 664 665 665 If you are editing your model from the SasView GUI, you can test it 666 by selecting *Run > C ompile* from the *Model Editor* menu bar. An666 by selecting *Run > Check Model* from the *Model Editor* menu bar. An 667 667 *Info* box will appear with the results of the compilation and a 668 668 check that the model runs. -
src/sas/sasgui/perspectives/fitting/model_thread.py
r934ce649 rca4d985 7 7 import math 8 8 from sas.sascalc.data_util.calcthread import CalcThread 9 from sas.sascalc.fit.MultiplicationModel import MultiplicationModel 9 10 10 11 class Calc2D(CalcThread): … … 166 167 index = (self.qmin <= self.data.x) & (self.data.x <= self.qmax) 167 168 169 # If we use a smearer, also return the unsmeared model 170 unsmeared_output = None 171 unsmeared_data = None 172 unsmeared_error = None 168 173 ##smearer the ouput of the plot 169 174 if self.smearer is not None: … … 171 176 self.qmax) 172 177 mask = self.data.x[first_bin:last_bin+1] 173 output[first_bin:last_bin+1] = self.model.evalDistribution(mask) 174 output = self.smearer(output, first_bin, last_bin) 178 unsmeared_output = numpy.zeros((len(self.data.x))) 179 unsmeared_output[first_bin:last_bin+1] = self.model.evalDistribution(mask) 180 output = self.smearer(unsmeared_output, first_bin, last_bin) 181 182 # Rescale data to unsmeared model 183 unsmeared_data = numpy.zeros((len(self.data.x))) 184 unsmeared_error = numpy.zeros((len(self.data.x))) 185 unsmeared_data[first_bin:last_bin+1] = self.data.y[first_bin:last_bin+1]\ 186 * unsmeared_output[first_bin:last_bin+1]\ 187 / output[first_bin:last_bin+1] 188 unsmeared_error[first_bin:last_bin+1] = self.data.dy[first_bin:last_bin+1]\ 189 * unsmeared_output[first_bin:last_bin+1]\ 190 / output[first_bin:last_bin+1] 191 unsmeared_output=unsmeared_output[index] 192 unsmeared_data=unsmeared_data[index] 193 unsmeared_error=unsmeared_error 175 194 else: 176 195 output[index] = self.model.evalDistribution(self.data.x[index]) 196 197 sq_model = None 198 pq_model = None 199 if isinstance(self.model, MultiplicationModel): 200 sq_model = numpy.zeros((len(self.data.x))) 201 pq_model = numpy.zeros((len(self.data.x))) 202 sq_model[index] = self.model.s_model.evalDistribution(self.data.x[index]) 203 pq_model[index] = self.model.p_model.evalDistribution(self.data.x[index]) 177 204 178 205 elapsed = time.time() - self.starttime … … 187 214 data=self.data, 188 215 update_chisqr=self.update_chisqr, 189 source=self.source) 216 source=self.source, 217 unsmeared_model=unsmeared_output, 218 unsmeared_data=unsmeared_data, 219 unsmeared_error=unsmeared_error, 220 pq_model=pq_model, 221 sq_model=sq_model) 190 222 191 223 def results(self):
Note: See TracChangeset
for help on using the changeset viewer.