Changeset 170ea69 in sasmodels


Ignore:
Timestamp:
Mar 18, 2016 8:09:02 AM (9 years ago)
Author:
krzywon
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:
9538fae
Parents:
59ce4cb
Message:

Resolving path issues with SESANS script

Location:
example
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • example/sesansfit.py

    ra06430c r170ea69  
    11from bumps.names import * 
    22from sasmodels import core, bumps_model, sesans 
     3from sas.sascalc.dataloader.loader import Loader 
    34 
    45HAS_CONVERTER = True 
     
    2627    """ 
    2728    try: 
    28         from sas.sascalc.dataloader.loader import Loader 
    2929        loader = Loader() 
    3030        data = loader.load(file) 
    3131        if data is None: raise IOError("Could not load file %r"%(file)) 
    32         data.needs_all_q = acceptance_angle is not None 
    3332        if HAS_CONVERTER == True: 
    3433            default_unit = "A" 
     
    5857            dy = err_data 
    5958            sample = Sample() 
    60             acceptance_angle = acceptance_angle 
    6159            needs_all_q = acceptance_angle is not None 
    6260        data = SESANSData1D() 
     61        data.acceptance_angle = acceptance_angle 
    6362 
     63    data.needs_all_q = acceptance_angle is not None 
    6464    if "radius" in initial_vals: 
    6565        radius = initial_vals.get("radius") 
  • example/sesansfit.sh

    rbdb653c r170ea69  
    11#!/bin/bash 
    22 
    3 SASVIEW=$PWD/../../sasview/src 
    4 PYTHONPATH=$PWD/../:$PWD/../../bumps:$PWD/../../periodictable:$SASVIEW 
     3# Need to fix the paths to sasmodels and sasview if no eggs present 
     4echo $PWD 
     5ONEUP="$(dirname "$PWD")" 
     6PROJECTS="$(dirname "$ONEUP")" 
     7CCOLON="C:/" 
     8CSLASH="/c/" 
     9SASMODELSBASE=$PROJECTS/sasmodels/ 
     10SASMODELS="${SASMODELSBASE/$CSLASH/$CCOLON}" 
     11SASVIEWBASE=$PROJECTS/sasview/src/ 
     12SASVIEW="${SASVIEWBASE/$CSLASH/$CCOLON}" 
     13PYTHONPATH="$SASVIEW;$SASMODELS" 
    514export PYOPENCL_CTX PYTHONPATH 
    615 
Note: See TracChangeset for help on using the changeset viewer.