external/CDAWlib/
auroral_image.pro
Routines
Routines from auroral_image.pro
result = find_valid_edge(arr, ind)
result = doByteScale(Z2, minZ1, maxZ1, Zsize, wBad, flipColorBar, is1dim)
auroral_image, Z, Lon, Lat, centerLonLat=centerLonLat, title=title, centerPole=centerPole, continents=continents, nogrid=nogrid, nLat=nLat, nLon=nLon, rangeLonLat=rangeLonLat, debug=debug, rotation=rotation, nocolorbar=nocolorbar, ctitle=ctitle, cscale=cscale, cCharSize=cCharSize, maxValue=maxValue, minValue=minValue, fillValue=fillValue, logZ=logZ, method=method, slow=slow, status=status, proj=proj, tvscale=tvscale, altitude=altitude, mapColor=mapColor, mapCharSize=mapCharSize, radius=radius, degrees=degrees, noisotropic=noisotropic, mltgrid=mltgrid, fill_cont=fill_cont, _Extra=_Extra
NAME: Auroral_Image PURPOSE: This function plots a 2-dimensional array Z mapped onto a polar projection, with each point mapped to its corresponding Longitude and Latitude (possible to use three 1-dim arrays also) CATEGORY: Graphics CALLING SEQUENCE: AURORAL_IMAGE, Z, Lon, Lat INPUTS: Z: 2-dimensional data array (nLon, nLat) or 1-dimensional (requires Lon and Lat be defined) (currently assumes Z is always positive) OPTIONAL INPUTS: Lon: Corresponding Longitudes for Z, degrees (-180:+180 deg) 1-dimensional data array of size Z(*,0) or 2-dim of size Z(*,*) or 1-dimensional of size Z(*) if Z is 1-dim##### try to handle longitudes 0:360?? Lat: Corresponding Latitudes for Z, degrees (-90:+90 deg) 1-dimensional data array of size Z(0,*) or 2-dim of size Z(*,*) or 1-dimensional of size Z(*) if Z is 1-dim Assumes measurements in Z are centered on Lat, Lon values KEYWORD PARAMETERS: LOGZ=logZ: Scale Z data and color scale logarithmically CENTERPOLE=centerPole: Center on nearest pole (overrides centerLonLat) CENTERLONLAT=centerLonLat: Center of polar plot [Lon, Lat], degrees (if centerPole and centerLonLat not provided, center on middle of image) RANGELONLAT=rangeLonLat: Range of Longitude and Latitude, degrees [minLat, minLon, maxLat, maxLon] (Lat may be >90 or <-90 and Lon may be >180 or <-180 for crossing poles and Dateline) default is to plot the whole sphere (Earth) CONTINENTs=continents: switch to plot continent outlines (requires Lon and Lat in geographic coordinates) TJK added the following on 12/12/2003 for vis lab requirements FILL_CONT=fill continental outlines w/ solid color NOGRID=nogrid: switch to not plot map grid (Lat, Lon lines) default is to plot grid lines (added by request) NLON=nLon: Number of pixels of output image in Longitude dim (def=50) NLAT=nLat: Number of pixels of output image in Latitude dim (def=50) NLon and NLat only used by Map_image and TV MAXVALUE=maxValue: Max value of data to plot; values above are ignored MINVALUE=minValue: Min value of data to plot; values below are ignored FILLVALUE=fillValue: Data with this value are ignored NOCOLORBAR=nocolorbar: Switch to not plot a color bar on right default is to plot colorbar (added by request) CTITLE=ctitle: String title for colorbar CSCALE=cscale: scale for colorbar range [min, max] CCHARSIZE=cCharSize: Character size for axis on color bar ROTATION=rotation: Rotate map, degrees (def=0), positive clockwise TVSCALE=tvScale: Integer scaling factor for TV method only METHOD=method: String indicating which method to plot with: "TV": TV bitmap of Z scaled to color table (no map, no plot) "QUICK": Quick plotting of Z array only (no map) "PLOTS": Use plots command "POLYFILL": Use polyfill "MAPIMAGE": Use map_image and tv (least preferred method) "DILATE": Use convert_coord, dilate and tv "MP": Map Overlay (testing) SLOW=slow: Switch to use bilinear and quintic interpolations (def=0) Only used by Map_image method STATUS=status: Return 0 if plot okay, else -1 for an error, status variable must be predefined before call PROJ=proj: Set map projection; defaults to /satellite 1=stereo, 2=ortho, 3=cone, 4=lamb, 5=gnom, 6=azim, 7=satel, 9=merc, 10=moll, 14=sinu, 15=aitoff Simple cyl proj: 11=8, 12=merc, 13=moll, 18=aitoff use 1, 2, 4, 6, 7 (see IDL manual for more info) ALTITUDE=altitude: Distance from center of sphere in units of sphere's radius (for satellite (7) projection) MAPCOLOR=mapColor: color index for grids and continent overlays; default=white MAPCHARSIZE=mapCharSize: character size for grid numbers; default=1.0 _EXTRA=extra: Any extra parameters to pass on to plot outline Add your own title, xtitle, ytitle May be able to over-ride plot location/size with position DEBUG=debug: switch to print debugging statements NOISOTROPIC=noisotropic: turn off isotropic mapping; default=1 (on) OUTPUTS: No outputs.
Routine details
top source doByteScale
result = doByteScale(Z2, minZ1, maxZ1, Zsize, wBad, flipColorBar, is1dim)
Parameters
- Z2
- minZ1
- maxZ1
- Zsize
- wBad
- flipColorBar
- is1dim
top source auroral_image
auroral_image, Z, Lon, Lat, centerLonLat=centerLonLat, title=title, centerPole=centerPole, continents=continents, nogrid=nogrid, nLat=nLat, nLon=nLon, rangeLonLat=rangeLonLat, debug=debug, rotation=rotation, nocolorbar=nocolorbar, ctitle=ctitle, cscale=cscale, cCharSize=cCharSize, maxValue=maxValue, minValue=minValue, fillValue=fillValue, logZ=logZ, method=method, slow=slow, status=status, proj=proj, tvscale=tvscale, altitude=altitude, mapColor=mapColor, mapCharSize=mapCharSize, radius=radius, degrees=degrees, noisotropic=noisotropic, mltgrid=mltgrid, fill_cont=fill_cont, _Extra=_Extra
NAME: Auroral_Image PURPOSE: This function plots a 2-dimensional array Z mapped onto a polar projection, with each point mapped to its corresponding Longitude and Latitude (possible to use three 1-dim arrays also) CATEGORY: Graphics CALLING SEQUENCE: AURORAL_IMAGE, Z, Lon, Lat INPUTS: Z: 2-dimensional data array (nLon, nLat) or 1-dimensional (requires Lon and Lat be defined) (currently assumes Z is always positive) OPTIONAL INPUTS: Lon: Corresponding Longitudes for Z, degrees (-180:+180 deg) 1-dimensional data array of size Z(*,0) or 2-dim of size Z(*,*) or 1-dimensional of size Z(*) if Z is 1-dim ##### try to handle longitudes 0:360?? Lat: Corresponding Latitudes for Z, degrees (-90:+90 deg) 1-dimensional data array of size Z(0,*) or 2-dim of size Z(*,*) or 1-dimensional of size Z(*) if Z is 1-dim Assumes measurements in Z are centered on Lat, Lon values KEYWORD PARAMETERS: LOGZ=logZ: Scale Z data and color scale logarithmically CENTERPOLE=centerPole: Center on nearest pole (overrides centerLonLat) CENTERLONLAT=centerLonLat: Center of polar plot [Lon, Lat], degrees (if centerPole and centerLonLat not provided, center on middle of image) RANGELONLAT=rangeLonLat: Range of Longitude and Latitude, degrees [minLat, minLon, maxLat, maxLon] (Lat may be >90 or <-90 and Lon may be >180 or <-180 for crossing poles and Dateline) default is to plot the whole sphere (Earth) CONTINENTs=continents: switch to plot continent outlines (requires Lon and Lat in geographic coordinates) TJK added the following on 12/12/2003 for vis lab requirements FILL_CONT=fill continental outlines w/ solid color NOGRID=nogrid: switch to not plot map grid (Lat, Lon lines) default is to plot grid lines (added by request) NLON=nLon: Number of pixels of output image in Longitude dim (def=50) NLAT=nLat: Number of pixels of output image in Latitude dim (def=50) NLon and NLat only used by Map_image and TV MAXVALUE=maxValue: Max value of data to plot; values above are ignored MINVALUE=minValue: Min value of data to plot; values below are ignored FILLVALUE=fillValue: Data with this value are ignored NOCOLORBAR=nocolorbar: Switch to not plot a color bar on right default is to plot colorbar (added by request) CTITLE=ctitle: String title for colorbar CSCALE=cscale: scale for colorbar range [min, max] CCHARSIZE=cCharSize: Character size for axis on color bar ROTATION=rotation: Rotate map, degrees (def=0), positive clockwise TVSCALE=tvScale: Integer scaling factor for TV method only METHOD=method: String indicating which method to plot with: "TV": TV bitmap of Z scaled to color table (no map, no plot) "QUICK": Quick plotting of Z array only (no map) "PLOTS": Use plots command "POLYFILL": Use polyfill "MAPIMAGE": Use map_image and tv (least preferred method) "DILATE": Use convert_coord, dilate and tv "MP": Map Overlay (testing) SLOW=slow: Switch to use bilinear and quintic interpolations (def=0) Only used by Map_image method STATUS=status: Return 0 if plot okay, else -1 for an error, status variable must be predefined before call PROJ=proj: Set map projection; defaults to /satellite 1=stereo, 2=ortho, 3=cone, 4=lamb, 5=gnom, 6=azim, 7=satel, 9=merc, 10=moll, 14=sinu, 15=aitoff Simple cyl proj: 11=8, 12=merc, 13=moll, 18=aitoff use 1, 2, 4, 6, 7 (see IDL manual for more info) ALTITUDE=altitude: Distance from center of sphere in units of sphere's radius (for satellite (7) projection) MAPCOLOR=mapColor: color index for grids and continent overlays; default=white MAPCHARSIZE=mapCharSize: character size for grid numbers; default=1.0 _EXTRA=extra: Any extra parameters to pass on to plot outline Add your own title, xtitle, ytitle May be able to over-ride plot location/size with position DEBUG=debug: switch to print debugging statements NOISOTROPIC=noisotropic: turn off isotropic mapping; default=1 (on) OUTPUTS: No outputs. COMMON BLOCKS: DEVICETYPEC: deviceType Shared with DeviceOpen.pro to allow inverting grayscale Postscript SIDE EFFECTS: Creates plot to screen or file. RESTRICTIONS: Sets a specific X margin to allow for the colorbar. PROCEDURE: Uses map_set, triangulate, trigrid, map_image to map pixels to polar coordinates; TV to display and map routines to draw grids and continents A colorbar is plotted on the right if not /nocolorbar or cscale is set. EXAMPLE: Create a polar plot of 2 dimensional data Z = dist(60), with lat = [findgen(30)+60., 90.-findgen(30)], lon = findgen(60)*6.-180. auroral_image, Z, lon, lat MODIFICATION HISTORY: Written by: Emily A. Greene, Hughes STX, emily@xfiles.gsfc.nasa.gov and Bobby Candey, NASA GSFC Code 632; Robert.M.Candey.1@gsfc.nasa.gov $Id: auroral_image.pro 15739 2014-09-03 22:05:59Z nikos $ 1995 Sept 26 BC, original full copy 1995 Sept 29 BC, beta 1995 Oct 2 BC, beta 2 1995 Nov 3 BC, reversed all Lat and Lon to agree with map_image 1996 April 11 BC, cleanup 1996 April 16 BC, cleanup, add status 1996 April 17 BC, added colorBar to allow autoscale 1996 April 18 BC, added methods 1996 April 19 BC, added projection keyword and rearranged 1996 April 20 BC, added doByteScale function and surface method 1996 July 9 BC, added not_nearby, changed centerLonLat calc. 1996 July 11 BC, fixed polyfill method, added even scale to quick 1996 July 17 BC, cleaned up, added mapColor 1996 Aug 5 BC, added comments and removed old stuff 1996 Aug 6 BC, added dilate method 1997 Jul 18 EAG, added avg function, !MAP changed for IDL5 1997 Aug 6 EAG, added EAG polyfilling method for sparse input image makes circles of radius=radius and removed default circle points if within degrees=degrees of real point 1998 Jan 12 BC, added noisotropic keyword
Parameters
- Z
- Lon
- Lat
Keywords
- centerLonLat
- title
- centerPole
- continents
- nogrid
- nLat
- nLon
- rangeLonLat
- debug
- rotation
- nocolorbar
- ctitle
- cscale
- cCharSize
- maxValue
- minValue
- fillValue
- logZ
- method
- slow
- status
- proj
- tvscale
- altitude
- mapColor
- mapCharSize
- radius
- degrees
- noisotropic
- mltgrid
- fill_cont
- _Extra
File attributes
Modification date: | Tue Oct 21 13:53:48 2014 |
Lines: | 624 |