idx int64 0 63k | question stringlengths 61 4.03k | target stringlengths 6 1.23k |
|---|---|---|
58,900 | def spkopn ( filename , ifname , ncomch ) : filename = stypes . stringToCharP ( filename ) ifname = stypes . stringToCharP ( ifname ) ncomch = ctypes . c_int ( ncomch ) handle = ctypes . c_int ( ) libspice . spkopn_c ( filename , ifname , ncomch , ctypes . byref ( handle ) ) return handle . value | Create a new SPK file returning the handle of the opened file . |
58,901 | def spkpds ( body , center , framestr , typenum , first , last ) : body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) framestr = stypes . stringToCharP ( framestr ) typenum = ctypes . c_int ( typenum ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) descr = stypes . emptyDoubleVector ( 5 ) libspice . spkpds_c ( body , center , framestr , typenum , first , last , descr ) return stypes . cVectorToPython ( descr ) | Perform routine error checks and if all check pass pack the descriptor for an SPK segment |
58,902 | def spksfs ( body , et , idlen ) : body = ctypes . c_int ( body ) et = ctypes . c_double ( et ) idlen = ctypes . c_int ( idlen ) handle = ctypes . c_int ( ) descr = stypes . emptyDoubleVector ( 5 ) identstring = stypes . stringToCharP ( idlen ) found = ctypes . c_int ( ) libspice . spksfs_c ( body , et , idlen , ctypes . byref ( handle ) , descr , identstring , ctypes . byref ( found ) ) return handle . value , stypes . cVectorToPython ( descr ) , stypes . toPythonString ( identstring ) , bool ( found . value ) | Search through loaded SPK files to find the highest - priority segment applicable to the body and time specified . |
58,903 | def spksub ( handle , descr , identin , begin , end , newh ) : assert len ( descr ) is 5 handle = ctypes . c_int ( handle ) descr = stypes . toDoubleVector ( descr ) identin = stypes . stringToCharP ( identin ) begin = ctypes . c_double ( begin ) end = ctypes . c_double ( end ) newh = ctypes . c_int ( newh ) libspice . spksub_c ( handle , descr , identin , begin , end , newh ) | Extract a subset of the data in an SPK segment into a separate segment . |
58,904 | def spkuds ( descr ) : assert len ( descr ) is 5 descr = stypes . toDoubleVector ( descr ) body = ctypes . c_int ( ) center = ctypes . c_int ( ) framenum = ctypes . c_int ( ) typenum = ctypes . c_int ( ) first = ctypes . c_double ( ) last = ctypes . c_double ( ) begin = ctypes . c_int ( ) end = ctypes . c_int ( ) libspice . spkuds_c ( descr , ctypes . byref ( body ) , ctypes . byref ( center ) , ctypes . byref ( framenum ) , ctypes . byref ( typenum ) , ctypes . byref ( first ) , ctypes . byref ( last ) , ctypes . byref ( begin ) , ctypes . byref ( end ) ) return body . value , center . value , framenum . value , typenum . value , first . value , last . value , begin . value , end . value | Unpack the contents of an SPK segment descriptor . |
58,905 | def spkw02 ( handle , body , center , inframe , first , last , segid , intlen , n , polydg , cdata , btime ) : handle = ctypes . c_int ( handle ) body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) inframe = stypes . stringToCharP ( inframe ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) segid = stypes . stringToCharP ( segid ) intlen = ctypes . c_double ( intlen ) n = ctypes . c_int ( n ) polydg = ctypes . c_int ( polydg ) cdata = stypes . toDoubleVector ( cdata ) btime = ctypes . c_double ( btime ) libspice . spkw02_c ( handle , body , center , inframe , first , last , segid , intlen , n , polydg , cdata , btime ) | Write a type 2 segment to an SPK file . |
58,906 | def spkw05 ( handle , body , center , inframe , first , last , segid , gm , n , states , epochs ) : handle = ctypes . c_int ( handle ) body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) inframe = stypes . stringToCharP ( inframe ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) segid = stypes . stringToCharP ( segid ) gm = ctypes . c_double ( gm ) n = ctypes . c_int ( n ) states = stypes . toDoubleMatrix ( states ) epochs = stypes . toDoubleVector ( epochs ) libspice . spkw05_c ( handle , body , center , inframe , first , last , segid , gm , n , states , epochs ) | Write an SPK segment of type 5 given a time - ordered set of discrete states and epochs and the gravitational parameter of a central body . |
58,907 | def spkw08 ( handle , body , center , inframe , first , last , segid , degree , n , states , epoch1 , step ) : handle = ctypes . c_int ( handle ) body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) inframe = stypes . stringToCharP ( inframe ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) segid = stypes . stringToCharP ( segid ) degree = ctypes . c_int ( degree ) n = ctypes . c_int ( n ) states = stypes . toDoubleMatrix ( states ) epoch1 = ctypes . c_double ( epoch1 ) step = ctypes . c_double ( step ) libspice . spkw08_c ( handle , body , center , inframe , first , last , segid , degree , n , states , epoch1 , step ) | Write a type 8 segment to an SPK file . |
58,908 | def spkw09 ( handle , body , center , inframe , first , last , segid , degree , n , states , epochs ) : handle = ctypes . c_int ( handle ) body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) inframe = stypes . stringToCharP ( inframe ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) segid = stypes . stringToCharP ( segid ) degree = ctypes . c_int ( degree ) n = ctypes . c_int ( n ) states = stypes . toDoubleMatrix ( states ) epochs = stypes . toDoubleVector ( epochs ) libspice . spkw09_c ( handle , body , center , inframe , first , last , segid , degree , n , states , epochs ) | Write a type 9 segment to an SPK file . |
58,909 | def spkw10 ( handle , body , center , inframe , first , last , segid , consts , n , elems , epochs ) : handle = ctypes . c_int ( handle ) body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) inframe = stypes . stringToCharP ( inframe ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) segid = stypes . stringToCharP ( segid ) consts = stypes . toDoubleVector ( consts ) n = ctypes . c_int ( n ) elems = stypes . toDoubleVector ( elems ) epochs = stypes . toDoubleVector ( epochs ) libspice . spkw10_c ( handle , body , center , inframe , first , last , segid , consts , n , elems , epochs ) | Write an SPK type 10 segment to the DAF open and attached to the input handle . |
58,910 | def spkw12 ( handle , body , center , inframe , first , last , segid , degree , n , states , epoch0 , step ) : handle = ctypes . c_int ( handle ) body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) inframe = stypes . stringToCharP ( inframe ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) segid = stypes . stringToCharP ( segid ) degree = ctypes . c_int ( degree ) n = ctypes . c_int ( n ) states = stypes . toDoubleMatrix ( states ) epoch0 = ctypes . c_double ( epoch0 ) step = ctypes . c_double ( step ) libspice . spkw12_c ( handle , body , center , inframe , first , last , segid , degree , n , states , epoch0 , step ) | Write a type 12 segment to an SPK file . |
58,911 | def spkw15 ( handle , body , center , inframe , first , last , segid , epoch , tp , pa , p , ecc , j2flg , pv , gm , j2 , radius ) : handle = ctypes . c_int ( handle ) body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) inframe = stypes . stringToCharP ( inframe ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) segid = stypes . stringToCharP ( segid ) epoch = ctypes . c_double ( epoch ) tp = stypes . toDoubleVector ( tp ) pa = stypes . toDoubleVector ( pa ) p = ctypes . c_double ( p ) ecc = ctypes . c_double ( ecc ) j2flg = ctypes . c_double ( j2flg ) pv = stypes . toDoubleVector ( pv ) gm = ctypes . c_double ( gm ) j2 = ctypes . c_double ( j2 ) radius = ctypes . c_double ( radius ) libspice . spkw15_c ( handle , body , center , inframe , first , last , segid , epoch , tp , pa , p , ecc , j2flg , pv , gm , j2 , radius ) | Write an SPK segment of type 15 given a type 15 data record . |
58,912 | def spkw17 ( handle , body , center , inframe , first , last , segid , epoch , eqel , rapol , decpol ) : handle = ctypes . c_int ( handle ) body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) inframe = stypes . stringToCharP ( inframe ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) segid = stypes . stringToCharP ( segid ) epoch = ctypes . c_double ( epoch ) eqel = stypes . toDoubleVector ( eqel ) rapol = ctypes . c_double ( rapol ) decpol = ctypes . c_double ( decpol ) libspice . spkw17_c ( handle , body , center , inframe , first , last , segid , epoch , eqel , rapol , decpol ) | Write an SPK segment of type 17 given a type 17 data record . |
58,913 | def spkw18 ( handle , subtyp , body , center , inframe , first , last , segid , degree , packts , epochs ) : handle = ctypes . c_int ( handle ) subtyp = ctypes . c_int ( subtyp ) body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) inframe = stypes . stringToCharP ( inframe ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) segid = stypes . stringToCharP ( segid ) degree = ctypes . c_int ( degree ) n = ctypes . c_int ( len ( packts ) ) packts = stypes . toDoubleMatrix ( packts ) epochs = stypes . toDoubleVector ( epochs ) libspice . spkw18_c ( handle , subtyp , body , center , inframe , first , last , segid , degree , n , packts , epochs ) | Write a type 18 segment to an SPK file . |
58,914 | def spkw20 ( handle , body , center , inframe , first , last , segid , intlen , n , polydg , cdata , dscale , tscale , initjd , initfr ) : handle = ctypes . c_int ( handle ) body = ctypes . c_int ( body ) center = ctypes . c_int ( center ) inframe = stypes . stringToCharP ( inframe ) first = ctypes . c_double ( first ) last = ctypes . c_double ( last ) segid = stypes . stringToCharP ( segid ) intlen = ctypes . c_double ( intlen ) n = ctypes . c_int ( n ) polydg = ctypes . c_int ( polydg ) cdata = stypes . toDoubleVector ( cdata ) dscale = ctypes . c_double ( dscale ) tscale = ctypes . c_double ( tscale ) initjd = ctypes . c_double ( initjd ) initfr = ctypes . c_double ( initfr ) libspice . spkw20_c ( handle , body , center , inframe , first , last , segid , intlen , n , polydg , cdata , dscale , tscale , initjd , initfr ) | Write a type 20 segment to an SPK file . |
58,915 | def srfrec ( body , longitude , latitude ) : body = ctypes . c_int ( body ) longitude = ctypes . c_double ( longitude ) latitude = ctypes . c_double ( latitude ) rectan = stypes . emptyDoubleVector ( 3 ) libspice . srfrec_c ( body , longitude , latitude , rectan ) return stypes . cVectorToPython ( rectan ) | Convert planetocentric latitude and longitude of a surface point on a specified body to rectangular coordinates . |
58,916 | def stelab ( pobj , vobs ) : pobj = stypes . toDoubleVector ( pobj ) vobs = stypes . toDoubleVector ( vobs ) appobj = stypes . emptyDoubleVector ( 3 ) libspice . stelab_c ( pobj , vobs , appobj ) return stypes . cVectorToPython ( appobj ) | Correct the apparent position of an object for stellar aberration . |
58,917 | def stpool ( item , nth , contin , lenout = _default_len_out ) : item = stypes . stringToCharP ( item ) contin = stypes . stringToCharP ( contin ) nth = ctypes . c_int ( nth ) strout = stypes . stringToCharP ( lenout ) lenout = ctypes . c_int ( lenout ) found = ctypes . c_int ( ) sizet = ctypes . c_int ( ) libspice . stpool_c ( item , nth , contin , lenout , strout , ctypes . byref ( sizet ) , ctypes . byref ( found ) ) return stypes . toPythonString ( strout ) , sizet . value , bool ( found . value ) | Retrieve the nth string from the kernel pool variable where the string may be continued across several components of the kernel pool variable . |
58,918 | def str2et ( time ) : if isinstance ( time , list ) : return numpy . array ( [ str2et ( t ) for t in time ] ) time = stypes . stringToCharP ( time ) et = ctypes . c_double ( ) libspice . str2et_c ( time , ctypes . byref ( et ) ) return et . value | Convert a string representing an epoch to a double precision value representing the number of TDB seconds past the J2000 epoch corresponding to the input epoch . |
58,919 | def datetime2et ( dt ) : lt = ctypes . c_double ( ) if hasattr ( dt , "__iter__" ) : ets = [ ] for t in dt : libspice . utc2et_c ( stypes . stringToCharP ( t . isoformat ( ) ) , ctypes . byref ( lt ) ) checkForSpiceError ( None ) ets . append ( lt . value ) return ets dt = stypes . stringToCharP ( dt . isoformat ( ) ) et = ctypes . c_double ( ) libspice . utc2et_c ( dt , ctypes . byref ( et ) ) return et . value | Converts a standard Python datetime to a double precision value representing the number of TDB seconds past the J2000 epoch corresponding to the input epoch . |
58,920 | def subpnt ( method , target , et , fixref , abcorr , obsrvr ) : method = stypes . stringToCharP ( method ) target = stypes . stringToCharP ( target ) et = ctypes . c_double ( et ) fixref = stypes . stringToCharP ( fixref ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) spoint = stypes . emptyDoubleVector ( 3 ) trgepc = ctypes . c_double ( 0 ) srfvec = stypes . emptyDoubleVector ( 3 ) libspice . subpnt_c ( method , target , et , fixref , abcorr , obsrvr , spoint , ctypes . byref ( trgepc ) , srfvec ) return stypes . cVectorToPython ( spoint ) , trgepc . value , stypes . cVectorToPython ( srfvec ) | Compute the rectangular coordinates of the sub - observer point on a target body at a specified epoch optionally corrected for light time and stellar aberration . |
58,921 | def sumad ( array ) : n = ctypes . c_int ( len ( array ) ) array = stypes . toDoubleVector ( array ) return libspice . sumad_c ( array , n ) | Return the sum of the elements of a double precision array . |
58,922 | def sumai ( array ) : n = ctypes . c_int ( len ( array ) ) array = stypes . toIntVector ( array ) return libspice . sumai_c ( array , n ) | Return the sum of the elements of an integer array . |
58,923 | def surfnm ( a , b , c , point ) : a = ctypes . c_double ( a ) b = ctypes . c_double ( b ) c = ctypes . c_double ( c ) point = stypes . toDoubleVector ( point ) normal = stypes . emptyDoubleVector ( 3 ) libspice . surfnm_c ( a , b , c , point , normal ) return stypes . cVectorToPython ( normal ) | This routine computes the outward - pointing unit normal vector from a point on the surface of an ellipsoid . |
58,924 | def surfpt ( positn , u , a , b , c ) : a = ctypes . c_double ( a ) b = ctypes . c_double ( b ) c = ctypes . c_double ( c ) positn = stypes . toDoubleVector ( positn ) u = stypes . toDoubleVector ( u ) point = stypes . emptyDoubleVector ( 3 ) found = ctypes . c_int ( ) libspice . surfpt_c ( positn , u , a , b , c , point , ctypes . byref ( found ) ) return stypes . cVectorToPython ( point ) , bool ( found . value ) | Determine the intersection of a line - of - sight vector with the surface of an ellipsoid . |
58,925 | def swpool ( agent , nnames , lenvals , names ) : agent = stypes . stringToCharP ( agent ) nnames = ctypes . c_int ( nnames ) lenvals = ctypes . c_int ( lenvals ) names = stypes . listToCharArray ( names ) libspice . swpool_c ( agent , nnames , lenvals , names ) | Add a name to the list of agents to notify whenever a member of a list of kernel variables is updated . |
58,926 | def sxform ( instring , tostring , et ) : instring = stypes . stringToCharP ( instring ) tostring = stypes . stringToCharP ( tostring ) xform = stypes . emptyDoubleMatrix ( x = 6 , y = 6 ) if hasattr ( et , "__iter__" ) : xforms = [ ] for t in et : libspice . sxform_c ( instring , tostring , ctypes . c_double ( t ) , xform ) checkForSpiceError ( None ) xforms . append ( stypes . cMatrixToNumpy ( xform ) ) return xforms else : et = ctypes . c_double ( et ) libspice . sxform_c ( instring , tostring , et , xform ) return stypes . cMatrixToNumpy ( xform ) | Return the state transformation matrix from one frame to another at a specified epoch . |
58,927 | def szpool ( name ) : name = stypes . stringToCharP ( name ) n = ctypes . c_int ( ) found = ctypes . c_int ( 0 ) libspice . szpool_c ( name , ctypes . byref ( n ) , ctypes . byref ( found ) ) return n . value , bool ( found . value ) | Return the kernel pool size limitations . |
58,928 | def termpt ( method , ilusrc , target , et , fixref , abcorr , corloc , obsrvr , refvec , rolstp , ncuts , schstp , soltol , maxn ) : method = stypes . stringToCharP ( method ) ilusrc = stypes . stringToCharP ( ilusrc ) target = stypes . stringToCharP ( target ) et = ctypes . c_double ( et ) fixref = stypes . stringToCharP ( fixref ) abcorr = stypes . stringToCharP ( abcorr ) corloc = stypes . stringToCharP ( corloc ) obsrvr = stypes . stringToCharP ( obsrvr ) refvec = stypes . toDoubleVector ( refvec ) rolstp = ctypes . c_double ( rolstp ) ncuts = ctypes . c_int ( ncuts ) schstp = ctypes . c_double ( schstp ) soltol = ctypes . c_double ( soltol ) maxn = ctypes . c_int ( maxn ) npts = stypes . emptyIntVector ( maxn . value ) points = stypes . emptyDoubleMatrix ( 3 , maxn . value ) epochs = stypes . emptyDoubleVector ( maxn ) trmvcs = stypes . emptyDoubleMatrix ( 3 , maxn . value ) libspice . termpt_c ( method , ilusrc , target , et , fixref , abcorr , corloc , obsrvr , refvec , rolstp , ncuts , schstp , soltol , maxn , npts , points , epochs , trmvcs ) npts = stypes . cVectorToPython ( npts ) valid_points = numpy . where ( npts >= 1 ) return npts [ valid_points ] , stypes . cMatrixToNumpy ( points ) [ valid_points ] , stypes . cVectorToPython ( epochs ) [ valid_points ] , stypes . cMatrixToNumpy ( trmvcs ) [ valid_points ] | Find terminator points on a target body . The caller specifies half - planes bounded by the illumination source center - target center vector in which to search for terminator points . |
58,929 | def timdef ( action , item , lenout , value = None ) : action = stypes . stringToCharP ( action ) item = stypes . stringToCharP ( item ) lenout = ctypes . c_int ( lenout ) if value is None : value = stypes . stringToCharP ( lenout ) else : value = stypes . stringToCharP ( value ) libspice . timdef_c ( action , item , lenout , value ) return stypes . toPythonString ( value ) | Set and retrieve the defaults associated with calendar input strings . |
58,930 | def timout ( et , pictur , lenout = _default_len_out ) : pictur = stypes . stringToCharP ( pictur ) output = stypes . stringToCharP ( lenout ) lenout = ctypes . c_int ( lenout ) if hasattr ( et , "__iter__" ) : times = [ ] for t in et : libspice . timout_c ( ctypes . c_double ( t ) , pictur , lenout , output ) checkForSpiceError ( None ) times . append ( stypes . toPythonString ( output ) ) return times else : et = ctypes . c_double ( et ) libspice . timout_c ( et , pictur , lenout , output ) return stypes . toPythonString ( output ) | This vectorized routine converts an input epoch represented in TDB seconds past the TDB epoch of J2000 to a character string formatted to the specifications of a user s format picture . |
58,931 | def tipbod ( ref , body , et ) : ref = stypes . stringToCharP ( ref ) body = ctypes . c_int ( body ) et = ctypes . c_double ( et ) retmatrix = stypes . emptyDoubleMatrix ( ) libspice . tipbod_c ( ref , body , et , retmatrix ) return stypes . cMatrixToNumpy ( retmatrix ) | Return a 3x3 matrix that transforms positions in inertial coordinates to positions in body - equator - and - prime - meridian coordinates . |
58,932 | def tisbod ( ref , body , et ) : ref = stypes . stringToCharP ( ref ) body = ctypes . c_int ( body ) et = ctypes . c_double ( et ) retmatrix = stypes . emptyDoubleMatrix ( x = 6 , y = 6 ) libspice . tisbod_c ( ref , body , et , retmatrix ) return stypes . cMatrixToNumpy ( retmatrix ) | Return a 6x6 matrix that transforms states in inertial coordinates to states in body - equator - and - prime - meridian coordinates . |
58,933 | def tkvrsn ( item ) : item = stypes . stringToCharP ( item ) return stypes . toPythonString ( libspice . tkvrsn_c ( item ) ) | Given an item such as the Toolkit or an entry point name return the latest version string . |
58,934 | def tparse ( instring , lenout = _default_len_out ) : errmsg = stypes . stringToCharP ( lenout ) lenout = ctypes . c_int ( lenout ) instring = stypes . stringToCharP ( instring ) sp2000 = ctypes . c_double ( ) libspice . tparse_c ( instring , lenout , ctypes . byref ( sp2000 ) , errmsg ) return sp2000 . value , stypes . toPythonString ( errmsg ) | Parse a time string and return seconds past the J2000 epoch on a formal calendar . |
58,935 | def tpictr ( sample , lenout = _default_len_out , lenerr = _default_len_out ) : sample = stypes . stringToCharP ( sample ) pictur = stypes . stringToCharP ( lenout ) errmsg = stypes . stringToCharP ( lenerr ) lenout = ctypes . c_int ( lenout ) lenerr = ctypes . c_int ( lenerr ) ok = ctypes . c_int ( ) libspice . tpictr_c ( sample , lenout , lenerr , pictur , ctypes . byref ( ok ) , errmsg ) return stypes . toPythonString ( pictur ) , ok . value , stypes . toPythonString ( errmsg ) | Given a sample time string create a time format picture suitable for use by the routine timout . |
58,936 | def trcdep ( ) : depth = ctypes . c_int ( ) libspice . trcdep_c ( ctypes . byref ( depth ) ) return depth . value | Return the number of modules in the traceback representation . |
58,937 | def trcnam ( index , namlen = _default_len_out ) : index = ctypes . c_int ( index ) name = stypes . stringToCharP ( namlen ) namlen = ctypes . c_int ( namlen ) libspice . trcnam_c ( index , namlen , name ) return stypes . toPythonString ( name ) | Return the name of the module having the specified position in the trace representation . The first module to check in is at index 0 . |
58,938 | def twovec ( axdef , indexa , plndef , indexp ) : axdef = stypes . toDoubleVector ( axdef ) indexa = ctypes . c_int ( indexa ) plndef = stypes . toDoubleVector ( plndef ) indexp = ctypes . c_int ( indexp ) mout = stypes . emptyDoubleMatrix ( ) libspice . twovec_c ( axdef , indexa , plndef , indexp , mout ) return stypes . cMatrixToNumpy ( mout ) | Find the transformation to the right - handed frame having a given vector as a specified axis and having a second given vector lying in a specified coordinate plane . |
58,939 | def txtopn ( fname ) : fnameP = stypes . stringToCharP ( fname ) unit_out = ctypes . c_int ( ) fname_len = ctypes . c_int ( len ( fname ) ) libspice . txtopn_ ( fnameP , ctypes . byref ( unit_out ) , fname_len ) return unit_out . value | Internal undocumented command for opening a new text file for subsequent write access . |
58,940 | def ucase ( inchar , lenout = None ) : if lenout is None : lenout = len ( inchar ) + 1 inchar = stypes . stringToCharP ( inchar ) outchar = stypes . stringToCharP ( " " * lenout ) lenout = ctypes . c_int ( lenout ) libspice . ucase_c ( inchar , lenout , outchar ) return stypes . toPythonString ( outchar ) | Convert the characters in a string to uppercase . |
58,941 | def ucrss ( v1 , v2 ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) vout = stypes . emptyDoubleVector ( 3 ) libspice . ucrss_c ( v1 , v2 , vout ) return stypes . cVectorToPython ( vout ) | Compute the normalized cross product of two 3 - vectors . |
58,942 | def uddc ( udfunc , x , dx ) : x = ctypes . c_double ( x ) dx = ctypes . c_double ( dx ) isdescr = ctypes . c_int ( ) libspice . uddc_c ( udfunc , x , dx , ctypes . byref ( isdescr ) ) return bool ( isdescr . value ) | SPICE private routine intended solely for the support of SPICE routines . Users should not call this routine directly due to the volatile nature of this routine . |
58,943 | def uddf ( udfunc , x , dx ) : x = ctypes . c_double ( x ) dx = ctypes . c_double ( dx ) deriv = ctypes . c_double ( ) libspice . uddf_c ( udfunc , x , dx , ctypes . byref ( deriv ) ) return deriv . value | Routine to calculate the first derivative of a caller - specified function using a three - point estimation . |
58,944 | def udf ( x ) : x = ctypes . c_double ( x ) value = ctypes . c_double ( ) libspice . udf_c ( x , ctypes . byref ( value ) ) return value . value | No - op routine for with an argument signature matching udfuns . Allways returns 0 . 0 . |
58,945 | def unitim ( epoch , insys , outsys ) : epoch = ctypes . c_double ( epoch ) insys = stypes . stringToCharP ( insys ) outsys = stypes . stringToCharP ( outsys ) return libspice . unitim_c ( epoch , insys , outsys ) | Transform time from one uniform scale to another . The uniform time scales are TAI TDT TDB ET JED JDTDB JDTDT . |
58,946 | def unload ( filename ) : if isinstance ( filename , list ) : for f in filename : libspice . unload_c ( stypes . stringToCharP ( f ) ) return filename = stypes . stringToCharP ( filename ) libspice . unload_c ( filename ) | Unload a SPICE kernel . |
58,947 | def unorm ( v1 ) : v1 = stypes . toDoubleVector ( v1 ) vout = stypes . emptyDoubleVector ( 3 ) vmag = ctypes . c_double ( ) libspice . unorm_c ( v1 , vout , ctypes . byref ( vmag ) ) return stypes . cVectorToPython ( vout ) , vmag . value | Normalize a double precision 3 - vector and return its magnitude . |
58,948 | def unormg ( v1 , ndim ) : v1 = stypes . toDoubleVector ( v1 ) vout = stypes . emptyDoubleVector ( ndim ) vmag = ctypes . c_double ( ) ndim = ctypes . c_int ( ndim ) libspice . unormg_c ( v1 , ndim , vout , ctypes . byref ( vmag ) ) return stypes . cVectorToPython ( vout ) , vmag . value | Normalize a double precision vector of arbitrary dimension and return its magnitude . |
58,949 | def utc2et ( utcstr ) : utcstr = stypes . stringToCharP ( utcstr ) et = ctypes . c_double ( ) libspice . utc2et_c ( utcstr , ctypes . byref ( et ) ) return et . value | Convert an input time from Calendar or Julian Date format UTC to ephemeris seconds past J2000 . |
58,950 | def valid ( insize , n , inset ) : assert isinstance ( inset , stypes . SpiceCell ) insize = ctypes . c_int ( insize ) n = ctypes . c_int ( n ) libspice . valid_c ( insize , n , inset ) return inset | Create a valid CSPICE set from a CSPICE Cell of any data type . |
58,951 | def vcrss ( v1 , v2 ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) vout = stypes . emptyDoubleVector ( 3 ) libspice . vcrss_c ( v1 , v2 , vout ) return stypes . cVectorToPython ( vout ) | Compute the cross product of two 3 - dimensional vectors . |
58,952 | def vdist ( v1 , v2 ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) return libspice . vdist_c ( v1 , v2 ) | Return the distance between two three - dimensional vectors . |
58,953 | def vdistg ( v1 , v2 , ndim ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) ndim = ctypes . c_int ( ndim ) return libspice . vdistg_c ( v1 , v2 , ndim ) | Return the distance between two vectors of arbitrary dimension . |
58,954 | def vdot ( v1 , v2 ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) return libspice . vdot_c ( v1 , v2 ) | Compute the dot product of two double precision 3 - dimensional vectors . |
58,955 | def vdotg ( v1 , v2 , ndim ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) ndim = ctypes . c_int ( ndim ) return libspice . vdotg_c ( v1 , v2 , ndim ) | Compute the dot product of two double precision vectors of arbitrary dimension . |
58,956 | def vequ ( v1 ) : v1 = stypes . toDoubleVector ( v1 ) vout = stypes . emptyDoubleVector ( 3 ) libspice . vequ_c ( v1 , vout ) return stypes . cVectorToPython ( vout ) | Make one double precision 3 - dimensional vector equal to another . |
58,957 | def vequg ( v1 , ndim ) : v1 = stypes . toDoubleVector ( v1 ) vout = stypes . emptyDoubleVector ( ndim ) ndim = ctypes . c_int ( ndim ) libspice . vequg_c ( v1 , ndim , vout ) return stypes . cVectorToPython ( vout ) | Make one double precision vector of arbitrary dimension equal to another . |
58,958 | def vhat ( v1 ) : v1 = stypes . toDoubleVector ( v1 ) vout = stypes . emptyDoubleVector ( 3 ) libspice . vhat_c ( v1 , vout ) return stypes . cVectorToPython ( vout ) | Find the unit vector along a double precision 3 - dimensional vector . |
58,959 | def vhatg ( v1 , ndim ) : v1 = stypes . toDoubleVector ( v1 ) vout = stypes . emptyDoubleVector ( ndim ) ndim = ctypes . c_int ( ndim ) libspice . vhatg_c ( v1 , ndim , vout ) return stypes . cVectorToPython ( vout ) | Find the unit vector along a double precision vector of arbitrary dimension . |
58,960 | def vlcom ( a , v1 , b , v2 ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) sumv = stypes . emptyDoubleVector ( 3 ) a = ctypes . c_double ( a ) b = ctypes . c_double ( b ) libspice . vlcom_c ( a , v1 , b , v2 , sumv ) return stypes . cVectorToPython ( sumv ) | Compute a vector linear combination of two double precision 3 - dimensional vectors . |
58,961 | def vlcomg ( n , a , v1 , b , v2 ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) sumv = stypes . emptyDoubleVector ( n ) a = ctypes . c_double ( a ) b = ctypes . c_double ( b ) n = ctypes . c_int ( n ) libspice . vlcomg_c ( n , a , v1 , b , v2 , sumv ) return stypes . cVectorToPython ( sumv ) | Compute a vector linear combination of two double precision vectors of arbitrary dimension . |
58,962 | def vminug ( vin , ndim ) : vin = stypes . toDoubleVector ( vin ) vout = stypes . emptyDoubleVector ( ndim ) ndim = ctypes . c_int ( ndim ) libspice . vminug_c ( vin , ndim , vout ) return stypes . cVectorToPython ( vout ) | Negate a double precision vector of arbitrary dimension . |
58,963 | def vminus ( vin ) : vin = stypes . toDoubleVector ( vin ) vout = stypes . emptyDoubleVector ( 3 ) libspice . vminus_c ( vin , vout ) return stypes . cVectorToPython ( vout ) | Negate a double precision 3 - dimensional vector . |
58,964 | def vnormg ( v , ndim ) : v = stypes . toDoubleVector ( v ) ndim = ctypes . c_int ( ndim ) return libspice . vnormg_c ( v , ndim ) | Compute the magnitude of a double precision vector of arbitrary dimension . |
58,965 | def vpack ( x , y , z ) : x = ctypes . c_double ( x ) y = ctypes . c_double ( y ) z = ctypes . c_double ( z ) vout = stypes . emptyDoubleVector ( 3 ) libspice . vpack_c ( x , y , z , vout ) return stypes . cVectorToPython ( vout ) | Pack three scalar components into a vector . |
58,966 | def vperp ( a , b ) : a = stypes . toDoubleVector ( a ) b = stypes . toDoubleVector ( b ) vout = stypes . emptyDoubleVector ( 3 ) libspice . vperp_c ( a , b , vout ) return stypes . cVectorToPython ( vout ) | Find the component of a vector that is perpendicular to a second vector . All vectors are 3 - dimensional . |
58,967 | def vprjp ( vin , plane ) : vin = stypes . toDoubleVector ( vin ) vout = stypes . emptyDoubleVector ( 3 ) libspice . vprjp_c ( vin , ctypes . byref ( plane ) , vout ) return stypes . cVectorToPython ( vout ) | Project a vector onto a specified plane orthogonally . |
58,968 | def vprjpi ( vin , projpl , invpl ) : vin = stypes . toDoubleVector ( vin ) vout = stypes . emptyDoubleVector ( 3 ) found = ctypes . c_int ( ) libspice . vprjpi_c ( vin , ctypes . byref ( projpl ) , ctypes . byref ( invpl ) , vout , ctypes . byref ( found ) ) return stypes . cVectorToPython ( vout ) , bool ( found . value ) | Find the vector in a specified plane that maps to a specified vector in another plane under orthogonal projection . |
58,969 | def vproj ( a , b ) : a = stypes . toDoubleVector ( a ) b = stypes . toDoubleVector ( b ) vout = stypes . emptyDoubleVector ( 3 ) libspice . vproj_c ( a , b , vout ) return stypes . cVectorToPython ( vout ) | Find the projection of one vector onto another vector . |
58,970 | def vrel ( v1 , v2 ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) return libspice . vrel_c ( v1 , v2 ) | Return the relative difference between two 3 - dimensional vectors . |
58,971 | def vrelg ( v1 , v2 , ndim ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) ndim = ctypes . c_int ( ndim ) return libspice . vrelg_c ( v1 , v2 , ndim ) | Return the relative difference between two vectors of general dimension . |
58,972 | def vrotv ( v , axis , theta ) : v = stypes . toDoubleVector ( v ) axis = stypes . toDoubleVector ( axis ) theta = ctypes . c_double ( theta ) r = stypes . emptyDoubleVector ( 3 ) libspice . vrotv_c ( v , axis , theta , r ) return stypes . cVectorToPython ( r ) | Rotate a vector about a specified axis vector by a specified angle and return the rotated vector . |
58,973 | def vscl ( s , v1 ) : s = ctypes . c_double ( s ) v1 = stypes . toDoubleVector ( v1 ) vout = stypes . emptyDoubleVector ( 3 ) libspice . vscl_c ( s , v1 , vout ) return stypes . cVectorToPython ( vout ) | Multiply a scalar and a 3 - dimensional double precision vector . |
58,974 | def vsclg ( s , v1 , ndim ) : s = ctypes . c_double ( s ) v1 = stypes . toDoubleVector ( v1 ) vout = stypes . emptyDoubleVector ( ndim ) ndim = ctypes . c_int ( ndim ) libspice . vsclg_c ( s , v1 , ndim , vout ) return stypes . cVectorToPython ( vout ) | Multiply a scalar and a double precision vector of arbitrary dimension . |
58,975 | def vsep ( v1 , v2 ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) return libspice . vsep_c ( v1 , v2 ) | Find the separation angle in radians between two double precision 3 - dimensional vectors . This angle is defined as zero if either vector is zero . |
58,976 | def vsepg ( v1 , v2 , ndim ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) ndim = ctypes . c_int ( ndim ) return libspice . vsepg_c ( v1 , v2 , ndim ) | Find the separation angle in radians between two double precision vectors of arbitrary dimension . This angle is defined as zero if either vector is zero . |
58,977 | def vsub ( v1 , v2 ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) vout = stypes . emptyDoubleVector ( 3 ) libspice . vsub_c ( v1 , v2 , vout ) return stypes . cVectorToPython ( vout ) | Compute the difference between two 3 - dimensional double precision vectors . |
58,978 | def vsubg ( v1 , v2 , ndim ) : v1 = stypes . toDoubleVector ( v1 ) v2 = stypes . toDoubleVector ( v2 ) vout = stypes . emptyDoubleVector ( ndim ) ndim = ctypes . c_int ( ndim ) libspice . vsubg_c ( v1 , v2 , ndim , vout ) return stypes . cVectorToPython ( vout ) | Compute the difference between two double precision vectors of arbitrary dimension . |
58,979 | def vtmv ( v1 , matrix , v2 ) : v1 = stypes . toDoubleVector ( v1 ) matrix = stypes . toDoubleMatrix ( matrix ) v2 = stypes . toDoubleVector ( v2 ) return libspice . vtmv_c ( v1 , matrix , v2 ) | Multiply the transpose of a 3 - dimensional column vector a 3x3 matrix and a 3 - dimensional column vector . |
58,980 | def vtmvg ( v1 , matrix , v2 , nrow , ncol ) : v1 = stypes . toDoubleVector ( v1 ) matrix = stypes . toDoubleMatrix ( matrix ) v2 = stypes . toDoubleVector ( v2 ) nrow = ctypes . c_int ( nrow ) ncol = ctypes . c_int ( ncol ) return libspice . vtmvg_c ( v1 , matrix , v2 , nrow , ncol ) | Multiply the transpose of a n - dimensional column vector a nxm matrix and a m - dimensional column vector . |
58,981 | def vupack ( v ) : v1 = stypes . toDoubleVector ( v ) x = ctypes . c_double ( ) y = ctypes . c_double ( ) z = ctypes . c_double ( ) libspice . vupack_c ( v1 , ctypes . byref ( x ) , ctypes . byref ( y ) , ctypes . byref ( z ) ) return x . value , y . value , z . value | Unpack three scalar components from a vector . |
58,982 | def vzero ( v ) : v = stypes . toDoubleVector ( v ) return bool ( libspice . vzero_c ( v ) ) | Indicate whether a 3 - vector is the zero vector . |
58,983 | def vzerog ( v , ndim ) : v = stypes . toDoubleVector ( v ) ndim = ctypes . c_int ( ndim ) return bool ( libspice . vzerog_c ( v , ndim ) ) | Indicate whether a general - dimensional vector is the zero vector . |
58,984 | def wncomd ( left , right , window ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 left = ctypes . c_double ( left ) right = ctypes . c_double ( right ) result = stypes . SpiceCell . double ( window . size ) libspice . wncomd_c ( left , right , ctypes . byref ( window ) , result ) return result | Determine the complement of a double precision window with respect to a specified interval . |
58,985 | def wncond ( left , right , window ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 left = ctypes . c_double ( left ) right = ctypes . c_double ( right ) libspice . wncond_c ( left , right , ctypes . byref ( window ) ) return window | Contract each of the intervals of a double precision window . |
58,986 | def wndifd ( a , b ) : assert isinstance ( a , stypes . SpiceCell ) assert isinstance ( b , stypes . SpiceCell ) assert a . dtype == 1 assert b . dtype == 1 c = stypes . SpiceCell . double ( a . size + b . size ) libspice . wndifd_c ( ctypes . byref ( a ) , ctypes . byref ( b ) , ctypes . byref ( c ) ) return c | Place the difference of two double precision windows into a third window . |
58,987 | def wnelmd ( point , window ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 point = ctypes . c_double ( point ) return bool ( libspice . wnelmd_c ( point , ctypes . byref ( window ) ) ) | Determine whether a point is an element of a double precision window . |
58,988 | def wnexpd ( left , right , window ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 left = ctypes . c_double ( left ) right = ctypes . c_double ( right ) libspice . wnexpd_c ( left , right , ctypes . byref ( window ) ) return window | Expand each of the intervals of a double precision window . |
58,989 | def wnextd ( side , window ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 assert side == 'L' or side == 'R' side = ctypes . c_char ( side . encode ( encoding = 'UTF-8' ) ) libspice . wnextd_c ( side , ctypes . byref ( window ) ) return window | Extract the left or right endpoints from a double precision window . |
58,990 | def wnfetd ( window , n ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 n = ctypes . c_int ( n ) left = ctypes . c_double ( ) right = ctypes . c_double ( ) libspice . wnfetd_c ( ctypes . byref ( window ) , n , ctypes . byref ( left ) , ctypes . byref ( right ) ) return left . value , right . value | Fetch a particular interval from a double precision window . |
58,991 | def wnfild ( small , window ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 small = ctypes . c_double ( small ) libspice . wnfild_c ( small , ctypes . byref ( window ) ) return window | Fill small gaps between adjacent intervals of a double precision window . |
58,992 | def wnincd ( left , right , window ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 left = ctypes . c_double ( left ) right = ctypes . c_double ( right ) return bool ( libspice . wnincd_c ( left , right , ctypes . byref ( window ) ) ) | Determine whether an interval is included in a double precision window . |
58,993 | def wninsd ( left , right , window ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 left = ctypes . c_double ( left ) right = ctypes . c_double ( right ) libspice . wninsd_c ( left , right , ctypes . byref ( window ) ) | Insert an interval into a double precision window . |
58,994 | def wnintd ( a , b ) : assert isinstance ( a , stypes . SpiceCell ) assert b . dtype == 1 assert isinstance ( b , stypes . SpiceCell ) assert a . dtype == 1 c = stypes . SpiceCell . double ( b . size + a . size ) libspice . wnintd_c ( ctypes . byref ( a ) , ctypes . byref ( b ) , ctypes . byref ( c ) ) return c | Place the intersection of two double precision windows into a third window . |
58,995 | def wnreld ( a , op , b ) : assert isinstance ( a , stypes . SpiceCell ) assert b . dtype == 1 assert isinstance ( b , stypes . SpiceCell ) assert a . dtype == 1 assert isinstance ( op , str ) op = stypes . stringToCharP ( op . encode ( encoding = 'UTF-8' ) ) return bool ( libspice . wnreld_c ( ctypes . byref ( a ) , op , ctypes . byref ( b ) ) ) | Compare two double precision windows . |
58,996 | def wnsumd ( window ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 meas = ctypes . c_double ( ) avg = ctypes . c_double ( ) stddev = ctypes . c_double ( ) shortest = ctypes . c_int ( ) longest = ctypes . c_int ( ) libspice . wnsumd_c ( ctypes . byref ( window ) , ctypes . byref ( meas ) , ctypes . byref ( avg ) , ctypes . byref ( stddev ) , ctypes . byref ( shortest ) , ctypes . byref ( longest ) ) return meas . value , avg . value , stddev . value , shortest . value , longest . value | Summarize the contents of a double precision window . |
58,997 | def wnunid ( a , b ) : assert isinstance ( a , stypes . SpiceCell ) assert b . dtype == 1 assert isinstance ( b , stypes . SpiceCell ) assert a . dtype == 1 c = stypes . SpiceCell . double ( b . size + a . size ) libspice . wnunid_c ( ctypes . byref ( a ) , ctypes . byref ( b ) , ctypes . byref ( c ) ) return c | Place the union of two double precision windows into a third window . |
58,998 | def wnvald ( insize , n , window ) : assert isinstance ( window , stypes . SpiceCell ) assert window . dtype == 1 insize = ctypes . c_int ( insize ) n = ctypes . c_int ( n ) libspice . wnvald_c ( insize , n , ctypes . byref ( window ) ) return window | Form a valid double precision window from the contents of a window array . |
58,999 | def writln ( line , unit ) : lineP = stypes . stringToCharP ( line ) unit = ctypes . c_int ( unit ) line_len = ctypes . c_int ( len ( line ) ) libspice . writln_ ( lineP , ctypes . byref ( unit ) , line_len ) | Internal undocumented command for writing a text line to a logical unit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.