Changeset 4c1bfb3 in sasmodels for example


Ignore:
Timestamp:
Mar 18, 2016 12:34:17 PM (9 years ago)
Author:
jhbakker
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
bfea0c2
Parents:
115d0f0
Message:

refactor fit_sesans/sesansfit to simplify startup

Location:
example
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • example/fit_sesans.py

    rbdb653c r4c1bfb3  
    1 import shlex, subprocess, sys 
    2 import platform 
    3 args = shlex.split("sesansfit.sh blah --edit") 
    4 args[1] = sys.argv[1] 
    5 if platform.system() != "Windows": 
    6     args = ["sh"] + args 
    7     shellFlag = False 
    8 else: 
    9     shellFlag = True 
    10 subprocess.Popen(args, shell=shellFlag) 
     1#!/usr/bin/env python 
     2import os 
     3import sys 
     4 
     5# Need to fix the paths to sasmodels and sasview if no eggs present 
     6ONEUP=os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 
     7PROJECTS=os.path.dirname(ONEUP) 
     8SASMODELS=os.path.join(PROJECTS, 'sasmodels') 
     9SASVIEW=os.path.join(PROJECTS, 'sasview', 'src') 
     10BUMPS=os.path.join(PROJECTS, 'bumps') 
     11 
     12sys.path.insert(0, BUMPS) 
     13sys.path.insert(0, SASVIEW) 
     14sys.path.insert(0, SASMODELS) 
     15 
     16from bumps.gui.gui_app import main as gui 
     17gui() 
  • example/sesansfit.py

    r170ea69 r4c1bfb3  
    2626    @return: FitProblem for Bumps usage 
    2727    """ 
     28    initial_vals['background'] = 0.0 
    2829    try: 
    2930        loader = Loader() 
     
    6667    else: 
    6768        radius = 1000 
    68     data.Rmax = 3*radius # [A] 
     69    data.Rmax = 30*radius # [A] 
    6970 
    7071    if isinstance(model, basestring): 
Note: See TracChangeset for help on using the changeset viewer.