acosd $SMEI/ucsd/gen/for/os/goniod.f
[Next]
 NAME:
	acosd
 CALLING SEQUENCE:
	entry acosd(a)
 INPUTS:
	a	real		cos(angle)
 CALLED BY:
	SC_ECLIP, SC_ECLIP90, SphereWeight, ThomsonLOS3D, ThomsonLOS3DStep
 SEE ALSO:
	cosd
 MODIFICATION HISTORY:
	JAN-2001, Paul Hick (UCSD; pphick@ucsd.edu)


AdjustJDCar $SMEI/for/lib/adjustjdcar.f
[Previous] [Next]
 NAME:
	AdjustJDCar
 PURPOSE:
	Modifies list of start times for set of Carrington rotations
 CALLING SEQUENCE:
	subroutine AdjustJDCar(XC,nCar,JDCar,NCoff)
 INPUTS:
	XC		real*4		modified Carrington rotation
					Used to determine the integer offset by which
					JDCar and NCoff are to be modified.
	nCar		integer		# start times
	JDCar(nCar)	real*8		start times of Carrington rotations
					NCoff+JDCar gives the start times in Julian days
 OUTPUTS:
	JDCar(nCar)	real*8		start times of Carrington rotations
	NCoff		integer		integer offset
 CALLED BY:
	SetGrid, ipsd, ipsdt
 EXTERNAL:
	external EARTH
 CALLS: ***
	EARTH, FLINT8, Julian, MAP_TZERO, N_CARRINGTON
 PROCEDURE:
	Entries in JDCar are made as small as possible by subtracting
	an integer number of rotations. NCoff is updated correspondingly
	(same integer added).
	This is something of a fudge intended to maintain as much precision as
	possible in all time determinations based on JDCar.


AIPS_WTF $SMEI/for/lib/aips_wtf.f
[Previous] [Next]
 NAME:
	AIPS_WTF
 PURPOSE:
	freq=IPS Observation Frequency
	1=327.0MHz: STELab. Nagoya Univ; 2=81.5MHZ: Cambridge Univ.; 3=73.8MHZ: UCSD
 CALLING SEQUENCE:
	function AIPS_WTF(im,zdist) ! Calculate IPS weighting function along los
 CALLED BY:
	MkLOSWeights
 INCLUDE:
	include		'sun.h'
	include		'phys.h'
	include		'math.h'
 EXTERNAL TYPE:
	real		IPSFuncQ
 EXTERNAL:
	external	IPSFuncQ		! Spectral function
 COMMON BLOCKS:
	common	/FQIPS/	hachodz,thetadz
!$omp threadprivate(/FQIPS/)
 CALLS: ***
	IPSFuncQ, Simpson
 PROCEDURE:


ANiceNum $SMEI/ucsd/gen/for/lib/gen/anicenum.f
[Previous] [Next]
 NAME:
	ANiceNum
 PURPOSE:
	Find a nice number close to a specified number x
 CALLING SEQUENCE:
	function ANiceNum(x,iup)
 INPUTS:
	x		real		real number
	iup		integer		0: result is less than x
					1: result is bigger than x
 OUTPUTS:
	ANiceNum	real		resulting number close to x
 PROCEDURE:
	The number returned will be of the form f*10^p, where p is an integer
	and f = 0,1,2,5 or 10
 MODIFICATION HISTORY:
	AUG-1996, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


ArrayLoc2 $SMEI/ucsd/gen/for/lib/array/arrayloc2.f
[Previous] [Next]
 NAME:
	ArrayLoc2
 PURPOSE:
 CALLING SEQUENCE:
	subroutine ArrayLoc2(iSource,iDestin,N,L,I1,I2,I3)
 INPUTS:
	iSource		integer		address of source array (loc(A))
	iDestin		integer		address of source array (loc(C))
	N		integer		array size
	L		integer		length of array element in bytes
					(L=1: byte, L=2: int2, L=4: int4,real4)
 OUTPUTS:
	I1, I2, I3	integer		DO loop parameters determining 
					direction in which array is processed
					(DO I=I1,I2,I3)
 CALLED BY:
	ArrI1Copy, ArrI4AddConstant, ArrI4AddConstant2, ArrI4Copy, ArrI4Copy2
	ArrR4AddConstant, ArrR4Copy, ArrR4Copy2, ArrR4DivideByConstant, ArrR4Function
	ArrR4Mask, ArrR4Scale, ArrR4Scale2, ArrR4TimesConstant, ArrR8Copy
 SEE ALSO:
	Array_Info
 PROCEDURE:
	If the origin of the source array is past the origin of the destination, or
	if the source and destination arrays don't overlap at all, then the
	destination can be filled from 1..N.
	If the source and destination overlap with the origin of the source prior to
	the origin of the destination, then the destination must be filled from N..1
 MODIFICATION HISTORY:
	AUG-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu); added documentation


ArrayLoc3 $SMEI/ucsd/gen/for/lib/array/arrayloc3.f
[Previous] [Next]
 NAME:
	ArrayLoc3
 PURPOSE:
 CALLING SEQUENCE:
	subroutine ArrayLoc3(iSource1,iSource2,iDestin,N,L,I1,I2,I3)
 INPUTS:
	iSource1	integer		address of source array (loc(A))
	iSource2	integer		address of source array (loc(B))
	iDestin		integer		address of source array (loc(C))
	N		integer		array size
	L		integer		length of array element in bytes
					(L=1: byte, L=2: int2, L=4: int4,real4)
 OUTPUTS:
	I1, I2, I3	integer		DO loop parameters determining 
					direction in which array is processed
					(DO I=I1,I2,I3)
 CALLS: ***
	Say
 CALLED BY:
	ArrR4DivideByArrI4, ArrR4DivideByArrR4, ArrR4LinearArrR4, ArrR4MinusArrR4
	ArrR4PlusArrR4, ArrR4TimesArrR4
 SEE ALSO:
	Array_Info
 PROCEDURE:
	A=Address Source1, B=Address Source2, C=Address Destination
	1..N : process array in forward direction (I=1,N,1)
	N..1 : process array in backward direction (I=N,1,-1)

		A<C	A=C	A>C
	B<C	N..1	N..1	?
	B=C	N..1	1..N	1..N
	B>C	?	1..N	1..N

	If (A=C and B=C) the direction does not matter.
	If (A<C and B>C) or (A>C and B<C) the direction can be determined if
	one of the source arrays does not overlap the other source array and
	does not overlap the destination. If all three arrays overlap it is
	not possible to obtain correct results by processing the arrays
	sequentially (forward or backward).
 MODIFICATION HISTORY:
	AUG-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu); added documentation


ArrI1Constant $SMEI/ucsd/gen/for/lib/array/arri1constant.f
[Previous] [Next]
 NAME:
	ArrI1Constant
 PURPOSE:
	Initialize integer*1 array to constant
 CALLING SEQUENCE:
	subroutine ArrI1Constant(N,R,C)
 SEE ALSO:
	Array_Info


ArrI1Copy $SMEI/ucsd/gen/for/lib/array/arri1copy.f
[Previous] [Next]
 NAME:
	ArrI1Copy
 PURPOSE:
	Copy integer*1 (signed byte) array
 CALLING SEQUENCE:
	subroutine ArrI1Copy(N,A,C)
 CALLS: ***
	ArrayLoc2, BadI1
 SEE ALSO:
	Array_Info


ArrI1Zero $SMEI/ucsd/gen/for/lib/array/arri1zero.f
[Previous] [Next]
 NAME:
	ArrI1Zero
 PURPOSE:
	Initialize integer*1 array to zero
 CALLING SEQUENCE:
	subroutine ArrI1Zero(N,C)
 CALLED BY:
	Pandora
 SEE ALSO:
	Array_Info


ArrI2GetMinMax $SMEI/ucsd/gen/for/lib/array/arri2getminmax.f
[Previous] [Next]
 NAME:
	ArrI2GetMinMax
 PURPOSE:
	Get min and max values of integer*2 array
 CALLING SEQUENCE:
	subroutine ArrI2GetMinMax(N,A,AAMin,AAMax)
 SEE ALSO:
	Array_Info


ArrI2SetMinMax $SMEI/ucsd/gen/for/lib/array/arri2setminmax.f
[Previous] [Next]
 NAME:
	ArrI2SetMinMax
 PURPOSE:
	Limit range of integer*2 array between min and max
 CALLING SEQUENCE:
	subroutine ArrI2SetMinMax(N,A,AAMin,AAMax)
 SEE ALSO:
	Array_Info


ArrI2Zero $SMEI/ucsd/gen/for/lib/array/arri2zero.f
[Previous] [Next]
 NAME:
	ArrI2Zero
 PURPOSE:
	Initialize integer*2 array to zero
 CALLING SEQUENCE:
	subroutine ArrI2Zero(N,C)
 SEE ALSO:
	Array_Info


ArrI4AddConstant $SMEI/ucsd/gen/for/lib/array/arri4addconstant.f
[Previous] [Next]
 NAME:
	ArrI4AddConstant
 PURPOSE:
	Add a constant to an integer*4 array
 CALLING SEQUENCE:
	subroutine ArrI4AddConstant(N,A,R,C)
 CALLS: ***
	ArrayLoc2, BadI4
 CALLED BY:
	NODAT
 SEE ALSO:
	Array_Info


ArrI4AddConstant2 $SMEI/ucsd/gen/for/lib/array/arri4addconstant2.f
[Previous] [Next]
 NAME:
	ArrI4AddConstant2
 PURPOSE:
	Add two constants to two same-size integer*4 array
 CALLING SEQUENCE:
	subroutine ArrI4AddConstant2(N,A1,A2,R,C1,C2)
 CALLS: ***
	ArrayLoc2, BadI4
 SEE ALSO:
	Array_Info


ArrI4Bad $SMEI/ucsd/gen/for/lib/array/arri4bad.f
[Previous] [Next]
 NAME:
	ArrI4Bad
 PURPOSE:
	Initialize integer*4 array to 'bad' value
 CALLING SEQUENCE:
	subroutine ArrI4Bad(N,C)
 CALLS: ***
	BadI4
 CALLED BY:
	ReadG
 SEE ALSO:
	Array_Info


ArrI4Constant $SMEI/ucsd/gen/for/lib/array/arri4constant.f
[Previous] [Next]
 NAME:
	ArrI4Constant
 PURPOSE:
	Initialize integer*4 array to constant
 CALLING SEQUENCE:
	subroutine ArrI4Constant(N,R,C)
 CALLS: ***
	BadI4
 CALLED BY:
	LOSReach, ipsd, ipsdt, smei_frm_measle
 SEE ALSO:
	Array_Info


ArrI4Copy $SMEI/ucsd/gen/for/lib/array/arri4copy.f
[Previous] [Next]
 NAME:
	ArrI4Copy
 PURPOSE:
	Copy integer*4 array
 CALLING SEQUENCE:
	subroutine ArrI4Copy(N,A,C)
 CALLS: ***
	ArrayLoc2, BadI4
 CALLED BY:
	FLINT, FLINT8, HOSdos2vms, ice_analyze, ice_read, ice_write, smei_orb, smei_orbit2
	smei_orbit_period2, smei_orbit_time2, smei_skyd, smei_skyd_fill, smei_skyd_flush
	smei_skyd_fts, smei_skyd_init, smei_skyd_make, smei_skyd_sky, smei_skyd_sort
 SEE ALSO:
	Array_Info


ArrI4Copy2 $SMEI/ucsd/gen/for/lib/array/arri4copy2.f
[Previous] [Next]
 NAME:
	ArrI4Copy2
 PURPOSE:
	Copy two integer*4 arrays of same size
 CALLING SEQUENCE:
	subroutine ArrI4Copy2(N,A1,A2,C1,C2)
 CALLS: ***
	ArrayLoc2, BadI4
 SEE ALSO:
	Array_Info


ArrI4GetMinMax $SMEI/ucsd/gen/for/lib/array/arri4getminmax.f
[Previous] [Next]
 NAME:
	ArrI4GetMinMax
 PURPOSE:
	Get min and max of integer*4 array
 CALLING SEQUENCE:
	subroutine ArrI4GetMinMax(N,A,AMin,AMax)
 CALLS: ***
	BadI4
 CALLED BY:
	Peep, WhatIsI4, ice_analyze, smei_skyd_fill, smei_skyd_flush, smei_skyd_size
	smei_skyd_sort
 SEE ALSO:
	Array_Info


ArrI4Index $SMEI/ucsd/gen/for/lib/array/arri4index.f
[Previous] [Next]
 NAME:
	ArrI4Index
 PURPOSE:
	Initialize integer*4 array to index
 CALLING SEQUENCE:
	subroutine ArrI4Index(N,C)
 CALLS: ***
	BadI4
 CALLED BY:
	Connect
 SEE ALSO:
	Array_Info


ArrI4Reverse $SMEI/ucsd/gen/for/lib/array/arri4reverse.f
[Previous] [Next]
 NAME:
	ArrI4Reverse
 PURPOSE:
	Reverse entries in integer*4 array
 CALLING SEQUENCE:
	subroutine ArrI4Reverse(N,A,B)
 CALLED BY:
	ice_analyze
 SEE ALSO:
	Array_Info


ArrI4SetMinMax $SMEI/ucsd/gen/for/lib/array/arri4setminmax.f
[Previous] [Next]
 NAME:
	ArrI4SetMinMax
 PURPOSE:
	Limit range of integer*4 array to min and max
 CALLING SEQUENCE:
	subroutine ArrI4SetMinMax(N,A,AMin,AMax)
 CALLS: ***
	BadI4
 SEE ALSO:
	Array_Info


ArrI4Zero $SMEI/ucsd/gen/for/lib/array/arri4zero.f
[Previous] [Next]
 NAME:
	ArrI4Zero
 PURPOSE:
	Initialize integer*4 array to zero
 CALLING SEQUENCE:
	subroutine ArrI4Zero(N,C)
 CALLS: ***
	BadI4
 CALLED BY:
	Average, Connect, GridRan2Reg, PrintAll, iFltArr, iHOSInfo, ice_analyze, ice_write, ipsd
	jpl_eph2, smei_get_starmask, smei_skyd_fts, smei_skyd_init, smei_skyd_make
	smei_skyd_sky, writem_scomp
 SEE ALSO:
	Array_Info


ArrI8GetMinMax $SMEI/ucsd/gen/for/lib/array/arri8getminmax.f
[Previous] [Next]
 NAME:
	ArrI8GetMinMax
 PURPOSE:
	Get min and max of integer*8 array
 CALLING SEQUENCE:
	subroutine ArrI8GetMinMax(N,A,AMin,AMax)
 CALLS: ***
	BadI8
 CALLED BY:
	WhatIsI8
 SEE ALSO:
	Array_Info


ArrI8Zero $SMEI/ucsd/gen/for/lib/array/arri8zero.f
[Previous] [Next]
 NAME:
	ArrI8Zero
 PURPOSE:
	Initialize integer*4 array to zero
 CALLING SEQUENCE:
	subroutine ArrI8Zero(N,C)
 CALLS: ***
	BadI8
 SEE ALSO:
	Array_Info


ArrInfo $SMEI/ucsd/gen/for/lib/array/arrinfo.f
[Previous] [Next]
 NAME:
	ArrInfo
 PURPOSE:
	Perform simple calculations on arrays
 INPUTS:
	All function take integer arguments for the array size;
	one or more arrays and/or one or more constants
	The types of A,B, R,R1,R2 depend on the function called.

	N		integer		array size
	A(N),B(N)	depends		source arrays
	R,R1,R2		integer/real	constants

 OUTPUTS:
	The type of C depends on the function called.

	C(N)			destination array
 SEE ALSO:
	ArrI1Constant, ArrI1Zero, ArrI2GetMinMax, ArrI2SetMinMax, ArrI2Zero
	ArrI4AddConstant, ArrI4AddConstant2, ArrI4Bad, ArrI4Constant, ArrI4Copy
	ArrI4Copy2, ArrI4GetMinMax, ArrI4Index, ArrI4Reverse, ArrI4SetMinMax, ArrI4Zero
	ArrR4AddConstant, ArrR4Bad, ArrR4Constant, ArrR4Copy, ArrR4Copy2
	ArrR4DivideByArrI4, ArrR4DivideByArrR4, ArrR4DivideByConstant, ArrR4Function
	ArrR4GetMinMax, ArrR4Index, ArrR4Interpolate, ArrR4Invert, ArrR4LinearArrR4
	ArrR4Mask, ArrR4MinusArrR4, ArrR4Negate, ArrR4PlusArrR4, ArrR4Reverse, ArrR4Scale
	ArrR4Scale2, ArrR4SetMinMax, ArrR4Step, ArrR4TimesArrR4, ArrR4TimesConstant
	ArrR4Total, ArrR4Zero, ArrR8Bad, ArrR8Copy, ArrR8Interpolate, ArrR8Zero, ArrayLoc2
	ArrayLoc3, iArrI4Total, iArrI4ValuePresent, iArrR4Compare, iArrR4ValuePresent
 PROCEDURE:
 >	The SEE ALSO list may not be complete
 >	The 'loc' function is used to retrieve the starting address of the
	arrays. This is an intrinsic function in VMS Fortran. So far all
	other compilers we've used support this also: Absoft Fortran, Sun Unix and
	Linux G77 (sometimes after displaying a warning message).
 >	The source and destination can be identical or can overlap.
	The only exception are the functions involving two source arrays and
	one destination array, which can produce erroneous results if all three
	arrays overlap (see discussion for ArrayLoc3). If this occurs, a
	warning message is displayed.
 >	The 'loc' function and the subroutines ArrayLoc2 and ArrayLoc3 are
	used to determine the relative location of the source and destination
	arrays in memory. The relative location determines whether arrays
	are processed forward (I=1,N,1) or backward (I=N,1,-1).
 >	Arrays are declared internally as one dimensional arrays.
	Multi-dimensional arrays can be processed by setting N to the total
	number of all elements in the array (product of all dimensions).

 >	For almost all of the subroutines specifying a negative array size
	results in checking for bad value (BadI4() for integer, BadR4() for
	real arrays. 'Bad' array elements are not processed
	(the main exceptions are the initialization routines).
 MODIFICATION HISTORY:
	FEB-1996, Paul Hick (UCSD/CASS)
	FEB-1996, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Replaced %loc by loc in all copy routines.


ArrR4AddConstant $SMEI/ucsd/gen/for/lib/array/arrr4addconstant.f
[Previous] [Next]
 NAME:
	ArrR4AddConstant
 PURPOSE:
	Add constant to real*4 array
 CALLING SEQUENCE:
	subroutine ArrR4AddConstant(N,A,R,C)
 INPUTS:
	N	integer		abs(N) = # elements
				N < 0 skips bad values
	A(*)	real		input array of abs(N) elements
	R	real		scalar constant to be added to A
 OUTPUTS:
	C(*)	real		output array A+R
 CALLS: ***
	ArrayLoc2, BadR4
 CALLED BY:
	smei_base, smei_cal_build, smei_frm_dark, smei_frm_ped
 PROCEDURE:
	Special case: if source=destination and const=0, then no action is taken
 SEE ALSO:
	Array_Info


ArrR4Bad $SMEI/ucsd/gen/for/lib/array/arrr4bad.f
[Previous] [Next]
 NAME:
	ArrR4Bad
 PURPOSE:
	Initialize real*4 array to 'bad' value
 CALLING SEQUENCE:
	subroutine ArrR4Bad(N,C)
 CALLS: ***
	BadR4
 CALLED BY:
	BRead_WSO, HERDISK, MapReadTimes, MkDMap, MkDMaptdn, MkVMap, MkVMaptdN, Pandora, ReadG
	T3D_Read_B, Write3D_bb, iHOSRead, iHOSWrite, ipsd, smei_frm_base, smei_orb
	write3D_infotd3D
 SEE ALSO:
	Array_Info


ArrR4Constant $SMEI/ucsd/gen/for/lib/array/arrr4constant.f
[Previous] [Next]
 NAME:
	ArrR4Constant
 PURPOSE:
	Initialize real*4 array to constant
 CALLING SEQUENCE:
	subroutine ArrR4Constant(N,R,C)
 CALLS: ***
	BadR4
 CALLED BY:
	MkShift, MkShiftdn, Write3D_bbtt, iFltArr, ipsd, ipsdt, ipsg2, ipsg2s, ipsg2t
	shift_MOD [1], shift_MOD [2], smei_cal, smei_cal_c3mask, smei_orb
 SEE ALSO:
	Array_Info


ArrR4Copy $SMEI/ucsd/gen/for/lib/array/arrr4copy.f
[Previous] [Next]
 NAME:
	ArrR4Copy
 PURPOSE:
	Copy real*4 array
 CALLING SEQUENCE:
	subroutine ArrR4Copy(N,A,C)
 CALLS: ***
	ArrayLoc2, BadR4
 CALLED BY:
	ArrR4CopySlab, BListAll, BRead_WSO, Connect, Dust, FLINT, GridSphere3D
	GridSphereRange, GridSphereWeight, HERDISK, HOSRead, HOSUpdate, HOSWrite, LOSClean
	LOSWeights, MKVTRACE, MapReadTimes, MkShiftdn, READ_HOS, RebinSphere
	SW_Model_Kinematic, iHOSRead, iHOSWrite, ipsd, ipsdt, ipsg2, ipsg2s, ipsg2t, smei_base
	smei_cal_write, smei_frm_clean, smei_orb, smei_orb_write, smei_skyd_scan
 PROCEDURE:
	Special case: source = destination, then no action is taken
 SEE ALSO:
	Array_Info


ArrR4Copy2 $SMEI/ucsd/gen/for/lib/array/arrr4copy2.f
[Previous] [Next]
 NAME:
	ArrR4Copy2
 PURPOSE:
	Copy two same-size real*4 arrays
 CALLING SEQUENCE:
	subroutine ArrR4Copy2(N,A1,A2,C1,C2)
 CALLS: ***
	ArrayLoc2, BadR4
 CALLED BY:
	MkShift, MkShiftdn
 SEE ALSO:
	Array_Info


ArrR4CopySlab $SMEI/ucsd/gen/for/lib/array/arrr4copyslab.f
[Previous] [Next]
 NAME:
	ArrR4CopySlab
 PURPOSE:
	Extract a section from a multi-dimensional array
 CATEGORY:
	Array manipulation
 CALLING SEQUENCE:
	subroutine ArrR4CopySlab(N,ND,M,L,A,C)
 INPUTS:
	N		integer		# dimensions
	ND(N)		integer		dimension sizes
	M		integer		dimension from which a slab is to be extracted
	L		integer		index into the Mth dimension identifying the slab
					to be extracted
	A(*)		integer		N dimensional array
 OUTPUTS:
	C(*)		integer		N-1 dimensional array
 CALLS: ***
	ArrR4Copy
 RESTRICTIONS:
	1 <= M <= N
	1 <= L <= ND(M)
	No explicit checks are made for this
	There is also no check whether A and C overlap.
 EXAMPLES:
	For a three-dimensional cube of dimensions 10x10x10
	N = 3
	ND(1) = 10
	ND(2) = 10
	ND(3) = 10
	call ArrR4CopySlab(N,ND,1,5,A,C)	Extracts a slab perpendicular to the x-axis
	call ArrR4CopySlab(N,ND,2,5,A,C)	Extracts a slab perpendicular to the y-axis
	call ArrR4CopySlab(N,ND,3,5,A,C)	Extracts a slab perpendicular to the z-axis
 PROCEDURE:
 >	For a multidimentional array A( ND(1),ND(2),..., ND(N) ) the portion extracted
	is A( ND(1),..,L,..,ND(N) ) for index L in dimension M. The array will have one
	dimension less than the input array (the Mth dimension disappears).
 >	Internally the array A is treated as a 3D array with dimensions [NLO,ND[M],NHI]
	(where NLO, the product of the 1st M-1 dimensions, and NHI, the product of the dimensions
	following the Mth dimension, could be equal to 1). The extraction of the slab is
	implemented as moving NHI blocks of NLO elements with ArrR4Copy.
 MODIFICATION HISTORY:
	MAY-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


ArrR4DivideByArrI4 $SMEI/ucsd/gen/for/lib/array/arrr4dividebyarri4.f
[Previous] [Next]
 NAME:
	ArrR4DivideByArrI4
 PURPOSE:
	Divide real*4 array by same-size integer*4 array
 CALLING SEQUENCE:
	subroutine ArrR4DivideByArrI4(N,A,B,C)
 CALLS: ***
	ArrayLoc3, BadI4, BadR4
 CALLED BY:
	Average, GridRan2Reg
 SEE ALSO:
	Array_Info


ArrR4DivideByArrR4 $SMEI/ucsd/gen/for/lib/array/arrr4dividebyarrr4.f
[Previous] [Next]
 NAME:
	ArrR4DivideByArrR4
 PURPOSE:
	Divide two same-size real*4 arrays
 CALLING SEQUENCE:
	subroutine ArrR4DivideByArrR4(N,A,B,C)
 CALLS: ***
	ArrayLoc3, BadR4
 CALLED BY:
	LOSIntegralG, LOSIntegralV, MapReadSingle, smei_cal_build, smei_skyd_fts
	smei_skyd_init, smei_skyd_make, smei_skyd_sky
 SEE ALSO:
	Array_Info


ArrR4DivideByConstant $SMEI/ucsd/gen/for/lib/array/arrr4dividebyconstant.f
[Previous] [Next]
 NAME:
	ArrR4DivideByConstant
 PURPOSE:
	Divide real*4 array by constant
 CALLING SEQUENCE:
	subroutine ArrR4DivideByConstant(N,A,R,C)
 INPUTS:
	N	integer		abs(N) = # elements
				N < 0 skips bad values
	A(*)	real		input array of abs(N) elements
	R	real		scalar constant by which to divide A
 OUTPUTS:
	C(*)	real		output array A/R
 CALLS: ***
	ArrayLoc2, BadR4
 CALLED BY:
	LOSIntegralG, LOSIntegralV
 SEE ALSO:
	Array_Info


ArrR4Function $SMEI/ucsd/gen/for/lib/array/arrr4function.f
[Previous] [Next]
 NAME:
	ArrR4Function
 PURPOSE:
	Apply external or intrinsic function to all elements in real*4 array
 CALLING SEQUENCE:
	subroutine ArrR4Function(N,fnc,A,C)
 CALLS: ***
	ArrayLoc2, BadR4
 CALLED BY:
	ipsg2, ipsg2s, ipsg2t
 SEE ALSO:
	Array_Info


ArrR4GetMinMax $SMEI/ucsd/gen/for/lib/array/arrr4getminmax.f
[Previous] [Next]
 NAME:
	ArrR4GetMinMax
 PURPOSE:
	Get min and max of real*4 array
 CALLING SEQUENCE:
	subroutine ArrR4GetMinMax(N,A,AMin,AMax)
 CALLS: ***
	BadR4
 CALLED BY:
	ExpandSW, FillWholeT, GridFill, HOSPlot, LOSTweak, MapGrid, MapReadTimes, MapWarp
	MkDMaptdn, MkShiftdn, MkVMaptdN, Peep, ReadG, SplineX, SplineY, T3D_Read_B, WR2DARR
	WhatIsR4, iFltArr, ipsdt, shift_MOD [1], shift_MOD [2], sim_MOD, smei_frm_measle
 SEE ALSO:
	Array_Info


ArrR4Index $SMEI/ucsd/gen/for/lib/array/arrr4index.f
[Previous] [Next]
 NAME:
	ArrR4Index
 PURPOSE:
	Initialize real*4 index to index
 CALLING SEQUENCE:
	subroutine ArrR4Index(N,C)
 CALLS: ***
	BadR4
 SEE ALSO:
	Array_Info


ArrR4Interpolate $SMEI/ucsd/gen/for/lib/array/arrr4interpolate.f
[Previous] [Next]
 NAME:
	ArrR4Interpolate
 PURPOSE:
	Interpolate on 1-dim real*4 array.
 CALLING SEQUENCE:
	function ArrR4Interpolate(N,A,X)
 INPUTS:
	N	integer		# points in array
	A(N)	real		Array of function values 
	X	real		Function value where interpolated position is needed
 OUTPUTS:
	ArrR4Interpolate
		real		interpolated index in [1,N]
				A BadR4 value is returned if X lies outside the
				range of input array A.
 CALLS: ***
	BadR4
 CALLED BY:
	Write3D_bbtt
 RESTRICTIONS:
	A must be a monotonically increasing array.
 PROCEDURE:
	For given X the pair of indices I-1 and I are located
	where A(I-1) < X <= A(I). Then a linear interpolation between these
	two points gives the return floating point index.
 MODIFICATION HISTORY:
	SEP-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


ArrR4Invert $SMEI/ucsd/gen/for/lib/array/arrr4invert.f
[Previous] [Next]
 NAME:
	ArrR4Invert
 PURPOSE:
	Invert elements in real*4 array
 CALLING SEQUENCE:
	subroutine ArrR4Invert(N,C)
 CALLS: ***
	BadR4
 SEE ALSO:
	Array_Info


ArrR4LinearArrR4 $SMEI/ucsd/gen/for/lib/array/arrr4linearr4.f
[Previous] [Next]
 NAME:
	ArrR4LinearArrR4
 PURPOSE:
	Make linear combination of two same-size real*4 array
 CALLING SEQUENCE:
	subroutine ArrR4LinearArrR4(N,A,R1,B,R2,C)
 CALLS: ***
	ArrayLoc3, BadR4
 SEE ALSO:
	Array_Info


ArrR4Mask $SMEI/ucsd/gen/for/lib/array/arrr4mask.f
[Previous] [Next]
 NAME:
	ArrR4Mask
 PURPOSE:
	Apply mask to real*4 array
 CALLING SEQUENCE:
	subroutine ArrR4Mask(N,A,AVal,TrueInt,TrueSlope,FalseInt,FalseSlope,C)
 INPUTS:
	N		integer		# elements in A
	A(abs(N))	real		real array to be processed
	AVal		real		test value
	TrueInt		real		y-intercept when A tests 'true'
	TrueSlope	real		slope when A tests 'true'
	FalseInt	real		y-intercept when A tests 'false'
	FalseSlope	real		slope when A tests 'false'
	C(abs(N))	real		array to be 'masked'
 OUTPUTS:
	C(abs(N))	real		modified real array
 CALLS: ***
	ArrayLoc2, BadR4
 CALLED BY:
	GridFill, MapWarp, WR2DARR, iFltArr, iHOSRead, iHOSWrite, iReadProxyMapN
	iWriteProxyMapN, ipsdt, ipsg2, ipsg2s, ipsg2t, smei_base, smei_cal, smei_cal_write
	smei_orb_write, smei_skyd_fts, smei_skyd_init, smei_skyd_make, smei_skyd_sky
 SEE ALSO:
	Array_Info
 PROCEDURE:
	Each element in A is compared with value AVal.
	Where A is equal to AVal (A .eq. AVal tests 'true') the value of C is
	scaled linearly using TrueInt and TrueSlope. Where B is NOT equal to AVal
	the value in C is scaled linearly using FalseInt and FalseSlope.
 EXAMPLE:
	call ArrR4Mask(N, A, BadR4(), 0.0,0.0, 0.0, 1.0, C)

	sets elements C to zero, where A is BadR4(), while not changing the 'good' values.
 MODIFICATION HISTORY:
	???-????, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


ArrR4Mean $SMEI/ucsd/gen/for/lib/array/arrr4mean.f
[Previous] [Next]
 NAME:
	ArrR4Mean
 PURPOSE:
	Get average of all elements in real*4 array
 CALLING SEQUENCE:
	function ArrR4Mean(N,A,M)
 INPUTS:
	N	integer		abs(N) is # elements in A
				if N < 0 then bad values in A are ignored
	A(*)	real		array
 OUTPUTS:
	M	integer		number of elements contributing to mean
 CALLS: ***
	BadR4
 CALLED BY:
	ArrR4Stdev, smei_base, smei_frm_dark, smei_frm_ped, smei_skyd_combine
 SEE ALSO:
	Array_Info


ArrR4Median $SMEI/ucsd/gen/for/lib/array/arrr4median.f
[Previous] [Next]
 NAME:
	ArrR4Median
 PURPOSE:
	Get median of all elements in real*4 array
 CALLING SEQUENCE:
	function ArrR4Median(N,A,W,M,B)
 INPUTS:
	N	integer		abs(N) is # elements in A
				if N < 0 then bad values in A are ignored
	A(*)	real		array
	W	real		bin width
 OUTPUTS:
	M	integer		# elements contributing to median
				=N if N > 0
				=N-(# bad values) if N < 0
	B(M)	real		M valid elements of A in sorted order
 CALLS: ***
	BadR4, SortR4
 CALLED BY:
	smei_frm_dark, smei_frm_ped, smei_skyd_combine
 SEE ALSO:
	Array_Info
 PROCEDURE:
	Array A and array B can be the same array, i.e. the following is legal:
		call ArrR4Median(N,A,M,A)
	After completion M=N (if N>0) and A will be sorted into ascending order. 


ArrR4MinusArrR4 $SMEI/ucsd/gen/for/lib/array/arrr4minusarrr4.f
[Previous] [Next]
 NAME:
	ArrR4MinusArrR4
 PURPOSE:
	Subtract two same-size real*4 arrays
 CALLING SEQUENCE:
	subroutine ArrR4MinusArrR4(N,A,B,C)
 CALLS: ***
	ArrayLoc3, BadR4
 CALLED BY:
	smei_frm_ped
 SEE ALSO:
	Array_Info


ArrR4Negate $SMEI/ucsd/gen/for/lib/array/arrr4negate.f
[Previous] [Next]
 NAME:
	ArrR4Negate
 PURPOSE:
	Change sign in real*4 array
 CALLING SEQUENCE:
	subroutine ArrR4Negate(N,C)
 CALLS: ***
	BadR4
 SEE ALSO:
	Array_Info


ArrR4PlusArrR4 $SMEI/ucsd/gen/for/lib/array/arrr4plusarrr4.f
[Previous] [Next]
 NAME:
	ArrR4PlusArrR4
 PURPOSE:
	Add two same-size real*4 arrays
 CALLING SEQUENCE:
	subroutine ArrR4PlusArrR4(N,A,B,C)
 CALLS: ***
	ArrayLoc3, BadR4
 CALLED BY:
	smei_skyd_fts, smei_skyd_init, smei_skyd_make, smei_skyd_sky
 SEE ALSO:
	Array_Info


ArrR4Reverse $SMEI/ucsd/gen/for/lib/array/arrr4reverse.f
[Previous] [Next]
 NAME:
	ArrR4Reverse
 PURPOSE:
	Reverse order of elements in real*4 array
 CALLING SEQUENCE:
	subroutine ArrR4Reverse(N,A,B)
 CALLED BY:
	BRead_WSO
 SEE ALSO:
	Array_Info


ArrR4Scale $SMEI/ucsd/gen/for/lib/array/arrr4scale.f
[Previous] [Next]
 NAME:
	ArrR4Scale
 PURPOSE:
	Apply linear scale change to real*4 array
 CALLING SEQUENCE:
	subroutine ArrR4Scale(N,A,Y,R,C)
 CALLS: ***
	ArrayLoc2, BadR4
 SEE ALSO:
	Array_Info


ArrR4Scale2 $SMEI/ucsd/gen/for/lib/array/arrr4scale2.f
[Previous] [Next]
 NAME:
	ArrR4Scale2
 PURPOSE:
	Apply linear scale changes to two same-size real*4 arrays
 CALLING SEQUENCE:
	subroutine ArrR4Scale2(N,A1,A2,Y1,Y2,R1,R2,C1,C2)
 CALLS: ***
	ArrayLoc2, BadR4
 SEE ALSO:
	Array_Info


ArrR4SetMinMax $SMEI/ucsd/gen/for/lib/array/arrr4setminmax.f
[Previous] [Next]
 NAME:
	ArrR4SetMinMax
 PURPOSE:
	Limit range of real*4 array to min and max
 CALLING SEQUENCE:
	subroutine ArrR4SetMinMax(N,A,AMin,AMax)
 CALLS: ***
	BadR4
 CALLED BY:
	MkShift, MkShiftdn, ipsd, ipsdt, smei_cal
 SEE ALSO:
	Array_Info


ArrR4Stdev $SMEI/ucsd/gen/for/lib/array/arrr4stdev.f
[Previous] [Next]
 NAME:
	ArrR4Stdev
 PURPOSE:
	Get standard deviations of all elements in real*4 array
 CALLING SEQUENCE:
	function ArrR4Stdev(iFree,N,A,AMean,M)
 INPUTS:
	iFree	integer		0,1 (only used if AMean is NOT set to BadR4())
				
	N	integer		abs(N) is # elements in A
				if N < 0 then bad values in A are ignored
	A(*)	real		array
	AMean	real		mean value (if set to BadR4()) then
				ArrR4Mean is called to get the mean, and
				iFree=1 is used)
 OUTPUTS:
	AMean	real		mean value (only if AMean = BadR4() on input)
	M	integer		number of elements contributing to
				standard deviation
 CALLS: ***
	ArrR4Mean, BadR4
 CALLED BY:
	smei_frm_dark, smei_frm_ped, smei_skyd_combine
 SEE ALSO:
	Array_Info
 PROCEDURE:
	The return value is
	    Stdev = sqrt( Sum( (Ai-AMean)^2 )/(N-iFree) )
	If AMean is set to BadR4() on input then the mean AMean is computed by
	a call to ArrR4Mean and iFree=1 is used.
	IF AMean is NOT set to BadR4() then the input values for both AMean
	and iFree are used in the expression for Stdev. Usually iFree=1.


ArrR4Step $SMEI/ucsd/gen/for/lib/array/arrr4step.f
[Previous] [Next]
 NAME:
	ArrR4Step
 PURPOSE:
	Initialize real*4 array to stepwise increasing values
 CALLING SEQUENCE:
	subroutine ArrR4Step(Y,dY,N,C)
 CALLS: ***
	BadR4
 CALLED BY:
	BRead_WSO, SplineGridX, SplineGridY
 SEE ALSO:
	Array_Info


ArrR4TimesArrR4 $SMEI/ucsd/gen/for/lib/array/arrr4timesarrr4.f
[Previous] [Next]
 NAME:
	ArrR4TimesArrR4
 PURPOSE:
	Multiply to same-size real*4 arrays
 CALLING SEQUENCE:
	subroutine ArrR4TimesArrR4(N,A,B,C)
 CALLS: ***
	ArrayLoc3, BadR4
 CALLED BY:
	LOSIntegralG, LOSIntegralV, ipsg2, ipsg2s, ipsg2t, smei_cal_build
 SEE ALSO:
	Array_Info


ArrR4TimesConstant $SMEI/ucsd/gen/for/lib/array/arrr4timesconstant.f
[Previous] [Next]
 NAME:
	ArrR4TimesConstant
 PURPOSE:
	Multiply real*4 array by constant
 INPUTS:
	N	integer		abs(N) = # elements
				N < 0 skips bad values
	A(*)	real		input array of abs(N) elements
	R	real		scalar constant to be multiplied with A
 OUTPUTS:
	C(*)	real		output array A*R
 CALLING SEQUENCE:
	subroutine ArrR4TimesConstant(N,A,R,C)
 CALLS: ***
	ArrayLoc2, BadR4
 CALLED BY:
	MapReadSingle, MapReadTimes, READ_HOS, Write3D_bb, Write3D_bb_UT, Write3D_bb_XC
	Write3D_bbtt, ipsd, ipsdt, smei_cal_bin, smei_frm_read, smei_frm_read_get_sdark
 SEE ALSO:
	Array_Info


ArrR4Total $SMEI/ucsd/gen/for/lib/array/arrr4total.f
[Previous] [Next]
 NAME:
	ArrR4Total
 PURPOSE:
	Get sum of all elements in real*4 array
 CALLING SEQUENCE:
	function ArrR4Total(N,A,M)
 INPUTS:
	N	integer		# elements in array
				If N < 0 then array elements
				set to BadR4 are skipped
	A(*)	real		array
 OUTPUTS:
	R	real		sum
	M	integer		# elements contributing
				to sum (if N > 0 then M=N)
 CALLS: ***
	BadR4
 CALLED BY:
	BuildSourceSurface, LOSIntegralG, LOSIntegralV, LOSReach, LOSWeights
	MapReadSingle, MkD2V, PrintAll, smei_skyd_combine
 SEE ALSO:
	Array_Info


ArrR4Zero $SMEI/ucsd/gen/for/lib/array/arrr4zero.f
[Previous] [Next]
 NAME:
	ArrR4Zero
 PURPOSE:
	Initialize real*4 array to zero
 CALLING SEQUENCE:
	subroutine ArrR4Zero(N,C)
 CALLS: ***
	BadR4
 CALLED BY:
	Average, BuildSourceSurface, GridRan2Reg, MapGrid, MapReadSingle, MkDMap, MkDMaptdn
	MkShift, MkShiftdn, MkVMap, MkVMaptdN, SW_Model_Kinematic, T_FILTER, ipsd, ipsdt
	shift_MOD [1], shift_MOD [2], smei_cal_build, smei_cal_write, smei_orb_get
	smei_skyd_fts, smei_skyd_init, smei_skyd_make, smei_skyd_sky
 SEE ALSO:
	Array_Info


ArrR8Bad $SMEI/ucsd/gen/for/lib/array/arrr8bad.f
[Previous] [Next]
 NAME:
	ArrR8Bad
 PURPOSE:
	Initialize real*8 array to 'bad' value
 CALLING SEQUENCE:
	subroutine ArrR8Bad(N,C)
 CALLS: ***
	BadR8
 CALLED BY:
	smei_skyd
 SEE ALSO:
	Array_Info


ArrR8Copy $SMEI/ucsd/gen/for/lib/array/arrr8copy.f
[Previous] [Next]
 NAME:
	ArrR8Copy
 PURPOSE:
	Copy double precision array
 CALLING SEQUENCE:
	subroutine ArrR8Copy(N,A,C)		! Copy double precision array
 CALLS: ***
	ArrayLoc2, BadR8
 CALLED BY:
	FLINT8, jpl_eph2, smei_cal_bin, smei_frm_ok, smei_skyd_fts, smei_skyd_init
	smei_skyd_make, smei_skyd_sky
 SEE ALSO:
	Array_Info


ArrR8Interpolate $SMEI/ucsd/gen/for/lib/array/arrr8interpolate.f
[Previous] [Next]
 NAME:
	ArrR8Interpolate
 PURPOSE:
	Interpolate on 1-dim double precision array.
 CALLING SEQUENCE:
	double precision function ArrR8Interpolate(N,A,X)
 INPUTS:
	N	integer			# points in array
	A(N)	double precision	Array of function values 
	X	double precision	Function value where interpolated position is needed
 OUTPUTS:
	ArrR8Interpolate
		double precision	interpolated index in [1,N]
					A BadR4 value is returned if X lies outside the
					range of input array A.
 CALLS: ***
	BadR8
 RESTRICTIONS:
	A must be a monotonically increasing array.
 PROCEDURE:
	For given X the pair of indices I-1 and I are located
	where A(I-1) < X <= A(I). Then a linear interpolation between these
	two points gives the return floating point index.
 MODIFICATION HISTORY:
	OCT-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


ArrR8Zero $SMEI/ucsd/gen/for/lib/array/arrr8zero.f
[Previous] [Next]
 NAME:
	ArrR8Zero
 PURPOSE:
	Initialize double precision array to zero
 CALLING SEQUENCE:
	subroutine ArrR8Zero(N,C)		! Initialize double precision array to zero
 CALLS: ***
	BadR8
 CALLED BY:
	NicHdr, jpl_eph2, smei_frm_ok, smei_frm_read, smei_frm_read_get_sdark
 SEE ALSO:
	Array_Info


asind $SMEI/ucsd/gen/for/os/goniod.f
[Previous] [Next]
 NAME:
	asind
 CALLING SEQUENCE:
	function asind(a)
 INPUTS:
	a	real		sin(angle)
 CALLED BY:
	BRead_WSO, MapWarp
 INCLUDE:
	include     'math.h'
 SEE ALSO:
	cosd
 MODIFICATION HISTORY:
	JAN-2001, Paul Hick (UCSD; pphick@ucsd.edu)


AskChar $SMEI/ucsd/gen/for/lib/what/askchar.f
[Previous] [Next]
 NAME:
	AskChar
 PURPOSE:
	Prompt user for character value
 CATEGORY:
	I/O: user input
 CALLING SEQUENCE:
	subroutine AskChar(cQueryIn,cVal)
 INPUTS:
	cQueryIn	character*(*)		string to be used as prompt
	cVal		character*(*)		default value
 OUTPUTS:
	cVal		character*(*)		user-defined value
 CALLS: ***
	bAskChar, iAskChar, itrim, uppercase
 CALLED BY:
	AskWhat, AskYN, Average, ExpandSW, FileInfo, HERDISK, HOSdos2vms, Pandora, Peep
	SetLog2Dir, bOpenFile, rice
 INCLUDE:
	include		'dirspec.h'
 PROCEDURE:
	User is prompted for a new value. The current (input) value is 
	presented as default. The default is selected by hitting return.
 >	If cQuery ends with the substring '$file', then the input is accepted
	only if it represents an existing file. The full filename is
	returned in cVal.
 >	if cQuery ends with the substring '$dir', then the input is accepted
	only if it represents an existing directory. The directory name is
	returned in cVal.
 >	if cQuery ends with the substring '$u', then all input is converted to
	uppercase.
 MODIFICATION HISTORY:
	Old, very old


AskI2 $SMEI/ucsd/gen/for/lib/what/aski2.f
[Previous] [Next]
 NAME:
	AskI2
 PURPOSE:
	Prompt for integer*2 value
 CALLING SEQUENCE:
	subroutine AskI2(cQuery,Valu)
 INPUTS:
	cQuery		character*(*)	string to be used as prompt
	Valu				default value
 OUTPUTS:
	Valu				selected value
 CALLS: ***
	AskR4
 CALLED BY:
	Pandora
 MODIFICATION HISTORY:
	1991, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


AskI4 $SMEI/ucsd/gen/for/lib/what/aski4.f
[Previous] [Next]
 NAME:
	AskI4
 PURPOSE:
	Prompt for integer*4 value
 CALLING SEQUENCE:
	subroutine AskI4(cQuery,Valu)
 INPUTS:
	cQuery		character*(*)	string to be used as prompt
	Valu		integer		default value
 OUTPUTS:
	Valu		integer		selected value
 CALLS: ***
	AskR4
 CALLED BY:
	Dust, HERDISK, HOSPlot, IPSConstraints, IPSProcessing, Pandora, Pandora_Menu, PrintAll
	SD, SetGrid, T_FILTER, TheFit, ipsd, ipsdt
 MODIFICATION HISTORY:
	1991, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


AskLimit $SMEI/ucsd/gen/for/lib/what/asklimit.f
[Previous] [Next]
 NAME:
	AskLimit
 PURPOSE:
	Extract max and min value from query string
 CATEGORY:
	I/O: user input
 CALLING SEQUENCE:
	logical function AskLimit(cQuery,L,rMin,rMax,rStop)
 INPUTS:
	cQuery		character*(*)		string to be used as prompt
 OUTPUTS:
	AskLimit	logical			.TRUE. if rMin and rMax are set
	L		integer			length of query string (see PROCEDURE)
	rMin		double precision	minimum permitted value
	rMax		double precision	maximum permitted value
	rStop		double precision	STOP value (see PROCEDURE)
 CALLED BY:
	AskR4, AskR8
 INCLUDE:
	include		'str2str_inc.h'
 CALLS: ***
	Dbl2Str, LocFirstLen, Say, Str2Dbl, Str2Str, Str2StrSet, itrim
 RESTRICTIONS:
 >	If AskLimit is returned .FALSE., the rMin and rMax values
	should not be used (they are returned as -999.0d0)
 >	Both `rmin' and `rmax' must be present
 PROCEDURE:
 >	used by some of the Ask* procedure to limit the range of permitted
	input values.
 >	The cQuery can contain information about the range of permitted values
	in the form:
		cQuery = "string$rmin$rmax$rstop"
	where
		`string' is the query string;
		`rmin' and `rmax' (returned in rMin and rMax) define the range
			of permissible input values;
		`rstop' is the STOP value;
 >	`rstop' is used to exit the query loop, even if it is outside the range
	[rmin,rmax]
 >	The default value for `rstop' is -999.0d0.
 >	the length of `string' is returned as L
 MODIFICATION HISTORY:
	SEP-1994, Paul Hick (UCSD/CASS)
	OCT-2002, Paul Hick (UCSD/CASS)
	    Changed output from single to double precision.
	OCT-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Bugfix. For AskLimit=.FALSE., rMin and rMax were not set
	    to anything. Now they are set to -999.0d0 so the calling routine
	    is not confronted with a potentially uninitialized variable.


AskLog $SMEI/ucsd/gen/for/lib/what/asklog.f
[Previous] [Next]
 NAME:
	AskLog
 PURPOSE:
	Prompt user for logical value (0=No;1=Yes)
 CATEGORY:
	I/O
 CALLING SEQUENCE:
	subroutine AskLog(cQuery,Val)
 INPUTS:
	cQuery		Character*(*)	query to be used as prompt
	Val		Logical		default value
 OUTPUTS:
	Val		Logical		user-defined value
 INCLUDE:
	include		'dirspec.h'
 CALLS: ***
	itrim
 PROCEDURE:
	User is prompted for a new value. The current (input) value is the
	default. The default is selected by hitting RETURN.
 MODIFICATION HISTORY:
	Old, very old


AskR4 $SMEI/ucsd/gen/for/lib/what/askr4.f
[Previous] [Next]
 NAME:
	AskR4
 PURPOSE:
	Prompt user for real*4 value
 CATEGORY:
	I/O: user input
 CALLING SEQUENCE:
	subroutine AskR4(cQuery,Valu)
 INPUTS:
	cQuery		character*(*)	string to be used as prompt
	Valu		real*4		default value
 OUTPUTS:
	Valu		real*4		selected value
 CALLS: ***
	AskLimit, Flt2Str, bStr2Flt, itrim
 CALLED BY:
	AskI2, AskI4, Average, Connect, HERDISK, HOSPlot, IPSConstraints, Pandora, PrintAll
	SetGrid, T_FILTER, TheFit, ipsd, ipsdt, ipsg2, ipsg2s, ipsg2t
 INCLUDE:
	include		'dirspec.h'
 RESTRICTIONS:
	There is no check for integer overflow
 PROCEDURE:
 >	User is prompted for a new value. The current (input) value is 
	presented as default. The default is selected by hitting return.
	If invalid characters are entered, user will be prompted again.
 >	A special value for breaking the prompt loop and the range of
	permitted input values can be coded into the cQuery string using
	appropriate delimiters (see function AskLimit)
 MODIFICATION HISTORY:
	???-1991, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


AskR8 $SMEI/ucsd/gen/for/lib/what/askr8.f
[Previous] [Next]
 NAME:
	AskR8
 PURPOSE:
	Prompt user for double precision value
 CATEGORY:
	I/O: user input
 CALLING SEQUENCE:
	subroutine AskR8(cQuery,Valu)
 INPUTS:
	cQuery		character*(*)		string to be used as prompt
	Valu		double precision	default value
 OUTPUTS:
	Valu		double precision	selected value
 CALLS: ***
	AskLimit, Dbl2Str, bStr2Dbl, itrim
 CALLED BY:
	Pandora, SetGrid, TheFit, ipsd, ipsdt
 INCLUDE:
	include		'dirspec.h'
 RESTRICTIONS:
	There is no check for integer overflow
 PROCEDURE:
 >	User is prompted for a new value. The current (input) value is 
	presented as default. The default is selected by hitting return.
	If invalid characters are entered, user will be prompted again.
 >	A special value for breaking the prompt loop and the range of
	permitted input values can be coded into the cQuery string using
	appropriate delimiters (see function AskLimit)
 MODIFICATION HISTORY:
	???-1991, Paul Hick (UCSD/CASS)
	OCT-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Fixed to return value at full double precision. AskR8 used
		to be a one-line interface to AskR4, i.e. it returned user-
		input at single precision.


AskWhat $SMEI/ucsd/gen/for/lib/what/askwhat.f
[Previous] [Next]
 NAME:
	AskWhat
 PURPOSE:
	Select entry from comma-separated list
 CATEGORY:
	I/O: user input
 CALLING SEQUENCE:
	subroutine AskWhat(cPrmptIn,iC)
 INPUTS:
	cList	character*(*)	comma-separated list of choices
	iC	integer		entry # of default item (if outside range
				the first item is the default).
 OUTPUTS:
	iC	integer		entry # of selected item
				(see PROCEDURE)
 CALLS: ***
	AskChar, AskWhatEntry, AskWhatPrmpt, iAskWhatEntry
 CALLED BY:
	Connect, HERDISK, HOSPlot, IPSConstraints, IPSProcessing, Pandora, PrintAll, ReadGIPS
	SetGipsy, SortIPS, TheFit, ipsd, ipsdt
 SIDE EFFECTS:
 >	The input is NOT case-sensitive
 >	One space is permitted between the comma and the start of the next item
 PROCEDURE:
 >	The return value of IC is 1 if the 1st item is selected, 2 for 2nd, etc.
 >	Override this default by adding an integer value preceded by the dollar
	($) sign to the prompt string.
	E.g. if the prompt string is `prompt$0' then the return value of IC = 0
	if the first item is selected, etc.
 >	If the prompt contains a colon (':') the portion preceding the colon
	(including the colon) are ignored in the selection process.
 >	The first item that starts with the input string is selected (i.e. only
	the first few characters of an item have to be entered.
 MODIFICATION HISTORY:
	SEP-1994, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


AskWhatEntry $SMEI/ucsd/gen/for/lib/what/askwhatentry.f
[Previous] [Next]
 NAME:
	AskWhatEntry
 CALLING SEQUENCE:
	subroutine AskWhatEntry(iP,iC,cPrmpt)
 CALLS: ***
	LocFirstLen
 PURPOSE:
	Internal use only.
 CALLED BY:
	AskWhat
 MODIFICATION HISTORY:
	SEP-1994, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


AskWhatPrmpt $SMEI/ucsd/gen/for/lib/what/askwhatprmpt.f
[Previous] [Next]
 NAME:
	AskWhatPrmpt
 CALLING SEQUENCE:
	subroutine AskWhatPrmpt(iC,L1,L2,cPrmptIn,cPrmpt,cWhatIn)
 CALLS: ***
	LocFirstLen, Str2Flt, itrim, uppercase
 PURPOSE:
	Internal use only.
 CALLED BY:
	AskWhat
 MODIFICATION HISTORY:
	SEP-1994, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


AskYN $SMEI/ucsd/gen/for/lib/what/askyn.f
[Previous] [Next]
 NAME:
	AskYN
 PURPOSE:
	Choose YES or NO
 CATEGORY:
	I/O: user input
 CALLING SEQUENCE:
	subroutine AskYN(cPrmptIn,bYN)
 INPUTS:
	cPrmpt	character*(*)	prompt string
 OUTPUTS:
	bYN	logical		.FALSE. for NO; .TRUE. for YES
 CALLS: ***
	AskChar, itrim
 CALLED BY:
	Average, Connect, Dust, HERDISK, HOSPlot, IPSConstraints, IPSProcessing, NODAT, Pandora
	PrintAll, SD_TREE, TheFit, ipsd, ipsdt
 SIDE EFFECTS:
	The input is NOT case-sensitive
 PROCEDURE:
 MODIFICATION HISTORY:
	SEP-1994, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


AsymDust $SMEI/for/lib/hos/asymdust.f
[Previous] [Next]
 NAME:
	AsymDust
 PURPOSE:
	Converts an observed intensity in the ecliptic into an intensity as
	would be observed in the plane of symmetry of the zodiacal dust cloud
	(iD=0) and v.v. (iD=1)
 CATEGORY:
	Physics: empirical correction
 CALLING SEQUENCE:
	function AsymDust(iD,iSc,L,P,iS,Z)
 INPUTS:	(all input is read-only)
	iD	integer		=0 : convert from ecliptic to symmetry plane
				=1 : convert from symmetry plane to ecliptic
	iSc	integer		1=Helios A; 2=Helios B
	L	real		ecliptic longitude of Sun
	P	integer		photometers for first ICNT(1) measurements
	iS	integer		sector number (regular or modified)
	Z	real		intensity
 OUTPUTS:
	AsymDust
		real		transformed intensity
				If Z = BadR4() then AsymDust returns BadR4()
 CALLS: ***
	BadR4, cosd, sind
 PROCEDURE:
	The corrections used are from Leinert et al.: Astron. Astrophys. 110
	(1982) 355-357
 MODIFICATION HISTORY:
	JUN-1992, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


atan2d $SMEI/ucsd/gen/for/os/goniod.f
[Previous] [Next]
 NAME:
	atan2d
 CALLING SEQUENCE:
	entry atan2d(a,b)
 INPUTS:
	a	real		sin(angle)
	b	real		cos(angle)
 CALLED BY:
	KeplerOrbit, shift_MOD [1], shift_MOD [2]
 SEE ALSO:
	cosd
 MODIFICATION HISTORY:
	JAN-2001, Paul Hick (UCSD; pphick@ucsd.edu)


atand $SMEI/ucsd/gen/for/os/goniod.f
[Previous] [Next]
 NAME:
	atand
 CALLING SEQUENCE:
	entry atand(a)
 INPUTS:
	a	real		tan(angle)
 CALLED BY:
	PA_POLE
 SEE ALSO:
	cosd
 MODIFICATION HISTORY:
	JAN-2001, Paul Hick (UCSD; pphick@ucsd.edu)


Average $SMEI/user/pphick/for/main/average.f
[Previous] [Next]
 NAME:
	Average
 PURPOSE:
	Replaces groups of points with their averages if those points are 
	closer together in time than a specified value.
 CALLING SEQUENCE:
	program Average
 INPUTS:
	Helios data file
	The data for each photometer/color/filter combinations must be
	chronologically ordered
 OUTPUTS:
	Averaged Helios data file
 CALLS: ***
	ArrI4Zero, ArrR4DivideByArrI4, ArrR4Zero, AskChar, AskR4, AskYN, BadR4, Say, bOpenFile
	iFreeLun, iGetFileSpec, iHOSInfo, iHOSRead, iHOSWrite, iPutFileSpec
 INCLUDE:
	include		'hos_e9.h'
	include		'filparts.h'
	include		'openfile.h'
 PROCEDURE:
	The input file does not need to be rigourously chronological, but should be
	chronologically ordered for each individual photometer/color/filter combination.

	The output file also will not be rigourously chronological. Individual 
	photometer/color/filter combination are stored in chronological order, and
	are written to file sequentially. Combinations are processed in the triple
	loop with the filter in the innermost loop, then the photometer, and the color
	in the outermost loop.

	If the 'merge colors' option is selected then the color values are ignored
	(essentially the file is treated as if it contains only visual (color=3) data.
	In the output file all color entries are set to 3.
 MODIFICATION HISTORY:
	MAY-2000, Paul Hick (UCSD/CASS); pphick@ucsd.edu), rewritten and documented