Changeset 5931 for branches/1.4


Ignore:
Timestamp:
Nov 3, 2015 9:00:05 AM (8 years ago)
Author:
mmh
Message:

use varnames as node names instead of labels for pdfs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4/puq/puq_analyze.py

    r5829 r5931  
    5252    yp = np.empty(len(xvals[vname]))
    5353    ym = np.empty(len(xvals[vname]))
     54
    5455    for vindex in sorted(xvals[vname].keys()):
    5556        if label is None:
     
    130131
    131132def plot_pdf(io, v, pdf, desc):
    132     p = io['output.curve(%s)' % desc]
     133    print("plot_pdf %s desc=%s" % (v, desc))
     134    p = io['output.curve(pdf-%s)' % v]
    133135    p['about.label'] = desc
    134136    p['about.uqtype'] = "PDF"
     
    145147    uqtype = h5.attrs['UQtype']
    146148    for v in h5[uqtype]:
     149        print("write_responses", v)
    147150        if '[' in v:
    148151            # It is a curve. Ignore.
     
    158161
    159162        rsp = h5['/%s/%s/response' % (uqtype, v)].value
    160 
    161         rout = io['output.response(%s)' % label]
     163        rout = io['output.response(%s)' % v]
    162164        rout['value'] = rsp
    163165        rout['about.description'] = desc
     
    272274uqtype = h5.attrs['UQtype']
    273275for v in h5[uqtype]:
     276    print('v=', v)
    274277    rsp = h5['/%s/%s/response' % (uqtype, v)].value
    275278    rs = unpickle(rsp)
     
    281284        matches = reg1.findall(v)
    282285        vname, vindex = matches[0]
     286        print('CURVE: vname=%s   vindex=%s' % (vname, vindex))
    283287        vindex = int(vindex)
    284288        if vname not in pcurves:
     
    316320write_responses(io, h5)
    317321write_summary(io, h5)
     322
    318323io.close()
    319 
    320324h5.close()
Note: See TracChangeset for help on using the changeset viewer.