Changeset f80b416e in sasview for src/sas/sasgui/guiframe
- Timestamp:
- Sep 20, 2017 12:21:41 PM (7 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- fca1f50
- Parents:
- 2746eab (diff), ce0a245 (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:
-
- 2 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/config.py
rf2ea95a rf80b416e 48 48 '''This work benefited from the use of the SasView application, originally developed under NSF Award DMR-0520547. SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project Grant No 654000.''' 49 49 _acknowledgement_citation = \ 50 '''M. Doucet et al. SasView Version 4.1 , Zenodo, 10.5281/zenodo.438138'''50 '''M. Doucet et al. SasView Version 4.1.2, Zenodo, 10.5281/zenodo.825675''' 51 51 52 52 _acknowledgement = \ -
src/sas/sasgui/guiframe/documentation_window.py
r2746eab rf80b416e 99 99 elif not os.path.exists(file_path): 100 100 url = "index.html" 101 logger.error("Could not find Sphinx documentation at %s \102 -- has it been built?",file_path)101 logger.error("Could not find Sphinx documentation at %s -- has it been built?", 102 file_path) 103 103 elif False: 104 104 start_documentation_server(docs_path, port=7999) … … 107 107 url = "file:///" + urllib.quote(file_path, r'/\:')+ url_instruction 108 108 109 logger.info("showing url " + url)109 #logger.info("showing url " + url) 110 110 if WX_SUPPORTS_HTML2: 111 111 # Complete HTML/CSS support! -
src/sas/sasgui/guiframe/aboutbox.py
r959eb01 rf2ea95a 31 31 (os.path.isfile("%s/%s.pyc" % (path, 'local_config'))): 32 32 fObj, path, descr = imp.find_module('local_config', [path]) 33 config = imp.load_module('local_config', fObj, path, descr) 33 config = imp.load_module('local_config', fObj, path, descr) 34 34 else: 35 35 # Try simply importing local_config 36 36 import local_config as config 37 37 except: 38 # Didn't find local config, load the default 38 # Didn't find local config, load the default 39 39 import config 40 40 … … 42 42 """ 43 43 Launches browser and opens specified url 44 44 45 45 In some cases may require BROWSER environment variable to be set up. 46 46 47 47 :param url: URL to open 48 48 49 49 """ 50 50 import webbrowser … … 55 55 """ 56 56 "About" Dialog 57 57 58 58 Shows product name, current version, authors, and link to the product page. 59 59 Current version is taken from version.py 60 61 """ 62 60 61 """ 62 63 63 def __init__(self, *args, **kwds): 64 64 … … 66 66 kwds["style"] = wx.DEFAULT_DIALOG_STYLE 67 67 wx.Dialog.__init__(self, *args, **kwds) 68 68 69 69 file_dir = os.path.dirname(__file__) 70 70 71 71 # Mac doesn't display images with transparent background so well, 72 72 # keep it for Windows 73 73 image = file_dir + "/images/angles_flat.png" 74 74 75 75 if os.path.isfile(config._corner_image): 76 76 image = config._corner_image … … 80 80 else: 81 81 self.bitmap_logo = wx.StaticBitmap(self, -1, wx.Bitmap(image)) 82 82 83 83 self.label_title = wx.StaticText(self, -1, config.__appname__) 84 84 self.label_version = wx.StaticText(self, -1, "") … … 112 112 #self.bitmap_button_danse = wx.BitmapButton(self, -1, wx.NullBitmap) 113 113 self.bitmap_button_msu = wx.BitmapButton(self, -1, wx.NullBitmap) 114 114 115 115 self.bitmap_button_isis = wx.BitmapButton(self, -1, wx.NullBitmap) 116 116 self.bitmap_button_ess = wx.BitmapButton(self, -1, wx.NullBitmap) … … 119 119 self.bitmap_button_tudelft = wx.BitmapButton(self, -1, wx.NullBitmap) 120 120 self.bitmap_button_dls = wx.BitmapButton(self, -1, wx.NullBitmap) 121 121 122 122 self.static_line_3 = wx.StaticLine(self, -1) 123 123 self.button_OK = wx.Button(self, wx.ID_OK, "OK") … … 125 125 self.__set_properties() 126 126 self.__do_layout() 127 127 128 128 self.Bind(wx.EVT_BUTTON, self.onNistLogo, self.bitmap_button_nist) 129 129 self.Bind(wx.EVT_BUTTON, self.onUmdLogo, self.bitmap_button_umd) … … 145 145 random.shuffle(config._authors) 146 146 strLabel = ", ".join(config._authors) 147 147 148 148 # display version and svn revison numbers 149 149 verwords = config.__version__.split('.') … … 157 157 self.label_version.SetLabel(config.__version__)#(version) 158 158 self.label_svnrevision.SetLabel(build_num) 159 159 160 160 # set bitmaps for logo buttons 161 161 image = file_dir + "/images/nist_logo.png" 162 162 if os.path.isfile(config._nist_logo): 163 163 image = config._nist_logo 164 logo = wx.Bitmap(image) 164 logo = wx.Bitmap(image) 165 165 self.bitmap_button_nist.SetBitmapLabel(logo) 166 166 167 167 image = file_dir + "/images/umd_logo.png" 168 168 if os.path.isfile(config._umd_logo): 169 169 image = config._umd_logo 170 logo = wx.Bitmap(image) 170 logo = wx.Bitmap(image) 171 171 self.bitmap_button_umd.SetBitmapLabel(logo) 172 172 … … 174 174 if os.path.isfile(config._ornl_logo): 175 175 image = config._ornl_logo 176 logo = wx.Bitmap(image) 176 logo = wx.Bitmap(image) 177 177 self.bitmap_button_ornl.SetBitmapLabel(logo) 178 178 … … 181 181 if os.path.isfile(config._sns_logo): 182 182 image = config._sns_logo 183 logo = wx.Bitmap(image) 183 logo = wx.Bitmap(image) 184 184 self.bitmap_button_sns.SetBitmapLabel(logo) 185 185 186 186 image = file_dir + "/images/nsf_logo.png" 187 187 if os.path.isfile(config._nsf_logo): 188 188 image = config._nsf_logo 189 logo = wx.Bitmap(image) 189 logo = wx.Bitmap(image) 190 190 self.bitmap_button_nsf.SetBitmapLabel(logo) 191 191 … … 196 196 self.bitmap_button_danse.SetBitmapLabel(logo) 197 197 """ 198 image = file_dir + "/images/utlogo. gif"198 image = file_dir + "/images/utlogo.png" 199 199 if os.path.isfile(config._inst_logo): 200 200 image = config._inst_logo 201 201 logo = wx.Bitmap(image) 202 202 self.bitmap_button_msu.SetBitmapLabel(logo) 203 203 204 204 image = file_dir + "/images/isis_logo.png" 205 205 if os.path.isfile(config._isis_logo): 206 206 image = config._isis_logo 207 logo = wx.Bitmap(image) 207 logo = wx.Bitmap(image) 208 208 self.bitmap_button_isis.SetBitmapLabel(logo) 209 209 … … 213 213 logo = wx.Bitmap(image) 214 214 self.bitmap_button_ess.SetBitmapLabel(logo) 215 215 216 216 image = file_dir + "/images/ill_logo.png" 217 217 if os.path.isfile(config._ill_logo): … … 219 219 logo = wx.Bitmap(image) 220 220 self.bitmap_button_ill.SetBitmapLabel(logo) 221 221 222 222 image = file_dir + "/images/ansto_logo.png" 223 223 if os.path.isfile(config._ansto_logo): … … 225 225 logo = wx.Bitmap(image) 226 226 self.bitmap_button_ansto.SetBitmapLabel(logo) 227 227 228 228 image = file_dir + "/images/tudelft_logo.png" 229 229 if os.path.isfile(config._tudelft_logo): … … 231 231 logo = wx.Bitmap(image) 232 232 self.bitmap_button_tudelft.SetBitmapLabel(logo) 233 233 234 234 image = file_dir + "/images/dls_logo.png" 235 235 if os.path.isfile(config._dls_logo): … … 237 237 logo = wx.Bitmap(image) 238 238 self.bitmap_button_dls.SetBitmapLabel(logo) 239 239 240 240 # resize dialog window to fit version number nicely 241 241 if wx.VERSION >= (2, 7, 2, 0): … … 244 244 size = [self.GetBestFittingSize()[0], self.GetSize()[1]] 245 245 self.Fit() 246 246 247 247 def __set_properties(self): 248 248 """ … … 310 310 sizer_main.Add(self.static_line_2, 0, wx.EXPAND, 0) 311 311 312 sizer_logos.Add(self.bitmap_button_msu, 0, 312 sizer_logos.Add(self.bitmap_button_msu, 0, 313 313 wx.LEFT|wx.ADJUST_MINSIZE, 2) 314 314 #sizer_logos.Add(self.bitmap_button_danse, 0, 315 315 # wx.LEFT|wx.ADJUST_MINSIZE, 2) 316 #sizer_logos.Add(self.bitmap_button_nsf, 0, 316 #sizer_logos.Add(self.bitmap_button_nsf, 0, 317 317 # wx.LEFT|wx.ADJUST_MINSIZE, 2) 318 sizer_logos.Add(self.bitmap_button_umd, 0, 319 wx.LEFT|wx.ADJUST_MINSIZE, 2) 320 sizer_logos.Add(self.bitmap_button_nist, 0, 321 wx.LEFT|wx.ADJUST_MINSIZE, 2) 322 #sizer_logos.Add(self.bitmap_button_sns, 0, 318 sizer_logos.Add(self.bitmap_button_umd, 0, 319 wx.LEFT|wx.ADJUST_MINSIZE, 2) 320 sizer_logos.Add(self.bitmap_button_nist, 0, 321 wx.LEFT|wx.ADJUST_MINSIZE, 2) 322 #sizer_logos.Add(self.bitmap_button_sns, 0, 323 323 # wx.LEFT|wx.ADJUST_MINSIZE, 2) 324 sizer_logos.Add(self.bitmap_button_ornl, 0, 325 wx.LEFT|wx.ADJUST_MINSIZE, 2) 326 sizer_logos.Add(self.bitmap_button_isis, 0, 327 wx.LEFT|wx.ADJUST_MINSIZE, 2) 328 sizer_logos.Add(self.bitmap_button_ess, 0, 329 wx.LEFT|wx.ADJUST_MINSIZE, 2) 330 sizer_logos.Add(self.bitmap_button_ill, 0, 331 wx.LEFT|wx.ADJUST_MINSIZE, 2) 332 sizer_logos.Add(self.bitmap_button_ansto, 0, 333 wx.LEFT|wx.ADJUST_MINSIZE, 2) 334 sizer_logos.Add(self.bitmap_button_tudelft, 0, 335 wx.LEFT|wx.ADJUST_MINSIZE, 2) 336 sizer_logos.Add(self.bitmap_button_dls, 0, 337 wx.LEFT|wx.ADJUST_MINSIZE, 2) 338 324 sizer_logos.Add(self.bitmap_button_ornl, 0, 325 wx.LEFT|wx.ADJUST_MINSIZE, 2) 326 sizer_logos.Add(self.bitmap_button_isis, 0, 327 wx.LEFT|wx.ADJUST_MINSIZE, 2) 328 sizer_logos.Add(self.bitmap_button_ess, 0, 329 wx.LEFT|wx.ADJUST_MINSIZE, 2) 330 sizer_logos.Add(self.bitmap_button_ill, 0, 331 wx.LEFT|wx.ADJUST_MINSIZE, 2) 332 sizer_logos.Add(self.bitmap_button_ansto, 0, 333 wx.LEFT|wx.ADJUST_MINSIZE, 2) 334 sizer_logos.Add(self.bitmap_button_tudelft, 0, 335 wx.LEFT|wx.ADJUST_MINSIZE, 2) 336 sizer_logos.Add(self.bitmap_button_dls, 0, 337 wx.LEFT|wx.ADJUST_MINSIZE, 2) 338 339 339 sizer_logos.Add((10, 50), 0, wx.ADJUST_MINSIZE, 0) 340 340 sizer_main.Add(sizer_logos, 0, wx.EXPAND, 0) 341 341 sizer_main.Add(self.static_line_3, 0, wx.EXPAND, 0) 342 342 sizer_button.Add((20, 40), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0) 343 sizer_button.Add(self.button_OK, 0, 343 sizer_button.Add(self.button_OK, 0, 344 344 wx.RIGHT|wx.ADJUST_MINSIZE|wx.CENTER, 10) 345 345 sizer_main.Add(sizer_button, 0, wx.EXPAND, 0) … … 350 350 # end wxGlade 351 351 352 def onNistLogo(self, event): 352 def onNistLogo(self, event): 353 353 """ 354 354 """ … … 356 356 launchBrowser(config._nist_url) 357 357 event.Skip() 358 359 def onUmdLogo(self, event): 358 359 def onUmdLogo(self, event): 360 360 """ 361 361 """ … … 363 363 launchBrowser(config._umd_url) 364 364 event.Skip() 365 366 def onOrnlLogo(self, event): 365 366 def onOrnlLogo(self, event): 367 367 """ 368 368 """ … … 370 370 launchBrowser(config._ornl_url) 371 371 event.Skip() 372 373 def onSnsLogo(self, event): 372 373 def onSnsLogo(self, event): 374 374 """ 375 375 """ … … 377 377 launchBrowser(config._sns_url) 378 378 event.Skip() 379 380 def onNsfLogo(self, event): 379 380 def onNsfLogo(self, event): 381 381 """ 382 382 """ … … 394 394 def onUTLogo(self, event): 395 395 """ 396 """ 396 """ 397 397 # wxGlade: DialogAbout.<event_handler> 398 398 launchBrowser(config._inst_url) 399 399 event.Skip() 400 400 401 def onIsisLogo(self, event): 401 def onIsisLogo(self, event): 402 402 """ 403 403 """ … … 415 415 def onIllLogo(self, event): 416 416 """ 417 """ 417 """ 418 418 # wxGlade: DialogAbout.<event_handler> 419 419 launchBrowser(config._ill_url) … … 422 422 def onAnstoLogo(self, event): 423 423 """ 424 """ 424 """ 425 425 # wxGlade: DialogAbout.<event_handler> 426 426 launchBrowser(config._ansto_url) … … 429 429 def onTudelftLogo(self, event): 430 430 """ 431 """ 431 """ 432 432 # wxGlade: DialogAbout.<event_handler> 433 433 launchBrowser(config._tudelft_url) … … 436 436 def onDlsLogo(self, event): 437 437 """ 438 """ 438 """ 439 439 # wxGlade: DialogAbout.<event_handler> 440 440 launchBrowser(config._dls_url) … … 462 462 app = MyApp(0) 463 463 app.MainLoop() 464 465 ##### end of testing code ##################################################### 464 465 ##### end of testing code ##################################################### -
src/sas/sasgui/guiframe/media/graph_help.rst
rf9b0c81 r5ed76f8 9 9 10 10 SasView generates three different types of graph window: one that displays *1D data* 11 (i e, I(Q) vs Q), one that displays *1D residuals* (ie, the difference between the12 experimental data and the theory at the same Qvalues), and *2D color maps*.11 (i.e., $I(Q)$ vs $Q$), one that displays *1D residuals* (ie, the difference between the 12 experimental data and the theory at the same $Q$ values), and *2D color maps*. 13 13 14 14 Graph window options … … 42 42 plot window. 43 43 44 .. note:: 44 .. note:: 45 45 *If a residuals graph (when fitting data) is hidden, it will not show up 46 46 after computation.* … … 138 138 style and size. *Remove Text* will remove the last annotation added. To change 139 139 the legend. *Window Title* allows a custom title to be entered instead of Graph 140 x. 140 x. 141 141 142 142 Changing scales … … 226 226 ^^^^^^^^^^^^^^^^^^^ 227 227 228 Linear fit performs a simple ( y(x)=ax+b )linear fit within the plot window.228 Linear fit performs a simple $y(x)=ax+b$ linear fit within the plot window. 229 229 230 230 In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Linear Fit*. A … … 234 234 235 235 This option is most useful for performing simple Guinier, XS Guinier, and 236 Porod type analyses, for example, to estimate Rg, a rod diameter, or incoherent236 Porod type analyses, for example, to estimate $R_g$, a rod diameter, or incoherent 237 237 background level, respectively. 238 238 … … 319 319 ^^^^^^^^^^^^^^^^^^^^^^^^^ 320 320 321 This operation will perform an average in constant Q-rings around the (x,y)321 This operation will perform an average in constant $Q$ rings around the (x,y) 322 322 pixel location of the beam center. 323 323 … … 331 331 ^^^^^^^^^^^^^^^^^^^^^^^ 332 332 333 This operation averages in constant Q-arcs.334 335 The width of the sector is specified in degrees ( +/- |delta|\|phi|\) each side336 of the central angle (|phi|\).337 338 Annular average [ |phi| View]339 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 340 341 This operation performs an average between two Q-values centered on (0,0),333 This operation averages in constant $Q$ arcs. 334 335 The width of the sector is specified in degrees ($\pm\delta|\phi|$) each side 336 of the central angle $\phi$. 337 338 Annular average [:math:`\phi`] 339 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 340 341 This operation performs an average between two $Q$ values centered on (0,0), 342 342 and averaged over a specified number of pixels. 343 343 344 The data is returned as a function of angle (|phi|\)in degrees with zero344 The data is returned as a function of angle $\phi$ in degrees with zero 345 345 degrees at the 3 O'clock position. 346 346 … … 356 356 ^^^^^^^^^^^^^^^^^^^ 357 357 358 This operation computes an average I(Qx)for the region of interest.358 This operation computes an average $I(Q_x)$ for the region of interest. 359 359 360 360 When editing the slicer parameters, the user can control the length and the 361 361 width the rectangular slicer. The averaged output is calculated from constant 362 bins with rectangular shape. The resultant Qvalues are nominal values, that362 bins with rectangular shape. The resultant $Q$ values are nominal values, that 363 363 is, the central value of each bin on the x-axis. 364 364 … … 366 366 ^^^^^^^^^^^^^^^^^^^ 367 367 368 This operation computes an average I(Qy)for the region of interest.368 This operation computes an average $I(Q_y)$ for the region of interest. 369 369 370 370 When editing the slicer parameters, the user can control the length and the 371 371 width the rectangular slicer. The averaged output is calculated from constant 372 bins with rectangular shape. The resultant Qvalues are nominal values, that372 bins with rectangular shape. The resultant $Q$ values are nominal values, that 373 373 is, the central value of each bin on the x-axis. 374 374
Note: See TracChangeset
for help on using the changeset viewer.