示例#1
0
    data = db.wavelengthForUid(uid)
    hist = np.histogram(data, bins=np.linspace(300, 800, num=100))
    pylab.hist(data, 100, histtype='stepfilled')
    pylab.savefig(os.path.join(drive, "tmp", "plot-edge.pdf"))
    pylab.clf()

    print "Plotting polar"
    for id in ['left', 'right', 'near', 'far']:
        data = []
        norm = db.surface_normal_for_surface(id)
        print "Surface", id, "Normal", norm
        uids = db.uids_out_bound_on_surface(id, luminescent=True)

        for item in uids:
            k = db.directionForUid(item)
            rads = pvtrace.angle(norm, k)
            deg = np.degrees(rads)
            data.append(deg)

    bins = np.linspace(0, 360, num=100)
    hist = np.histogram(data, bins=bins)
    pylab.hist(data, 100, histtype='stepfilled')
    pylab.savefig(os.path.join(drive, "tmp", 'plot-polar.pdf'))
    pylab.clf()

    print "Plotting escape"
    uid = db.uids_out_bound_on_surface(
        'top', luminescent=True) + db.uids_out_bound_on_surface(
            'bottom', luminescent=True)
    print uid
    data = db.wavelengthForUid(uid)
示例#2
0
 data = db.wavelengthForUid(uid)
 hist = np.histogram(data, bins=np.linspace(300,800,num=100))
 pylab.hist(data, 100, histtype='stepfilled')
 pylab.savefig(os.path.join(drive,"tmp","plot-edge.pdf"))
 pylab.clf()
 
 print "Plotting polar"
 for id in ['left','right', 'near', 'far']:
     data = []
     norm = db.surface_normal_for_surface(id)
     print "Surface", id, "Normal", norm
     uids = db.uids_out_bound_on_surface(id, luminescent=True)
     
     for item in uids:
         k = db.directionForUid(item)
         rads = pvtrace.angle(norm, k)
         deg = np.degrees(rads)
         data.append(deg)
 
 bins = np.linspace(0,360,num=100)
 hist = np.histogram(data, bins=bins)
 pylab.hist(data, 100, histtype='stepfilled')
 pylab.savefig(os.path.join(drive,"tmp",'plot-polar.pdf'))
 pylab.clf()
 
 print "Plotting escape"
 uid = db.uids_out_bound_on_surface('top', luminescent=True) + db.uids_out_bound_on_surface('bottom', luminescent=True)
 print uid
 data = db.wavelengthForUid(uid)
 hist, bin_edges = np.histogram(data, bins=np.linspace(300,800,num=10))
 pylab.hist(data, len(bin_edges), histtype='stepfilled')