Changeset 2c627ad in sasview
- Timestamp:
- Aug 11, 2016 8:19:11 AM (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:
- a47d0c8
- Parents:
- 5a3c1f0 (diff), 713cc1c (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. - Files:
-
- 22 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
build_tools/jenkins_win_build.bat
rd2fd8fc rb188f53 16 16 17 17 :: SET SASVIEW GITHASH ################################################ 18 ::cd %WORKSPACE%19 ::cd sasview\sasview20 ::git rev-parse HEAD > tmpFile_githash21 ::SET /p githash= < tmpFile_githash22 ::DEL tmpFile_githash23 ::%GIT_SED% -i.bak "s/GIT_COMMIT/%githash%/g" __init__.py18 cd %WORKSPACE% 19 cd sasview\sasview 20 git rev-parse HEAD > tmpFile_githash 21 SET /p githash= < tmpFile_githash 22 DEL tmpFile_githash 23 %GIT_SED% -i.bak "s/GIT_COMMIT/%githash%/g" __init__.py 24 24 25 25 -
sasview/__init__.py
r8ca1ba1 r801a296 3 3 try: 4 4 import subprocess 5 git_revision = subprocess.check_output(['git', 'rev-parse', 'HEAD']) 5 import os 6 FNULL = open(os.devnull, 'w') 7 git_revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'], 8 stderr=FNULL, 9 shell=True) 6 10 __build__ = str(git_revision).strip() 7 11 except: -
src/sas/sascalc/calculator/BaseComponent.py
rcb4ef58 rdeddda1 7 7 # imports 8 8 import copy 9 from collections import OrderedDict 10 9 11 import numpy 10 12 #TO DO: that about a way to make the parameter … … 254 256 Return a list of all available parameters for the model 255 257 """ 256 list = self.params.keys()258 list = _ordered_keys(self.params) 257 259 # WARNING: Extending the list with the dispersion parameters 258 260 list.extend(self.getDispParamList()) … … 264 266 """ 265 267 list = [] 266 267 for item in self.dispersion.keys(): 268 for p in self.dispersion[item].keys(): 268 for item in _ordered_keys(self.dispersion): 269 for p in _ordered_keys(self.dispersion[item]): 269 270 if p not in ['type']: 270 271 list.append('%s.%s' % (item.lower(), p.lower())) … … 309 310 """ 310 311 raise ValueError, "Model operation are no longer supported" 312 313 314 def _ordered_keys(d): 315 keys = list(d.keys()) 316 if not isinstance(d, OrderedDict): 317 keys.sort() 318 return keys -
src/sas/sascalc/dataloader/readers/associations.py
rb699768 re5c09cf 92 92 import nexus_reader 93 93 import sesans_reader 94 import cansas_reader_HDF5 95 import anton_paar_saxs_reader 94 96 registry_function(sesans_reader) 95 97 registry_function(abs_reader) … … 102 104 #registry_function(tiff_reader) 103 105 registry_function(nexus_reader) 104 106 registry_function(cansas_reader_HDF5) 107 registry_function(anton_paar_saxs_reader) 105 108 return True -
docs/sphinx-docs/source/user/analysis.rst
r8f46df7 r0390040 6 6 .. toctree:: 7 7 :maxdepth: 1 8 8 9 9 Model Fitting <sasgui/perspectives/fitting/fitting> 10 10 11 11 P(r) Inversion <sasgui/perspectives/pr/pr_help> 12 12 13 13 Invariant Calculation <sasgui/perspectives/invariant/invariant_help> 14 15 Correlation Function <sasgui/perspectives/corfunc/corfunc_help> -
sasview/sasview.py
r1be5202 rc23f303 81 81 #Always use private .matplotlib setup to avoid conflicts with other 82 82 #uses of matplotlib 83 #Have to check if .sasview exists first 83 #Have to check if .sasview exists first 84 84 sasdir = os.path.join(os.path.expanduser("~"),'.sasview') 85 85 if not os.path.exists(sasdir): … … 119 119 # Fitting perspective 120 120 try: 121 import sas.sasgui.perspectives.fitting as module 121 import sas.sasgui.perspectives.fitting as module 122 122 fitting_plug = module.Plugin() 123 123 self.gui.add_perspective(fitting_plug) … … 145 145 logging.error(traceback.format_exc()) 146 146 147 #Calculator perspective 147 # Corfunc perspective 148 try: 149 import sas.sasgui.perspectives.corfunc as module 150 corfunc_plug = module.Plugin() 151 self.gui.add_perspective(corfunc_plug) 152 except: 153 logging.error("Unable to load corfunc module") 154 155 #Calculator perspective 148 156 try: 149 157 import sas.sasgui.perspectives.calculator as module … … 191 199 if __name__ == "__main__": 192 200 run() 193 -
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
rd85c194 r5a54aa4 95 95 self.parent.SetFocus() 96 96 97 # If true, there are 3 qrange bars 98 self.is_corfunc = False 99 97 100 98 101 def get_symbol_label(self): … … 214 217 if active_ctrl == None: 215 218 return 219 if hasattr(event, 'is_corfunc'): 220 self.is_corfunc = event.is_corfunc 216 221 if event.id in self.plots.keys(): 217 222 ctrl = event.ctrl … … 222 227 values = [max(x_data.min(), float(ctrl[0].GetValue())), 223 228 min(x_data.max(), float(ctrl[1].GetValue()))] 229 if len(ctrl) == 3: 230 colors.append('purple') 231 values.append(min(x_data.max(), float(ctrl[2].GetValue()))) 224 232 if self.ly == None: 225 233 self.ly = [] … … 293 301 ly0x = ly[0].get_xdata() 294 302 ly1x = ly[1].get_xdata() 303 ly2x = None 304 if self.is_corfunc: ly2x = ly[2].get_xdata() 295 305 self.q_ctrl[0].SetBackgroundColour('white') 296 306 self.q_ctrl[1].SetBackgroundColour('white') … … 306 316 self.q_ctrl[0].SetValue(str(pos_x)) 307 317 self.q_ctrl[1].SetBackgroundColour('pink') 318 elif ly2x is not None and ly1x >= ly2x: 319 if self.vl_ind == 1: 320 ly[2].set_xdata(posx) 321 ly[2].set_zorder(nop) 322 self.q_ctrl[2].SetValue(str(pos_x)) 323 elif self.vl_ind == 2: 324 ly[1].set_xdata(posx) 325 ly[1].set_zorder(nop) 326 self.q_ctrl[1].SetValue(str(pos_x)) 327 308 328 309 329 def _get_cusor_lines(self, event): … … 325 345 dqmin = math.fabs(event.xdata - self.ly[0].get_xdata()) 326 346 dqmax = math.fabs(event.xdata - self.ly[1].get_xdata()) 327 is_qmax = dqmin > dqmax 328 if is_qmax: 329 self.vl_ind = 1 347 if not self.is_corfunc: 348 is_qmax = dqmin > dqmax 349 if is_qmax: 350 self.vl_ind = 1 351 else: 352 self.vl_ind = 0 330 353 else: 331 self.vl_ind = 0 354 dqmax2 = math.fabs(event.xdata - self.ly[2].get_xdata()) 355 closest = min(dqmin, dqmax, dqmax2) 356 self.vl_ind = { dqmin: 0, dqmax: 1, dqmax2: 2 }.get(closest) 332 357 333 358 def cusor_line(self, event):
Note: See TracChangeset
for help on using the changeset viewer.