⇤ ← Revision 1 as of 2008-04-27 16:36:00
Size: 1152
Comment:
|
Size: 1143
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
[[{{attachement:ASAR_seaice_20080421_f32_5000x5000.dat}}|Data]] | {{attachement:ASAR_seaice_20080421_f32_5000x5000.dat}} |
1 from scipy import float32,int16,tan,sin,array,zeros,arange,pi,fromfile,reshape,ones,clip,log10
2 from pylab import rc,imshow,show,gray,figure,cm,hold,colorbar,title,savefig,subplot,hist,title,close,xlabel,ylabel
3 import scipy.ndimage as ndi
4 import scipy.misc as misc
5
6 rc('image',origin='lower',interpolation='nearest')
7
8 def ql(img,vmin,vmax):
9 figure()
10 imshow(img,vmin=vmin,vmax=vmax)
11 gray()
12 show()
13
14 y0,x0,wy,wx=2300,2800,1000,1000
15 img=reshape(fromfile('ASAR_seaice_20080421_f32_5000x5000.dat',dtype=float32),(5000,5000))[y0:y0+wy,x0:x0+wx]
16
17 close('all')
18 ql(img,vmin=0,vmax=0.3)
19 colorbar()
20 title('Sea ice radar backscatter intensity')
21 savefig('seaice_intensity.png',dpi=100)
22 dbimg=10*log10(img)
23
24 figure()
25 subplot(2,1,1)
26 hist(img,bins=500)
27 xlabel('Intensity')
28 ylabel('Occurrence')
29 subplot(2,1,2)
30 hist(dbimg,bins=500)
31 xlabel('Intensity [dB]')
32 ylabel('Occurrence')
33 savefig('seaice_histogram.png',dpi=100)
34
35
36 ql(dbimg,-30,0)
37 colorbar()
38 title('Sea ice radar backscatter intensity [dB]')
39 savefig('seaice_dB.png',dpi=100)