Changeset 56fac50 in sasmodels


Ignore:
Timestamp:
Mar 14, 2016 4:35:17 AM (9 years ago)
Author:
smk78
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:
cf95788
Parents:
4b0e1f3 (diff), 6869ceb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasmodels

Files:
8 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    ra4a7308 r6869ceb  
    3131import sys 
    3232import math 
    33 from os.path import basename, dirname, join as joinpath 
    34 import glob 
    3533import datetime 
    3634import traceback 
     
    9896kerneldll.ALLOW_SINGLE_PRECISION_DLLS = True 
    9997 
    100 # List of available models 
    101 ROOT = dirname(__file__) 
    102 MODELS = [basename(f)[:-3] 
    103           for f in sorted(glob.glob(joinpath(ROOT, "models", "[a-zA-Z]*.py")))] 
     98MODELS = core.list_models() 
    10499 
    105100# CRUFT python 2.6 
     
    671666    Parse command line options. 
    672667    """ 
     668    MODELS = core.list_models() 
    673669    flags = [arg for arg in sys.argv[1:] 
    674670             if arg.startswith('-')] 
     
    683679        print(columnize(MODELS, indent="  ")) 
    684680        sys.exit(1) 
    685     if args[0] not in MODELS: 
    686         print("Model %r not available. Use one of:\n    %s"%(args[0], models)) 
     681 
     682    name = args[0] 
     683    try: 
     684        model_definition = core.load_model_definition(name) 
     685    except ImportError, exc: 
     686        print(str(exc)) 
     687        print("Use one of:\n    " + models) 
    687688        sys.exit(1) 
    688689    if len(args) > 3: 
     
    764765        del engines[2:] 
    765766 
    766     name = args[0] 
    767     model_definition = core.load_model_definition(name) 
    768  
    769767    n1 = int(args[1]) if len(args) > 1 else 1 
    770768    n2 = int(args[2]) if len(args) > 2 else 1 
  • sasmodels/data.py

    rd18582e r7824276  
    548548    #plottable = Iq 
    549549    plottable = masked_array(image, ~valid | data.mask) 
     550    # Divide range by 10 to convert from angstroms to nanometers 
    550551    xmin, xmax = min(data.qx_data)/10, max(data.qx_data)/10 
    551552    ymin, ymax = min(data.qy_data)/10, max(data.qy_data)/10 
  • sasmodels/models/rpa.py

    rfa8011eb r5cfda00  
    133133    case_num = pars.get("case_num", parameters[0][2]) 
    134134    if case_num < 2: 
     135        return HIDE_AB 
     136    elif case_num < 5: 
    135137        return HIDE_A 
    136     elif case_num < 5: 
    137         return HIDE_AB 
    138138    else: 
    139139        return HIDE_NONE 
  • doc/rst_prolog

    r0d0aee1 r4b0e1f3  
    6060.. |deg| unicode:: U+00B0 
    6161.. |g/cm^3| replace:: g\ |cdot|\ cm\ :sup:`-3` 
     62.. |mg/m^2| replace:: mg\ |cdot|\ m\ :sup:`-2` 
    6263.. |fm^2| replace:: fm\ :sup:`2` 
    6364.. |Ang*cm^-1| replace:: |Ang|\ |cdot|\ cm\ :sup:`-1` 
Note: See TracChangeset for help on using the changeset viewer.