Changes in / [ce0a245:d76c43a] in sasview
- Files:
-
- 78 added
- 77 deleted
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
recdd132 re9df8a5 49 49 /docs/sphinx-docs/source/user/perspectives 50 50 /docs/sphinx-docs/source/user/sasgui 51 /docs/sphinx-docs/katex*.zip 51 52 52 53 -
build_tools/jenkins_linux_build.sh
r128c287 r1573220 63 63 $PYTHON setup.py build docs bdist_egg 64 64 65 # CREATE PDF FROM LATEX 66 #cd $WORKSPACE 67 #cd sasview/docs/sphinx-docs/build/latex 68 #pdflatex SasView.tex 65 69 66 70 # INSTALL SASVIEW -
docs/sphinx-docs/Makefile
r1d5f5c2 r3194371 16 16 PAPEROPT_a4 = -D latex_paper_size=a4 17 17 PAPEROPT_letter = -D latex_paper_size=letter 18 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 18 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source-temp 19 19 # the i18n builder cannot share the environment and doctrees with the others 20 20 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source … … 53 53 rm -rf source/dev/api 54 54 sphinx-apidoc -o source/dev/api -d 8 ../../src 55 55 56 56 html: stubs 57 57 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html -
docs/sphinx-docs/build_sphinx.py
r4abc05d8 r6e546f8 18 18 from distutils.dir_util import copy_tree 19 19 from distutils.util import get_platform 20 from distutils.spawn import find_executable 21 20 22 from shutil import copy 21 23 from os import listdir … … 324 326 print("!!!!NO MODEL DOCS WILL BE BUILT!!!!") 325 327 326 327 328 def retrieve_bumps_docs(): 328 329 """ … … 360 361 SASVIEW_BUILD]) 361 362 363 def build_pdf(): 364 """ 365 Runs sphinx-build for pdf. Reads in all .rst files and spits out the final html. 366 """ 367 print("=== Build PDF Docs from ReST Files ===") 368 subprocess.call(["sphinx-build", 369 "-b", "latex", # Builder name. TODO: accept as arg to setup.py. 370 "-d", os.path.join(SPHINX_BUILD, "doctrees"), 371 SPHINX_SOURCE, 372 os.path.join(SPHINX_BUILD, "latex")]) 373 374 LATEXDIR = os.path.join(SPHINX_BUILD, "latex") 375 #TODO: Does it need to be done so many time? 376 def pdflatex(): 377 subprocess.call(["pdflatex", "SasView.tex"], cwd=LATEXDIR) 378 pdflatex() 379 pdflatex() 380 pdflatex() 381 subprocess.call(["makeindex", "-s", "python.ist", "SasView.idx"], cwd=LATEXDIR) 382 pdflatex() 383 pdflatex() 384 385 print("=== Copy PDF to HTML Directory ===") 386 source = os.path.join(LATEXDIR, "SasView.pdf") 387 target = os.path.join(SASVIEW_DOCS, "SasView.pdf") 388 shutil.copyfile(source, target) 389 362 390 def build(): 363 391 """ 364 392 Runs sphinx-build. Reads in all .rst files and spits out the final html. 365 393 """ 366 print("=== Build HTML Docs from Re stFiles ===")394 print("=== Build HTML Docs from ReST Files ===") 367 395 subprocess.call(["sphinx-build", 368 396 "-b", "html", # Builder name. TODO: accept as arg to setup.py. … … 375 403 copy_tree(html, SASVIEW_DOCS) 376 404 405 def fetch_katex(version, destination="_static"): 406 from zipfile import ZipFile 407 import urllib2 408 url = "https://github.com/Khan/KaTeX/releases/download/%s/katex.zip" % version 409 cache_path = "katex_%s.zip" % version 410 if not os.path.exists(cache_path): 411 try: 412 fd_in = urllib2.urlopen(url) 413 with open(cache_path, "wb") as fd_out: 414 fd_out.write(fd_in.read()) 415 finally: 416 fd_in.close() 417 with ZipFile(cache_path) as zip: 418 zip.extractall(destination) 419 420 def convert_katex(): 421 print("=== Preprocess HTML, converting latex to html ===") 422 subprocess.call(["node", "convertKaTex.js", SASVIEW_DOCS]) 423 424 def convert_mathjax(): 425 print("=== Preprocess HTML, converting latex to html ===") 426 subprocess.call(["node", "convertMathJax.js", SASVIEW_DOCS]) 427 428 def fetch_mathjax(): 429 subprocess.call(["npm", "install", "mathjax-node-page"]) 430 # TODO: copy fonts from node_modules/mathjax/fonts/HTML-CSS/Tex into static 431 377 432 def rebuild(): 378 433 clean() … … 380 435 retrieve_user_docs() 381 436 retrieve_bumps_docs() 437 #fetch_katex(version=KATEX_VERSION, destination=KATEX_PARENT) 438 #fetch_mathjax() 382 439 apidoc() 383 440 build() 441 if find_executable('latex'): 442 build_pdf() 443 #convert_katex() 444 #convert_mathjax() 384 445 385 446 print("=== Done ===") -
docs/sphinx-docs/source/conf.py
r6394851 r96f00a0 36 36 'sphinx.ext.coverage', 37 37 'sphinx.ext.mathjax', 38 #'mathjax', # replacement mathjax that allows a list of paths 38 39 'dollarmath', 39 40 'sphinx.ext.viewcode'] 40 41 41 #set mathjax path 42 mathjax_path="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML" 42 mathjax_path = ( 43 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?' 44 'config=TeX-MML-AM_CHTML') 45 46 # For katex uncomment the following 47 """ 48 #STATIC_PATH = '../../_static/' 49 STATIC_PATH = '' 50 mathjax_path = [ 51 STATIC_PATH + 'katex/katex.min.js', 52 STATIC_PATH + 'katex/contrib/auto-render.min.js', 53 STATIC_PATH + 'rendermath.js' 54 ] 55 mathjax_css = STATIC_PATH + 'katex/katex.min.css' 56 """ 57 43 58 44 59 # Add any paths that contain templates here, relative to this directory. … … 204 219 # -- Options for LaTeX output -------------------------------------------------- 205 220 221 # TODO: seems like angstroms is defined twice. 206 222 LATEX_PREAMBLE=r""" 223 \usepackage[utf8]{inputenc} % Allow unicode symbols in text 224 \newcommand{\lt}{<} % HTML needs \lt rather than < 225 \newcommand{\gt}{>} % HTML needs \gt rather than > 207 226 \renewcommand{\AA}{\text{\r{A}}} % Allow \AA in math mode 208 \ usepackage[utf8]{inputenc} % Allow unicode symbols in text227 \DeclareUnicodeCharacter {212B} {\AA} % Angstrom 209 228 \DeclareUnicodeCharacter {00B7} {\ensuremath{\cdot}} % cdot 210 229 \DeclareUnicodeCharacter {00B0} {\ensuremath{^\circ}} % degrees 211 \DeclareUnicodeCharacter {212B} {\AA} % Angstrom212 230 """ 213 231 latex_elements = { -
docs/sphinx-docs/source/rst_prolog
ra45185c r1659f54 1 1 .. Set up some substitutions to make life easier... 2 .. Remove |biggamma|, etc. when they are no longer needed.3 2 4 5 .. |alpha| unicode:: U+03B16 .. |beta| unicode:: U+03B27 .. |gamma| unicode:: U+03B38 .. |delta| unicode:: U+03B49 .. |epsilon| unicode:: U+03B510 .. |zeta| unicode:: U+03B611 .. |eta| unicode:: U+03B712 .. |theta| unicode:: U+03B813 .. |iota| unicode:: U+03B914 .. |kappa| unicode:: U+03BA15 .. |lambda| unicode:: U+03BB16 .. |mu| unicode:: U+03BC17 .. |nu| unicode:: U+03BD18 .. |xi| unicode:: U+03BE19 .. |omicron| unicode:: U+03BF20 .. |pi| unicode:: U+03C021 .. |rho| unicode:: U+03C122 .. |sigma| unicode:: U+03C323 .. |tau| unicode:: U+03C424 .. |upsilon| unicode:: U+03C525 .. |phi| unicode:: U+03C626 .. |chi| unicode:: U+03C727 .. |psi| unicode:: U+03C828 .. |omega| unicode:: U+03C929 30 31 .. |biggamma| unicode:: U+039332 .. |bigdelta| unicode:: U+039433 .. |bigzeta| unicode:: U+039E34 .. |bigpsi| unicode:: U+03A835 .. |bigphi| unicode:: U+03A636 .. |bigsigma| unicode:: U+03A337 .. |Gamma| unicode:: U+039338 .. |Delta| unicode:: U+039439 .. |Zeta| unicode:: U+039E40 .. |Psi| unicode:: U+03A841 42 43 .. |drho| replace:: |Delta|\ |rho|44 3 .. |Ang| unicode:: U+212B 45 4 .. |Ang^-1| replace:: |Ang|\ :sup:`-1` … … 57 16 .. |cm^-3| replace:: cm\ :sup:`-3` 58 17 .. |sr^-1| replace:: sr\ :sup:`-1` 59 .. |P0| replace:: P\ :sub:`0`\60 .. |A2| replace:: A\ :sub:`2`\61 62 63 .. |equiv| unicode:: U+226164 .. |noteql| unicode:: U+226065 .. |TM| unicode:: U+212266 67 18 68 19 .. |cdot| unicode:: U+00B7 -
src/sas/sascalc/calculator/sas_gen.py
ra1b8fee ra1b8fee 913 913 def set_sldms(self, sld_mx, sld_my, sld_mz): 914 914 r""" 915 Sets (\|m\|, m_theta, m_phi)916 """ 915 Sets mx, my, mz and abs(m). 916 """ # Note: escaping 917 917 if sld_mx.__class__.__name__ == 'float': 918 918 self.sld_mx = np.ones(len(self.pos_x)) * sld_mx -
src/sas/sascalc/realspace/__init__.py
r959eb01 r959eb01 1 1 """ 2 2 Real-Space Modeling for SAS 3 """ 3 """ 4 4 ## \mainpage Real-Space Modeling for SAS 5 5 # 6 6 # \section intro_sec Introduction 7 # This module provides SAS scattering intensity simulation 7 # This module provides SAS scattering intensity simulation 8 8 # based on real-space modeling. 9 9 # 10 # Documentation can be found here: 10 # Documentation can be found here: 11 11 # http://danse.us/trac/sas/wiki/RealSpaceModeling 12 12 # … … 37 37 # 38 38 # \section overview_sec Package Overview 39 # 39 # 40 40 # \subsection class Class Diagram: 41 41 # \image html real-space-class-diagram.png 42 42 # 43 43 # \subsection behav Behavior Enumeration: 44 # \image html enum. gif44 # \image html enum.png 45 45 # 46 46 # \subsection Tutorial … … 78 78 # \section help_sec Contact Info 79 79 # Code and Documentation by Jing Zhou as part of the DANSE project. 80 -
src/sas/sasgui/guiframe/aboutbox.py
r959eb01 r959eb01 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/config.py
rd908932 rd908932 77 77 _nsf_logo = os.path.join(icon_path, "nsf_logo.png") 78 78 _danse_logo = os.path.join(icon_path, "danse_logo.png") 79 _inst_logo = os.path.join(icon_path, "utlogo. gif")79 _inst_logo = os.path.join(icon_path, "utlogo.png") 80 80 _nist_url = "http://www.nist.gov/" 81 81 _umd_url = "http://www.umd.edu/" -
src/sas/sasgui/guiframe/documentation_window.py
rd7ee5866 r2746eab 16 16 import os 17 17 import logging 18 import wx19 18 import webbrowser 20 19 import urllib 21 20 import sys 22 21 22 import wx 23 try: 24 import wx.html2 as html 25 WX_SUPPORTS_HTML2 = True 26 except ImportError: 27 WX_SUPPORTS_HTML2 = False 28 29 from .gui_manager import get_app_dir 30 31 # Don't use wx html renderer on windows. 32 if os.name == 'nt': 33 WX_SUPPORTS_HTML2 = False 34 23 35 logger = logging.getLogger(__name__) 24 36 25 37 SPHINX_DOC_ENV = "SASVIEW_DOC_PATH" 26 WX_SUPPORTS_HTML2 = True27 try:28 import wx.html2 as html29 except:30 WX_SUPPORTS_HTML2 = False31 38 39 THREAD_STARTED = False 40 def start_documentation_server(doc_root, port): 41 import thread 42 global THREAD_STARTED 43 if not THREAD_STARTED: 44 thread.start_new_thread(_documentation_server, (doc_root, port)) 45 THREAD_STARTED = True 32 46 33 from gui_manager import get_app_dir 47 def _documentation_server(doc_root, port): 48 from SimpleHTTPServer import SimpleHTTPRequestHandler 49 from SocketServer import TCPServer 34 50 51 os.chdir(doc_root) 52 httpd = TCPServer(("127.0.0.1", port), SimpleHTTPRequestHandler, bind_and_activate=False) 53 httpd.allow_reuse_address = True 54 try: 55 httpd.server_bind() 56 httpd.server_activate() 57 httpd.serve_forever() 58 finally: 59 httpd.server_close() 35 60 36 61 class DocumentationWindow(wx.Frame): … … 70 95 #Note added June 21, 2015 PDB 71 96 file_path = os.path.join(docs_path, path) 72 url = "file:///" + urllib.quote(file_path, r'/\:')+ url_instruction 97 if path.startswith('http'): 98 url = path 99 elif not os.path.exists(file_path): 100 url = "index.html" 101 logger.error("Could not find Sphinx documentation at %s -- has it been built?", 102 file_path) 103 elif False: 104 start_documentation_server(docs_path, port=7999) 105 url = "http://127.0.0.1:7999/" + path.replace('\\', '/') + url_instruction 106 else: 107 url = "file:///" + urllib.quote(file_path, r'/\:')+ url_instruction 73 108 74 if not os.path.exists(file_path): 75 logger.error("Could not find Sphinx documentation at %s \ 76 -- has it been built?", file_path) 77 #Commenting following 5 lines, so default browser is forced 78 #This is due to CDN mathjax discontinuation of service, intenal help 79 #browser should be back with qt version 80 #Note added by Wojtek Potrzebowski, July 4th 2017 81 # elif WX_SUPPORTS_HTML2: 82 # # Complete HTML/CSS support! 83 # self.view = html.WebView.New(self) 84 # self.view.LoadURL(url) 85 # self.Show() 109 #logger.info("showing url " + url) 110 if WX_SUPPORTS_HTML2: 111 # Complete HTML/CSS support! 112 self.view = html.WebView.New(self) 113 self.view.LoadURL(url) 114 self.Bind(html.EVT_WEBVIEW_ERROR, self.OnError, self.view) 115 self.Show() 86 116 else: 87 117 logger.error("No html2 support, popping up a web browser") … … 92 122 webbrowser.open_new_tab(url) 93 123 124 def OnError(self, evt): 125 logger.error("%d: %s", evt.GetInt(), evt.GetString()) 126 94 127 def main(): 95 128 """ 96 129 main loop function if running alone for testing. 97 130 """ 131 url = "index.html" if len(sys.argv) <= 1 else sys.argv[1] 98 132 app = wx.App() 99 DocumentationWindow(None, -1, "index.html", "", "Documentation",)133 DocumentationWindow(None, -1, url, "", "Documentation",) 100 134 app.MainLoop() 101 135 -
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 -
src/sas/sasgui/perspectives/calculator/media/density_calculator_help.rst
rd85c194 r6aad2e8 29 29 4) Click the 'Calculate' button to perform the calculation. 30 30 31 .. image:: density_tutor. gif31 .. image:: density_tutor.png 32 32 33 33 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ -
src/sas/sasgui/perspectives/calculator/media/gen_sas_help.html
rd85c194 r6aad2e8 19 19 by the particle 20 20 <p> 21 <img src="gen_i. gif"/>21 <img src="gen_i.png"/> 22 22 </p> 23 23 <br> … … 26 26 of the j'th pixel respectively. And the total volume 27 27 <p> 28 <img src="v_j. gif"/>28 <img src="v_j.png"/> 29 29 </p> 30 30 <br> … … 44 44 scattering length. (Figure below). 45 45 <p> 46 <img src="mag_vector. bmp"/>46 <img src="mag_vector.png"/> 47 47 </p> 48 48 <br> 49 49 The magnetic scattering length density is then 50 50 <p> 51 <img src="dm_eq. gif"/>51 <img src="dm_eq.png"/> 52 52 </p> 53 53 <br> … … 66 66 <br> 67 67 <p> 68 <img src="gen_mag_pic. bmp"/>68 <img src="gen_mag_pic.png"/> 69 69 </p> 70 70 <br> … … 75 75 densities , including the nuclear scattering length density (β <sub>N</sub>) are given as, for non-spin-flips, 76 76 <p> 77 <img src="sld1. gif"/>77 <img src="sld1.png"/> 78 78 </p> 79 79 <br> … … 81 81 for spin-flips, 82 82 <p> 83 <img src="sld2. gif"/>83 <img src="sld2.png"/> 84 84 </p> 85 85 <br> … … 87 87 where 88 88 <p> 89 <img src="mxp. gif"/>89 <img src="mxp.png"/> 90 90 </p> 91 91 <p> 92 <img src="myp. gif"/>92 <img src="myp.png"/> 93 93 </p> 94 94 <p> 95 <img src="mzp. gif"/>95 <img src="mzp.png"/> 96 96 </p> 97 97 <p> 98 <img src="mqx. gif"/>98 <img src="mqx.png"/> 99 99 </p> 100 100 <p> 101 <img src="mqy. gif"/>101 <img src="mqy.png"/> 102 102 </p> 103 103 <br> … … 110 110 <br> 111 111 <p> 112 <img src="gen_gui_help. bmp"/>112 <img src="gen_gui_help.png"/> 113 113 </p> 114 114 <br> … … 136 136 in a 2D output, whileas the scattering calculation averaged over all the orientations uses the Debye equation providing a 1D output: 137 137 <p> 138 <img src="gen_debye_eq. gif"/>138 <img src="gen_debye_eq.png"/> 139 139 </p> 140 140 <br> -
src/sas/sasgui/perspectives/calculator/media/kiessig_calculator_help.rst
r7805458 r5ed76f8 10 10 ----------- 11 11 12 This tool is approximately estimates the thickness of a layer or the diameter13 of particles from the position of the Kiessig fringe/Bragg peak in NR/SAS data 14 usingthe relation12 This tool estimates real space dimensions from the position or spacing of 13 features in recipricol space. In particular a particle of size $d$ will 14 give rise to Bragg peaks with spacing $\Delta q$ according to the relation 15 15 16 (thickness *or* size) = 2 * |pi| / (fringe_width *or* peak position) 17 16 .. math:: 17 18 d = 2\pi / \Delta q 19 20 Similarly, the spacing between the peaks in Kiessig fringes in reflectometry 21 data arise from layers of thickness $d$. 22 18 23 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 19 24 … … 21 26 -------------- 22 27 23 To get a rough thickness or particle size, simply type the fringe or peak 28 To get a rough thickness or particle size, simply type the fringe or peak 24 29 position (in units of 1/|Ang|\) and click on the *Compute* button. 25 30 26 31 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 27 32 28 .. note:: This help document was last changed by Steve King, 01May2015 29 33 .. note:: This help document was last changed by Paul Kienzle, 05Apr2017 -
src/sas/sasgui/perspectives/calculator/media/resolution_calculator_help.rst
r7805458 r5ed76f8 10 10 ----------- 11 11 12 This tool is approximately estimates the resolution of Q from SAS instrumental13 parameter values assuming that the detector is flat and normal to the 12 This tool is approximately estimates the resolution of $Q$ from SAS instrumental 13 parameter values assuming that the detector is flat and normal to the 14 14 incident beam. 15 15 … … 23 23 2) Select the source (Neutron or Photon) and source type (Monochromatic or TOF). 24 24 25 *NOTE! The computational difference between the sources is only the 25 *NOTE! The computational difference between the sources is only the 26 26 gravitational contribution due to the mass of the particles.* 27 27 28 3) Change the default values of the instrumental parameters as required. Be 28 3) Change the default values of the instrumental parameters as required. Be 29 29 careful to note that distances are specified in cm! 30 30 31 4) Enter values for the source wavelength(s), |lambda|\ , and its spread (= FWHM/|lambda|\).32 33 For monochromatic sources, the inputs are just one value. For TOF sources, 34 the minimum and maximum values should be separated by a '-' to specify a 31 4) Enter values for the source wavelength(s), $\lambda$, and its spread (= $\text{FWHM}/\lambda$). 32 33 For monochromatic sources, the inputs are just one value. For TOF sources, 34 the minimum and maximum values should be separated by a '-' to specify a 35 35 range. 36 37 Optionally, the wavelength (BUT NOT of the wavelength spread) can be extended 38 by adding '; nn' where the 'nn' specifies the number of the bins for the 39 numerical integration. The default value is nn = 10. The same number of bins 36 37 Optionally, the wavelength (BUT NOT of the wavelength spread) can be extended 38 by adding '; nn' where the 'nn' specifies the number of the bins for the 39 numerical integration. The default value is nn = 10. The same number of bins 40 40 will be used for the corresponding wavelength spread. 41 41 42 5) For TOF, the default wavelength spectrum is flat. A custom spectral 43 distribution file (2-column text: wavelength (|Ang|\) vs Intensity) can also 42 5) For TOF, the default wavelength spectrum is flat. A custom spectral 43 distribution file (2-column text: wavelength (|Ang|\) vs Intensity) can also 44 44 be loaded by selecting *Add new* in the combo box. 45 45 46 6) When ready, click the *Compute* button. Depending on the computation the 46 6) When ready, click the *Compute* button. Depending on the computation the 47 47 calculation time will vary. 48 48 49 7) 1D and 2D dQ values will be displayed at the bottom of the panel, and a 2D50 resolution weight distribution (a 2D elliptical Gaussian function) will also 51 be displayed in the plot panel even if the Q inputs are outside of the49 7) 1D and 2D $dQ$ values will be displayed at the bottom of the panel, and a 2D 50 resolution weight distribution (a 2D elliptical Gaussian function) will also 51 be displayed in the plot panel even if the $Q$ inputs are outside of the 52 52 detector limit (the red lines indicate the limits of the detector). 53 54 TOF only: green lines indicate the limits of the maximum Q range accessible53 54 TOF only: green lines indicate the limits of the maximum $Q$ range accessible 55 55 for the longest wavelength due to the size of the detector. 56 57 Note that the effect from the beam block/stop is ignored, so in the small Q58 region near the beam block/stop59 56 60 [ie., Q < 2. |pi|\ .(beam block diameter) / (sample-to-detector distance) / |lambda|\_min] 57 Note that the effect from the beam block/stop is ignored, so in the small $Q$ 58 region near the beam block/stop 59 60 [i.e., $Q < (2 \pi \cdot \text{beam block diameter}) / (\text{sample-to-detector distance} \cdot \lambda_\text{min})$] 61 61 62 62 the variance is slightly under estimated. 63 63 64 8) A summary of the calculation is written to the SasView *Console* at the 64 8) A summary of the calculation is written to the SasView *Console* at the 65 65 bottom of the main SasView window. 66 66 67 .. image:: resolution_tutor. gif67 .. image:: resolution_tutor.png 68 68 69 69 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 74 74 The scattering wave transfer vector is by definition 75 75 76 .. image:: q. gif76 .. image:: q.png 77 77 78 In the small-angle limit, the variance of Q is to a first-order78 In the small-angle limit, the variance of $Q$ is to a first-order 79 79 approximation 80 80 81 .. image:: sigma_q. gif81 .. image:: sigma_q.png 82 82 83 83 The geometric and gravitational contributions can then be summarised as 84 84 85 .. image:: sigma_table. gif85 .. image:: sigma_table.png 86 86 87 Finally, a Gaussian function is used to describe the 2D weighting distribution 88 of the uncertainty in Q.87 Finally, a Gaussian function is used to describe the 2D weighting distribution 88 of the uncertainty in $Q$. 89 89 90 90 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 93 93 ---------- 94 94 95 D.F.R. Mildner and J.M. Carpenter 95 D.F.R. Mildner and J.M. Carpenter 96 96 *J. Appl. Cryst.* 17 (1984) 249-256 97 97 98 D.F.R. Mildner, J.M. Carpenter and D.L. Worcester 98 D.F.R. Mildner, J.M. Carpenter and D.L. Worcester 99 99 *J. Appl. Cryst.* 19 (1986) 311-319 100 100 -
src/sas/sasgui/perspectives/calculator/media/sas_calculator_help.rst
rda456fb r5ed76f8 19 19 ------ 20 20 21 In general, a particle with a volume *V* can be described by an ensemble22 containing *N* 3-dimensional rectangular pixels where each pixel is much23 smaller than *V*.21 In general, a particle with a volume $V$ can be described by an ensemble 22 containing $N$ 3-dimensional rectangular pixels where each pixel is much 23 smaller than $V$. 24 24 25 Assuming that all the pixel sizes are the same, the elastic scattering 25 Assuming that all the pixel sizes are the same, the elastic scattering 26 26 intensity from the particle is 27 27 28 .. image:: gen_i. gif28 .. image:: gen_i.png 29 29 30 30 Equation 1. 31 31 32 where |beta|\ :sub:`j` and *r*\ :sub:`j` are the scattering length density and33 the position of the j'thpixel respectively.32 where $\beta_j$ and $r_j$ are the scattering length density and 33 the position of the $j^\text{th}$ pixel respectively. 34 34 35 The total volume *V*35 The total volume $V$ 36 36 37 .. image:: v_j.gif37 .. math:: 38 38 39 for |beta|\ :sub:`j` |noteql|\0 where *v*\ :sub:`j` is the volume of the j'th 40 pixel (or the j'th natural atomic volume (= atomic mass / (natural molar 39 V = \sum_j^N v_j 40 41 for $\beta_j \ne 0$ where $v_j$ is the volume of the $j^\text{th}$ 42 pixel (or the $j^\text{th}$ natural atomic volume (= atomic mass / (natural molar 41 43 density * Avogadro number) for the atomic structures). 42 44 43 *V* can be corrected by users. This correction is useful especially for an 44 atomic structure (such as taken from a PDB file) to get the right normalization. 45 $V$ can be corrected by users. This correction is useful especially for an 46 atomic structure (such as taken from a PDB file) to get the right normalization. 45 47 46 *NOTE! * |beta|\ :sub:`j` *displayed in the GUI may be incorrect but this will not48 *NOTE! $\beta_j$ displayed in the GUI may be incorrect but this will not 47 49 affect the scattering computation if the correction of the total volume V is made.* 48 50 49 The scattering length density (SLD) of each pixel, where the SLD is uniform, is 50 a combination of the nuclear and magnetic SLDs and depends on the spin states 51 The scattering length density (SLD) of each pixel, where the SLD is uniform, is 52 a combination of the nuclear and magnetic SLDs and depends on the spin states 51 53 of the neutrons as follows. 52 54 … … 54 56 ^^^^^^^^^^^^^^^^^^^ 55 57 56 For magnetic scattering, only the magnetization component, *M*\ :sub:`perp`\ ,57 perpendicular to the scattering vector *Q* contributes to the magnetic58 For magnetic scattering, only the magnetization component, $M_\perp$, 59 perpendicular to the scattering vector $Q$ contributes to the magnetic 58 60 scattering length. 59 61 60 .. image:: mag_vector. bmp62 .. image:: mag_vector.png 61 63 62 64 The magnetic scattering length density is then 63 65 64 .. image:: dm_eq. gif66 .. image:: dm_eq.png 65 67 66 where the gyromagnetic ratio |gamma| = -1.913, |mu|\ :sub:`B` is the Bohr67 magneton, *r*\ :sub:`0` is the classical radius of electron, and |sigma| is the68 where the gyromagnetic ratio is $\gamma = -1.913$, $\mu_B$ is the Bohr 69 magneton, $r_0$ is the classical radius of electron, and $\sigma$ is the 68 70 Pauli spin. 69 71 70 72 For a polarized neutron, the magnetic scattering is depending on the spin states. 71 73 72 Let us consider that the incident neutrons are polarised both parallel (+) and 73 anti-parallel (-) to the x' axis (see below). The possible states after 74 scattering from the sample are then 74 Let us consider that the incident neutrons are polarised both parallel (+) and 75 anti-parallel (-) to the x' axis (see below). The possible states after 76 scattering from the sample are then 75 77 76 78 * Non-spin flips: (+ +) and (- -) 77 79 * Spin flips: (+ -) and (- +) 78 80 79 .. image:: gen_mag_pic. bmp81 .. image:: gen_mag_pic.png 80 82 81 Now let us assume that the angles of the *Q* vector and the spin-axis (x') 82 to the x-axis are |phi| and |theta|\ :sub:`up` respectively (see above). Then,83 depending upon the polarization (spin) state of neutrons, the scattering 84 length densities, including the nuclear scattering length density ( |beta|\ :sub:`N`\ )83 Now let us assume that the angles of the *Q* vector and the spin-axis (x') 84 to the x-axis are $\phi$ and $\theta_\text{up}$ respectively (see above). Then, 85 depending upon the polarization (spin) state of neutrons, the scattering 86 length densities, including the nuclear scattering length density ($\beta_N$) 85 87 are given as 86 88 87 89 * for non-spin-flips 88 90 89 .. image:: sld1. gif91 .. image:: sld1.png 90 92 91 93 * for spin-flips 92 94 93 .. image:: sld2. gif95 .. image:: sld2.png 94 96 95 97 where 96 98 97 .. image:: mxp. gif99 .. image:: mxp.png 98 100 99 .. image:: myp. gif101 .. image:: myp.png 100 102 101 .. image:: mzp. gif103 .. image:: mzp.png 102 104 103 .. image:: mqx. gif105 .. image:: mqx.png 104 106 105 .. image:: mqy. gif107 .. image:: mqy.png 106 108 107 Here the *M0*\ :sub:`x`\ , *M0*\ :sub:`y` and *M0*\ :sub:`z` are the x, y and z108 components of the magnetisation vector in the laboratory xyz frame.109 Here the $M0_x$, $M0_y$ and $M0_z$ are the $x$, $y$ and $z$ 110 components of the magnetisation vector in the laboratory $xyz$ frame. 109 111 110 112 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 113 115 -------------- 114 116 115 .. image:: gen_gui_help. bmp117 .. image:: gen_gui_help.png 116 118 117 After computation the result will appear in the *Theory* box in the SasView 119 After computation the result will appear in the *Theory* box in the SasView 118 120 *Data Explorer* panel. 119 121 120 *Up_frac_in* and *Up_frac_out* are the ratio 122 *Up_frac_in* and *Up_frac_out* are the ratio 121 123 122 124 (spin up) / (spin up + spin down) 123 125 124 126 of neutrons before the sample and at the analyzer, respectively. 125 127 126 *NOTE 1. The values of* Up_frac_in *and* Up_frac_out *must be in the range 128 *NOTE 1. The values of* Up_frac_in *and* Up_frac_out *must be in the range 127 129 0.0 to 1.0. Both values are 0.5 for unpolarized neutrons.* 128 130 129 *NOTE 2. This computation is totally based on the pixel (or atomic) data fixed 131 *NOTE 2. This computation is totally based on the pixel (or atomic) data fixed 130 132 in xyz coordinates. No angular orientational averaging is considered.* 131 133 132 *NOTE 3. For the nuclear scattering length density, only the real component 134 *NOTE 3. For the nuclear scattering length density, only the real component 133 135 is taken account.* 134 136 … … 139 141 140 142 The SANS Calculator tool can read some PDB, OMF or SLD files but ignores 141 polarized/magnetic scattering when doing so, thus related parameters such as 143 polarized/magnetic scattering when doing so, thus related parameters such as 142 144 *Up_frac_in*, etc, will be ignored. 143 145 144 The calculation for fixed orientation uses Equation 1 above resulting in a 2D 145 output, whereas the scattering calculation averaged over all the orientations 146 The calculation for fixed orientation uses Equation 1 above resulting in a 2D 147 output, whereas the scattering calculation averaged over all the orientations 146 148 uses the Debye equation below providing a 1D output 147 149 148 .. image:: gen_debye_eq. gif150 .. image:: gen_debye_eq.png 149 151 150 where *v*\ :sub:`j` |beta|\ :sub:`j` |equiv| *b*\ :sub:`j` is the scattering151 length of the j'th atom. The calculation output is passed to the *Data Explorer*152 where $v_j \beta_j \equiv b_j$ is the scattering 153 length of the $j^\text{th}$ atom. The calculation output is passed to the *Data Explorer* 152 154 for further use. 153 155 -
src/sas/sasgui/perspectives/calculator/media/sld_calculator_help.rst
rf93b473f r5ed76f8 10 10 ----------- 11 11 12 The neutron scattering length density (SLD ) is defined as12 The neutron scattering length density (SLD, $\beta_N$) is defined as 13 13 14 SLD = (b_c1 + b_c2 + ... + b_cn) / Vm 14 .. math:: 15 15 16 where b_ci is the bound coherent scattering length of ith of n atoms in a molecule 17 with the molecular volume Vm 16 \beta_N = (b_{c1} + b_{c2} + ... + b_{cn}) / V_m 17 18 where $b_{ci}$ is the bound coherent scattering length of ith of n atoms in a molecule 19 with the molecular volume $V_m$. 18 20 19 21 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 22 24 ---------------------------- 23 25 24 To calculate scattering length densities enter the empirical formula of a 26 To calculate scattering length densities enter the empirical formula of a 25 27 compound and its mass density and click "Calculate". 26 28 27 Entering a wavelength value is optional (a default value of 6.0 |Ang| will 29 Entering a wavelength value is optional (a default value of 6.0 |Ang| will 28 30 be used). 29 31 … … 38 40 * Parentheses can be nested, such as "(CaCO3(H2O)6)1". 39 41 40 * Isotopes are represented by their atomic number in *square brackets*, such 42 * Isotopes are represented by their atomic number in *square brackets*, such 41 43 as "CaCO[18]3+6H2O", H[1], or H[2]. 42 44 43 45 * Numbers of atoms can be integer or decimal, such as "CaCO3+(3HO0.5)2". 44 46 45 * The SLD of mixtures can be calculated as well. For example, for a 70-30 47 * The SLD of mixtures can be calculated as well. For example, for a 70-30 46 48 mixture of H2O/D2O write "H14O7+D6O3" or more simply "H7D3O5" (i.e. this says 47 49 7 hydrogens, 3 deuteriums, and 5 oxygens) and enter a mass density calculated 48 50 on the percentages of H2O and D2O. 49 51 50 * Type "C[13]6 H[2]12 O[18]6" for C(13)6H(2)12O(18)6 (6 Carbon-13 atoms, 12 52 * Type "C[13]6 H[2]12 O[18]6" for C(13)6H(2)12O(18)6 (6 Carbon-13 atoms, 12 51 53 deuterium atoms, and 6 Oxygen-18 atoms). 52 54 53 55 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 54 56 55 .. note:: This help document was last changed by Steve King, 01May201557 .. note:: This help document was last changed by Paul Kienzle, 05Apr2017 56 58 -
src/sas/sasgui/perspectives/calculator/media/slit_calculator_help.rst
rf93b473f r5ed76f8 11 11 ----------- 12 12 13 This tool enables X-ray users to calculate the slit size (FWHM/2) for smearing 13 This tool enables X-ray users to calculate the slit size (FWHM/2) for smearing 14 14 based on their half beam profile data. 15 15 16 16 *NOTE! Whilst it may have some more generic applicability, the calculator has 17 only been tested with beam profile data from Anton-Paar SAXSess*\ |TM|\ 18 *software.* 17 only been tested with beam profile data from Anton-Paar SAXSess:sup:`TM` software.* 19 18 20 19 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 27 26 2) Load a beam profile file in the *Data* field using the *Browse* button. 28 27 29 *NOTE! To see an example of the beam profile file format, visit the file 28 *NOTE! To see an example of the beam profile file format, visit the file 30 29 beam profile.DAT in your {installation_directory}/SasView/test folder.* 31 30 32 3) Once a data is loaded, the slit size is automatically computed and displayed 31 3) Once a data is loaded, the slit size is automatically computed and displayed 33 32 in the tool window. 34 33 35 *NOTE! The beam profile file does not carry any information about the units of 34 *NOTE! The beam profile file does not carry any information about the units of 36 35 the Q data. This calculator assumes the data has units of 1/\ |Ang|\ . If the 37 36 data is not in these units it must be manually converted beforehand.* -
src/sas/sasgui/perspectives/corfunc/media/corfunc_help.rst
rd78b5cb rd78b5cb 71 71 regions as shown below. 72 72 73 .. figure:: fig1. gif73 .. figure:: fig1.png 74 74 :align: center 75 75 … … 145 145 performed. 146 146 147 .. figure:: fig2. gif147 .. figure:: fig2.png 148 148 :align: center 149 149 -
src/sas/sasgui/perspectives/fitting/basepage.py
r33dc18f r33dc18f 2788 2788 def _on_mag_angle_help(self, event): 2789 2789 """ 2790 Bring up Magnetic Angle definition bmpimage whenever the ? button2790 Bring up Magnetic Angle definition.png image whenever the ? button 2791 2791 is clicked. Calls DocumentationWindow with the path of the location 2792 2792 within the documentation tree (after /doc/ ....". When using old … … 2802 2802 """ 2803 2803 2804 _TreeLocation = "_images/M_angles_pic. bmp"2804 _TreeLocation = "_images/M_angles_pic.png" 2805 2805 _doc_viewer = DocumentationWindow(self, wx.ID_ANY, _TreeLocation, "", 2806 2806 "Magnetic Angle Defintions") … … 2808 2808 def _on_mag_help(self, event): 2809 2809 """ 2810 Bring up Magnetic Angle definition bmpimage whenever the ? button2810 Bring up Magnetic Angle definition.png image whenever the ? button 2811 2811 is clicked. Calls DocumentationWindow with the path of the location 2812 2812 within the documentation tree (after /doc/ ....". When using old -
src/sas/sasgui/perspectives/fitting/media/fitting_help.rst
rca383a0 rca383a0 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 5 6 .. |inlineimage004| image:: sm_image004. gif7 .. |inlineimage005| image:: sm_image005. gif8 .. |inlineimage008| image:: sm_image008. gif9 .. |inlineimage009| image:: sm_image009. gif10 .. |inlineimage010| image:: sm_image010. gif11 .. |inlineimage011| image:: sm_image011. gif12 .. |inlineimage012| image:: sm_image012. gif13 .. |inlineimage018| image:: sm_image018. gif14 .. |inlineimage019| image:: sm_image019. gif6 .. |inlineimage004| image:: sm_image004.png 7 .. |inlineimage005| image:: sm_image005.png 8 .. |inlineimage008| image:: sm_image008.png 9 .. |inlineimage009| image:: sm_image009.png 10 .. |inlineimage010| image:: sm_image010.png 11 .. |inlineimage011| image:: sm_image011.png 12 .. |inlineimage012| image:: sm_image012.png 13 .. |inlineimage018| image:: sm_image018.png 14 .. |inlineimage019| image:: sm_image019.png 15 15 16 16 … … 90 90 *View* option on the menubar, or click on the *Modify* button on the *Fit Page*. 91 91 92 .. image:: cat_fig0. bmp92 .. image:: cat_fig0.png 93 93 94 94 The categorization of all models except the user supplied Plugin Models can be … … 96 96 hidden from view in the drop-down menus. 97 97 98 .. image:: cat_fig1. bmp98 .. image:: cat_fig1.png 99 99 100 100 Changing category … … 105 105 to make the required changes. 106 106 107 .. image:: cat_fig2. bmp107 .. image:: cat_fig2.png 108 108 109 109 To create a category for the selected model, click the *Add* button. In order … … 179 179 GUI using the *New Plugin Model Function*. 180 180 181 .. image:: new_model. bmp181 .. image:: new_model.png 182 182 183 183 When using this feature, be aware that even if your code has errors, including … … 228 228 ^^^^^^^^^^^^^^^^ 229 229 230 .. image:: sum_model. bmp230 .. image:: sum_model.png 231 231 232 232 This option creates a custom Plugin Model of the form:: … … 449 449 450 450 In the bottom left corner of the *Fit Page* is a box displaying the normalised value 451 of the statistical |chi|\ :sup:`2`parameter returned by the optimiser.451 of the statistical $\chi^2$ parameter returned by the optimiser. 452 452 453 453 Now check the box for another model parameter and click *Fit* again. Repeat this … … 455 455 fit of the theory to the experimental data improves the value of 'chi2/Npts' will 456 456 decrease. A good model fit should easily produce values of 'chi2/Npts' that are 457 close to zero, and certainly <100. See :ref:`Assessing_Fit_Quality`.457 close to one, and certainly <100. See :ref:`Assessing_Fit_Quality`. 458 458 459 459 SasView has a number of different optimisers (see the section :ref:`Fitting_Options`). … … 579 579 at the bottom of that panel and *Send To Fitting*. A *BatchPage* will be created. 580 580 581 .. image:: batch_button_area. bmp581 .. image:: batch_button_area.png 582 582 583 583 *NB: The Batch Page can also be created by checking the Batch Mode radio button* … … 601 601 will all appear on one graph. 602 602 603 .. image:: view_button. bmp603 .. image:: view_button.png 604 604 605 605 *NB: In theory, returning to the BatchPage and changing the name of the I(Q)* … … 637 637 bar. 638 638 639 .. image:: restore_batch_window. bmp639 .. image:: restore_batch_window.png 640 640 641 641 Once a batch fit is completed, all model parameters are displayed but *not* … … 653 653 label. 654 654 655 .. image:: edit_menu. bmp655 .. image:: edit_menu.png 656 656 657 657 *NB: If there is an existing Grid Window and another batch fit is performed,* … … 666 666 *Window* menu bar. The loaded parameters will appear in a new table tab. 667 667 668 .. image:: file_menu. bmp668 .. image:: file_menu.png 669 669 670 670 *NB: Saving the Grid Window does not save any experimental data, residuals* … … 684 684 but different labels and units can be entered manually. 685 685 686 .. image:: plot_button. bmp686 .. image:: plot_button.png 687 687 688 688 The *X/Y-axis Selection Range* can be edited manually. The text control box -
src/sas/sasgui/perspectives/fitting/media/mag_help.rst
reca66a1 r5ed76f8 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 5 6 .. |inlineimage004| image:: sm_image004. gif7 .. |inlineimage005| image:: sm_image005. gif8 .. |inlineimage008| image:: sm_image008. gif9 .. |inlineimage009| image:: sm_image009. gif10 .. |inlineimage010| image:: sm_image010. gif11 .. |inlineimage011| image:: sm_image011. gif12 .. |inlineimage012| image:: sm_image012. gif13 .. |inlineimage018| image:: sm_image018. gif14 .. |inlineimage019| image:: sm_image019. gif6 .. |inlineimage004| image:: sm_image004.png 7 .. |inlineimage005| image:: sm_image005.png 8 .. |inlineimage008| image:: sm_image008.png 9 .. |inlineimage009| image:: sm_image009.png 10 .. |inlineimage010| image:: sm_image010.png 11 .. |inlineimage011| image:: sm_image011.png 12 .. |inlineimage012| image:: sm_image012.png 13 .. |inlineimage018| image:: sm_image018.png 14 .. |inlineimage019| image:: sm_image019.png 15 15 16 16 … … 20 20 -------------------------------- 21 21 22 Magnetic scattering is implemented in five (2D) models 22 Magnetic scattering is implemented in five (2D) models 23 23 24 24 * *sphere* … … 28 28 * *parallelepiped* 29 29 30 In general, the scattering length density (SLD, = |beta|) in each region where the30 In general, the scattering length density (SLD, = $\beta$) in each region where the 31 31 SLD is uniform, is a combination of the nuclear and magnetic SLDs and, for polarised 32 32 neutrons, also depends on the spin states of the neutrons. 33 33 34 For magnetic scattering, only the magnetization component, *M*\ :sub:`perp`,35 perpendicular to the scattering vector *Q*contributes to the the magnetic34 For magnetic scattering, only the magnetization component, $M_\perp$, 35 perpendicular to the scattering vector $Q$ contributes to the the magnetic 36 36 scattering length. 37 37 38 .. image:: mag_vector. bmp38 .. image:: mag_vector.png 39 39 40 40 The magnetic scattering length density is then 41 41 42 .. image:: dm_eq. gif42 .. image:: dm_eq.png 43 43 44 where |gamma| = -1.913 is the gyromagnetic ratio, |mu|\ :sub:`B`is the45 Bohr magneton, *r*\ :sub:`0` is the classical radius of electron, and |sigma|44 where $\gamma = -1.913$ is the gyromagnetic ratio, $\mu_B$ is the 45 Bohr magneton, $r_0$ is the classical radius of electron, and $\sigma$ 46 46 is the Pauli spin. 47 47 … … 53 53 Spin-flips (+ -) and (- +) 54 54 55 .. image:: M_angles_pic. bmp55 .. image:: M_angles_pic.png 56 56 57 If the angles of the *Q* vector and the spin-axis (*x'*) to the *x*-axis are |phi|58 and |theta|\ :sub:`up`, respectively, then, depending on the spin state of the57 If the angles of the $Q$ vector and the spin-axis (*x'*) to the *x*-axis are $\phi$ 58 and $\theta_\text{up}$, respectively, then, depending on the spin state of the 59 59 neutrons, the scattering length densities, including the nuclear scattering 60 length density ( |beta|\ :sub:`N`) are60 length density ($\beta_N$) are 61 61 62 .. image:: sld1. gif62 .. image:: sld1.png 63 63 64 64 when there are no spin-flips, and 65 65 66 .. image:: sld2. gif66 .. image:: sld2.png 67 67 68 68 when there are, and 69 69 70 .. image:: mxp. gif70 .. image:: mxp.png 71 71 72 .. image:: myp. gif72 .. image:: myp.png 73 73 74 .. image:: mzp. gif74 .. image:: mzp.png 75 75 76 .. image:: mqx. gif76 .. image:: mqx.png 77 77 78 .. image:: mqy. gif78 .. image:: mqy.png 79 79 80 Here, *M*\ :sub:`0x`, *M*\ :sub:`0y` and *M*\ :sub:`0z` are the x, y and zcomponents81 of the magnetization vector given in the laboratory xyzframe given by80 Here, $M_{0x}$, $M_{0y}$ and $M_{0z}$ are the $x$, $y$ and $z$ components 81 of the magnetization vector given in the laboratory $xyz$ frame given by 82 82 83 .. image:: m0x_eq. gif83 .. image:: m0x_eq.png 84 84 85 .. image:: m0y_eq. gif85 .. image:: m0y_eq.png 86 86 87 .. image:: m0z_eq. gif87 .. image:: m0z_eq.png 88 88 89 and the magnetization angles |theta|\ :sub:`M` and |phi|\ :sub:`M`are defined in89 and the magnetization angles $\theta_M$ and $\phi_M$ are defined in 90 90 the figure above. 91 91 … … 93 93 94 94 =========== ================================================================ 95 M0_sld = *D*\ :sub:`M` *M*\ :sub:`0`96 Up_theta = |theta|\ :sub:`up`97 M_theta = |theta|\ :sub:`M`98 M_phi = |phi|\ :sub:`M`95 M0_sld = $D_M M_0$ 96 Up_theta = $\theta_\text{up}$ 97 M_theta = $\theta_M$ 98 M_phi = $\phi_M$ 99 99 Up_frac_i = (spin up)/(spin up + spin down) neutrons *before* the sample 100 100 Up_frac_f = (spin up)/(spin up + spin down) neutrons *after* the sample -
src/sas/sasgui/perspectives/fitting/media/pd_help.rst
rb64b87c r5ed76f8 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 5 6 .. |inlineimage004| image:: sm_image004. gif7 .. |inlineimage005| image:: sm_image005. gif8 .. |inlineimage008| image:: sm_image008. gif9 .. |inlineimage009| image:: sm_image009. gif10 .. |inlineimage010| image:: sm_image010. gif11 .. |inlineimage011| image:: sm_image011. gif12 .. |inlineimage012| image:: sm_image012. gif13 .. |inlineimage018| image:: sm_image018. gif14 .. |inlineimage019| image:: sm_image019. gif6 .. |inlineimage004| image:: sm_image004.png 7 .. |inlineimage005| image:: sm_image005.png 8 .. |inlineimage008| image:: sm_image008.png 9 .. |inlineimage009| image:: sm_image009.png 10 .. |inlineimage010| image:: sm_image010.png 11 .. |inlineimage011| image:: sm_image011.png 12 .. |inlineimage012| image:: sm_image012.png 13 .. |inlineimage018| image:: sm_image018.png 14 .. |inlineimage019| image:: sm_image019.png 15 15 16 16 … … 24 24 form factor is normalized by the average particle volume such that 25 25 26 *P(q) = scale* * \ <F*\F> / *V + bkg* 26 .. math:: 27 27 28 where F is the scattering amplitude and the \<\> denote an average over the size 29 distribution. 28 P(q) = \text{scale} \langle F^*F rangle V + \text{background} 29 30 where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an average 31 over the size distribution. 30 32 31 33 Users should note that this computation is very intensive. Applying polydispersion … … 57 59 .. image:: pd_image001.png 58 60 59 where *xmean* is the mean of the distribution, *w* is the half-width, and *Norm* is a60 normalization factor which is determined during the numerical calculation.61 where $x_{mean}$ is the mean of the distribution, $w$ is the half-width, and $Norm$ 62 is a normalization factor which is determined during the numerical calculation. 61 63 62 Note that the standard deviation and the half width *w*are different!64 Note that the standard deviation and the half width $w$ are different! 63 65 64 66 The standard deviation is … … 81 83 .. image:: pd_image005.png 82 84 83 where *xmean* is the mean of the distribution and *Norm*is a normalization factor85 where $x_{mean}$ is the mean of the distribution and $Norm$ is a normalization factor 84 86 which is determined during the numerical calculation. 85 87 … … 100 102 .. image:: pd_image007.png 101 103 102 where |mu|\ =ln(*xmed*), *xmed*is the median value of the distribution, and103 *Norm*is a normalization factor which will be determined during the numerical104 where $\mu=\ln(x_{med})$, $x_{med}$ is the median value of the distribution, and 105 $Norm$ is a normalization factor which will be determined during the numerical 104 106 calculation. 105 107 … … 107 109 size parameter in the *FitPage*, for example, radius = 60. 108 110 109 The polydispersity is given by |sigma|111 The polydispersity is given by $\sigma$ 110 112 111 113 .. image:: pd_image008.png … … 115 117 .. image:: pd_image009.png 116 118 117 The mean value is given by *xmean*\ =exp(|mu|\ +p\ :sup:`2`\ /2). The peak value118 is given by *xpeak*\ =exp(|mu|-p\ :sup:`2`\ ).119 The mean value is given by $x_{mean} =\exp(\mu + p^2 /2)$. The peak value 120 is given by $x_{peak} =\exp(\mu-p^2)$. 119 121 120 122 .. image:: pd_image010.jpg 121 123 122 This distribution function spreads more, and the peak shifts to the left, as *p*124 This distribution function spreads more, and the peak shifts to the left, as $p$ 123 125 increases, requiring higher values of Nsigmas and Npts. 124 126 … … 132 134 .. image:: pd_image011.png 133 135 134 where *xmean* is the mean of the distribution and *Norm*is a normalization factor135 which is determined during the numerical calculation, and *z*is a measure of the136 where $x_{mean}$ is the mean of the distribution and $Norm$ is a normalization factor 137 which is determined during the numerical calculation, and $z$ is a measure of the 136 138 width of the distribution such that 137 139 138 z = (1-p\ :sup:`2`\ ) / p\ :sup:`2` 140 .. math:: 141 142 z = (1-p^2 ) / p^2 139 143 140 144 The polydispersity is … … 156 160 157 161 This user-definable distribution should be given as as a simple ASCII text file 158 where the array is defined by two columns of numbers: *x* and *f(x)*. The *f(x)*162 where the array is defined by two columns of numbers: $x$ and $f(x)$. The $f(x)$ 159 163 will be normalized by SasView during the computation. 160 164 … … 172 176 173 177 SasView only uses these array values during the computation, therefore any mean 174 value of the parameter represented by *x*present in the *FitPage*178 value of the parameter represented by $x$ present in the *FitPage* 175 179 will be ignored. 176 180 … … 181 185 182 186 Many commercial Dynamic Light Scattering (DLS) instruments produce a size 183 polydispersity parameter, sometimes even given the symbol *p*! This parameter is187 polydispersity parameter, sometimes even given the symbol $p$! This parameter is 184 188 defined as the relative standard deviation coefficient of variation of the size 185 189 distribution and is NOT the same as the polydispersity parameters in the Lognormal -
src/sas/sasgui/perspectives/fitting/media/plugin.rst
re081946 re081946 49 49 50 50 Other models are available for download from our 51 `Model Marketplace <http://marketplace.sasview.org/>`_. You can contribute your own models to the 51 `Model Marketplace <http://marketplace.sasview.org/>`_. You can contribute your own models to the 52 52 Marketplace aswell. 53 53 … … 83 83 - without any capitalization or CamelCase 84 84 - without incorporating the word "model" 85 - examples: *barbell* **not** *BarBell*; *broad_peak* **not** *BroadPeak*; 85 - examples: *barbell* **not** *BarBell*; *broad_peak* **not** *BroadPeak*; 86 86 *barbell* **not** *BarBellModel* 87 87 … … 103 103 at the top of the *.py* file 104 104 - what you write here is abstracted into the SasView help documentation 105 - this is what other users will refer to when they want to know what your model does; 105 - this is what other users will refer to when they want to know what your model does; 106 106 so please be helpful! 107 107 … … 128 128 converted/created the model file 129 129 130 Models that do not conform to these requirements will *never* be incorporated 130 Models that do not conform to these requirements will *never* be incorporated 131 131 into the built-in library. 132 132 … … 309 309 defines the parameters that form the model. 310 310 311 **Note: The order of the parameters in the definition will be the order of the 312 parameters in the user interface and the order of the parameters in Iq(), 313 Iqxy() and form_volume(). And** *scale* **and** *background* **parameters are 311 **Note: The order of the parameters in the definition will be the order of the 312 parameters in the user interface and the order of the parameters in Iq(), 313 Iqxy() and form_volume(). And** *scale* **and** *background* **parameters are 314 314 implicit to all models, so they do not need to be included in the parameter table.** 315 315 … … 492 492 and it includes orientation parameters. 493 493 494 *form_volume* defines the volume of the shape. As in python models, it 494 *form_volume* defines the volume of the shape. As in python models, it 495 495 includes only the volume parameters. 496 496 … … 626 626 627 627 sas_gamma(x): 628 Gamma function $\text{sas_gamma}(x) = \Gamma(x)$.628 Gamma function sas_gamma\ $(x) = \Gamma(x)$. 629 629 630 630 The standard math function, tgamma(x) is unstable for $x < 1$ … … 636 636 sas_erf(x), sas_erfc(x): 637 637 Error function 638 $\text{sas_erf}(x) = \frac{2}{\sqrt\pi}\int_0^x e^{-t^2}\,dt$638 sas_erf\ $(x) = \frac{2}{\sqrt\pi}\int_0^x e^{-t^2}\,dt$ 639 639 and complementary error function 640 $\text{sas_erfc}(x) = \frac{2}{\sqrt\pi}\int_x^{\infty} e^{-t^2}\,dt$.640 sas_erfc $(x) = \frac{2}{\sqrt\pi}\int_x^{\infty} e^{-t^2}\,dt$. 641 641 642 642 The standard math functions erf(x) and erfc(x) are slower and broken … … 647 647 648 648 sas_J0(x): 649 Bessel function of the first kind $\text{sas_J0}(x)=J_0(x)$ where649 Bessel function of the first kind sas_J0\ $(x)=J_0(x)$ where 650 650 $J_0(x) = \frac{1}{\pi}\int_0^\pi \cos(x\sin(\tau))\,d\tau$. 651 651 … … 656 656 657 657 sas_J1(x): 658 Bessel function of the first kind $\text{sas_J1}(x)=J_1(x)$ where658 Bessel function of the first kind sas_J1\ $(x)=J_1(x)$ where 659 659 $J_1(x) = \frac{1}{\pi}\int_0^\pi \cos(\tau - x\sin(\tau))\,d\tau$. 660 660 … … 666 666 sas_JN(n, x): 667 667 Bessel function of the first kind and integer order $n$: 668 $\text{sas_JN}(n, x)=J_n(x)$ where668 sas_JN\ $(n, x)=J_n(x)$ where 669 669 $J_n(x) = \frac{1}{\pi}\int_0^\pi \cos(n\tau - x\sin(\tau))\,d\tau$. 670 670 If $n$ = 0 or 1, it uses sas_J0(x) or sas_J1(x), respectively. … … 676 676 677 677 sas_Si(x): 678 Sine integral $\text{Si}(x) = \int_0^x \tfrac{\sin t}{t}\,dt$.678 Sine integral Si\ $(x) = \int_0^x \tfrac{\sin t}{t}\,dt$. 679 679 680 680 This function uses Taylor series for small and large arguments: … … 701 701 sas_3j1x_x(x): 702 702 Spherical Bessel form 703 $\text{sph_j1c}(x) = 3 j_1(x)/x = 3 (\sin(x) - x \cos(x))/x^3$,703 sph_j1c\ $(x) = 3 j_1(x)/x = 3 (\sin(x) - x \cos(x))/x^3$, 704 704 with a limiting value of 1 at $x=0$, where $j_1(x)$ is the spherical 705 705 Bessel function of the first kind and first order. … … 712 712 713 713 sas_2J1x_x(x): 714 Bessel form $\text{sas_J1c}(x) = 2 J_1(x)/x$, with a limiting value714 Bessel form sas_J1c\ $(x) = 2 J_1(x)/x$, with a limiting value 715 715 of 1 at $x=0$, where $J_1(x)$ is the Bessel function of first kind 716 716 and first order. … … 835 835 one return value for each point in the mesh grid. 836 836 837 *NOTE: we may be removing or modifying this feature soon. As of the 837 *NOTE: we may be removing or modifying this feature soon. As of the 838 838 time of writing, core-shell sphere returns (1., 1.) for VR, giving a volume 839 839 ratio of 1.0.* … … 881 881 ............... 882 882 883 Either open the :ref:`Python_shell` (*Tools* > *Python Shell/Editor*) or the :ref:`Advanced_Plugin_Editor` (*Fitting* > *Plugin Model Operations* > *Advanced 884 Plugin Editor*), load your model, and then select *Run > Check Model* from the 883 Either open the :ref:`Python_shell` (*Tools* > *Python Shell/Editor*) or the :ref:`Advanced_Plugin_Editor` (*Fitting* > *Plugin Model Operations* > *Advanced 884 Plugin Editor*), load your model, and then select *Run > Check Model* from the 885 885 menu bar. 886 886 887 An *Info* box will appear with the results of the compilation and a check that 887 An *Info* box will appear with the results of the compilation and a check that 888 888 the model runs. 889 889 … … 950 950 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 951 951 952 **NB: For now we are not providing pylint with the installer version of SasView; 952 **NB: For now we are not providing pylint with the installer version of SasView; 953 953 so unless you have a SasView build environment available, you can ignore this section!** 954 954 -
src/sas/sasgui/perspectives/fitting/media/residuals_help.rst
r7805458 r940d034 18 18 also provides two other measures of the quality of a fit: 19 19 20 * |chi|\ :sup:`2`(or 'Chi2'; pronounced 'chi-squared')20 * $\chi^2$ (or 'Chi2'; pronounced 'chi-squared') 21 21 * *Residuals* 22 22 … … 32 32 *Npts* such that 33 33 34 *Chi2/Npts* = { SUM[(*Y_i* - *Y_theory_i*)^2 / (*Y_error_i*)^2] } / *Npts* 34 .. math:: 35 35 36 This differs slightly from what is sometimes called the 'reduced chi-squared' 36 \chi^2/N_{pts} = \sum[(Y_i - \mathrm{theory}_i)^2 / \mathrm{error}_i^2] / N_{pts} 37 38 This differs slightly from what is sometimes called the 'reduced $\chi^2$' 37 39 because it does not take into account the number of fitting parameters (to 38 calculate the number of 'degrees of freedom'), but the 'normalized chi-squared'39 and the 'reduced chi-squared' are very close to each other when *Npts* >> number of40 parameters.40 calculate the number of 'degrees of freedom'), but the 'normalized $\chi^2$ 41 and the 'reduced $\chi^2$ are very close to each other when $N_{pts} \gg 42 \text{number of parameters}. 41 43 42 For a good fit, *Chi2/Npts* tends to 0.44 For a good fit, $\chi^2/N_{pts}$ tends to 1. 43 45 44 *Chi2/Npts*is sometimes referred to as the 'goodness-of-fit' parameter.46 $\chi^2/N_{pts}$ is sometimes referred to as the 'goodness-of-fit' parameter. 45 47 46 48 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 53 55 value and its *true* value is its error). 54 56 55 *SasView* calculates 'normalized residuals', *R_i*, for each data point in the57 *SasView* calculates 'normalized residuals', $R_i$, for each data point in the 56 58 fit: 57 59 58 *R_i* = (*Y_i* - *Y_theory_i*) / (*Y_err_i*) 60 .. math:: 59 61 60 For a good fit, *R_i* ~ 0. 62 R_i = (Y_i - Y_theory_i) / (Y_err_i) 63 64 For a good fit, $R_i \sim 0$. 61 65 62 66 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ -
src/sas/sasgui/perspectives/fitting/media/sm_help.rst
r27aabc1 r5ed76f8 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 5 6 .. |inlineimage004| image:: sm_image004. gif7 .. |inlineimage005| image:: sm_image005. gif8 .. |inlineimage008| image:: sm_image008. gif9 .. |inlineimage009| image:: sm_image009. gif10 .. |inlineimage010| image:: sm_image010. gif11 .. |inlineimage011| image:: sm_image011. gif12 .. |inlineimage012| image:: sm_image012. gif13 .. |inlineimage018| image:: sm_image018. gif14 .. |inlineimage019| image:: sm_image019. gif6 .. |inlineimage004| image:: sm_image004.png 7 .. |inlineimage005| image:: sm_image005.png 8 .. |inlineimage008| image:: sm_image008.png 9 .. |inlineimage009| image:: sm_image009.png 10 .. |inlineimage010| image:: sm_image010.png 11 .. |inlineimage011| image:: sm_image011.png 12 .. |inlineimage012| image:: sm_image012.png 13 .. |inlineimage018| image:: sm_image018.png 14 .. |inlineimage019| image:: sm_image019.png 15 15 16 16 … … 20 20 ================== 21 21 22 Sometimes the instrumental geometry used to acquire the experimental data has 23 an impact on the clarity of features in the reduced scattering curve. For 24 example, peaks or fringes might be slightly broadened. This is known as 25 *Q resolution smearing*. To compensate for this effect one can either try and 26 remove the resolution contribution - a process called *desmearing* - or add the 27 resolution contribution into a model calculation/simulation (which by definition 28 will be exact) to make it more representative of what has been measured 22 Sometimes the instrumental geometry used to acquire the experimental data has 23 an impact on the clarity of features in the reduced scattering curve. For 24 example, peaks or fringes might be slightly broadened. This is known as 25 *Q resolution smearing*. To compensate for this effect one can either try and 26 remove the resolution contribution - a process called *desmearing* - or add the 27 resolution contribution into a model calculation/simulation (which by definition 28 will be exact) to make it more representative of what has been measured 29 29 experimentally - a process called *smearing*. SasView will do the latter. 30 30 31 Both smearing and desmearing rely on functions to describe the resolution 31 Both smearing and desmearing rely on functions to describe the resolution 32 32 effect. SasView provides three smearing algorithms: 33 33 … … 36 36 * *2D Smearing* 37 37 38 SasView also has an option to use Q resolution data (estimated at the time of38 SasView also has an option to use $Q$ resolution data (estimated at the time of 39 39 data reduction) supplied in a reduced data file: the *Use dQ data* radio button. 40 40 … … 43 43 dQ Smearing 44 44 ----------- 45 46 If this option is checked, SasView will assume that the supplied dQ values45 46 If this option is checked, SasView will assume that the supplied $dQ$ values 47 47 represent the standard deviations of Gaussian functions. 48 48 … … 57 57 The slit-smeared scattering intensity is defined by 58 58 59 .. image:: sm_image002. gif59 .. image:: sm_image002.png 60 60 61 61 where *Norm* is given by 62 62 63 .. image:: sm_image003. gif63 .. image:: sm_image003.png 64 64 65 65 **[Equation 1]** 66 66 67 The functions |inlineimage004| and |inlineimage005|68 refer to the slit width weighting function and the slit height weighting 69 determined at the given *q*point, respectively. It is assumed that the weighting67 The functions $W_v(v)$ and $W_u(u)$ 68 refer to the slit width weighting function and the slit height weighting 69 determined at the given $q$ point, respectively. It is assumed that the weighting 70 70 function is described by a rectangular function, such that 71 71 72 .. image:: sm_image006. gif72 .. image:: sm_image006.png 73 73 74 74 **[Equation 2]** … … 76 76 and 77 77 78 .. image:: sm_image007. gif78 .. image:: sm_image007.png 79 79 80 80 **[Equation 3]** 81 81 82 so that |inlineimage008| |inlineimage009| for |inlineimage010| and *u*\ . 83 84 Here |inlineimage011| and |inlineimage012| stand for 85 the slit height (FWHM/2) and the slit width (FWHM/2) in *q* space. 82 so that $\Delta q_\alpha = \int_0^\infty d\alpha W_\alpha(\alpha)$ 83 for $\alpha = v$ and $u$. 84 85 Here $\Delta q_u$ and $\Delta q_v$ stand for 86 the slit height (FWHM/2) and the slit width (FWHM/2) in $q$ space. 86 87 87 88 This simplifies the integral in Equation 1 to 88 89 89 .. image:: sm_image013. gif90 .. image:: sm_image013.png 90 91 91 92 **[Equation 4]** 92 93 93 which may be solved numerically, depending on the nature of |inlineimage011| and |inlineimage012| . 94 which may be solved numerically, depending on the nature of 95 $\Delta q_u$ and $\Delta q_v$. 94 96 95 97 Solution 1 96 98 ^^^^^^^^^^ 97 99 98 **For ** |inlineimage012| **= 0 and** |inlineimage011| **= constant.**99 100 .. image:: sm_image016. gif101 102 For discrete *q* values, at the *q* values of the data points and at the *q*103 values extended up to *q*\ :sub:`N`\ = *q*\ :sub:`i` + |inlineimage011|the smeared100 **For $\Delta q_v= 0$ and $\Delta q_u = \text{constant}$.** 101 102 .. image:: sm_image016.png 103 104 For discrete $q$ values, at the $q$ values of the data points and at the $q$ 105 values extended up to $q_N = q_i + \Delta q_u$ the smeared 104 106 intensity can be approximately calculated as 105 107 106 .. image:: sm_image017. gif108 .. image:: sm_image017.png 107 109 108 110 **[Equation 5]** 109 111 110 where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *i* or *j* > *N-1*.112 where |inlineimage018| = 0 for $I_s$ when $j < i$ or $j > N-1$. 111 113 112 114 Solution 2 113 115 ^^^^^^^^^^ 114 116 115 **For ** |inlineimage012| **= constant and** |inlineimage011| **= 0.**117 **For $\Delta q_v = \text{constant}$ and $\Delta q_u= 0$.** 116 118 117 119 Similar to Case 1 118 120 119 |inlineimage019| for *q*\ :sub:`p` = *q*\ :sub:`i` - |inlineimage012| and *q*\ :sub:`N` = *q*\ :sub:`i` + |inlineimage012|121 |inlineimage019| for $q_p = q_i - \Delta q_v$ and $q_N = q_i + \Delta q_v$ 120 122 121 123 **[Equation 6]** 122 124 123 where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *p* or *j* > *N-1*.125 where |inlineimage018| = 0 for $I_s$ when $j < p$ or $j > N-1$. 124 126 125 127 Solution 3 126 128 ^^^^^^^^^^ 127 129 128 **For ** |inlineimage011| **= constant and** |inlineimage011| **= constant.**130 **For $\Delta q_u = \text{constant}$ and $\Delta q_v = \text{constant}$.** 129 131 130 132 In this case, the best way is to perform the integration of Equation 1 … … 138 140 numerical integration for the slit width. Then 139 141 140 .. image:: sm_image020. gif142 .. image:: sm_image020.png 141 143 142 144 **[Equation 7]** 143 145 144 for *q*\ :sub:`p` = *q*\ :sub:`i` - |inlineimage012| and *q*\ :sub:`N` = *q*\ :sub:`i` + |inlineimage012| 145 146 where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *p* or *j* > *N-1*. 146 for *q_p = q_i - \Delta q_v$ and $q_N = q_i + \Delta q_v$ 147 where |inlineimage018| = 0 for *I_s$ when $j < p$ or $j > N-1$. 147 148 148 149 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 158 159 Equation 6 becomes 159 160 160 .. image:: sm_image021. gif161 .. image:: sm_image021.png 161 162 162 163 **[Equation 8]** … … 171 172 Thus 172 173 173 .. image:: sm_image022. gif174 .. image:: sm_image022.png 174 175 175 176 **[Equation 9]** 176 177 177 In Equation 9, *x*\ :sub:`0` = *q* cos(|theta|), *y*\ :sub:`0` = *q* sin(|theta|), and 178 the primed axes, are all in the coordinate rotated by an angle |theta| about 179 the z-axis (see the figure below) so that *x'*\ :sub:`0` = *x*\ :sub:`0` cos(|theta|) + 180 *y*\ :sub:`0` sin(|theta|) and *y'*\ :sub:`0` = -*x*\ :sub:`0` sin(|theta|) + 181 *y*\ :sub:`0` cos(|theta|). Note that the rotation angle is zero for a x-y symmetric 182 elliptical Gaussian distribution. The *A* is a normalization factor. 183 184 .. image:: sm_image023.gif 185 186 Now we consider a numerical integration where each of the bins in |theta| and *R* are 187 *evenly* (this is to simplify the equation below) distributed by |bigdelta|\ |theta| 188 and |bigdelta|\ R, respectively, and it is further assumed that *I(x',y')* is constant 178 In Equation 9, $x_0 = q \cos(\theta)$, $y_0 = q \sin(\theta)$, and 179 the primed axes, are all in the coordinate rotated by an angle $\theta$ about 180 the z-axis (see the figure below) so that 181 $x'_0 = x_0 \cos(\theta) + y_0 \sin(\theta)$ and 182 $y'_0 = -x_0 \sin(\theta) + y_0 \cos(\theta)$. 183 Note that the rotation angle is zero for a $xy$ symmetric 184 elliptical Gaussian distribution. The $A$ is a normalization factor. 185 186 .. image:: sm_image023.png 187 188 Now we consider a numerical integration where each of the bins in $\theta$ and $R$ are 189 *evenly* (this is to simplify the equation below) distributed by $\Delta \theta$ 190 and $\Delta R$, respectively, and it is further assumed that $I(x',y')$ is constant 189 191 within the bins. Then 190 192 191 .. image:: sm_image024. gif193 .. image:: sm_image024.png 192 194 193 195 **[Equation 10]** 194 196 195 197 Since the weighting factor on each of the bins is known, it is convenient to 196 transform *x'-y'* back to *x-y* coordinates (by rotating it by -|theta|around the197 *z*axis).198 transform $x'y'$ back to $xy$ coordinates (by rotating it by $-\theta$ around the 199 $z$ axis). 198 200 199 201 Then, for a polar symmetric smear 200 202 201 .. image:: sm_image025. gif203 .. image:: sm_image025.png 202 204 203 205 **[Equation 11]** … … 205 207 where 206 208 207 .. image:: sm_image026. gif208 209 while for a *x-y*symmetric smear210 211 .. image:: sm_image027. gif209 .. image:: sm_image026.png 210 211 while for a $xy$ symmetric smear 212 213 .. image:: sm_image027.png 212 214 213 215 **[Equation 12]** … … 215 217 where 216 218 217 .. image:: sm_image028. gif219 .. image:: sm_image028.png 218 220 219 221 The current version of the SasView uses Equation 11 for 2D smearing, assuming … … 225 227 ------------------------- 226 228 227 In all the cases above, the weighting matrix *W*is calculated on the first call228 to a smearing function, and includes ~60 *q*values (finely and evenly binned)229 below (>0) and above the *q*range of data in order to smear all data points for230 a given model and slit/pinhole size. The *Norm*factor is found numerically with the231 weighting matrix and applied on the computation of *I*\ :sub:`s`.229 In all the cases above, the weighting matrix $W$ is calculated on the first call 230 to a smearing function, and includes ~60 $q$ values (finely and evenly binned) 231 below (>0) and above the $q$ range of data in order to smear all data points for 232 a given model and slit/pinhole size. The $Norm$ factor is found numerically with the 233 weighting matrix and applied on the computation of $I_s$. 232 234 233 235 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ -
src/sas/sasgui/perspectives/invariant/media/invariant_help.rst
r484141c r094b9eb 10 10 ----------- 11 11 12 The scattering, or Porod, invariant ( Q*\) is a model-independent quantity that12 The scattering, or Porod, invariant ($Q^*$) is a model-independent quantity that 13 13 can be easily calculated from scattering data. 14 14 15 For two phase systems, the scattering invariant is defined as the integral of 16 the square of the wave transfer (Q) multiplied by the scattering cross section17 over the full range of Qfrom zero to infinity, that is15 For two phase systems, the scattering invariant is defined as the integral of 16 the square of the wavevector transfer ($Q$) multiplied by the scattering cross section 17 over the full range of $Q$ from zero to infinity, that is 18 18 19 .. image:: image001.gif19 .. math:: 20 20 21 where *g = q* for pinhole geometry (SAS) and *g = q*\ :sub:`v` (the slit height) for 22 slit geometry (USAS). 21 Q^* = \int_0^\infty q^2I(q)\,dq 23 22 24 The worth of Q*\ is that it can be used to determine the volume fraction and 25 the specific area of a sample. Whilst these quantities are useful in their own 23 in the case of pinhole geometry. For slit geometry the invariant is given by 24 25 .. math:: 26 27 Q^* = \Delta q_v \int_0^\infty qI(q)\,dq 28 29 where $\Delta q_v$ is the slit height. 30 31 The worth of $Q^*$ is that it can be used to determine the volume fraction and 32 the specific area of a sample. Whilst these quantities are useful in their own 26 33 right they can also be used in further analysis. 27 34 28 The difficulty with using Q*\ arises from the fact that experimental data is29 never measured over the range 0 =< *Q* =< infinity. At best, combining USAS and30 WAS data might cover the range 1e-5 =< *Q* =< 10 1/\ |Ang| . Thus it is usually31 necessary to extrapolate the experimental data to low and high *Q*. For this35 The difficulty with using $Q^*$ arises from the fact that experimental data is 36 never measured over the range $0 \le Q \le \infty$. At best, combining USAS and 37 WAS data might cover the range $10^{-5} \le Q \le 10$ 1/\ |Ang| . Thus it is usually 38 necessary to extrapolate the experimental data to low and high $Q$. For this 32 39 33 High- *Q*region (>= *Qmax* in data)40 High-\ $Q$ region (>= *Qmax* in data) 34 41 35 * The power law function *C*/*Q*\ :sup:`4` is used where the constant36 *C* (= 2.\ |pi|\ .(\ |bigdelta|\ |rho|\ ).\ *Sv*\ ) is to be found by fitting part of data37 within the range *Q*\ :sub:`N-m` to *Q*\ :sub:`N` (where m < N).42 * The power law function $C/Q^4$ is used where the constant 43 $C = 2 \pi \Delta\rho S_v$ is to be found by fitting part of data 44 within the range $Q_{N-m}$ to $Q_N$ (where $m < N$). 38 45 39 Low- *Q*region (<= *Qmin* in data)46 Low-\ $Q$ region (<= *Qmin* in data) 40 47 41 * The Guinier function *I0.exp(-Rg*\ :sup:`2`\ *Q*\ :sup:`2`\ */3)* where *I0*42 and *Rg* are obtained by fitting as for the high-*Q* region above.48 * The Guinier function $I_0 exp(-R_g^2 Q^2/3)$ where $I_0$ 49 and $R_g$ are obtained by fitting as for the high-\ $Q$ region above. 43 50 Alternatively a power law can be used. 44 51 … … 52 59 2) Load some data with the *Data Explorer*. 53 60 54 3) Select a dataset and use the *Send To* button on the *Data Explorer* to load 61 3) Select a dataset and use the *Send To* button on the *Data Explorer* to load 55 62 the dataset into the *Invariant* panel. 56 63 57 4) Use the *Customised Input* boxes on the *Invariant* panel to subtract 58 any background, specify the contrast (i.e. difference in SLDs - this must be 59 specified for the eventual value of Q*\ to be on an absolute scale), or to64 4) Use the *Customised Input* boxes on the *Invariant* panel to subtract 65 any background, specify the contrast (i.e. difference in SLDs - this must be 66 specified for the eventual value of $Q^*$ to be on an absolute scale), or to 60 67 rescale the data. 61 68 62 5) Adjust the extrapolation range as necessary. In most cases the default 69 5) Adjust the extrapolation range as necessary. In most cases the default 63 70 values will suffice. 64 71 65 72 6) Click the *Compute* button. 66 73 67 7) To include a lower and/or higher Q range, check the relevant *Enable74 7) To include a lower and/or higher $Q$ range, check the relevant *Enable 68 75 Extrapolate* check boxes. 69 70 If power law extrapolations are chosen, the exponent can be either held 71 fixed or fitted. The number of points, Npts, to be used for the basis of the 76 77 If power law extrapolations are chosen, the exponent can be either held 78 fixed or fitted. The number of points, Npts, to be used for the basis of the 72 79 extrapolation can also be specified. 73 80 74 8) If the value of Q*\ calculated with the extrapolated regions is invalid, a81 8) If the value of $Q^*$ calculated with the extrapolated regions is invalid, a 75 82 red warning will appear at the top of the *Invariant* panel. 76 83 77 The details of the calculation are available by clicking the *Details* 84 The details of the calculation are available by clicking the *Details* 78 85 button in the middle of the panel. 79 86 80 .. image:: image005. gif87 .. image:: image005.png 81 88 82 89 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 88 95 ^^^^^^^^^^^^^^^ 89 96 90 The volume fraction |phi| is related to Q*\by97 The volume fraction $\phi$ is related to $Q^*$ by 91 98 92 .. image:: image002.gif99 .. math:: 93 100 94 where |bigdelta|\ |rho| is the SLD contrast. 101 \phi(1 - \phi) = \frac{Q^*}{2\pi^2(\Delta\rho)^2} \equiv A 95 102 96 .. image:: image003.gif 103 where $\Delta\rho$ is the SLD contrast. 104 105 .. math:: 106 107 \phi = \frac{1 \pm \sqrt{1 - 4A}}{2} 97 108 98 109 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 101 112 ^^^^^^^^^^^^^^^^^^^^^ 102 113 103 The specific surface area *Sv* is related to Q*\by114 The specific surface area $S_v$ is related to $Q^*$ by 104 115 105 .. image:: image004.gif116 .. math:: 106 117 107 where *Cp* is the Porod constant. 118 S_v = \frac{2\pi\phi(1-\phi)C_p}{Q^*} = \frac{2\pi A C_p}{Q^*} 119 120 where $C_p$ is the Porod constant. 108 121 109 122 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
Note: See TracChangeset
for help on using the changeset viewer.