Changes in / [ef3e09b:a95ae9a] in sasview
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/sphinx-docs/source/user/opencl_installation.rst
r6673d2f r6e0c7b2 14 14 15 15 * Go to: Start -> Control Panel -> Administrative Tools 16 * Double Click on Computer Manag ement16 * Double Click on Computer Managment 17 17 * Click on Device Manager 18 18 * Click open Display Adapters … … 32 32 Windows 33 33 ========= 34 Depen ding on the graphic card on your system, drivers34 Depeneding 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
r756f288 r49148bb 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 format6 5 7 6 .. _Formats: … … 10 9 ============ 11 10 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) 11 SasView reads several different 1D (I(Q) vs Q) and 2D (I(Qx,Qy) vs (Qx,Qy)) 14 12 data files. But please note that SasView does not at present load data where 15 13 the Q and I(Q) data are in separate files. 16 14 17 1D Formats SANS18 ---------- -----15 1D Formats 16 ---------- 19 17 20 18 SasView will read files with 2 to 4 columns of numbers in the following order: … … 48 46 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 49 47 50 2D Formats SANS51 ---------- -----48 2D Formats 49 ---------- 52 50 53 51 SasView will only read files in the NIST 2D format with the extensions … … 62 60 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 63 61 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 62 .. note:: This help document was last changed by Steve King, 01May2015 -
docs/sphinx-docs/source/user/user.rst
rbdae317 r20a3c55 7 7 :maxdepth: 1 8 8 9 Model Documentation <index> 10 11 Menu Bar <menu_bar> 9 SasView Model Documentation <index> 12 10 13 11 Analysis <analysis> … … 16 14 17 15 Working with SasView <working> 16 17 Computations with GPU <gpu_computations> -
docs/sphinx-docs/source/user/working.rst
rc43953ef r3a6b10d 16 16 17 17 Tutorial <tutorial.rst> 18 19 Computations with a GPU <gpu_computations>20 -
src/sas/sasgui/guiframe/gui_manager.py
r3fac0df rc8a641e8 1345 1345 self._help_menu.Append(wx_id, '&Documentation', '') 1346 1346 wx.EVT_MENU(self, wx_id, self._onSphinxDocs) 1347 self._help_menu.AppendSeparator()1348 1347 1349 1348 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 1354 if config._do_acknowledge: 1353 1355 self._help_menu.AppendSeparator() 1354 1355 1356 if config._do_acknowledge:1357 1356 wx_id = wx.NewId() 1358 1357 self._help_menu.Append(wx_id, '&Acknowledge', 'Acknowledging SasView') 1359 1358 wx.EVT_MENU(self, wx_id, self._onAcknowledge) 1359 1360 if config._do_aboutbox: 1360 1361 self._help_menu.AppendSeparator() 1361 1362 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) 1368 self._help_menu.AppendSeparator() 1369 1362 self._help_menu.Append(wx.ID_ABOUT, '&About', 'Software information') 1363 wx.EVT_MENU(self, wx.ID_ABOUT, self._onAbout) 1370 1364 1371 1365 # Checking for updates -
src/sas/sasgui/perspectives/fitting/basepage.py
rc65a265 r6c382da 1521 1521 self.fitrange = False 1522 1522 1523 if not self.data.is_data: 1524 is_modified = True 1525 1523 1526 ## if any value is modify draw model with new value 1524 1527 if not self.fitrange: … … 1536 1539 self._draw_model() 1537 1540 self.Refresh() 1538 1539 logging.info("is_modified flag set to %g",is_modified)1540 1541 return is_modified 1541 1542 -
src/sas/sasgui/perspectives/fitting/fitting.py
rca4d985 r7673ecd 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 logging.error("update_custom_combo: %s", sys.exc_value) 344 pass 345 345 346 346 347 def set_edit_menu(self, owner): … … 1665 1666 wx.PostEvent(self.parent, StatusEvent(status=msg, type="update")) 1666 1667 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 Data1D1671 and add it to the data manager.1672 @param x: x-values of the data1673 @param y: y_values of the data1674 @param page_id: fit page ID1675 @param model: model used for fitting1676 @param data: Data1D object to create the theory for1677 @param state: model state1678 @param data_description: title to use in the data manager1679 @param data_id: unique data ID1680 """1681 new_plot = Data1D(x=x, y=y)1682 if dy is None:1683 new_plot.is_data = False1684 new_plot.dy = numpy.zeros(len(y))1685 # If this is a theory curve, pick the proper symbol to make it a curve1686 new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM1687 else:1688 new_plot.is_data = True1689 new_plot.dy = dy1690 new_plot.interactive = True1691 new_plot.dx = None1692 new_plot.dxl = None1693 new_plot.dxw = None1694 _yaxis, _yunit = data.get_yaxis()1695 _xaxis, _xunit = data.get_xaxis()1696 new_plot.title = data.name1697 new_plot.group_id = data.group_id1698 if new_plot.group_id == None:1699 new_plot.group_id = data.group_id1700 new_plot.id = data_id1701 # Find if this theory was already plotted and replace that plot given1702 # the same id1703 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_plot1718 1719 1668 def _complete1D(self, x, y, page_id, elapsed, index, model, 1720 1669 weight=None, fid=None, 1721 1670 toggle_mode_on=False, state=None, 1722 1671 data=None, update_chisqr=True, 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 1672 source='model', plot_result=True): 1673 """ 1674 Complete plotting 1D data 1731 1675 """ 1732 1676 try: 1733 1677 numpy.nan_to_num(y) 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 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) 1756 1709 current_pg = self.fit_panel.get_page_by_id(page_id) 1757 1710 title = new_plot.title -
src/sas/sasgui/perspectives/fitting/media/plugin.rst
rcbbb6a4 re925f61 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 heck Model* from the *Model Editor* menu bar. An666 by selecting *Run > Compile* 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
rca4d985 r934ce649 7 7 import math 8 8 from sas.sascalc.data_util.calcthread import CalcThread 9 from sas.sascalc.fit.MultiplicationModel import MultiplicationModel10 9 11 10 class Calc2D(CalcThread): … … 167 166 index = (self.qmin <= self.data.x) & (self.data.x <= self.qmax) 168 167 169 # If we use a smearer, also return the unsmeared model170 unsmeared_output = None171 unsmeared_data = None172 unsmeared_error = None173 168 ##smearer the ouput of the plot 174 169 if self.smearer is not None: … … 176 171 self.qmax) 177 172 mask = self.data.x[first_bin:last_bin+1] 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 173 output[first_bin:last_bin+1] = self.model.evalDistribution(mask) 174 output = self.smearer(output, first_bin, last_bin) 194 175 else: 195 176 output[index] = self.model.evalDistribution(self.data.x[index]) 196 197 sq_model = None198 pq_model = None199 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])204 177 205 178 elapsed = time.time() - self.starttime … … 214 187 data=self.data, 215 188 update_chisqr=self.update_chisqr, 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) 189 source=self.source) 222 190 223 191 def results(self):
Note: See TracChangeset
for help on using the changeset viewer.