Modis-Daten:

MODIS

http://rapidfire.sci.gsfc.nasa.gov/subsets/?subset=AERONET_Hornsund.2009072.terra.250m

http://rapidfire.sci.gsfc.nasa.gov/subsets/?subset=AERONET_Hornsund.2009072&altdates

Satellitenbilder (Aqua Modis) Fram Straße : Modis Images

Bilder als Dateianhänge

   1 def load_img(filename):
   2     im=Image.open(filename)
   3     return resize(fromstring(im.tostring(),uint8),(im.size[1],im.size[0],3))

Spektrum erzeugen mit der Funktion pylab.psd. Spektrum über eine Zeile und plot mit basemap (noch ohne Helligkeitsdaten):

   1 import Image
   2 from pylab import *
   3 from mpl_toolkits.basemap import Basemap
   4 import numpy as np
   5 
   6 def load_img(filename):
   7     im=Image.open(filename)
   8     return resize(fromstring(im.tostring(),uint8),(im.size[1],im.size[0],3))
   9 
  10 
  11 filename='AERONET_Hornsund.2009072.aqua.250m.jpg'
  12 
  13 a=load_img(filename)
  14 
  15 north=80.2363
  16 south=73.7612
  17 east=40.4156
  18 west=-9.3026
  19 
  20 [yn,xn,dum]=shape(a)
  21 
  22 # make grid
  23 x=linspace(west,east,xn)
  24 y=linspace(north,south,yn)
  25 
  26 [lons,lats] = meshgrid(x,y)
  27 
  28 
  29 start,stop,line=500,1500,1550
  30 test=a[line,start:stop,0]
  31 
  32 # power spectrum
  33 figure(1)
  34 psd(test,NFFT=512,Fs=250,Fc=0,detrend=mlab.detrend_linear,window=mlab.window_hanning, noverlap=0)
  35 
  36 
  37 
  38 # plot location of profile
  39 figure(2)
  40 m = Basemap(width=2400000,height=1600000,projection='stere',lat_ts=77.0,lon_0=15.0,lat_0=77.0,resolution='l')
  41 
  42 m.drawcoastlines()
  43 m.fillcontinents(color='gray',lake_color='aqua')
  44 m.drawmapboundary(fill_color='aqua')
  45 
  46 m.drawmeridians(np.arange(0,360,5),labels=[1,0,0,1])
  47 m.drawparallels(np.arange(-90,90,5),labels=[0,1,0,1])
  48 
  49 xm,ym=m(lons,lats)
  50 
  51 #m.imshow(xm,ym,a[:,:,0]) # geht nicht!
  52 
  53 x1,y1=m(x[start],y[line])
  54 x2,y2=m(x[stop],y[line])
  55 m.plot([x1,x2],[y1,y2],'-r')
  56 
  57 
  58 
  59 show()

Noch keine genaue Aussage über die Zellengröße machbar!

   1 from  scipy import *
   2 import Image
   3 def profmean(img,y1=0,ylen=5,x1=0,xlen=512):
   4     """
   5         
   6         
   7     """
   8     y2=y1+ylen
   9     xlist=range(x1,x1+xlen)
  10     #print xlist
  11     p=[]
  12     for x in xlist:
  13         p.append(a[y1:y2,x,0].mean())
  14     print p
  15     return p    
  16 
  17 def load_img(filename):
  18     im=Image.open(filename)
  19     return resize(fromstring(im.tostring(),uint8),(im.size[1],im.size[0],3))
  20     
  21 filename='AERONET_Hornsund.2009072.terra.250m.jpg'
  22 
  23 a=load_img(filename)
  24 
  25 print profmean(a)

LehreWiki: OpenSource2010/Project/Project Idea2010/Konvektionszellen (last edited 2011-01-17 09:45:59 by anonymous)