Changeset 672978c in sasmodels for sasmodels/core.py


Ignore:
Timestamp:
Aug 9, 2016 4:27:14 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
c95dfc63, 9f60c06
Parents:
3d9001f (diff), 9457498 (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 github.com:sasview/sasmodels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/core.py

    r3d9001f r672978c  
    4040    # CRUFT: np.meshgrid requires multiple vectors 
    4141    def meshgrid(*args): 
     42        """Allow meshgrid with a single argument""" 
    4243        if len(args) > 1: 
    4344            return np.meshgrid(*args) 
     
    6364    """ 
    6465    Return the list of available models on the model path. 
     66 
     67    *kind* can be one of the following: 
     68 
     69        * all: all models 
     70        * py: python models only 
     71        * c: compiled models only 
     72        * single: models which support single precision 
     73        * double: models which require double precision 
     74        * 1d: models which are 1D only, or 2D using abs(q) 
     75        * 2d: models which can be 2D 
     76        * magnetic: models with an sld 
     77        * nommagnetic: models without an sld 
    6578    """ 
    6679    if kind and kind not in KINDS: 
     
    87100    elif kind == "2d" and any(p.type == 'orientation' for p in pars): 
    88101        return True 
    89     elif kind == "1d" and any(p.type != 'orientation' for p in pars): 
     102    elif kind == "1d" and all(p.type != 'orientation' for p in pars): 
    90103        return True 
    91104    elif kind == "magnetic" and any(p.type == 'sld' for p in pars): 
     
    251264 
    252265def list_models_main(): 
     266    # type: () -> None 
     267    """ 
     268    Run list_models as a main program.  See :func:`list_models` for the 
     269    kinds of models that can be requested on the command line. 
     270    """ 
    253271    import sys 
    254272    kind = sys.argv[1] if len(sys.argv) > 1 else "all" 
Note: See TracChangeset for help on using the changeset viewer.