File: smodel.py

package info (click to toggle)
python-bumps 0.9.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,776 kB
  • sloc: python: 24,586; ansic: 4,973; cpp: 4,849; javascript: 639; xml: 493; makefile: 143; perl: 108; sh: 94
file content (27 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# ======
# Put current directory and sasview directory on path.
# This won't be necessary once bumps is in sasview
import os, sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
try:
    import periodictable
except ImportError:
    from distutils.util import get_platform
    platform = '.%s-%s'%(get_platform(),sys.version[:3])
    pt = os.path.abspath(os.path.join(os.path.dirname(__file__),'..','..','..','..','periodictable'))
    sys.path.insert(0,pt)
try: 
    import sans
except ImportError:
    from distutils.util import get_platform
    platform = '.%s-%s'%(get_platform(),sys.version[:3])
    sasview = os.path.abspath(os.path.join(os.path.dirname(__file__),'..','..','..','..','sasview','build','lib'+platform))
    sys.path.insert(0,sasview)
    #raise Exception("\n".join(sys.path))
# ======

from sasbumps import *

M = load_fit('FitPage2.fitv')
problem = FitProblem([M])