Univeristy of Alabama in Huntsville

UAH LTG IDL Library

IDL Routines from Phillip Bitzer and UAH Lightning Group

summary     class     fields     routine details     file attributes

ats509/

ess_plot_modis.pro

MODIS, Plotting, ATS509

includes main-level program

Working file to get a plot of MODIS data, given three bands that represent the RGB values. The plot is actually an image. In addition, several map entities are plotted.

To continue plotting on the same map used herein, use the output keyword for the mapping object. If you use this, however, you are responsible to clean up your own mess (i.e., destroy the objects).

This code is largely based on initial work by D. Fanning, originally named swath2image.

Intended for use with ATS509. A more robust version is in the PMB library, pmb_plot_modis

Examples

A main level program is included for an example. It uses ess_read_modis1b to read in data. For prosperity, here's the code:

file = 'MOD021KM.A2005240.1700.005.2010159164217.hdf' bands = ESS_READ_MODIS1b(file, latlon=ll) r = bands[*, *, 0] g = bands[*, *, 3] b = bands[*, *, 2] ess_plot_modis, r, g, b, ll.lat, ll.lon

Author information

Author

Phillip M. Bitzer, University of Alabama in Huntsville, pm.bitzer "AT" uah.edu

History

Modification History:

First written: ??, 2013 Ready for release, 20131029 PMB Added output keyword for the map object. 20131116 PMB

Other file information

Uses:

Hist_ND, cgReverseIndices, cgMap, cgMap_Continents, cgMapGrid, cgImage

Routines

Routines from ess_plot_modis.pro

result = ess_plot_modis_scale(color)

This helper routine will do scaling of an array for you and perform histogram equalization.

ess_plot_modis, rBand, gBand, bBand, lat, lon [, /NoScale] [, BinX=double] [, BinY=double] [, OMap=cgMap object]

Create an image from bands from MODIS.

Routine details

top ess_plot_modis_scale

result = ess_plot_modis_scale(color)

This helper routine will do scaling of an array for you and perform histogram equalization.

Return value

Given a n element array, an n element array of scaled values is returned.

Parameters

color in required type=numeric array

The values to be scaled.

top ess_plot_modis

ess_plot_modis, rBand, gBand, bBand, lat, lon [, /NoScale] [, BinX=double] [, BinY=double] [, OMap=cgMap object]

Create an image from bands from MODIS.

Parameters

rBand in required type=numeric array

nxm element array of values to use for the red channel

gBand in required type=numeric array

nxm element array of values to use for the green channel

bBand in required type=numeric array

n element array of values to use for the blue channel

lat in required type=numeric array

nxm element array giving the latitudes (in degrees) of each element of the color channels

lon in required type=numeric array

nxm element array giving the latitudes (in degrees) of each element of the color channels

Keywords

NoScale in optional type=boolean default=0B

If set, the data is not scaled and histogram equalization is not performed

BinX in optional type=double default=5D3

Specify the horizontal bin size of the image. Smaller values suggest higher resolution.

BinY in optional type=double default=5D3

Specify the vertical bin size of the image. Smaller values suggest higher resolution.

OMap out optional type=cgMap object

An object of class cgMap. If this is set to a parameter, then no objects will be cleaned up. That's up to you when you are done with the objects

Other attributes

Uses:

Hist_ND, cgReverseIndices, cgMap, cgMap_Continents, cgMapGrid, cgImage

File attributes

Modification date: Thu Oct 19 09:10:17 2017
Lines: 88
Docformat: rst rst