CarringtonLng $SSW_SMEI_UCSD/obsolete/idl/carringtonlng.pro
[Previous] [Next]
 NAME:
	CarringtonLng
 PURPOSE:
	Get Carrington (heliographic) longitude for given time T
 CALLING SEQUENCE:
	FUNCTION CarringtonLng, T, degrees=degrees
 INPUTS:
	Yr		array; type: standard time structure
 OPTIONAL INPUT PARAMETERS:
	/degrees	    if set then then the output is in degrees
			    (default: radians)
 OUTPUTS:
	R		array; type: float
			    Carrington (heliographic) longitude
 INCLUDE:
	@compile_opt.pro			    ; On error, return to caller
 CALLS: ***
	Carrington, ToRadians
 SEE ALSO:
	CarringtonNr
 PROCEDURE:
	See CarringtonT0 for more details.
 MODIFICATION HISTORY:
	DEC-2000, Paul Hick (UCSD/CASS)
	JAN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Rewrite using new version of Carrington


CarringtonNear $SSW_SMEI_UCSD/obsolete/idl/carringtonnear.pro
[Previous] [Next]
 NAME:
	CarringtonNear
 PURPOSE:
	Translate a heliographic longitude into a Carrington variable within half
	a rotation from a specified Carrington variable
 CATEGORY:
 CALLING SEQUENCE:
	FUNCTION CarringtonNear, XC, LNG, degrees=Degrees
 INPUTS:
	XC	    array; type: float
			reference Carrington variable
	LNG	    array; type: float
			heliographic longitude in [0,360]
 OPTIONAL INPUT PARAMETERS:
	/degrees    indicates LNG is in degrees (default is radians)
 OUTPUTS:
	XCnear	    array; type: float
			Carrington variable near XC ( abs(XCnear-XC) le 0.5 )
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	ToRadians
 SEE ALSO:
	Carrington
 RESTRICTIONS:
	The input longitudes MUST be inside [0,360]
 PROCEDURE:
	The difference in longitude between LNG and XC is calculated. If
	the difference is less than -180 deg then 360 deg is added; if greater than
	180 deg then 360 deg is subtracted.
 MODIFICATION HISTORY:
	OCT-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


CarringtonNr $SSW_SMEI_UCSD/obsolete/idl/carringtonnr.pro
[Previous] [Next]
 NAME:
	CarringtonNr
 PURPOSE:
	Get Carrington rotation number for given time (Yr,Doy)
 CALLING SEQUENCE:
	FUNCTION CarringtonNr, T, lng=lng, degrees=degrees
 INPUTS:
	T	array; type: standard time structure
		    time
 OPTIONAL INPUTS:
	/degrees    if set then the heliographic longitude returned
		    in keyword 'lng' is in degrees (default: radians)
 OUTPUTS:
	CarringtonNr	array; type: integer
		    Carrington rotation number
 OPTIONAL OUTPUTS:
	lng=lng     array; type: float
		    Carrington (heliographic) longitude in
		    radians or degrees (depending on setting of
		    keyword 'degrees')
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	Carrington, ToRadians
 PROCEDURE:
	See CarringtonT0 for more details.
 MODIFICATION HISTORY:
	NOV-1994, Paul Hick (UCSD)
	SEP-1999, Paul Hick (UCSD/CASS)
	    simplified procedure; argument is now a time structure
	DEC-2000, Paul Hick (UCSD/CASS)
	    added output keyword 'lng'
	JAN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Rewrite using new version of Carrington


CarringtonT $SSW_SMEI_UCSD/obsolete/idl/carringtont.pro
[Previous] [Next]
 NAME:
	CarringtonT
 PURPOSE:
	Get times when Earth was at Carrington variable XC
 CALLING SEQUENCE:
	FUNCTION CarringtonT, xc
 INPUTS:
	XC	    array; type: float
 OUTPUTS:
	T	    array; type: standard time structure
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	AngleRange, ScEarth, TimeArray, TimeOp, TimeOrigin, TimeSet
 PROCEDURE:
	An estimate for the Carrington start time is set up first.
	This is refined by a call to CarringtonT0.
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS)
	JAN-2004, Paul Hick (UCSD/CASS)
	    Substantial rewrite to improve precision from several minutes
	    to about a milli-second
	APR-2004, Paul Hick (UCSD/CASS)
	    Added code to prevent iteration loop to get stuck in infinite loop
	JUN=2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Bug fix (du was subscripted with n instead of nn)


CarringtonT0 $SSW_SMEI_UCSD/obsolete/idl/carringtont0.pro
[Previous] [Next]
 NAME:
	CarringtonT0
 PURPOSE:
	Calculate list of start times for subsequent 'Carrington rotations'
 CATEGORY:
	Celestial mechanics
 CALLING SEQUENCE:
	FUNCTION CarringtonT0, T, ScName, ddoy = dDoy, ncar = nCar,	$
	    eastlimb = EastLimb, westlimb = WestLimb, n_c = N_C, f_c = F_C
 INPUTS:
	T	array; type: time structure
		    times
	ScName	scalar; type: string; default: 'ScEarth'
		    function name; identifies spacecraft
	dDoy	scalar; type: float
		    required accuracy (in days) for the Carrington start times JDs
	nCar	scalar; type: integer
		    # start times to be calculated (default=1)
 OUTPUTS:
	Ts	array; type: standard time structure
			Carrington start times
 OPTIONAL OUTPUTS:
	n_c=N_C scalar; type: integer
		    Rotation for which Ts[0] is the start time
		    (this is the rotation containing T)
	f_c=F_C fraction of rotation between input T and Ts[0]
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	AngleRange, ArrayLocation, InitVar, ScEarth, TimeArray, TimeGet, TimeOp, TimeSet
	TimeUnit
 PROCEDURE:
 >	ScName is a user-written function which calculates the heliographic
	    longitude of a spacecraft for a given time T
	The call to ScName has the form:
	    LNG = ScName(T, degrees=degrees)
	where T, a standard time structure is input and LNG (float) is output.
	The function should not modify T in any way.
 >	The spacecraft is supposed to move in the ecliptic, circling the Sun in
	the same direction as Earth (direct motion)
 >	The start time of a new Carrington rotation is defined as the time for
	which the heliographic longitude of the spacecraft is zero.
 >	the input T is the time where the search for start times begins.
	the first nCar Carrington start times after T, including
	the one containing T, are calculated)
 MODIFICATION HISTORY:
	JAN-1992, Paul Hick (UCSD)
	NOV-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu); all times are now
	    time structures (used to be yr, doy or Julian days).


CarringtonVar $SSW_SMEI_UCSD/obsolete/idl/carringtonvar.pro
[Previous] [Next]
 NAME:
	CarringtonVar
 PURPOSE:
	Get Carrington variable for given time T
 CALLING SEQUENCE:
	FUNCTION CarringtonVar, T, fraction=xc
 INPUTS:
	T		array; type: standard time structure
 OUTPUTS:
	CarringtonVar	array; type: float
			    Carrington variable
 OPTIONAL OUTPUTS:
	fraction	array; positive fraction of a rotation
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	AngleRange, ScEarth, TimeOp, TimeSet, TimeUnit
 SEE ALSO:
	CarringtonLng, CarringtonNr
 PROCEDURE:
	See CarringtonT0 for more details.
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS)
	JAN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Rewrite, circumventing ugly CarringtonT0 calls