Discussion:
Tutor Digest, Vol 98, Issue 51
Boris Vladimir Comi
2012-04-19 00:52:54 UTC
Permalink
Hi I have the following code that calculates the position and the value of each pixel of the image:

def scm(directory):
import os;
fs = os.listdir(directory);

# now fs will be a list of all the files in directory

from edu.wisc.ssec.mcidas import AreaFile;
for name in fs:

print "Reading in:",name
af = AreaFile(directory+"/"+name);
ad = af.getAreaDirectory();
count = 0;
data = af.getFloatData();

# now look through the first band y count pixels
# MCS detected when his temperature infrared (TIR) is < 219 K

for i in xrange(ad.getLines()):
for j in xrange(ad.getElements()):
if 552 < i < 900 and 244 < j < 572:
if (data[0][i][j]) > 206 and (data[0][i][j]) < 208:
print i, j, data[0][i][j];

Where in the code I can add the condition: to only print those values ​​(206-208) to be maintained for three hours or more

Boris Vladimir Comi Gonzalez
Universidad Nacional Autónoma de México
Grupo de Tormentas Convecivas
Lennart Regebro
2012-04-19 04:50:29 UTC
Permalink
To: python codigo <python-porting-+ZN9ApsXKcEdnm+***@public.gmane.org>

This is wrong. Is this an indication of the reason why we get Tutor
mails to python-porting a lot nowadays? Somebody typed the wrong
address in a site somewhere?

//Lennart

Loading...