Changeset e68bae9 in sasmodels


Ignore:
Timestamp:
Jan 24, 2018 2:11:20 AM (7 years ago)
Author:
Adam Washington <adam.washington@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
7fec3b7
Parents:
ffc2a61
Message:

Give "@" a higher precedence than "*" in the combined models

As mentioned by Paul Kienzle,

"…a*b@c is parsed as a*(b@c). We don't define ER for a*b, so (a*b)@c isn't valid."

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/core.py

    rffc2a61 re68bae9  
    152152                 for part in model_string.split("+")] 
    153153        return mixture.make_mixture_info(parts, operation='+') 
     154    elif "*" in model_string: 
     155        parts = [load_model_info(part) 
     156                 for part in model_string.split("*")] 
     157        return mixture.make_mixture_info(parts, operation='*') 
    154158    elif "@" in model_string: 
    155159        p_info, q_info = [load_model_info(part) 
    156160                          for part in model_string.split("@")] 
    157161        return product.make_product_info(p_info, q_info) 
    158     elif "*" in model_string: 
    159         parts = [load_model_info(part) 
    160                  for part in model_string.split("*")] 
    161         return mixture.make_mixture_info(parts, operation='*') 
    162162    # We are now dealing with a pure model 
    163163    elif "custom." in model_string: 
Note: See TracChangeset for help on using the changeset viewer.