PA_Pole $SSW/smei/ucsd/sat/idl/toolbox/sun/pa_pole.pro
[Previous] [Next]
 NAME:
	PA_Pole
 PURPOSE:
	Calculate the position angle of the solar north pole
 CATEGORY:
	Astronomy: celestial physics
 CALLING SEQUENCE:
	PA = PA_POLE(T, lngsun=LngSun)
 INPUTS:
	T		array; type: time structure
				times (UT)
	lngsun=LngSun
			array; type: float
				ecliptic longitude of Sun as viewed from observer
 OPTIONAL INPUTS:
	/equatorial		if set, the return value is relative to equatorial
					north (default is ecliptic north)
	/southpole		if set, return values for solar south pole
					(default: solar north pole)
	/degrees		if set, all angles are in degrees (default is radians)
 OUTPUTS:
	PA_POLE	array; type: float
				position angle
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	InitVar, TimeGet, TimeUnit, ToRadians
 PROCEDURE:
	For given time T and ecliptic longitude of the Sun (as seen
	from an observer in the ecliptic plane) the position angle
	of the solar pole is calculated, either relative to ecliptic or to
	equatiorial North.
	See Spherical Astronomy pp. 430-433 by Green, Robin M., Cambridge UP
	(1985) (The position angle is measured counterclockwise, i.e. toward
	the east, from North)
 MODIFICATION HISTORY:
	JUL-1992, Tom Davidson (UCSD/CASS)
	SEP-1992, Paul Hick (UCSD/CASS), converted from F77 to IDL
	FEB-1998, Paul Hick (UCSD/CASSu)
		added keywords /degrees and /southpole
	NOV-1999; Paul Hick (UCSD/CASS, pphick@ucsd.edu); switched to using
		time structures instead of yr,doy


PARSE_OP $SSW/smei/bham/idl/ops/parse_op.pro
[Previous] [Next]
 NAME:
	PARSE_OP


 PURPOSE:
	Convert a description of a set of ops into code and execute it.


 CATEGORY:
	OPS


 CALLING SEQUENCE:
	seq = parse_op(descr)


 INPUTS:
	descr	string	The description of the operation sequence.


 OPTIONAL INPUTS:



 KEYWORD PARAMETERS:
 	/noexec		If specified, then ony generate the code, do
		 	not try to run it. (The CODE key must then be
		 	set).
	code	string	A named variable to contain the IDL code
			generated by parsing the descriptor.
	file	string	A file from which to read the description.
	Name mappings may be given as keys: for example if you have a
	sequence called EVNT, but the descriptor expects SS then the
	key SS=EVNT may be given.	


 OUTPUTS:
	seq	objref	The smei_sequence generated from the descriptor.


 CALLS: ***
	PARSE_OP_TOKEN, READ_SMEI_OP, smei_msg
 CALLED BY:
	SMEI_CALCULATE
 RESTRICTIONS:
	The descriptor argument and the file spec are exclusive.


 MODIFICATION HISTORY:
	Original: 30/10/03; SJT
	Allow passing of remappings, and descriptor as a file:
	4/11/03; SJT
	Fix indexing error that caused complex expressions to fail:
	30/3/04; SJT


PARSE_OP_TOKEN $SSW/smei/bham/idl/ops/parse_op_token.pro
[Previous] [Next]
 NAME:
	PARSE_OP_TOKEN


 PURPOSE:
	Convert an operator toke string from PARSE_OP into idl code.


 CATEGORY:
	OPS


 CALLING SEQUENCE:
	code=parse_op_token(token, index)


 INPUTS:
	token	string	The token (a whitespace separated list of op
			and args)
	index	int	The token index number.


 OUTPUTS:
	code	string	The IDL call generated.


 CALLS: ***
	smei_msg
 CALLED BY:
	PARSE_OP
 MODIFICATION HISTORY:
	Original: 30/10/03; SJT


pcursor [1] $SSW/smei/ucsd/sat/idl/util/pcursor.pro
[Previous] [Next]
 NAME:
	pcursor
 PURPOSE:
	Kludging the IDL CURSOR procedure
 CALLING SEQUENCE:
	pcursor, xp, yp [, /device, /normal, /data, /down]
 INPUTS:
	None
 OUTPUTS:
	xp, yp		coordinates of spin-hair cursor
	!err		= 1/2/4 when left/middle/right button is pushed
	perror		!err value returned by CURSOR procedure
	kludge		if !d.name eq 'TEK' a blank print statement is inserted
				after the call to cursor
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLED BY:
	round1var
 COMMON BLOCKS:
	common	save_pcursor, ginchars
 CALLS: ***
	IsWindowSystem
 PROCEDURE:
 >>	the KLUDGE keyword is required only for EMUTEK at the moment. Without
	the extra print statement the first call to CURSOR will work, but
	all subsequent calls will make EMUTEK get stuck in GIN mode. The
	reason is unclear.

 >>	When using a mouse to select a screen location, the mouse buttons
	should return 1,2 and 4 in the !ERR system variable for left, middle
	and right mouse button (if the mouse has only two buttons use 1 and 2).
	The keys 1,2,3 or a,b,c or A,B,C or CTRL-A,CTRL-B,CTRL-C can be used
	to mimick mouse action, provided the CURSOR procedure puts the ASCII
	decimal equivalent of the corresponding key in the !ERR variable. If
	you get funny characters on the screen and/or you have to press one or
	more keys to return to the IDL prompt, there may be problems with the
	type-ahead buffer (i.e. CURSOR puts more/less characters in the type
	ahead buffer than IDL reads out of it before continuing). Set
	DEVICE,gin_chars=6 and try again.

	X-windows (!d.name = 'X'):
		Should work without any problems
	HDS3200 terminal (!d.name = 'TEK'):
		The mouse button keys should be user defined as <SOH>, <STX>
		and <EOT> for left, middle and right button respectively (the
		corresponding keyboard strokes are CTRL A, CTRL B and CTRL D).
		The error codes returned when pushing a button are the decimal
		equivalent of the first character of the user definition, which
		for the settings given above results 1,2 and 4 for left, middle
		and right button respectively. The IDL CURSOR procedure places
		the user definition of the button in the type-ahead buffer
		(one character in this case).
	VT240 (!d.name = 'REGIS'):
		It worked the last time I tried
 MODIFICATION HISTORY:
	FEB-91, Paul Hick (ARC)


PE_GRID $SSW/smei/bham/idl/utils/pe_grid.pro
[Previous] [Next]
 NAME:
	PE_GRID


 PURPOSE:
	Add a grid of elongation and position angle to a SMEI
	aitoff plot


 CATEGORY:
	utils


 CALLING SEQUENCE:
	pe_grid[, delong, dpa]


 OPTIONAL INPUTS:
	delong	int	The step in elongation angle.
	dpa	int	The step in position angle.


 KEYWORD PARAMETERS:
	/label			If set, then label the grid.
	charsize	Float	Set a size for the labels (ignored if
				label is not set.
	Any key accepted by PLOTS will be passed through.

 CALLS: ***
	AITOFF, AITOFF_GRID, QD_ELONG, QD_POSANG
 RESTRICTIONS:
	Steps will be rounded to the nearest whole degree, PA=0 and 90
	will always be drawn.

 MODIFICATION HISTORY:
	Original: 17/6/03; SJT
	Add delong and dpa arguments: 24/7/03; SJT


plot3darc $SSW/smei/ucsd/sat/idl/toolbox/tricks/plot3darc.pro
[Previous] [Next]
 NAME:
	plot3darc
 PURPOSE:
	Plot an arc in a 3d geometry (with optional label)
 CATEGORY:
	Tricks
 CALLING SEQUENCE:
	plot3darc, center, nn1, nn2 [, arcbegin, arclength, degrees=degrees,	$
		color=color, tiplen=tiplen, tipwid=tipwid, 		$
		labeltext=labeltext, labelradius=labelradius, labeloffset=labeloffset]
 INPUTS:
	center		array[3]; type: int or float
					Cartesian coordinates of center of arc
	nn1, nn2	array[3]; type: int or float
					Cartesian coordinates defining plane in which arc is to be drawn
		The arc is drawn in one of two ways:
		1.	if arcbegin and arclength both specified:
			nn1 is intepreted as 'x-axis', nn2 as y-axis; the arc is drawn by connecting points
				center+(nn1*cos(angle)+nn2*sin(angle)) where angle covers [arcbegin,arcbegin+arclength]
				In this case n1 and n2 usually will be two perpendicular vectors
		2.	if either arcbegin or arclength not specified
				nn1 and nn2 are connected by arc
 OPTIONAL INPUT PARAMETERS:
	arcbegin	scalar; type: int or float
					phase angle for the starting point of the arc in the [nn1,nn2] plane
	arclength	scalar; type: int or float
					length of the arc
	/degrees	if set, arcbegin and arclength are assumed to be in radians

	color=color	if set, the area between the center and the arc is shaded with the specfied color

	tiplen=tiplen			keyword passed to arrow3d
	tipwid=tipwid			keyword passed to arrow3d
				if one of these keywords is set the end point of the arc (at nn2) receives an
				3D arrow point

	labeltext=labeltext
				scalar; type: string
					string to plotted somewhere near the arc. The following three keywords are only used
					if labeltext is provided:
	labelradius=labelradius
				scalar; type: int or float
					as a first approximation the string is plotted near the middle of the arc
					between nn1 and nn1 at a distance of labelradius times the radius of the arc.
					Usually labelradius is somewhat greater than one.
	labeloffset=labeloffset
				array[2]; type: int or float
					adjustment to the position of labeltext in x and y data coordinates
					This is usually to manually tweak the position determined with labelradius
					(depending on the !p.t matrix the computed position can be awkward).
 OUTPUTS:
	circle=circle
				array[3,361]; type: float
					3D-coordinates of point along arc. If this keyword is present
					then nothing is plotted.
 INCLUDE:
	@compile_opt.pro				; On error, return to caller
 CALLS: ***
	InitVar, IsType, SuperArray, ToRadians, arrow3d, gridgen, plot3dtext, vectorproduct
 CALLED BY:
	PlotSolarDisk, even_light_figures, qvu_draw
 SEE ALSO:
	setup3d
 RESTRICTIONS:
	A proper !p.t matrix must be set up (e.g. with setup3d)
 PROCEDURE:
 MODIFICATION HISTORY:
	AUG-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


plot3dcube $SSW/smei/ucsd/sat/idl/toolbox/tricks/plot3dcube.pro
[Previous] [Next]
 NAME:
	plot3dcube
 PURPOSE:
	Plot 3D cube with optional label
 CATEGORY:
 CALLING SEQUENCE:
	plot3dcube, r0, r1 [, linestyle=linestyle, thick=thick,	$
		labeltext=labeltext, labeldist=labeldist, labeloffset=labeloffset, charsize=charsize, charthick=chartick]
 INPUTS:
	r0, r1		array[3]; type: int of float
					rectangular coordinates for begin and end point of line (in data coordinates)
 OPTIONAL INPUT PARAMETERS:
	linestyle=linestyle, thick=thick
					IDL keywords passed to plots, /t3d command for drawing line
	tiplen=tiplen, tipwid=tipwid, color=color
					keywords passed to arrow3d. If either tiplen or tipwid is set then arrow3d is called
					to add a 3D arrow point to the end of the line (at r1 side)
	labeltext=labeltext
				scalar; type: string
					label to plotted near axis (usually near the end r1)

	There are two keywords to determine label placement:

	labeldist=labeldist
				scalar; type: int or float
					labeldist is a distance (in data coordinates) along the line from r0 to r1 where the label
					is placed. Since this placement sometime looks messy when a strange 3D transformation
					is in effect, labeloffset
	labeloffset=labeloffset
				array[2]; type: int or float
					adjustment to the position of labeltext in x and y data coordinates
					This is usually used to manually tweak the position determined with labeldist
					(depending on the !p.t matrix the computed position can be awkward).
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	InitVar, IsType, plot3dtext
 PROCEDURE:
 MODIFICATION HISTORY:
	APR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


plot3dline $SSW/smei/ucsd/sat/idl/toolbox/tricks/plot3dline.pro
[Previous] [Next]
 NAME:
	plot3dline
 PURPOSE:
	Plot line ('axis') in 3D with optional label
 CATEGORY:
	Tricks
 CALLING SEQUENCE:
	plot3dline, r0, r1 [, linestyle=linestyle, thick=thick,	$
		labeltext=labeltext, labeldist=labeldist, labeloffset=labeloffset, charsize=charsize, charthick=chartick]
 INPUTS:
	r0, r1		array[3]; type: int or float
					rectangular coordinates for begin and end point of line (in data coordinates)
 OPTIONAL INPUT PARAMETERS:
	tiplen=tiplen, tipwid=tipwid, color=color
					keywords passed to arrow3d. If either tiplen or tipwid is set then arrow3d is called
					to add a 3D arrow point to the end of the line (at r1 side)
	labeltext=labeltext
				scalar; type: string
					label to be plotted near axis (usually near the end r1)

	There are two keywords to determine label placement:

	labeldist=labeldist
				scalar; type: int or float
					labeldist is a distance (in data coordinates) along the line from r0 to r1 where the label
					is placed. Since this placement sometime looks messy when a strange 3D transformation
					is in effect, labeloffset
	labeloffset=labeloffset
				array[2]; type: int or float
					adjustment to the position of labeltext in x and y data coordinates
					This is usually used to manually tweak the position determined with labeldist
					(depending on the !p.t matrix the computed position can be awkward).
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	InitVar, IsType, arrow3d, plot3dtext
 CALLED BY:
	even_light_figures, qvu_draw
 PROCEDURE:
 MODIFICATION HISTORY:
	AUG-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


plot3dtext $SSW/smei/ucsd/sat/idl/toolbox/tricks/plot3dtext.pro
[Previous] [Next]
 NAME:
	plot3dtext
 PURPOSE:
	Plots a text string at a 3D location
 CATEGORY:
	Tricks
 CALLING SEQUENCE:
	plot3dtext, pos, labeltext, labeloffset=labeloffset
 INPUTS:
	pos			array[3]; type: int or float
					rectangular coordinates for positioning string (in data coordinates)
	labeltext	scalar; type: string
					label to be plotted
 OPTIONAL INPUT PARAMETERS:
	labeloffset=labeloffset
				array[2]; type: int or float
					adjustment to the position of labeltext in x and y data coordinates
					This is usually used to manually tweak the position determined with labeldist
					(depending on the !p.t matrix the computed position can be awkward).
 OUTPUTS:
	(none)
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	InitVar, coord3to2
 CALLED BY:
	PlotSolarDisk, even_light_figures, plot3darc, plot3dcube, plot3dline
 PROCEDURE:
 MODIFICATION HISTORY:
	APR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


PLOT_ENV $SSW/smei/bham/idl/utils/plot_env.pro
[Previous] [Next]
 NAME:
	PLOT_ENV


 PURPOSE:
	Save and restore plotting environments


 CATEGORY:
	Utilities


 CALLING SEQUENCE:
	plot_env, [/save|/restore]


 KEYWORD PARAMETERS:
	/save		If set, then save the current environment
	/restore	If set, then restore the saved environ


 COMMON BLOCKS:
	smei_plot_common


 SIDE EFFECTS:
	The 4 plot environment system variables are changed or saved.


 RESTRICTIONS:
	If it gets used in a nested way it will get confused. If
	neither key is given it silently does nothing at all.


 MODIFICATION HISTORY:
	Original: 13/6/03; SJT


PlotCurve $SSW/smei/ucsd/gen/idl/toolbox/graphics/plotcurve.pro
[Previous] [Next]
 NAME:
	PlotCurve
 PURPOSE:
	(Over)plot two arrays x, y. Connect only `valid' points.
 CALLING SEQUENCE:
	PlotCurve, x,y [,nvalid, /oplot,linestyle=linestyle]
 INPUTS:
	x,y		one-dimensional arrays; must have the same size
	nvalid	identifies the array elements to be plotted as:
			- an array of indices e.g. [0,1,2,7,8,9,10]
			- a boolean array (containing only values 0 or 1)
			of same size as x and y, e.g. [1,1,1,0,0,0,0,1,1,1,1]
			if nvalid is absent, all finite function values are plotted
 OPTIONAL INPUT PARAMETERS:
	/oplot	if not set, then a new plot (with a new x-axis) is started)
				(implicitly /newaxis is set and yaxis=-1, i.e. a y-axis
				will be drawn on the left)
			if set, then the arrays are overplotted on a previous plot
				(the keywords /newyaxis and yaxis=yaxis can be used to add
				additional y axes, if necessary)
	/newyaxis
			adds a new yaxis (if /oplot is NOT set, then /newaxis is assumed set)
	yaxis=yaxis
			controls the position of a new y axis; yaxis is used only if /newaxis is set
			yaxis=-1 : y-axis on left (default)
			yaxis=0	 : y-axis on right
			0<yaxis<1: y-axis is placed in the right margin
						(if this is used then ymargin must be made big enough
						to hold the extra y axis).
	IDL plot keywords:
		xmargin, ymargin		used only to start a new plot (/oplot NOT set)
		yrange, ynozero			used only if new y-axis is plotted
								(/oplot NOT set, or /newaxis set)
								ynozero is NOT used if yrange is specified
		linestyle, xtitle, ytitle, psym, charsize
 INCLUDE
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	InitVar, IsTime, IsType, TimeOp, TimeXAxis
 CALLED BY:
	InSitu, PlotEarthSkymap, PlotPolarSkymap, eclipsed_area, even_light_registration
	jpl_test, qLine_Curve, smei_frm_summary, smei_hdr_plot, vu_insitucurve
 RESTRICTIONS:
	There still seems to be a problem with the axis plotting: once a log axis has been
	plotted all added curves will also have a logarithmic scale, i.e. ylog=0 setting does not
	have any effect. This appears to be a bug in the IDL axis routine.
 PROCEDURE:
>	Only valid data points are connected by the type of line specified
	by the linestyle keyword.
>	Valid data points are identified in the nvalid array either by their
	array index or by a boolean value of 1.
 MODIFICATION HISTORY:
	APR-1996, Paul Hick (UCSD/CASS)
	OCT-1999, Paul Hick (UCSD/CASS)
		if nvalid is not specified only finite y-values (finite(y) = 1) are
		plotted, instead of all points
	FEB-2001, Paul Hick (UCSD/CASS)
		Fixed minor bug in handling of invalid data points.
	FEB-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Fixed bug for call with a time array as x-array when the time origin is not yet
		defined


PlotEarthSkymap $SSW/smei/ucsd/sat/idl/toolbox/graphics/plotearthskymap.pro
[Previous] [Next]
 NAME:
	PlotEarthSkymap
 PURPOSE:
	Plot sky map, with locations of point sources overplotted (optional)
 CATEGORY:
	www
 CALLING SEQUENCE:
	PRO PlotEarthSkymap, UT, RA, DEC, F, $
		equator 	= equator		, $
		maxelo		= maxelo		, $
		geolng		= geolng		, $
		degrees 	= degrees		, $
		mirror		= mirror		, $
		breakval	= BreakVal		, $
		log 		= log			, $
		charsize	= charsize		, $
		title		= title 		, $
		upto		= upto			, $
		scale		= scale 		, $
		minelo		= minelo		, $
		zero_point	= zero_point	, $
		zero_phase	= zero_phase	, $
		dabg		= dabg			, $
		format		= format		, $
		fill2edge	= fill2edge 	, $
		_extra		= _extra		, $
		galactic	= galactic		, $
		silent		= silent		, $
		goodcolor	= goodcolor 	, $
		badcolor	= badcolor		, $

		sn_position = sn_position	, $
		we_position = we_position	, $
		ut_position = ut_position	, $
		user_position=user_position , $
		user_string = user_string	, $

		point_sources=point_sources , $
		point_names = point_names	, $
		point_size	= point_size	, $
		point_onesize=point_onesize , $

		position	= position		, $
		legend		= legend		, $
		compass 	= compass		, $
		max_dec 	= max_dec		, $
		ra_step 	= ra_step		, $
		dec_step	= dec_step
 INPUTS:
	UT			scalar; type: standard time structure
					time; determines position of Sun in the sky
	RA			array[n]; type: float
					array of ecliptic longitudes or right ascensions
					(if /equator set) in the range [-180,+180]
					(values are mapped into this range if they are not)
	DEC			array[m]; type: float
					array of ecliptic latitudes or declinations
					(if /equator is set) in the range [-90,90]
	F			array[n,m]; type: float
					array of function values in sky map; each function value
					refers to bin on the sky. The edges of the skybin are
					specified in RA and DEC
 OPTIONAL INPUT PARAMETERS:
	breakval	array[*]; type: integer or float
					levels between colors (passed to ColorSkybox)
					if not set, a set of break values is calculated
					equally spaced between minimum and maximum
	/log		if set, changes to logarithmic scale
	/degrees	if set, indicates that all angles are in degrees
					Default: radians.
	maxelo		scalar; type: float
					used to decide on map projection
					> 0: fish-eye map out to elongation 'maxelo'
					= 0: Mercator projection (similar to synoptic map)
					< 0: Hammer-Aitoff projection
					if absent then a Hammer-Aitoff map is drawn
	minelo		scalar; type: float
					Erases plot inside of minelo
	/equator	if set, the 'horizontal' in the sky map is parallel to the
					equatorial plane. By default the horizontal is along the ecliptic
	upto=upto	scalar; type: integer; default: TimeUnit(/hour)
					controls the length of the UT string plotted
	scale=scale	scalar; type: float; default: 1.0
					controls the overall size of the skymap relative to the plot window
	/galactic	if set, add a line for the galactic plane

	goodcolor = goodcolor
				scalar; type: integer; default: !d.n_colors-1
	badcolor  = badcolor
				scalar; type: integer; default: !p.color

	sn_position=sn_position
				array[4]; type: real
					Pairs of x,y coordinates for shifts of South/North labels
					Units are percentages of the window size
	we_position=we_position
				array[4]; type: real
					Pairs of x,y coordinates for shifts of East/West labels
	ut_position=ut_position
				array[2]; type: real
					x,y coordinates for shifts of UT time label

	user_string=user_string
				scalar; type: string
					User specified string to be plotted
	user_position=user_position
				array[2]; type: real
					Position of user string in normal coordinates

	point_sources=point_sources
				array; type: sky_point_source structure
					contains information about point sources to be overplotted
					on the skymap. See vu_point_source.
	/point_names
				if set, then the names of the point sources are plotted

	point_size=point_size
				scalar or array[2]; controls the size of the circles used to plot the
				point source position. The size is specified in radians or degrees
				(depending on setting of /degrees).

				point_size[0]: minimim size of circle.
				point_size[1]: increment in circle size per unit of the function
					value in skymap F.

				point_size[1] is used to increase the circle size proportional to
				the difference between the point source fnc value and the value in
				the skymap F.

				If point_size[1] is not set bad (and /point_onesize is NOT set)
				then only sources with valid function values will be plotted.
				(I.e. to plot only good sources with the same cirle size set
				point_size[1] to zero.)

				If point_size[1] is bad or omitted then /point_onesize is assumed set.

	/point_onesize
				if set then all sources (including those with bad fnc values)
				are plotted with the same size circle point_size[0].
				This is useful to override the information stored
				in 'point_sources' or in keyword element point_size[1].

				If only IPS sources are plotted (i.e. if no skymap F is specified) then
				setting /point_onesize will plot all source position with the same size.

	The following three keywords are clumsy to use. The idea is to control the orientation
	of the map (i.e. direction of origin, and tilt of horizontal on sky).
	vu_earthskymap uses these keywords to set up sky 'snapshots' and sky 'sweeps'.

	dabg		array[3]; type: float; default: [0,0,0]
					(used by the projection functions FishEye, HammerAitoff and
					MercatorProj, either directly in this procedure or indirectly in
					ColorSkybox)

	zero_point	scalar; type: float; default: centered on Sun
					(used internally and passed to FishEye, HammerAitoff and MercatorProj)
					Defines the longitude or RA of the center of the FishEye,HammerAitoff
					or Mercator map.

	zero_phase	scalar, or array with same structure as 'RA'; type: float; default: zero_point
					(passed to ColorSkybox)
					ColorSkybox uses this keyword to rearrange its first three arguments
					(RA,DEC and fnc-values) to put zero_phase in the center of the map.
					This modifies input arrays RA and DEC, but not F.
					zero_phase is not used if F does not exist on input, i.e. if only point
					sources are plotted (in this case the RA and DEC arrays don't exist either).

	For sky 'snapshots' zero_phase is the same as zero_point.
	For sky 'sweeps' zero_phase is a monotonic array with a value for each sweep, and
	the value of 'zero_point' (almost) exactly in the center of 'zero_phase'. Note that
	inconsistent settings of zero_point and zero_phase make an incorrect map.
 OUTPUTS:
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	AngleRange, BadValue, ColorSkybox, CvSky, Elongation, EulerRotate, FishEye
	GeographicInfo, GetColors, HammerAitoff, INTERPOL, InitVar, IsType, MercatorProj
	PlotCurve, TimeString, TimeUnit, ToDegrees, ToRadians, anicenum, big_eph, gridgen
	jpl_body, vu_point_source
 CALLED BY:
	smei_sky, vu_earthskymap
 SEE AlSO:
	ips_point_source__define
 PROCEDURE:
 >	Time UT is needed to calculate the location of equator and ecliptic
 >	The ecliptic is drawn on an equatorial skymap and v.v
 >	Longitude/RA is plotted increasing right-to-left across the map
	(as it is for a viewer at Earth looking up at the sky). For sun-centered maps
	this means that east is left and west is right. A mirror image of the map
	can be made by setting keyword /mirror.
 > The data range for the horizontal axis is -180,+180 degrees relative to
	'zero_point' as needed for the Hammer-Aitoff and fisheye projections. I.e.
	longitude/RA 'zero_point' will appear at the center of the map.
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS)
	FEB-2002, Paul Hick (UCSD/CASS)
		Added option to plot a sky map in Mercator projection by setting maxelo=0.
	APR-2002, Paul Hick (UCSD/CASS)
		Added /fill2edge keyword (passed to ColorSkybox)
	SEP-2003, Paul Hick (UCSD/CASS)
		Minor tweaking of labels to get Mercator projection to look better
		Added /galactic keyword.
	AUG-2004, Paul Hick (UCSD/CASS)
		Started adding some code to deal with Thomson scattering brightness
		(mainly for overplotting point sources).
		The time plotted at the top is now rounded instead of truncating
		to timeunit 'upto'.
	SEP-2004, Paul Hick (UCSD/CASS)
		For fisheye plots point sources with outside maxelo are not plotted anymore
		Reworked the determination of the circle sizes for the point sources, and
		added some keywords to control them.
	SEP-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Modified default for zero_point. Was zero, now is ecliptic longitude/RA
		of Sun. This automatically centers the Sun if only point sources are
		plotted (as by vu_NagoyaSourcemap).


PlotPlanarCut $SSW/smei/ucsd/sat/idl/toolbox/graphics/plotplanarcut.pro
[Previous] [Next]
 NAME:
	PlotPlanarCut
 PURPOSE:
	Plot map of solar disk
 CATEGORY:
	sat/idl/toolbox/graphics
 CALLING SEQUENCE:
	PRO PlotPlanarCut, zz, ut=ut	, $
		radius		= radius		, $
		euler_angles= euler_angles	, $
		degrees 	= degrees		, $
		euler_info	= euler_info	, $
		breakval	= breakval		, $
		title		= title 		, $
		upto		= upto			, $
		body		= body			, $
		_extra=_extra
 INPUTS:
	zz				array[n,n]; type: float
						function value on disk
	ut=ut			array[1]; type: time structure
						UT time used for ephemeris calculation
 OPTIONAL INPUT PARAMETERS:
	upto=upto		scalar; type: integer; default: none
						return value of TimeUnit function.
						The 'ut' time is plotted in the upper right
						corner using TimeString. The 'upto' keyword
						determines at which time unit the string
						is terminated.
	radius=radius	scalar; type: float; default: 1.0
						radius of circular planar cut (in AU)
	body=body		scalar or array; type: string
						names of bodies to be plotted
						If trailing char is '&'
						then the orbit is also plotted
	euler_angles=euler_angles
	/degrees		if set, angles are in degrees
						default is radians
	euler_info=euler_info
	title=title 	scalar; type: string
						string plotted in lower-left corner
	breakval=breakval
					array; type: integer or float
						contour levels passed to GetColors
	_extra=_extra	additional plot keywords
 OUTPUTS:
	(plot)
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	EulerRotate, GetColors, InitVar, IsType, REVERSE, TimeString, big_body, big_eph
	big_orbit, gridgen, setup3d
 CALLED BY:
	vu_planarcut
 SEE ALSO:
 PROCEDURE:
 MODIFICATION HISTORY:
	JUN-2006, Paul Hick (UCSD/CASS)
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Replaced jpl_eph and jpl_orbit calls by big_eph
		and big_orbit calls.


PlotPolarSkymap $SSW/smei/ucsd/sat/idl/toolbox/graphics/plotpolarskymap.pro
[Previous] [Next]
 NAME:
	PlotPolarSkymap
 PURPOSE:
	Plot sky map in polar projection, with locations of point sources overplotted (optional)
 CATEGORY:
	gen/idl/graphics
 CALLING SEQUENCE:
	PRO PlotPolarSkymap, UT, cosRA, sinRA, F,	$
		equator 	= equator	, $
		geolng		= geolng	, $
		degrees 	= degrees	, $
		breakval	= BreakVal	, $
		log 		= log		, $
		charsize	= charsize	, $
		title		= title 	, $
		upto		= upto		, $
		scale		= scale 	, $
		minelo		= minelo	, $
		zero_point	= zero_point, $
		zero_phase	= zero_phase, $
		dabg		= dabg		, $
		format		= format	, $
		fill2edge	= fill2edge , $
		_extra		= _extra	, $
		galactic	= galactic	, $
		silent		= silent	, $

		point_sources=point_sources,$
		point_names = point_names  ,$
		point_size	= point_size   ,$
		point_onesize=point_onesize,$

		mirror		= mirror	, $
		noerase 	= noerase	, $
		xrange		= xrange	, $
		yrange		= yrange	, $
		position	= position	, $
		legend		= legend	, $
		dec_step	= dec_step	, $
		ra_step 	= ra_step	, $

		ra_position = ra_position
 INPUTS:
	UT			scalar; type: standard time structure
					time; determines position of Sun in the sky
	cosRA		array[n]; type: float
				+/- (90-DEC)*cos(RA)
					array of ecliptic longitudes or right ascensions
					(if /equator set) in the range [-180,+180]??NOT REALLY??
	sinRA		array[m]; type: float
				+/- (90-DEC)*sin(RA)
					array of ecliptic latitudes or declinations
					(if /equator is set) in the range [-90.90]
	F			array[n,m]; type: float
					array of function values in sky map; each function value
					refers to bin on the sky. The edges of the skybin are
					specified in RA and DEC
 OPTIONAL INPUT PARAMETERS:
	breakval	array[*]; type: integer or float
					levels between colors (passed to ColorSkybox)
					if not set, a set of break values is calculated
					equally spaced between minimum and maximum
	/log		if set, changes to logarithmic scale
	/degrees	if set, indicates that all angles are in degrees
					Default: radians.
	minelo		scalar; type: float
					Erases plot inside of minelo
	/equator	if set, the 'horizontal' in the sky map is parallel to the
					equatorial plane. By default the horizontal is along the ecliptic
	upto=upto	scalar; type: integer; default: TimeUnit(/hour)
					controls the length of the UT string plotted
	scale=scale	scalar; type: float; default: 1.0
					controls the overall size of the skymap relative to the plot window
	/galactic	if set, add a line for the galactic plane

	point_sources=point_sources
				array; type: sky_point_source structure
					contains information about point sources to be overplotted
					on the skymap. See vu_point_source.
	/point_names
				if set, then the names of the point sources are plotted

	point_size=point_size
				scalar or array[2]; controls the size of the circles used to plot the
				point source position. The size is specified in radians or degrees
				(depending on setting of /degrees).

				point_size[0]: minimim size of circle.
				point_size[1]: increment in circle size per unit of the function
					value in skymap F.

				point_size[1] is used to increase the circle size proportional to
				the difference between the point source fnc value and the value in
				the skymap F.

				If point_size[1] is not set bad (and /point_onesize is NOT set)
				then only sources with valid function values will be plotted.
				(I.e. to plot only good sources with the same cirle size set
				point_size[1] to zero.)

				If point_size[1] is bad or omitted then /point_onesize is assumed set.

	/point_onesize
				if set then all sources (including those with bad fnc values)
				are plotted with the same size circle point_size[0].
				This is useful to override the information stored
				in 'point_sources' or in keyword element point_size[1].

				If only IPS sources are plotted (i.e. if no skymap F is specified) then
				setting /point_onesize will plot all source position with the same size.

	The following three keywords are clumsy to use. The idea is to control the orientation
	of the map (i.e. direction of origin, and tilt of horizontal on sky).
	vu_earthskymap uses these keywords to set up sky 'snapshots' and sky 'sweeps'.

	dabg		array[3]; type: float; default: [0,0,0]
					(used by the projection functions FishEye, HammerAitoff and
					MercatorProj, either directly in this procedure or indirectly in
					ColorSkybox)

	zero_point	scalar; type: float; default: 0.0
					(used internally and passed to FishEye, HammerAitoff and MercatorProj)
					Defines the longitude or RA of the origin.

	zero_phase	scalar, or array with same structure as 'RA'; type: float; default: zero_point
					(passed to ColorSkybox)
					ColorSkybox uses this keyword to rearrange its first three arguments
					(RA,DEC and fnc-values) to put zero_phase in the center of the map.
					This modifies input arrays RA and DEC, but not F.

	For sky 'snapshots' zero_phase is the same as zero_point.
	For sky 'sweeps' zero_phase is a monotonic array with a value for each sweep, and
	the value of 'zero_point' (almost) exactly in the center of 'zero_phase'. Note that
	inconsistent settings of zero_point and zero_phase make an incorrect map.
 OUTPUTS:
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	AngleRange, BadValue, ColorSkybox, CvSky, FishEye, GeographicInfo, GetColors
	HammerAitoff, INTERPOL, InitVar, IsType, MercatorProj, PlotCurve, TimeString, TimeUnit
	ToDegrees, ToRadians, anicenum, big_eph, gridgen, jpl_body, vu_point_source
 CALLED BY:
	smei_sky
 SEE AlSO:
	ips_point_source__define
 PROCEDURE:
 >	Time UT is needed to calculate the location of equator and ecliptic
 >	The ecliptic is drawn on an equatorial skymap and v.v
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS)
	FEB-2002, Paul Hick (UCSD/CASS)
		Added option to plot a sky map in Mercator projection by setting maxelo=0.
	APR-2002, Paul Hick (UCSD/CASS)
		Added /fill2edge keyword (passed to ColorSkybox)
	SEP-2003, Paul Hick (UCSD/CASS)
		Minor tweaking of labels to get Mercator projection to look better
		Added /galactic keyword.
	AUG-2004, Paul Hick (UCSD/CASS)
		Started adding some code to deal with Thomson scattering brightness
		(mainly for overplotting point sources).
		The time plotted at the top is now rounded instead of truncating
		to timeunit 'upto'.
	SEP-2004, Paul Hick (UCSD/CASS)
		For fisheye plots point sources with outside maxelo are not plotted anymore
		Reworked the determination of the circle sizes for the point sources, and
		added some keywords to control them.
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Replaced NewcombSun by big_eph calls


PlotSolarDisk $SSW/smei/ucsd/sat/idl/toolbox/graphics/plotsolardisk.pro
[Previous] [Next]
 NAME:
	PlotSolarDisk
 PURPOSE:
	Plot map of solar disk
 CATEGORY:
 CALLING SEQUENCE:
	PRO PlotSolarDisk, zz, ut=ut,	$
		radius	= radius	, $
		diameter= diameter	, $
		breakval= breakval	, $
		xysize	= xysize	, $
		title	= title		, $
		upto	= upto		, $
		rotate	= rotate	, $
		earth	= earth		, $
		_extra	= _extra
 INPUTS:
	zz				array[diameter,diameter]; type: float
						function value on disk
 OPTIONAL INPUT PARAMETERS:
	rotate=rotate	array[3,*]
						sets of rotations needed to rotate
						from x-y-z to heliographic coordinates
	ut = ut
	diameter=diameter
					scalar; type: integer; default: 0.8*!d.x_size
						diameter of disk in pixels
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	CvT3d, GetColors, InitVar, IsType, REVERSE, TimeString, big_eph, gridgen, jpl_body
	plot3darc, plot3dtext, setup3d, vectorproduct
 CALLED BY:
	vu_solardisk
 SEE ALSO:
 PROCEDURE:
 MODIFICATION HISTORY:
	AUG-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


PlotSynopticMap $SSW/smei/ucsd/sat/idl/toolbox/graphics/plotsynopticmap.pro
[Previous] [Next]
 NAME:
	PlotSynopticMap
 PURPOSE:
	Plot synoptic map
 CATEGORY:
	WWW: graphics
 CALLING SEQUENCE:
	PRO PlotSynopticMap, XCplot, Map, $	
		XCmap	= XCmap		, $
		YLmap	= YLmap		, $
		YLshow	= YLshow	, $
		YLplot	= YLplot	, $
		degrees	= degrees	, $
		breakval= breakval	, $
		plotcenter=plotcenter,$
		plotsize= plotsize	, $
		fill	= fill		, $
		grid	= grid		, $
		draw_contour=draw_contour, $
		timeaxis= timeaxis	, $
		_extra	= _extra
 INPUTS:
	XCplot			scalar or array[2]; type: float
						start and end Carrington variable to be displayed
						if a scalar is specified this is used as start value, and the end
						value is set to the start value, plus one (i.e. one rotation
						is assumed)
	Map				2D array; any type

 OPTIONAL INPUT PARAMETERS:
	xcmap=XCmap		array[2]; type: float; default: XCplot
						range of Carrington variable of input array Map
	ylmap=YLmap		array[2]; type: float; default: [-90,90] degrees
						latitude range of input array Map
	ylplot=YLplot	array[2]; type: float: default: ylmap
						latitude range covered by vertical axis
	ylshow=YLshow	array[2]; type: float: default: ylplot
						latitude range of input map actually shown on plot
	/degrees		scalar; type: integer; default:0 (radians)
						if set YLmap should be in degrees
	plotcenter=plotcenter
					array[2]; type: integer; default: [!d.x_size,!d.y_size]/2
						pixel coordinates for center of map
	plotsize=plotsize
					array; type: integer; default: 0.8*plotcenter[0]
						size of map in pixels

	breakval=breakval
					array[*]; type: float
						contour levels used to plot map
	/draw_contour	if set then the IDL 'contour' function is used to plot
						the map instead of the 'tv' function

	/fill			if set then 'map_grid' is called to fill in bad values
						before plotting the map
	/grid			if set then the grid of the input map is marked by
						putting crosses at the corners of grid squares.
	timeaxis=timeaxis	if set, adds a time axis at the top of the map, specifying the time at
				    which the corresponding heliographic longitude crossed the
				    central meridian on the solar disk
 OUTPUTS:
	(none)
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], CarringtonT, GetColors, InitVar, IsType, MEAN
	REVERSE, TimeUnit, TimeXAxis, ToDegrees, ToRadians, gridfill, gridgen
 CALLED BY:
	nso_fe_plot, vu_synopticmap
 PROCEDURE:
 MODIFICATION HISTORY:
	APR-1999, Paul Hick (UCSD/CASS)
	FEB-2002, Paul Hick (UCSD/CASS)
		Added xsize and ysize keywords to 'tv' call. This is needed for
		devices with scalable pixels, such as PS.
	JUL-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added 'timeaxis' keyword to add a time axis
		at top of map. This was always done before.


put_logo $SSW/smei/ucsd/sat/idl/util/put_logo.pro
[Previous] [Next]
 NAME:
	put_logo
 PURPOSE:
	Adds logo to image
 CATEGORY:
	sat/idl/util
 CALLING SEQUENCE:
	PRO put_logo, img, logo=logo
 INPUTS:
 OPTIONAL INPUT PARAMETERS:
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	IsType, img_read
 CALLED BY:
	Get_Page
 PROCEDURE:
 MODIFICATION HISTORY:
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


PutFileSpec $SSW/smei/ucsd/gen/idl/toolbox/files/putfilespec.pro
[Previous] [Next]
 NAME:
	PutFileSpec
 PURPOSE:
	Updates internal data originally set up by SetFileSpec
 CATEGORY:
	I/O, string manipulation
 CALLING SEQUENCE:
	PRO PutFileSpec, FileSpec, from=From, upto=Upto, part=Part, parse=Parse
 INPUTS:
	FileSpec	string scalar of array with file names
			If it is an array it should have the same
			# elements as the internal data.
 OPTIONAL INPUT PARAMETERS:
	From, UpTo	string scalars
			Any of the following six strings can be used:
			'NODE','DEVICE','DIRECTORY','NAME','TYPE','VERSION'
			The input is case-insensitive
			Only a unique starting substring has to be specified
			If From is not specified, From='NODE' is assumed
			If UpTo is not specified, UpTo='VERSION' is assumed
	/parse		if set, the filenames are parsed before adding them
			to the internal data (/parse is passed to SetFileSpec;
			see that procedure for more information about parsing).
 OUTPUTS:
	None (the modified internal data are accessed by GetFileSpec)
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
	@filespec_common.pro	; Common block with array File and Parts
 CALLS: ***
	InitVar, SetFileSpec, strposn
 CALLED BY:
	vu_vox_write
 SIDE EFFECTS:
	If FileSpec is an array it must have the same size as the internal data.
 PROCEDURE:
	FileSpec is passed through SetFileSpec (with the /nosave keyword set so
	the internal data are not modified) to decompose into separate file
	parts. The relevant part (as identified from the From and UpTo strings)
	are then used to overwrite (part of) the internal data.
 MODIFICATION HISTORY:
	DEC-1997, Paul Hick (UCSD/CASS; pphick@ucsd.edu)