Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

external/CDAWlib/

spectrogram.pro


Routines

top source spectrogram

spectrogram, Z0, X0, Y0, X1, Y1, X2, Y2, colorbar=colorbar, ctitle=ctitle, cscale=cscale, cCharSize=cCharSize, logZ=logZ, logX=logX, logY=logY, center=center, centerX=centerX, centerY=centerY, fillValue=fillValue, Xfillval=Xfillval, Yfillval=Yfillval, maxValue=maxValue, minValue=minValue, nResCol=nResCol, noSkipGaps=noSkipGaps, noYSkipGaps=noYSkipGaps, quick=quick, reduce=reduce, noclip=noclip, status=status, firstplot=firstplot, _Extra=_Extra

NAME: Spectrogram PURPOSE: This function plots a color spectrogram of Z in contiguous or non-contiguous blocks with color Z(i,j) (data Z(i,j) is shown as a box of size Xmin(i):Xmax(i) and Ymin(j):Ymax(j) with color Z(i,j)) CATEGORY: Graphics CALLING SEQUENCE: SPECTROGRAM, Z, [X, Y] SPECTROGRAM, Z, Xmin, Ymin, Xmax, Ymax SPECTROGRAM, Z, Xcenter, Ycenter, Xminus, Yminus, Xplus, Yplus INPUTS: Z: 2-dimensional data array; converted to float or double for NAN use OPTIONAL INPUTS: X: 1-dimensional data array of size Z[*,0] or 2-dim of size Z[*,*] Y: 1-dimensional data array of size Z[0,*] or 2-dim of size Z[*,*] Xmin: 1- or 2- dim array of X values for left side of each data box Ymin: 1- or 2- dim array of Y values for bottom side of each data box Xmax: 1- or 2- dim array of X values for right side of each data box Ymax: 1- or 2- dim array of Y values for top side of each data box Xcenter:1- or 2- dim array of X values for center side of each data box Ycenter:1- or 2- dim array of Y values for center side of each data box Xminus: Xcenter-Xminus defines left side of each data box Yminus: Ycenter-Yminus defines bottom side of each data box Xplus: Xcenter+Xplus defines right side of each data box Yplus: Ycenter+Yplus defines top side of each data box (this allows gaps or overlaps in boxes; if not desired, use Z,X,Y case) KEYWORD PARAMETERS: COLORBAR=colorbar: Switch to create color bar on right CSCALE=cScale: scale for colorbar range [min, max]; sets /colorbar CTITLE=cTitle: String title for colorbar CCHARSIZE=cCharSize: Character size for axis on color bar LOGZ=logZ: Scale Z data and color scale logarithmically LOGX=logX: Scale Y axis logarithmically LOGY=logY: Scale Y axis logarithmically CENTER=center: Center boxes on (X,Y) location (only for 3 parameter case: spectrogram, Z, X, Y, /center) CENTERX=centerX: Center boxes in X direction (only for 3 parameter case: spectrogram, Z, X, Y, /centerX) CENTERY=centerY: Center boxes in Y direction (only for 3 parameter case: spectrogram, Z, X, Y, /centerY) FILLVALUE=fillValue: Z data with this value are ignored YFILLVALUE=YfillValue: Y data with this value are ignored XFILLVALUE=XfillValue: X data with this value are ignored MAXVALUE=maxValue: Max value of data to plot; values above are ignored MINVALUE=minValue: Min value of data to plot; values below are ignored [probably better to use cScale so extremas are colored not ignored] NRESCOL=nResCol: number of colors to reserve outside color table, def=2 NOSKIPGAPS=noSkipGaps: Turns off treating large delta X as missing data and skip; not done anyway if Center option selected #### Also assumes 1-dim X array NOYSKIPGAPS=noYSkipGaps: Turns off treating large delta Y as missing data QUICK=quick: Allow quick and dirty plotting ignoring X and Y sizes (for X and Z plot devices only) REDUCE=reduce: Reduce the number of X values to polyfill to not more than twice the number of pixels across the plot, by sampling every so many values; for non-Postscript devices only; done for speed, alternative to /quick NOCLIP=noclip: Polyfill bug in Z device; defaults to noclip=0 STATUS=status: Return 0 if plot okay, else -1 for an error, status variable must be predefined before call _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 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. Forces input arrays to float or double SUBROUTINES: Calls colorbar.pro, findgaps.pro, align_center.pro PROCEDURE: Uses plot,/nodata to setup the plot area and then uses polyfill to on each data value to color each small square of the spectrogram A colorbar is plotted on the right if cscale is set. EXAMPLE: Create a spectrogram plot of 2 dimensional data Z = dist(50) spectrogram, dist(50), /colorbar spectrogram,dist(50),findgen(50),findgen(50)+1,findgen(50),findgen(50)+1 MODIFICATION HISTORY: Written by: Bobby Candey, NASA GSFC Code 632, 1993 August 27 Robert.M.Candey.1@gsfc.nasa.gov 1993 Nov 9 BC, removed timeaxis call and made more generic 1994 Sept 19 BC, update with documentation and higher level routine 1994 Nov 28 BC, added handling of 2-dim X and Y 1994 Dec 6 BC, merged routines and added center-minus-plus option 1995 April 10 BC, completed initial coding of version 5 1995 Jun 22 BC, added smaller font size for color bar axis 1995 July 26 BC, added cCharSize and reforming 1995 Oct 11 BC, added min/maxValue scaling to bytscl 1996 March 17 BC, added skip over time gaps and added fillValue 1996 March 18 BC, added /reduce for speed plotting 1996 March 25 BC, added noclip keyword for Z device bug with polyfill 1996 April 8 BC, added status keyword and plot a blank on all fill 1996 April 16 BC, moved Cscale to override min/maxValue 1996 April 17 BC, added colorBar switch to allow autoscale 1996 August 28 BC, added save for !p.multi so overplot works 2001 March 7 BC, added centerX/Y, XfillVal, and repaired Yfillval, etc. 2001 March 16 BC, repaired Yfillval, force all to float/double, added checks for NAN 2001 March 20 BC, added noYskipGaps, logX, and rearranged calling sequence for clarity 2001 March 30 BC, added nResCol in place of fixed 2 colors 2001 April 27 BC, added additional fillValue checks and updated alog10(Z) section 2001 August 9 BC, added logY tick sections Copyright 1996-2013 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.

Parameters

Z0
X0
Y0
X1
Y1
X2
Y2

Keywords

colorbar
ctitle
cscale
cCharSize
logZ
logX
logY
center
centerX
centerY
fillValue
Xfillval
Yfillval
maxValue
minValue
nResCol
noSkipGaps
noYSkipGaps
quick
reduce
noclip
status
firstplot
_Extra

File attributes

Modification date: Tue Oct 21 13:53:47 2014
Lines: 489