function sidtim, jd ; ; Given a scalar or array of Julian Day Numbers (& fraction), return ; the corresponding apparent sidereal time(s) at Greenwich. ; ; B. Knapp, 2001-02-15 ; ; RCS Data: ; ; $Header$ ; ; $Log$ ; ; Print usage? n = n_elements( jd ) if n eq 0 then begin print, ' ' print, ' Given a scalar or array of Julian Day Numbers (& fraction),' print, ' this function returns the corresponding apparent sidereal' print, ' time(s) at Greenwich (in degrees).' print, ' ' print, ' st = sidtim( jd )' return, ' ' endif ; ; Use 32-bit or 64-bit shareable object library? mbits = ((!version.release ge 5.4) ? !version.memory_bits : 32) dll = getenv('bgkroot')+string(mbits,"('/lib/astron',i2,'.so')") ; ; Define output and then call the Fortran subroutine jd_loc = double( jd ) st = dblarr( n ) result = call_external( dll, 'sidtim_arg_', n, jd_loc, st ) ; ; Return scalar or array, according to argument jd if (size( jd ))[0] eq 0 then $ return, st[0] $ else $ return, st end