Changes in / [ce94504:dceff6e] in sasview
- Files:
-
- 6 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified .travis.yml ¶
r58918de ra4974fa 12 12 system_site_packages: true 13 13 before_install: 14 - 'if [ $TRAVIS_PYTHON_VERSION == "2.7" ]; then sudo apt-get update;sudo apt-get install python-numpy python-scipy python-matplotlib libhdf5-serial-dev python-h5py fglrx opencl-headers python-pyopencl; fi'14 - 'if [ $TRAVIS_PYTHON_VERSION == "2.7" ]; then sudo apt-get update;sudo apt-get install python-numpy python-scipy python-matplotlib; fi' 15 15 16 16 install: 17 17 - pip install -r build_tools/requirements.txt 18 19 before_script:20 - "export DISPLAY=:99.0"21 - "sh -e /etc/init.d/xvfb start"22 - sleep 3 # give xvfb some time to start23 24 18 script: 25 - export WORKSPACE=/home/travis/build/SasView/ 26 - cd $WORKSPACE 27 - git clone --depth=50 --branch=master https://github.com/SasView/sasmodels.git sasmodels 19 - export WORKSPACE=/home/travis/build/SasView/sasview/ 28 20 - export PYTHONPATH=$WORKSPACE/sasview-install:$WORKSPACE/utils:$PYTHONPATH 29 - cd $WORKSPACE30 - ls -ltr31 21 - if [ ! -d "utils" ]; then mkdir utils; fi 32 - /bin/sh -xe sasview/build_tools/travis_build.sh33 # - /bin/sh -xe sasview/build_tools/jenkins_linux_test.sh22 - /bin/sh -xe build_tools/jenkins_linux_build.sh 23 - /bin/sh -xe build_tools/jenkins_linux_test.sh 34 24 - export LC_ALL=en_US.UTF-8 35 25 - export LANG=en_US.UTF-8 36 #- python setup.py docs; echo 037 #- python setup.py bdist_egg --skip-build26 - python setup.py docs; echo 0 27 - python setup.py bdist_egg --skip-build 38 28 -
TabularUnified sasview/__init__.py ¶
r4ac4caa r86eb046 2 2 __build__ = "GIT_COMMIT" 3 3 try: 4 import logging5 4 import subprocess 6 5 import os 7 import platform8 6 FNULL = open(os.devnull, 'w') 9 if platform.system() == "Windows": 10 args = ['git', 'describe', '--tags'] 11 else: 12 args = ['git describe --tags'] 13 git_revision = subprocess.check_output(args, 7 git_revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'], 14 8 stderr=FNULL, 15 9 shell=True) 16 10 __build__ = str(git_revision).strip() 17 except subprocess.CalledProcessError as cpe: 18 logging.warning("Error while determining build number\n Using command:\n %s \n Output:\n %s"% (cpe.cmd,cpe.output)) 11 except: 12 import logging 13 import sys 14 logging.warning("Error while determining build number\n %s" % sys.exc_value) -
TabularUnified src/sas/sascalc/dataloader/readers/cansas_reader.py ¶
r654e8e0 r5f26aa4 62 62 type_name = "canSAS" 63 63 invalid = True 64 frm = ""65 64 ## Log messages and errors 66 65 logging = None … … 139 138 for entry in entry_list: 140 139 # Create a new DataInfo object for every <SASentry> 140 141 141 142 142 # Set the file name and then parse the entry. … … 183 183 return self.output 184 184 185 def _parse_entry(self, dom , recurse=False):185 def _parse_entry(self, dom): 186 186 """ 187 187 Parse a SASEntry - new recursive method for parsing the dom of … … 192 192 """ 193 193 194 if not self._is_call_local() and not recurse: 194 frm = inspect.stack()[1] 195 if not self._is_call_local(frm): 195 196 self.reset_state() 196 197 self.add_data_set() … … 200 201 self.base_ns = "{0}{1}{2}".format("{", \ 201 202 CANSAS_NS.get(self.cansas_version).get("ns"), "}") 203 tagname = '' 204 tagname_original = '' 202 205 203 206 # Go through each child in the parent element … … 222 225 self._initialize_new_data_set() 223 226 ## Recursion step to access data within the group 224 self._parse_entry(node , True)227 self._parse_entry(node) 225 228 if tagname == "SASsample": 226 229 self.current_datainfo.sample.name = name … … 434 437 length = len(self.names) - 1 435 438 self.parent_class = self.names[length] 436 if not self._is_call_local() and not recurse: 437 self.frm = "" 439 if not self._is_call_local(frm): 438 440 self.add_data_set() 439 441 empty = None … … 446 448 447 449 448 def _is_call_local(self ):449 """ 450 451 """452 if self.frm == "":453 inter = inspect.stack()454 self.frm = inter[2]455 mod_name = self.frm[1].replace("\\", "/").replace(".pyc", "")450 def _is_call_local(self, frm=""): 451 """ 452 453 :return: 454 """ 455 if frm == "": 456 frm = inspect.stack()[1] 457 mod_name = frm[1].replace("\\", "/").replace(".pyc", "") 456 458 mod_name = mod_name.replace(".py", "") 457 459 mod = mod_name.split("sas/") … … 834 836 # If the calling function was not the cansas reader, return a minidom 835 837 # object rather than an lxml object. 836 self.frm = inspect.stack()[1]837 doc, entry_node = self._check_origin(entry_node, doc )838 frm = inspect.stack()[1] 839 doc, entry_node = self._check_origin(entry_node, doc, frm) 838 840 return doc, entry_node 839 841 … … 1230 1232 self.append(node, entry_node) 1231 1233 1232 def _check_origin(self, entry_node, doc ):1234 def _check_origin(self, entry_node, doc, frm): 1233 1235 """ 1234 1236 Return the document, and the SASentry node associated with … … 1240 1242 :param doc: entire xml tree 1241 1243 """ 1242 if not self.frm:1243 self.frm = inspect.stack()[1]1244 mod_name = self.frm[1].replace("\\", "/").replace(".pyc", "")1244 if not frm: 1245 frm = inspect.stack()[1] 1246 mod_name = frm[1].replace("\\", "/").replace(".pyc", "") 1245 1247 mod_name = mod_name.replace(".py", "") 1246 1248 mod = mod_name.split("sas/") -
TabularUnified src/sas/sasgui/guiframe/media/graph_help.rst ¶
rf9b0c81 re68c9bf 42 42 plot window. 43 43 44 .. note:: 45 *If a residuals graph (when fitting data) is hidden, it will not show up 46 after computation.* 44 *NOTE! If a residuals graph (when fitting data) is hidden, it will not show up 45 after computation.* 47 46 48 47 Dragging a plot … … 68 67 After zooming in on a a region, the *left arrow* or *right arrow* buttons on 69 68 the toolbar will switch between recent views. 70 71 The axis range can also be specified manually. To do so go to the *Graph Menu*72 (see Invoking_the_graph_menu_ for further details), choose the *Set Graph Range*73 option and enter the limits in the pop box.74 69 75 70 *NOTE! If a wheel mouse is available scrolling the wheel will zoom in/out … … 121 116 ^^^^^^^^^^^^^^^^^^^ 122 117 123 It is possible to make custom modifications to plots including: 118 From the *Graph Menu* (see Invoking_the_graph_menu_) it is also possible to 119 make some custom modifications to plots, including: 124 120 125 121 * changing the plot window title 126 * changing the default legend location and toggling it on/off127 * changing the axis l abel text128 * changing the axis l abel units129 * changing the axis l abel font & font colour122 * changing the axis legend locations 123 * changing the axis legend label text 124 * changing the axis legend label units 125 * changing the axis legend label font & font colour 130 126 * adding/removing a text string 131 127 * adding a grid overlay 132 133 The legend and text strings can be drag and dropped around the plot134 135 These options are accessed through the *Graph Menu* (see Invoking_the_graph_menu_)136 and selecting *Modify Graph Appearance* (for axis labels, grid overlay and137 legend position) or *Add Text* to add textual annotations, selecting font, color,138 style and size. *Remove Text* will remove the last annotation added. To change139 the legend. *Window Title* allows a custom title to be entered instead of Graph140 x.141 128 142 129 Changing scales … … 247 234 selected data will be removed from the plot. 248 235 249 .. note:: 250 The Remove data set action cannot be undone. 236 *NOTE! This action cannot be undone.* 251 237 252 238 Show-Hide error bars … … 262 248 In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Modify Plot 263 249 Property* to change the size, color, or shape of the displayed marker for the 264 chosen dataset, or to change the dataset label that appears in the plot legend 265 box. 250 chosen dataset, or to change the dataset label that appears on the plot. 266 251 267 252 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 307 292 average. 308 293 309 .. note:: 310 The displayed average only updates when input focus is moved back to 311 that window; ie, when the mouse pointer is moved onto that plot. 294 *NOTE! The displayed average only updates when input focus is moved back to 295 that window; ie, when the mouse pointer is moved onto that plot.* 312 296 313 297 Selecting *Box Sum* automatically brings up the 'Slicer Parameters' dialog in … … 375 359 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 376 360 377 .. note:: This help document was last modified by Paul Butler, 05 September, 2016361 .. note:: This help document was last changed by Steve King, 01May2015 -
TabularUnified src/sas/sasgui/perspectives/fitting/pagestate.py ¶
r654e8e0 r7673ecd 1569 1569 if output[ind].run_name is not None\ 1570 1570 and len(output[ind].run_name) != 0: 1571 if isinstance(output[ind].run_name, dict): 1572 name = output[ind].run_name.keys()[0] 1573 else: 1574 name = output[ind].run_name 1571 name = output[ind].run_name 1575 1572 else: 1576 1573 name = original_fname -
TabularUnified src/sas/sasgui/perspectives/invariant/invariant_panel.py ¶
r654e8e0 rcb93b40 830 830 """ 831 831 try: 832 if key in ['compute_num', 'file', 'is_time_machine', 'state_num']: 833 return 834 else: 835 attr = getattr(self, key) 832 attr = getattr(self, key) 836 833 if attr.__class__.__name__ == "StaticText": 837 834 return 838 if value in ["True", "False", True, False]: 839 value = bool(value) 840 else: 835 if type(value) is not bool: 841 836 value = str(value) 842 837 attr.SetValue(value) -
TabularUnified src/sas/sasgui/perspectives/pr/media/pr_help.rst ¶
r0391dae rb64b87c 15 15 *P(r)* is set to be equal to an expansion of base functions of the type 16 16 17 .. math:: 18 \Phi_{n(r)} = 2 r sin(\frac{\pi n r}{D_{max}}) 17 |bigphi|\_n(r) = 2.r.sin(|pi|\ .n.r/D_max) 19 18 20 The coefficient of each base function in the expansion is found by performing 19 The coefficient of each base function in the expansion is found by performing 21 20 a least square fit with the following fit function 22 21 23 .. math:: 22 |chi|\ :sup:`2` = |bigsigma|\ :sub:`i` [ I\ :sub:`meas`\ (Q\ :sub:`i`\ ) - I\ :sub:`th`\ (Q\ :sub:`i`\ ) ] :sup:`2` / (Error) :sup:`2` + Reg_term 24 23 25 \chi^2=\frac{\sum_i (I_{meas}(Q_i)-I_{th}(Q_i))^2}{error^2}+Reg\_term 26 24 where I\ :sub:`meas`\ (Q) is the measured scattering intensity and 25 I\ :sub:`th`\ (Q) is the prediction from the Fourier transform of the *P(r)* 26 expansion. 27 27 28 where $I_{meas}(Q_i)$ is the measured scattering intensity and $I_{th}(Q_i)$ is 29 the prediction from the Fourier transform of the *P(r)* expansion. 30 31 The $Reg\_term$ term is a regularization term set to the second derivative 32 $d^2P(r)/d^2r$ integrated over $r$. It is used to produce a smooth *P(r)* output. 28 The *Reg_term* term is a regularization term set to the second derivative 29 d\ :sup:`2`\ *P(r)* / dr\ :sup:`2` integrated over *r*. It is used to produce a 30 smooth *P(r)* output. 33 31 34 32 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 47 45 system. 48 46 49 P(r) inversion requires that the background be perfectly subtracted. This is50 often difficult to do well and thus many data sets will include a background.51 For those cases, the user should check the "estimate background" box and the52 module will do its best to estimate it.53 54 The P(r) module is constantly computing in the background what the optimum55 *number of terms* should be as well as the optimum *regularization constant*.56 These are constantly updated in the buttons next to the entry boxes on the GUI.57 These are almost always close and unless the user has a good reason to choose58 differently they should just click on the buttons to accept both. {D_max} must59 still be set by the user. However, besides looking at the output, the user can60 click the explore button which will bring up a graph of chi^2 vs Dmax over a61 range around the current Dmax. The user can change the range and the number of62 points to explore in that range. They can also choose to plot several other63 parameters as a function of Dmax including: I0, Rg, Oscillation parameter,64 background, positive fraction, and 1-sigma positive fraction.65 66 47 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 67 48 … … 74 55 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 75 56 76 .. note:: This help document was last modified by Paul Butler, 05 September, 201657 .. note:: This help document was last changed by Steve King, 01May2015
Note: See TracChangeset
for help on using the changeset viewer.