Table of Contents

Class: madPcolorWedgeScan ui/madrigalPlot.py

madPcolorWedgeScan is the class that produces pcolor scans where data is drawn as wedge shapes.

Usage example:

        obj = madPcolorScan(isprintText,
                        'Nel (log(m^-3)) - 26 June 2006 13:49:43-14:07:36',
                        'Longitude',
                        'Latitude',
                        './isprint.png',
                        size = 'large',
                        minColormap = 9,
                        maxColormap = 12)    

Non-standard Python modules used: matplotlib

Change history:

Written by Bill Rideout Jul. 20, 2006

Methods   
__init__
_generateWedges
_getLimits
_getWedge
_setLimits
getGreatCircleDist
  __init__ 
__init__ (
        self,
        isprintText,
        scanType,
        titleStr,
        xLabelStr,
        yLabelStr,
        fullFilename,
        size='small',
        xMinimum=None,
        xMaximum=None,
        yMinimum=None,
        yMaximum=None,
        minColormap=None,
        maxColormap=None,
        colorMap=matplotlib.cm.jet,
        )

__init__ writes a madPcolorWedgeScan to a file.

Inputs:

isprintText - a string giving isprint output without headers. The 9 parameters are (gdlatr, gdlonr, galtr, range, az1, az2, el1, el2, <parameter value>). Any missing data should be written as "missing" or other string that cannot be converted to a float. gdlatr, gdlonr, galtr are the station location

scanType - must be az or el_lat (for north or south el scans), el_lon (for east or west el scans) or el_gcdist (for all other el scans. For az - x is long, y is lat for el_* y is always alt, and x is either lat, lon, or great circle distance

titleStr - plot title (string) - should describe parameter being plotted

xLabelStr - x label string

yLabelStr - ylabel string

fullFilename - full path of file containing pcolor plot to be saved. Extension must be jpeg or png, or exception thrown.

size - size of plot to save. Must be "small", "wide", or "large". Defaults to small.

xMinimum = minumum x value. If None (default), uses lowest value found.

xMaximum = maximum x value. If None (default), uses highest value found.

yMinimum = minumum y value. If None (default), uses lowest value found.

yMaximum = maximum y value. If None (default), uses highest value found.

minColormap - minimum parameter value (defaults to lowest parameter value)

maxColormap - maximum parameter value (defaults to highest parameter value). However, if both minColormap and maxColormap == None, autoscaling applied.

colorMap - sets colormap. It not given, defaults to matplotlib.cm.jet

Returns: void

Affects: Writes fullFilename to disk

Exceptions   
ValueError, 'scanType must be "az", "el_lat", "el_lon", "el_gcdist", not %s' %(str( scanType ) )
ValueError, 'size must be "small", "wide", or "large", not %s' %(str( size ) )
  _generateWedges 
_generateWedges (
        self,
        isprintLines,
        scanType,
        )

_generateWedges is a python generator that return a data wedge in the form (dataValue, (point1_x, point1_y), (point2_x, point2_y), (point3_x, point3_y), (point4_x, point4_y))

Inputs:

isprintLines - a list of line with 9 parameters that are (gdlatr, gdlonr, galtr, range, az1, az2, el1, el2, <parameter value>). Any missing data should be written as "missing" or other string that cannot be converted to a float. gdlatr, gdlonr, galtr are the station location. No wedge is returned for a missing data line

scanType - must be az or el_lat (for north or south el scans), el_lon (for east or west el scans) or el_gcdist (for all other el scans. For az - x is long, y is lat for el_* y is always alt, and x is either lat, lon, or great circle distance

  _getLimits 
_getLimits ( self,  isprintLines )

returns (newLonMax, newLonMin, newLatMax, newLatMin, newAltMax, newGreatCDist, newParmMax, newParmMin) given isprint lines with parameters (gdlatr, gdlonr, galtr, range, az1, az2, el1, el2, <parameter value>)

We only look at the end points of ranges and the station location

  _getWedge 
_getWedge (
        self,
        gdlatr,
        gdlonr,
        galtr,
        range,
        diffRange1,
        diffRange2,
        az1,
        az2,
        el1,
        el2,
        value,
        scanType,
        )

_getWedge returns return a data wedge in the form (dataValue, (point1_x, point1_y), (point2_x, point2_y), (point3_x, point3_y), (point4_x, point4_y)). The x and y dimensions depend on scanType: az: x: lon, y: lat el_lat: x: lat, y: alt el_lon: x: lon, y: alt el_gcdist: x: great circle distance, y: alt

Inputs: gdlatr, gdlonr, galtr - location of radar range, diffRange1, diffRange2 - range of center of wedge, and distance in and out from there az1, az2, el1, el2 - start and end aximuth and elevation. Which is used depends on scanType value - float data value scanType - az, el_lat, el_lon, el_gcdist

  _setLimits 
_setLimits (
        self,
        scanType,
        xMaximum,
        xMinimum,
        yMaximum,
        yMinimum,
        newLonMax,
        newLonMin,
        newLatMax,
        newLatMin,
        newAltMax,
        newGreatCDist,
        newParmMax,
        newParmMin,
        )

_setLimits sets xMaximum, xMinimum, yMaximum, yMinimum based on values found in self._getLimits and scanType. If any value in (xMaximum, xMinimum, yMaximum, yMinimum) is not None, it will not be changed.

  getGreatCircleDist 
getGreatCircleDist (
        self,
        gdlatr,
        glonr,
        gdlat,
        glon,
        )

getGreatCircleDist return the great circle distance in. Taken from madDeriveMethods c code.

Inputs: gdlatr, glonr: reference point on earth's surface gdlat, glon: second point on earth's surface


Table of Contents

This document was automatically generated on Thu Oct 20 16:51:50 2011 by HappyDoc version r1_5