[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[McIDAS #NSZ-383912]: FW: Help script
- Subject: [McIDAS #NSZ-383912]: FW: Help script
- Date: Thu, 19 Apr 2012 17:41:36 -0600
Hi Boris,
re:
> I want to make a script that calculates certain characteristics in a
> satellite image for the day April 3, 2004. The data is downloaded from
> Unidata in the following format: 200404031215.goesi12r and are hourly.
OK, those images are in McIDAS AREA format.
re:
> The first thing I want to do:
>
> 1. how to select the Region of Mexico from a script?
Selecting a region of an image for manipulation/analysis is very easy
in McIDAS-X. I am not sure of how to do it in McIDAS-V/IDV.
Questions:
- what calculation(s) are you wanting to do?
I see the code snippit you included in your email, but I am not
sure if I understand what it is you are trying to do.
- do you just want to list out the values for pixels that match
certain conditions, or do you want to highlight those pixels in
the image display?
If you just want to highlight the pixels that meet certain
conditions (e.g., values), you could do this by manipulating
the color enhancement you are using.
re:
> Doing some deployments in McIDAS-V and after having researched the types
> of coordinates in McIDAS-V , I note that the values ??of lines and elements
> which correspond to Region of Mexico are the values ??determined by the
> "AREA Coordinates" (see 3abril.jpg in attached), they are the values
> ??associated
> with the image displayed on screen ?
McIDAS (McIDAS-X and McIDAS-V and the IDV) use the coordinate concepts
introduced
in McIDAS:
image coordinates - lines and elements from the original satellite scan
AREA coordinates - that portion of a satellite scan that is contained in an
AREA file. An AREA file can contain all or part of
a satellite scan
AREA coordinates - Earth reference for each pixel. When the pixel is out
in space, there is no Earth reference
Any pixel in an image can be referred to uniquely/correctly in at least two of
these coordinate systems. Why 2 and not 3? A portion of a satellite image's
scan may be out in space, not over ground.
re:
> if that's true, How to convert lines and elements of an image to coordinates
> of latitude and longitude?
This is done by knowing the navigation (projection) transforms. This can
be quite complicated for satellite images in their native projection.
The IDV/McIDAS-V does this for you on the fly: the equations that represent
the navigation transforms are part of the packages.
Hmm... if you remapped the images you got into a Lat,Lon projection (easiest
done in McIDAS-X). If this is done, the mapping from line,element to lat,lon
is simple.
re:
> There is some method or function to select the domain mentioned?
I don't know. I will have to ask our IDV developers. What did the folks
at SSEC say?
re:
> 2. There is some method or function to display this data on screen of
> McIDAS-V?
I can't speak about McIDAS-V since it is under the control of SSEC, but
I would think that the answer is yes.
re:
> 3. I want to display a image with the values ??of brightness, where the range
> is from 201 to 207 and segment the region corresponding to these values.
> Is there any way to do this?
I don't know; I will have to ask the IDV guys.
re:
> The script is as follows:
>
> 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();
>
>
> # Mesoscale Convective System detected
>
> 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];
>
>
> scm("/home/mcidas/Documents/datos/IR")
I understand what this script is supposed to do, but I don't know
the basis for it. Can you elaborate?
Cheers,
Tom
--
****************************************************************************
Unidata User Support UCAR Unidata Program
(303) 497-8642 P.O. Box 3000
address@hidden Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage http://www.unidata.ucar.edu
****************************************************************************
Ticket Details
===================
Ticket ID: NSZ-383912
Department: Support McIDAS
Priority: Normal
Status: Closed