Changeset 6831fa0 in sasmodels for sasmodels/compare.py


Ignore:
Timestamp:
Oct 14, 2016 3:18:34 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
b716cc6
Parents:
87bc707
Message:

stacked_disks: enable 2D modeling for stacked disks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    r9068f4c r6831fa0  
    3838from . import core 
    3939from . import kerneldll 
    40 from . import weights 
     40from . import exception 
    4141from .data import plot_theory, empty_data1D, empty_data2D 
    4242from .direct_model import DirectModel 
     
    4545try: 
    4646    from typing import Optional, Dict, Any, Callable, Tuple 
    47 except: 
     47except Exception: 
    4848    pass 
    4949else: 
     
    466466            if k.endswith('.type'): 
    467467                par = k[:-5] 
     468                if v == 'gaussian': continue 
    468469                cls = dispersers[v if v != 'rectangle' else 'rectangula'] 
    469470                handle = cls() 
    470471                model[0].disperser_handles[par] = handle 
    471                 model[0].set_dispersion(par, handle) 
     472                try: 
     473                    model[0].set_dispersion(par, handle) 
     474                except Exception: 
     475                    exception.annotate_exception("while setting %s to %r" 
     476                                                 %(par, v)) 
     477                    raise 
     478 
    472479 
    473480        #print("sasview pars",oldpars) 
Note: See TracChangeset for help on using the changeset viewer.