File: smodel.py

package info (click to toggle)
python-bumps 1.0.0b2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,144 kB
  • sloc: python: 23,941; xml: 493; ansic: 373; makefile: 209; sh: 91; javascript: 90
file content (31 lines) | stat: -rw-r--r-- 941 bytes parent folder | download | duplicates (2)
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
28
29
30
31
# ======
# 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])