Yard dose rate

501 days ago by SW83A

yard = ( ( 0, 0), ( 766, 0), ( 766,113), ( 533,113), ( 533, 53), ( 333, 53), ( 333,113), ( 47,113), ( 47,581), (1228,581), (1228,781), ( 875,781), ( 875,628), ( 0,628), ( 0, 0), ) 
       
gamma_before = ( ( 75, 25, 0.24), ( 125, 25, 0.23), ( 175, 25, 0.15), ( 225, 25, 0.12), ( 275, 25, 0.16), ( 325, 25, 0.12), ( 375, 25, 0.18), ( 425, 25, 0.24), ( 475, 25, 0.11), ( 525, 25, 0.20), ( 575, 25, 0.22), ( 625, 25, 0.25), ( 675, 25, 0.19), ( 725, 25, 0.25), ( 25, 75, 0.20), ( 75, 75, 0.20), ( 125, 75, 0.21), ( 175, 75, 0.17), ( 225, 75, 0.12), ( 275, 75, 0.10), ( 325, 75, 0.13), ( 575, 75, 0.19), ( 625, 75, 0.20), ( 675, 75, 0.23), ( 725, 75, 0.23), ( 25,125, 0.15), ( 25,175, 0.11), ( 25,225, 0.14), ( 25,275, 0.10), ( 25,325, 0.15), ( 25,375, 0.18), ( 25,425, 0.15), ( 25,475, 0.22), ( 25,525, 0.22), ( 25,575, 0.21), ( 25,625, 0.28), ( 75,600, 0.30), ( 125,600, 0.30), ( 175,600, 0.27), ( 225,600, 0.27), ( 275,600, 0.22), ( 325,600, 0.22), ( 375,600, 0.24), ( 425,600, 0.27), ( 475,600, 0.26), ( 525,600, 0.20), ( 575,600, 0.22), ( 625,600, 0.21), ( 675,600, 0.34), ( 725,600, 0.27), ( 775,600, 0.27), ( 825,600, 0.24), ( 875,600, 0.27), ( 925,625, 0.28), ( 975,625, 0.37), (1025,625, 0.28), (1075,625, 0.30), (1125,625, 0.24), (1175,625, 0.20), (1225,625, 0.16), ( 925,675, 0.33), ( 975,675, 0.39), (1025,675, 0.30), (1075,675, 0.32), (1125,675, 0.29), (1175,675, 0.24), (1225,675, 0.18), ( 925,725, 0.37), ( 975,725, 0.28), (1025,725, 0.26), (1075,725, 0.28), (1125,725, 0.26), (1175,725, 0.22), (1225,725, 0.24), ( 925,775, 0.33), ( 975,775, 0.24), (1025,775, 0.19), (1075,775, 0.27), (1125,775, 0.22), (1175,775, 0.18), (1225,775, 0.25), ) 
       
plot_yard = list_plot(yard, plotjoined=True, rgbcolor='black') plot_yard += polygon([(767,0),(1228,0),(1228,580),(48,580),(48,114),(334,114),(334,54),(532,54),(532,114),(767,114)], rgbcolor='white', zorder=2) plot_yard += polygon([(0,629),(874,629),(874,781),(0,781)], rgbcolor='white', zorder=2) cmap = sage.plot.colors.get_cmap('jet') plot_gamma = Graphics() for x,y,z in gamma_before: plot_gamma += point((x,y), rgbcolor=cmap(z*2)[:3], zorder=3) import numpy, scipy.interpolate f_interpolation = scipy.interpolate.interp2d(*zip(*gamma_before)) plot_interpolation = contour_plot(lambda x,y: f_interpolation(x,y)[0], (0,1228), (0,781), cmap='jet', contours=numpy.arange(0.1,0.4,0.1), colorbar=True) plot_all = (plot_yard + plot_gamma + plot_interpolation) plot_all.show(axes_labels=["cm", "cm"]) 
       
Warning:     No more knots can be added because the number of B-spline
coefficients
    already exceeds the number of data points m. Probably causes: either
    s or m too small. (fp>s)
	kx,ky=1,1 nx,ny=11,12 m=81 fp=0.041377 s=0.000000
Warning:     No more knots can be added because the number of B-spline coefficients
    already exceeds the number of data points m. Probably causes: either
    s or m too small. (fp>s)
	kx,ky=1,1 nx,ny=11,12 m=81 fp=0.041377 s=0.000000
plot_yard = list_plot(yard, plotjoined=True, rgbcolor='black') plot_gamma = list_plot(gamma_before, rgbcolor='red') plot_all = (plot_yard + plot_gamma) plot_all.show(axes_labels=["cm", "cm"]) 
       
plot_yard = list_plot(yard, plotjoined=True, rgbcolor='black') plot_gamma = list_plot3d(list(gamma_before)) plot_all = (plot_yard + plot_gamma) plot_all.show(axes_labels=["cm", "cm"]) 
       
gamma_after = ( ( 75, 25, 0.10), ( 125, 25, 0.12), ( 175, 25, 0.07), ( 225, 25, 0.10), ( 275, 25, 0.12), ( 325, 25, 0.10), ( 375, 25, 0.13), ( 425, 25, 0.13), ( 475, 25, 0.13), ( 525, 25, 0.10), ( 575, 25, 0.13), ( 625, 25, 0.09), ( 675, 25, 0.12), ( 725, 25, 0.10), ( 25, 75, 0.13), ( 75, 75, 0.11), ( 125, 75, 0.12), ( 175, 75, 0.08), ( 225, 75, 0.06), ( 275, 75, 0.10), ( 325, 75, 0.11), ( 575, 75, 0.10), ( 625, 75, 0.10), ( 675, 75, 0.08), ( 725, 75, 0.11), ( 25,125, 0.11), ( 25,175, 0.08), ( 25,225, 0.10), ( 25,275, 0.08), ( 25,325, 0.12), ( 25,375, 0.11), ( 25,425, 0.09), ( 25,475, 0.12), ( 25,525, 0.12), ( 25,575, 0.09), ( 25,625, 0.12), ( 75,600, 0.11), ( 125,600, 0.11), ( 175,600, 0.11), ( 225,600, 0.13), ( 275,600, 0.06), ( 325,600, 0.10), ( 375,600, 0.09), ( 425,600, 0.10), ( 475,600, 0.10), ( 525,600, 0.11), ( 575,600, 0.11), ( 625,600, 0.11), ( 675,600, 0.13), ( 725,600, 0.10), ( 775,600, 0.08), ( 825,600, 0.10), ( 875,600, 0.13), ( 925,625, 0.11), ( 975,625, 0.11), (1025,625, 0.12), (1075,625, 0.15), (1125,625, 0.10), (1175,625, 0.10), (1225,625, 0.12), ( 925,675, 0.13), ( 975,675, 0.14), (1025,675, 0.13), (1075,675, 0.12), (1125,675, 0.08), (1175,675, 0.10), (1225,675, 0.09), ( 925,725, 0.10), ( 975,725, 0.15), (1025,725, 0.17), (1075,725, 0.13), (1125,725, 0.11), (1175,725, 0.10), (1225,725, 0.11), ( 925,775, 0.14), ( 975,775, 0.12), (1025,775, 0.19), (1075,775, 0.14), (1125,775, 0.15), (1175,775, 0.11), (1225,775, 0.14), ) 
       
plot_yard = list_plot(yard, plotjoined=True, rgbcolor='black') plot_yard += polygon([(767,0),(1228,0),(1228,580),(48,580),(48,114),(334,114),(334,54),(532,54),(532,114),(767,114)], rgbcolor='white', zorder=2) plot_yard += polygon([(0,629),(874,629),(874,781),(0,781)], rgbcolor='white', zorder=2) cmap = sage.plot.colors.get_cmap('jet') plot_gamma = Graphics() for x,y,z in gamma_after: plot_gamma += point((x,y), rgbcolor=cmap(z*2)[:3], zorder=3) import numpy, scipy.interpolate f_interpolation = scipy.interpolate.interp2d(*zip(*gamma_after)) plot_interpolation = contour_plot(lambda x,y: f_interpolation(x,y)[0], (0,1228), (0,781), cmap='jet', contours=numpy.arange(0.1,0.4,0.1), colorbar=True) plot_all = (plot_yard + plot_gamma + plot_interpolation) plot_all.show(axes_labels=["cm", "cm"]) 
       
Warning:     No more knots can be added because the number of B-spline
coefficients
    already exceeds the number of data points m. Probably causes: either
    s or m too small. (fp>s)
	kx,ky=1,1 nx,ny=11,12 m=81 fp=0.013550 s=0.000000
Warning:     No more knots can be added because the number of B-spline coefficients
    already exceeds the number of data points m. Probably causes: either
    s or m too small. (fp>s)
	kx,ky=1,1 nx,ny=11,12 m=81 fp=0.013550 s=0.000000
plot_yard = list_plot(yard, plotjoined=True, rgbcolor='black') plot_gamma = list_plot(gamma_after, rgbcolor='red') plot_all = (plot_yard + plot_gamma) plot_all.show(axes_labels=["cm", "cm"]) 
       
plot_yard = list_plot(yard, plotjoined=True, rgbcolor='black') plot_gamma = list_plot3d(list(gamma_after)) plot_all = (plot_yard + plot_gamma) plot_all.show(axes_labels=["cm", "cm"]) 
       
print sum([x[2] for x in gamma_before])/len(gamma_before) print sum([x[2] for x in gamma_after])/len(gamma_after) 
       
0.227037037037037
0.111358024691358
0.227037037037037
0.111358024691358