Changeset a0d75ce in sasmodels


Ignore:
Timestamp:
Oct 14, 2016 1:18:32 AM (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:
3a45c2c, a23639a
Parents:
a80e64c
git-author:
Paul Kienzle <pkienzle@…> (10/13/16 23:36:09)
git-committer:
Paul Kienzle <pkienzle@…> (10/14/16 01:18:32)
Message:

add title option to sascomp to provide more details on the graph

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    r234c532 ra0d75ce  
    8181    -default/-demo* use demo vs default parameters 
    8282    -html shows the model docs instead of running the model 
     83    -title="graph title" adds a title to the plot 
    8384 
    8485Any two calculation engines can be selected for comparison: 
     
    689690    #    h.ax.set_title(cbar_title) 
    690691    fig = plt.gcf() 
    691     fig.suptitle(opts['name']) 
     692    extra_title = ' '+opts['title'] if opts['title'] else '' 
     693    fig.suptitle(opts['name'] + extra_title) 
    692694 
    693695    if n_comp > 0 and n_base > 0 and '-hist' in opts: 
     
    742744VALUE_OPTIONS = [ 
    743745    # Note: random is both a name option and a value option 
    744     'cutoff', 'random', 'nq', 'res', 'accuracy', 
     746    'cutoff', 'random', 'nq', 'res', 'accuracy', 'title', 
    745747    ] 
    746748 
     
    847849        'zero'      : False, 
    848850        'html'      : False, 
     851        'title'     : None, 
    849852    } 
    850853    engines = [] 
     
    867870        elif arg.startswith('-cutoff='):   opts['cutoff'] = float(arg[8:]) 
    868871        elif arg.startswith('-random='):   opts['seed'] = int(arg[8:]) 
     872        elif arg.startswith('-title'):     opts['title'] = arg[7:] 
    869873        elif arg == '-random':  opts['seed'] = np.random.randint(1000000) 
    870874        elif arg == '-preset':  opts['seed'] = -1 
Note: See TracChangeset for help on using the changeset viewer.