Ejemplo n.º 1
0
    #for cc in range(channels):
    #    bg=num.median(IRspecData[cc,:,:][IRBGPixels])
    #    print bg
    #    IRspecData[cc,:,:]-=bg
        
    waterDepth=[]
    siliDepth=[]
    for l in range(A):
        waterDepth.append([])
        siliDepth.append([])
        for s in range(B):
            (w,spec)=specAnalysis.getSpec(IRspecData,l=l,s=s)
            med=num.nanmedian(spec)
            if med>0.0025: #could probably put this at 0.0025
                wat=specAnalysis.water(w,spec)
                sil=max(0.0,specAnalysis.silicate(w,spec))
                if wat>0:
                    waterDepth[len(waterDepth)-1].append(wat)
                else:
                    waterDepth[len(waterDepth)-1].append(0.0)
                siliDepth[len(siliDepth)-1].append(sil)
            else:
                waterDepth[len(waterDepth)-1].append(0.0)
                siliDepth[len(siliDepth)-1].append(0.0)
    waterDepth=num.array(waterDepth)
    siliDepth=num.array(siliDepth)
    
    x=[]
    y=[]
    z=[]
Ejemplo n.º 2
0
        print 'swaitch'
        specData=specData[:,::-1,::-1]


    (channels,A,B)=specData.shape

    waterDepth=[]
    for l in range(A):
        waterDepth.append([])
        for s in range(B):
            (w,spec)=specAnalysis.getSpec(specData,l=l,s=s)
            med=num.nanmedian(spec)
            #print l,s,med,imData[1,l,s]

            if med>0.0005:
                (h,junk)=specAnalysis.water(w,spec)
                if h>0.0:
                    waterDepth[len(waterDepth)-1].append(h)
                else: waterDepth[len(waterDepth)-1].append(0.0)
            else:
                waterDepth[len(waterDepth)-1].append(0.0)
    waterDepth=num.array(waterDepth)

    """
    for i in range(len(waterDepth)):
        for j in range(len(waterDepth[i])):
            if len(vertsInPixelIR[i][j])>0:
                print i,j
    print
    for i in range(len(waterDepth)):
        for j in range(len(waterDepth[i])):