BadValue $SSW/smei/ucsd/sat/idl/toolbox/badvalue.pro
[Previous] [Next]
 NAME:
	BadValue
 PURPOSE:
	Provide the Not A Number value for any data type
 CATEGORY:
	Tricks
 CALLING SEQUENCE:
	R = BadValue(X)
 INPUTS:
	X			variable of any type
 OUTPUTS:
	R			scalar; type: as implied by 'size' vector
					NaN value
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	IsType
 CALLED BY:
	AlignHeliosphere, CleanGlitchBox, Find2DGlitch, GeographicInfo, GetNagoyaSources
	InsituTimeSeries, IntegrateLOS, InterpolateHeliosphere, LocalExtrema
	PlotEarthSkymap, PlotPolarSkymap, RemoteView_CurrentSheet
	RemoteView_Display2D, RemoteView_FOV_loc, RemoteView_Init_Matrix
	TMO_skymotion, TMO_tracksky, ThomsonMidpointFar, ThomsonPDistance
	ThomsonPDistanceFar, big_eph, eclipsed_area, even_light, even_light_info
	even_light_photometry, even_light_registration, flt_read, flt_string, jpl_eph
	mpc_eph, nso_fe_temperature, qEphem_State, qGlitch_Run, qImage_TrackPeak
	qImage_cw_DrawCross, qImage_cw_Set_Value, qImage_cw_ZUpdate, qImage_cw_ZWedge
	qLine, qLine_IsX, qLine_XBase, qView_TMO_tracksky, qvu, qvu_draw, sgp4_eph
	sgp4_orbit_period, smei_ccd2sky, smei_cv, smei_frm_base, smei_frm_property
	smei_frm_summary, smei_hdr_plot, smei_sky, smei_sky2ccd, smei_sky_read
	smei_star_fit, usno_eph, vu_RemoteView, vu_atlocation, vu_correlate, vu_header
	vu_insitu, vu_insitu_raw, vu_mean, vu_read, vu_solardisk, vu_timeseries
	vu_type_insitu, vu_type_skymap, vu_vox_write, wedge_content, wso_read
 PROCEDURE:
	For integers the number zero is returned.
	For floating point the appropriate value from !values is returned.
 MODIFICATION HISTORY:
	MAR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


bargraph $SSW/smei/ucsd/sat/idl/util/bargraph.pro
[Previous] [Next]
 NAME:
	bargraph
 PURPOSE:
	Plot bar graph
 CATEGORY:
	Plotting
 CALLING SEQUENCE:
	bargraph, Y, sigma=sigma,	$
		minbin=minbin, maxbin=maxbin, bin=bin, histo=histo,	$
		/hatch, xrange=xrange, yrange=yrange, title=title
		/average, /median, /maximum
 INPUTS:
	Y		array[n]; type: any numerical array
				array to be plotted in bargraph
 OPTIONAL INPUTS:
	sigma=sigma	scalar or array[n]; type: float
					errors in Y-array
					Ignored if /histo is set.
					If sigma is not a scalar, but does not have the
					same # elements as Y then it is ignored
	/histo		if set the Y is passed through the IDL
					histogram function using keywords minbin, maxbin, bin
	minbin		scalar; type: float; default: 0.0
					minimum X-value = left edge of leftmost bin
	bin			scalar; type: float; default: 1.0
					bin width
	maxbin		scalar; type: float
					maximum Y-value, only used as keyword to
					IDL histogram function if /histo is set

	/hatch		if set and nonzero, bins will be hatched
	xrange=xrange
				array[2]; type: float
					xrange keyword to IDL plot command
	yrange=yrange
				array[2]; type: float
					yrange keyword to IDL plot command
	/average	if set, plot vertical line at position of average
	/median		if set, plot vertical line at position of median
	/maximum	if set, plot vertical line at position of maximum
	title		scalar; type: string; default: value of bin width
				title string
	_extra=_extra	additional keywords passed to IDL plot command
 OPTIONAL OUTPUTS:
	stat=stat	array[3]; type: float
				positions of average, median and maximum
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	InitVar, IsType, statpos
 CALLED BY:
	even_light_info, even_light_photometry, even_light_registration, qBar
 PROCEDURE:
 >	The number of bins is n_elements(Y)
 >	The bin edges are minbin+bin*indgen(n_elements(Y)+1)
 >	To plot a histogram of an array
		bargraph,histogram(Y,min=25,max=350,bin=50),25,50
 MODIFICATION HISTORY:
	AUG-1992, Paul Hick (UCSD/CASS)
		Modification of HIST.PRO (Written Feb'91 by DMZ (ARC))
	NOV-1992, Paul Hick (UCSD/CASS)
		Added option to plot standard deviations
	JAN-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Minor modifications; added stat keyword


big_body $SSW/smei/ucsd/gen/idl/ephem/big_body.pro
[Previous] [Next]
 NAME:
	big_body
 PURPOSE:
 CATEGORY:
 CALLING SEQUENCE:
	FUNCTION big_body, body, count=count
 INPUTS:
	body		scalar, or array; type: string
					list of names of bodies
 OPTIONAL INPUT PARAMETERS:
 OUTPUTS:
	Result		if 'body' NOT defined:
				array[count]; type: string
					list of names of bodies
					This is the concatenation of bodies handled by the
					JPL planetary ephemeris, the USNO asteroid ephemeris,
					the MPC minor planet and comet ephemeris, and the
					SGP satellite ephemeris. Finally a few deep space
					satellites are included for which we happen to have
					ephemeris data available: Helios 1, Helios 2 and Ulysses
				if 'body' set:
					same as input 'body' with aliases replaced by the
					real names of bodies.
 OPTIONAL OUTPUT PARAMETERS:
	count=count scalar; type: integer
					number of bodies handled by big_eph
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	IsType, jpl_body, mpc_body, sgp_alias, sgp_body, usno_body, where_common
 CALLED BY:
	InsituTimeSeries, PlotPlanarCut, RemoteView_Init_Display
 PROCEDURE:
	Acceptable aliases are defined in sgp_alias.
	(currently this is only SMEI, WindSat, Coriolis = sat27640
	Additional aliases defined here:
	Helios A, Helios-A, Helios_A, Helios-1, Helios_1 = Helios 1
	Helios B, Helios-B, Helios_B, Helios-2, Helios_2 = Helios 2
	Swoops = Ulysses
 MODIFICATION HISTORY:
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


big_eph $SSW/smei/ucsd/gen/idl/ephem/big_eph.pro
[Previous] [Next]
 NAME:
	big_eph
 PURPOSE:
	Controls all available ephemeris data
 CATEGORY:
	gen/idl/ephem
 CALLING SEQUENCE:
	FUNCTION big_eph, tt		, $
		jpls		= jpls		, $
		usnos		= usnos		, $
		mpcs		= mpcs		, $
		stars		= stars		, $
		m_max		= m_max 	, $
		body		= body		, $
		center		= center	, $
		to_sphere	= to_sphere	, $
		precess		= precess	, $
		degrees		= degrees	, $
		names		= names		, $
		nodist		= nodist	, $
		count		= count		, $
		clean		= clean 	, $
		onebody		= onebody	, $
		sc_loc		= sc_loc	, $
		state		= state 	, $
		_extra		= _extra
 INPUTS:
	tt			array; type: time structure
					list of times in UT
 OPTIONAL INPUT PARAMETERS:
	Any combination of the following keywords determines which
	bodies are used; if the selection of keywords selects a body
	more than once, then the duplicate copy is removed from the list.

	/jpls			if set, positions for Sun, Moon, and all 9 planets
						are returned from the JPL ephemeris
	/usnos			if set, positions of all asteroids from the USNO
						ephemeris are returned
	/mpcs			if set, positions for all minor planets and comets from
						locally available ephemerides from the Minor Planet
						Center are returned
	/stars			if set, positions for all stars (brighter than magnitude
						m_max) from the SMEI star catalogues are returned
	m_max=m_max 	scalar: type: float; default: none
						used only if /stars is set. Only stars with magnitudes
						brighter than m_max are returned.
	body=body		scalar; type: string; default: none
						comma-separated list of bodies for which positions are
						required. The names are compared against names in the
						JPL, USNO, MPC and SMEI star databases. The comparison
						is case-insensitive.
	
	center=center	scalar; type: string or integer; default: jpl_body(/sun)
						any of the bodies in the JPL ephemeris, or the name of
						of an Earth-orbiting satellite. This determines the origin
						of the coordinates system used. See PROCEDURE.

	/to_sphere		if set, spherical coordinates are returned. By default,
						rectangular coordinates are used
	_extra=_extra	passed to CvSky
						Should be used to set one of the to_* keywords allowed
						for CvSky to determine the output coordinate frame.
						Note that this means that CvSky determines what the
						default coordinate frame for the output vectors are.
						Currently the default in CvSky (if no to_* keywords are
						specified) is ecliptic coordinates.
	/precess		if set, coordinates are precessed to the equinox at time
						'tt'. By default, J2000 coordinates are returned.
	/degrees		if set, all angles will be in degrees. Default is radians

	/clean			if set, the output arrays are reduced by removing all bodies
						and all times for which no valid positions were obtained.
	/onebody		can be used to remove the dummy second dimension if
						only one body is specified, i.e. an array[3,ntime] is
						returned, instead of an array[3,1,ntime]
 OUTPUTS:
	Result			array[3,nbody,ntime]; type: double
						positions of requested bodies. The distance scale is in AU.
						By default the ephemeris returns J2000 ecliptic
						rectangular coordinates (see keyword _extra).
						This is modified with keywords /precess, /to_sphere and
						_extra=_extra
	tt				array; type: time structure
						if /clean is set then this is the subset of the
						input times for which valid positions were founds
						if /clean is NOT set the input tt is not modified
 OPTIONAL OUTPUT PARAMETERS:
	names=names 	array; type: string
						names of bodies for which positions are returned
	nodist=nodist	array; type: byte
						0 indicates a planet, comet or asteroid
						1 indicates a star
						For stars the distance is arbitrarily set to one.
	count=count 	scalar; type: integer
						# bodies for which positions are returned.
 INCLUDE:
	@compile_opt.pro
 CALLS: ***
	AngleRange, BadValue, CV_COORD, CvPrecess, CvSky, HOSOrbit, InitVar, IsType, SuperArray
	TimeSet, TimeSystem, UNIQ [1], UNIQ [2], UNIQ [3], UlyssesOrbit, big_eph_boost
	big_eph_clean, big_eph_short, destroyvar, jpl_body, jpl_eph, mpc_body, mpc_eph
	sgp4_eph, sgp_alias, sgp_body, smei_star_alias, smei_star_info, usno_body
	usno_close, usno_eph, where_common
 CALLED BY:
	BZero, CvSky, CvSky_GSE, CvSky_GSEQ, CvSky_GSM, CvSky_RTN, EarthSky3DLoc
	EarthTransit3DLoc, GeographicInfo, InsituTimeSeries, PlotEarthSkymap
	PlotPlanarCut, PlotPolarSkymap, PlotSolarDisk, RemoteView_BodyLoc
	RemoteView_Init_View, big_orbit, qEphem_State, qImage_cw_DrawEphem
	smei_sgp4_orbits, smei_sky, smei_zodiac_model, vu_point_source, vu_solardisk
	vu_synopticmap, vu_timeseries, vu_vox_draworbit, vu_vox_write
 SEE ALSO:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
	The 'center' keyword determines the origin of the coordinate system.
	The default is heliocentric coordinates. This can be changed to
	any of the bodies in JPL ephemeris, i.e. setting center=jpl_body(/earth)
	forces geocentric coordinates.
	Center can also be set to an Earth-orbiting spacecraft by specifying the
	name of an available file with orbital elements. The spacecraft position
	is taken into account using the sgp4_eph routine.
	Currently the only satelite we have is Coriolis
	NOTE: for stars the 'center' keyword is ignored
 MODIFICATION HISTORY:
	JUL-2005, Paul Hick (UCSD/CASS)
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		If one of the ephemeris program would return a bad position vector
		(e.g. when an MPC ephemeris is accessed outside the time range of the
		MPC file) then the conversion to spherical coordinates would set the
		angles to zero with only the radial distance staying bad. Fixed it
		so the angles are now bad too.
		The procedure now also keeps track of which bodies have already
		been identified to avoid unnecessarily accessing an ephemeris.


big_eph_boost $SSW/smei/ucsd/gen/idl/ephem/big_eph_boost.pro
[Previous] [Next]
 NAME:
	big_eph_boost
 PURPOSE:
	(For internal use by big_eph only)
 CATEGORY:
 CALLING SEQUENCE:
	big_eph_boost, nt, rr, pp, names, list, nodist, distflag
 INPUTS:
	nt  		scalar; type: integer
					# times in rr and pp
	rr			array[3,*,ntt]; type: double
					positions already accepted
	pp			array[3,*,ntt]; type: double
					positions to be added
	names		array; type: string
					names of bodies already accepted
	list		array; type: string
					names of bodies to be added
	nodist		array: type: byte
					list of distance flags of accepted bodies
	distflag	array: type: byte
					list of distance flags to be added
 OUTPUTS:
	rr			array[3,*,ntt]; type: double
					input rr with pp added
	names		array; type: string
					input names with list added
	nodist		array; type: byte
					input nodist with distflag added
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	boost
 CALLED BY:
	big_eph
 MODIFICATION HISTORY:
	JUL-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


big_eph_clean $SSW/smei/ucsd/gen/idl/ephem/big_eph_clean.pro
[Previous] [Next]
 NAME:
	big_eph_clean
 PURPOSE:
	(For internal use by big_eph only)
 CATEGORY:
	gen/idl/ephem
 CALLING SEQUENCE:
	big_eph_clean, tt, rr, names, nodist
 INPUTS:
	tt		array[m]; type: time structure
				times
	rr		array[3,n,m]; type: double
				position for n bodies at m times
	names	array[n]; type: string
				names of m bodies
	nodist	array[n]; type: byte
				distance flags for m bodies
 OUTPUTS:
	tt		array; type: time structure
				input tt with all times removed for which no
				positions are available
	rr		array; type: double
				input rr with all times and all bodies
				removed for which no positions are available
	names	array; type: string
				input names with bodies removed for which no
				positions are available
	nodist	array; type; byte
				input nodist with bodies removed for which no
				positions are available
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	IsType, destroyvar
 CALLED BY:
	big_eph
 MODIFICATION HISTORY:
	JUL-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


big_eph_short $SSW/smei/ucsd/gen/idl/ephem/big_eph_short.pro
[Previous] [Next]
 NAME:
	big_eph_short
 PURPOSE:
	(For internal use by big_eph only)
 CATEGORY:
	gen/idl/ephem
 CALLING SEQUENCE:
	FUNCTION big_eph_short, bodies, list, names, add_list=add_list, found=found
 INPUTS:
	bodies				array; type: string
							list of all requested but not yet accepted bodies
	list				array: type: string
							list of bodies in one of the ephemeris data bases
	names				array; type: string
							list of all bodies already accepted
 OUTPUTS:
	Result				scalar; type: integer
							# new bodies accepted
 OPTIONAL OUTPUT PARAMETERS:
	add_list=add_list	array[count]; type: string
							names of new bodies accepted
							The names in 'add_list' are all name in 'list'
							that are not yet in 'names'
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	IsType, UNIQ [1], UNIQ [2], UNIQ [3], where_common
 CALLED BY:
	big_eph
 MODIFICATION HISTORY:
	JUL-2005, Paul Hick (UCSD/CASS)
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added found keyword


big_orbit $SSW/smei/ucsd/gen/idl/ephem/big_orbit.pro
[Previous] [Next]
 NAME:
	big_orbit
 PURPOSE:
	Get coordinates arrays for the orbit of one of the
	bodies supported by the big_eph ephemeris.
 CATEGORY:
	gen/idl/ephem
 CALLING SEQUENCE:
	FUNCTION big_orbit, TT		, $
		body		= body		, $
		precess 	= precess	, $
		to_sphere	= to_sphere , $
		degrees 	= degrees	, $
		silent		= silent	, $
		_extra		= _extra
 INPUTS:
	TT				array[1]; type: standard time structure
 OPTIONAL INPUT PARAMETERS:
	body=body		scalar; type: string; default: jpl_body(/earth)
	/precess		passed to big_eph
					precesses the orbital locations from
					J2000 to epoch TT
	/to_sphere		by default rectangular coordinates are returned
					If /to_sphere is set these are converted
					to spherical coordinates.
	/degrees		if set, angles returned when /to_sphere is
					set are in degrees; default is radians.
	_extra=_extra	passed to CvSky
					this should be one of the to_* keywords
					allowed for CvSky and determines the
					reference frame of the orbital coordinates
 OUTPUTS:
	Result		array[3,*]	type: float
					coordinate arrays for orbit of 'body'
					The unit of length is AU; if /to_sphere
					is set the units for the angles depends
					on the setting of /degrees.
					If the body is not recognized then -1 is
					returned	
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CvSky, InitVar, TimeOp, TimeSet, big_eph, gridgen, jpl_body, mpc_body, usno_body
 CALLED BY:
	PlotPlanarCut, RemoteView
 PROCEDURE:
	The orbit is set up by using NewcombSun on an array of times
 	covering one Julian year centered on TT.
	Then CvSky is used to transform to heliographic coordinates.
 MODIFICATION HISTORY:
	JUN-1997, Paul Hick (UCSD/CASS)
	OCT-2002, Paul Hick (UCSD/CASS, pphick@ucsd.edu)
		Fixed bug in orbit calculation by adding /heliocentric
		keyword to NewcombSun. The problem only was visible
		for viewing locations extremely close (within a few
		earth radii) of Earth.
	JUN-2004, Paul Hick (UCSD/CASS)
		Switched to JPL ephemeris instead of using NewcombSun.
		This allowed adding orbits for other planets and Moon.
		Renamed from RemoteView_EarthOrbit to RemoteView_PlanetOrbit
	OCT-2006, Paul Hick (UCSD/CASS)
		Now using big_eph instead of jpl_eph. Allows adding of
		partial orbits for comets and asteroids.
		Renamed to RemoteView_BodyOrbit
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Better documentation. Renamed to big_orbit.


bin_read $SSW/smei/ucsd/gen/idl/util/bin_read.pro
[Previous] [Next]
 NAME:
	bin_read
 PURPOSE:
	Read 2D array from binary file
 CALLING SEQUENCE:
	status = bin_read(File, Array, errormessage=errormessage)
 INPUTS:
	File		string		file name
 OPTIONAL INPUT PARAMETERS:
	type=type	scalar; type: integer
					type code for returned array (see IsType)
					If not set then type=2 (short integer is assumed)
	header=header
				scalar; type: integer; default: 0
					# bytes at start of files preceding the data array
					(these are skipped when reading the data).
					If the file extension is .pph or .nic then
					this keyword is ignored.
	/eor		if set, the last column of the array is discarded
					(useful for reading binary files containing a CR at
					the end of each record).
	/bor		if set, the first two bytes and the last two bytes
					of each record are discarded
					(some binary VAX files contain 2 bytes of leading
					and trailing garbage???).
	nx=nX		used to fix the first dimension of the output array
	/twod		reads a 2D array with nX=nY (ignored if nX is used)
	/block		ignores the recordlength if its 512 bytes (1 VMS block)
	/sizeonly	returns dimensions of the array (NOT the array itself,
					i.e. the file is NOT read)
	/unix		forces a call to IEEE_TO_HOST
 OUTPUTS:
	status		0: some error occurred (check 'errormessage')
				1: file properly read
	Array		array[n,m]
				2D array of requested type
				if something goes wrong Array = -1 is returned
 OPTIONAL OUTPUT PARAMETERS:
	errormessage
				scalar; type: string
					Contains null string if file was read succesfully
					Contains error message if an error occurred
	trailer 	array; type: byte
					if any data are found after the data area, then these
					trailing data are returned here as a byte array.
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	GetFileSpec, IEEE_TO_HOST [1], IEEE_TO_HOST [2], IEEE_TO_HOST [3]
	IEEE_TO_HOST [4], InitVar, IsType, SetFileSpec, do_file, gunzip_file
 CALLED BY:
	even_light, even_light_info, img_read, qLine_Read, smei_frm_read
 PROCEDURE:
 >	The FSTAT is function is used to determine the array dimensions from
	file size and record length.
 >	The /block keyword should be used to read files created with the /block
	keyword on the open statement.
 >	Several file types are recognized as special types and don't require
	any further keywords:
	*.pph	contain a header with a valid size vector
	*.nic	files from the SMEI camera
 MODIFICATION HISTORY:
	JAN-1995, Paul Hick (UCSD/CASS)
	MAR-2003, Paul Hick (UCSD/CASS)
		Trailer is now output as a byte array, instead of a string scalar
		(the conversion string_trailer = string(byte_trailer) could destroy
		a binary trailer).
	APR-2003, Paul Hick (UCSD/CASS)
		Added check for .gz file (by calling gunzip_file).
		Added check on 3rd element in header (# bytes per number) to
		distinguish between short int (2), long int (4) and float (-4).
	SEP-2003, Paul Hick (UCSD/CASS)
		Renamed sbinarr to bin_read.
	JUL-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added /ramdisk keyword


bin_write $SSW/smei/ucsd/gen/idl/util/bin_write.pro
[Previous] [Next]
 NAME:
	bin_write
 PURPOSE:
	Write array to binary file
 CALLING SEQUENCE:
	bin_write, File, Array
 INPUTS:
	File		string		file name
	Array		array to be written into binary file `file'.
				By default the array is written into a fixed-length
				file with record length determined by the first
				dimension of the array. If the /block keyword is set,
				then the file is written in VMS block mode.
 OPTIONAL INPUT PARAMETERS:
	/block		write in VMS block mode
 OUTPUTS:
	(None)
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	GetFileSpec, InitVar, IsType, SetFileSpec
 CALLED BY:
	RemoteView_Display2D, even_light, qImage_cw_SmeiMask, qLine_Write
	qSave2File_Save, qView_Save2File
 RESTRICTIONS:
 PROCEDURE:
	File name extension '.nic':

	These are assumed to be files from the SMEI camera. The Array is written to
	file as an unsigned short integer array (irrespective of input type) with the
	proper 6 byte header. It is the users responsibility that the conversion to
	unsigned integer does not have any adverse effects on the array. A 512 byte
	trailer is added using the 'trailer' keyword (padded to 512 bytes with NULL
	characters, or truncated, if necessary).

	File name extension '.pph'

	The file is written with a header containing the IDL 'size' vector.
	The trailer is added at the end.

	In all other cases the array is written using a single binary write statement.
	The trailer is ignored.
 MODIFICATION HISTORY:
	APR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


boost $SSW/smei/ucsd/gen/idl/toolbox/boost.pro
[Previous] [Next]
 NAME:
	boost
 PURPOSE:
	Combining arrays
 CATEGORY:
	Toolbox
 CALLING SEQUENCE:
	boost, a, b [, pushdim=pushdim, plus=plus, top=top, value=value]
 INPUTS:
	a			array; type: any
					array to be added to
	b			array; type: same as 'a'
					array to be appended to 'a'
 OPTIONAL INPUT PARAMETERS:
	pushdim=pushdim
				scalar; type: integer
					dimension to be boosted using 'b' or 'plus'
	plus=plus	scalar; type: integer; default: 0
					only used if b_in not set or doesn't exist
					# elements to be added to dimension 'pushdim'
	/lead		adds to the front of the array instead of the end
	/top		by default, the input array is put at the bottom
					of dimension; if /top is set then it is shifted to
					the top of the dimension (see EXAMPLE)

	Additional arguments, except 'type' and 'dim' can be passed to make_array
	through the _extra keyword. Probably the only useful one is:

	value=value	scalar; type: same as 'a'
					value used to pad the output array 'a' where needed
 OUTPUTS:
	a			array; type: same as input
					input array 'a' boosted using 'b' or 'plus'
					(used by make_array as initialization value).
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	InitVar, IsType, rank_array, where_common
 CALLED BY:
	CvRotation, FindPeaks, InterpolateHeliosphere, RemoteView, RemoteView_Display2D
	RemoteView_Display3D, ThomsonSetupLOS, TimePosn, TimePosn_test, big_eph_boost
	flt_read, flt_string, hide_env, htmd_cat, nagoya_glevel, qTool_State [1]
	qTool_State [2], qvu_pick, smei_buf_getframe, smei_buf_prep, smei_buf_read
	smei_ccd2sky, smei_cv, smei_findcrazy, smei_frm_findpoint, smei_frm_get
	smei_frm_property, smei_frm_where, smei_getfile, smei_hdr_get, smei_orbits_stat
	smei_sky2cam, smei_sky_read, smei_star_readpnt, smei_star_writepnt, vox_write
	vu_correlate, vu_get_page, vu_movie, vu_planarcut, vu_read, vu_select, vu_solardisk
	vu_synopticmap, vu_vox_write, wso_read, www_help_ptr
 PROCEDURE:
	print, boost( indgen(3,2), plus=5)
	0	1	2	0	0	0	0	0
	3	4	5	0	0	0	0	0
	print, boost( indgen(3,2), plus=5, /top)
	0	0	0	0	0	0	1	2
	0	0	0	0	0	3	4	5

	IDL> a = [0,1,2]
	IDL> b = [0,1,2,3]
	IDL> boost, a,b
	IDL> print,a
	0       1       2       0       1       2       3
	(i.e. concatenats a and b)

	IDL> a = [0,1,2]
	IDL> b = [0,1,2,3]
	IDL> boost, a,b, /push
	IDL> print,a
	0       1       2
	0       1       2
	(i.e. puts 2nd array on new array, truncating or padding as necessary)

	IDL> a = indgen(3,4,5)
	IDL> b = indgen(3,5)
	IDL> boost, a,b
	IDL> help,a
	A               INT       = Array[3, 5, 5]

	I.e. array b is merged with a by adding it to the 2nd dimension.
	The dimension to be added to is determined by excluding dimension
	with the same number of elements. The pushdim keyword can be
	used to explicitly select the dimension.

 MODIFICATION HISTORY:
	FEB-2002, Paul Hick (UCSD/CASS)
		Extended old version of boost considerably; also merged
		boostdim with boost (using keyword 'plus')
	APR-2002, Paul Hick (UCSD/CASS)
		replaced explicit keyword 'value' by _extra. 'value' was passed
		to make_array explicitly, but this caused problems in IDL 5.3
		(the variable MUST exist).
	AUG-2002, Paul Hick (UCSD/CASS)
		Added keyword /lead
	MAR-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Made some modifications to make this work with structures.
		The change involves replacing make_array calls with replicate calls.


BZero $SSW/smei/ucsd/sat/idl/toolbox/sun/bzero.pro
[Previous] [Next]
 NAME:
	BZero
 PURPOSE:

 CALLING SEQUENCE:
	FUNCTION BZero, T, degrees=degrees, lzero=L0
 INPUTS:
	T		array; type: standard time structure
				times where B0 angle is requested
 OPTIONAL INPUT PARAMETERS:
	/degrees	if set, output angles BZero and L0 are in degrees
			(default: radians)
 OUTPUTS:
	Result	heliographic latitude of the sub-Earth point (center
			of the disk)
 OPTIONAL OUTPUT PARAMETERS:
	L0		heliographic longitude of the sub-Earth point
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	SyncDims, big_eph, jpl_body
 PROCEDURE:
 >	For time T the heliocentric ecliptic longitude of the sub-Earth
	point is L=180+(geocentric ecliptic longitude Sun); the
	heliocentric latitude is D=-(geocentric latitude).
	The heliographic latitude of the sub-Earth point follows by
	converting L,D at time T.

	1971, doy 1.0 : B0 = -3.00629,  L0 = 129.631
			B0 = -3.01   ,  L0 = 129.62  (Nautical Almanac)

 > 	using the /Precision keyword in NewcombSun produces worse results
 MODIFICATION HISTORY:
	JUN-1993, Paul Hick (UCSD/CASS)
	FEB-1998, Paul Hick (UCSD/CASS)
		Replaced /radians keyword by /degrees keyword
	OCT-2006, Paul Hick (UCSD/.CASS; pphick@ucsd.edu)
		Replaced NewcombSun by big_eph call