;+ ; NAME: ; jpl_sizeofsun ; PURPOSE: ; Get size of half the solar disk in angular measure ; CATEGORY: ; gen/idl/ephem ; CALLING SEQUENCE: FUNCTION jpl_sizeofsun, tt_or_rr, $ body = body , $ onebody = onebody, $ degrees = degrees, $ arcsec = arcsec ; INPUTS: ; tt_or_rr array; type: time structure or float ; If time structure is specified this is ; used with 'body' to calculate a heliocentric ; distance using big_eph. ; If float this should be a heliocentric ; distance in AU ; OPTIONAL INPUT PARAMETERS: ; body=body passed to big_eph ; /onebody passed to big_eph ; /degrees return disk size in degrees (default is radians) ; /arcsec return disk size in arcseconds (overrides /degrees) ; OUTPUTS: ; dd angular size of half the solar disk ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; InitVar, IsTime, big_eph, SubArray, ToRadians ; PROCEDURE: ; Returns arcsin( radius of Sun / heliocentric distance) ; MODIFICATION HISTORY: ; MAR-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- InitVar, arcsec, /key CASE IsTime(tt_or_rr) OF 0: rr = tt_or_rr 1: BEGIN InitVar, body, 'earth' rr = big_eph(tt_or_rr,body=body,center='sun',/to_sphere,onebody=onebody) rr = SubArray(rr, element=2) END ENDCASE rr = asin( !sun.R/(rr*!sun.AU*1000.0d0) ) ; Radians CASE arcsec OF 0: rr /= ToRadians(degrees=degrees) ; Radians or degrees 1: rr /= ToRadians(/degrees)/3600.0d0 ; Arcseconds ENDCASE RETURN, rr & END