idx int64 0 251k | question stringlengths 53 3.53k | target stringlengths 5 1.23k | len_question int64 20 893 | len_target int64 3 238 |
|---|---|---|---|---|
246,700 | def pipool ( name , ivals ) : name = stypes . stringToCharP ( name ) n = ctypes . c_int ( len ( ivals ) ) ivals = stypes . toIntVector ( ivals ) libspice . pipool_c ( name , n , ivals ) | This entry point provides toolkit programmers a method for programmatically inserting integer data into the kernel pool . | 66 | 20 |
246,701 | def pjelpl ( elin , plane ) : assert ( isinstance ( elin , stypes . Ellipse ) ) assert ( isinstance ( plane , stypes . Plane ) ) elout = stypes . Ellipse ( ) libspice . pjelpl_c ( ctypes . byref ( elin ) , ctypes . byref ( plane ) , ctypes . byref ( elout ) ) return elout | Project an ellipse onto a plane orthogonally . | 95 | 13 |
246,702 | def pl2nvc ( plane ) : assert ( isinstance ( plane , stypes . Plane ) ) normal = stypes . emptyDoubleVector ( 3 ) constant = ctypes . c_double ( ) libspice . pl2nvc_c ( ctypes . byref ( plane ) , normal , ctypes . byref ( constant ) ) return stypes . cVectorToPython ( normal ) , constant . value | Return a unit normal vector and constant that define a specified plane . | 89 | 13 |
246,703 | def pl2nvp ( plane ) : assert ( isinstance ( plane , stypes . Plane ) ) normal = stypes . emptyDoubleVector ( 3 ) point = stypes . emptyDoubleVector ( 3 ) libspice . pl2nvp_c ( ctypes . byref ( plane ) , normal , point ) return stypes . cVectorToPython ( normal ) , stypes . cVectorToPython ( point ) | Return a unit normal vector and point that define a specified plane . | 90 | 13 |
246,704 | def pl2psv ( plane ) : assert ( isinstance ( plane , stypes . Plane ) ) point = stypes . emptyDoubleVector ( 3 ) span1 = stypes . emptyDoubleVector ( 3 ) span2 = stypes . emptyDoubleVector ( 3 ) libspice . pl2psv_c ( ctypes . byref ( plane ) , point , span1 , span2 ) return stypes . cVectorToPython ( point ) , stypes . cVectorToPython ( span1 ) , stypes . cVectorToPython ( span2 ) | Return a point and two orthogonal spanning vectors that generate a specified plane . | 120 | 16 |
246,705 | def pos ( string , substr , start ) : string = stypes . stringToCharP ( string ) substr = stypes . stringToCharP ( substr ) start = ctypes . c_int ( start ) return libspice . pos_c ( string , substr , start ) | Find the first occurrence in a string of a substring starting at a specified location searching forward . | 60 | 19 |
246,706 | def posr ( string , substr , start ) : string = stypes . stringToCharP ( string ) substr = stypes . stringToCharP ( substr ) start = ctypes . c_int ( start ) return libspice . posr_c ( string , substr , start ) | Find the first occurrence in a string of a substring starting at a specified location searching backward . | 62 | 19 |
246,707 | def prop2b ( gm , pvinit , dt ) : gm = ctypes . c_double ( gm ) pvinit = stypes . toDoubleVector ( pvinit ) dt = ctypes . c_double ( dt ) pvprop = stypes . emptyDoubleVector ( 6 ) libspice . prop2b_c ( gm , pvinit , dt , pvprop ) return stypes . cVectorToPython ( pvprop ) | Given a central mass and the state of massless body at time t_0 this routine determines the state as predicted by a two - body force model at time t_0 + dt . | 107 | 39 |
246,708 | def prsdp ( string ) : string = stypes . stringToCharP ( string ) dpval = ctypes . c_double ( ) libspice . prsdp_c ( string , ctypes . byref ( dpval ) ) return dpval . value | Parse a string as a double precision number encapsulating error handling . | 61 | 14 |
246,709 | def prsint ( string ) : string = stypes . stringToCharP ( string ) intval = ctypes . c_int ( ) libspice . prsint_c ( string , ctypes . byref ( intval ) ) return intval . value | Parse a string as an integer encapsulating error handling . | 58 | 12 |
246,710 | def psv2pl ( point , span1 , span2 ) : point = stypes . toDoubleVector ( point ) span1 = stypes . toDoubleVector ( span1 ) span2 = stypes . toDoubleVector ( span2 ) plane = stypes . Plane ( ) libspice . psv2pl_c ( point , span1 , span2 , ctypes . byref ( plane ) ) return plane | Make a CSPICE plane from a point and two spanning vectors . | 90 | 14 |
246,711 | def pxform ( fromstr , tostr , et ) : et = ctypes . c_double ( et ) tostr = stypes . stringToCharP ( tostr ) fromstr = stypes . stringToCharP ( fromstr ) rotatematrix = stypes . emptyDoubleMatrix ( ) libspice . pxform_c ( fromstr , tostr , et , rotatematrix ) return stypes . cMatrixToNumpy ( rotatematrix ) | Return the matrix that transforms position vectors from one specified frame to another at a specified epoch . | 104 | 18 |
246,712 | def pxfrm2 ( frame_from , frame_to , etfrom , etto ) : frame_from = stypes . stringToCharP ( frame_from ) frame_to = stypes . stringToCharP ( frame_to ) etfrom = ctypes . c_double ( etfrom ) etto = ctypes . c_double ( etto ) outmatrix = stypes . emptyDoubleMatrix ( ) libspice . pxfrm2_c ( frame_from , frame_to , etfrom , etto , outmatrix ) return stypes . cMatrixToNumpy ( outmatrix ) | Return the 3x3 matrix that transforms position vectors from one specified frame at a specified epoch to another specified frame at another specified epoch . | 136 | 27 |
246,713 | def q2m ( q ) : q = stypes . toDoubleVector ( q ) mout = stypes . emptyDoubleMatrix ( ) libspice . q2m_c ( q , mout ) return stypes . cMatrixToNumpy ( mout ) | Find the rotation matrix corresponding to a specified unit quaternion . | 58 | 13 |
246,714 | def qcktrc ( tracelen = _default_len_out ) : tracestr = stypes . stringToCharP ( tracelen ) tracelen = ctypes . c_int ( tracelen ) libspice . qcktrc_c ( tracelen , tracestr ) return stypes . toPythonString ( tracestr ) | Return a string containing a traceback . | 88 | 8 |
246,715 | def qdq2av ( q , dq ) : q = stypes . toDoubleVector ( q ) dq = stypes . toDoubleVector ( dq ) vout = stypes . emptyDoubleVector ( 3 ) libspice . qdq2av_c ( q , dq , vout ) return stypes . cVectorToPython ( vout ) | Derive angular velocity from a unit quaternion and its derivative with respect to time . | 79 | 18 |
246,716 | def qxq ( q1 , q2 ) : q1 = stypes . toDoubleVector ( q1 ) q2 = stypes . toDoubleVector ( q2 ) vout = stypes . emptyDoubleVector ( 4 ) libspice . qxq_c ( q1 , q2 , vout ) return stypes . cVectorToPython ( vout ) | Multiply two quaternions . | 81 | 8 |
246,717 | def radrec ( inrange , re , dec ) : inrange = ctypes . c_double ( inrange ) re = ctypes . c_double ( re ) dec = ctypes . c_double ( dec ) rectan = stypes . emptyDoubleVector ( 3 ) libspice . radrec_c ( inrange , re , dec , rectan ) return stypes . cVectorToPython ( rectan ) | Convert from range right ascension and declination to rectangular coordinates . | 90 | 14 |
246,718 | def rav2xf ( rot , av ) : rot = stypes . toDoubleMatrix ( rot ) av = stypes . toDoubleVector ( av ) xform = stypes . emptyDoubleMatrix ( x = 6 , y = 6 ) libspice . rav2xf_c ( rot , av , xform ) return stypes . cMatrixToNumpy ( xform ) | This routine determines a state transformation matrix from a rotation matrix and the angular velocity of the rotation . | 80 | 19 |
246,719 | def raxisa ( matrix ) : matrix = stypes . toDoubleMatrix ( matrix ) axis = stypes . emptyDoubleVector ( 3 ) angle = ctypes . c_double ( ) libspice . raxisa_c ( matrix , axis , ctypes . byref ( angle ) ) return stypes . cVectorToPython ( axis ) , angle . value | Compute the axis of the rotation given by an input matrix and the angle of the rotation about that axis . | 78 | 22 |
246,720 | def rdtext ( file , lenout = _default_len_out ) : # pragma: no cover file = stypes . stringToCharP ( file ) line = stypes . stringToCharP ( lenout ) lenout = ctypes . c_int ( lenout ) eof = ctypes . c_int ( ) libspice . rdtext_c ( file , lenout , line , ctypes . byref ( eof ) ) return stypes . toPythonString ( line ) , bool ( eof . value ) | Read the next line of text from a text file . | 118 | 11 |
246,721 | def reccyl ( rectan ) : rectan = stypes . toDoubleVector ( rectan ) radius = ctypes . c_double ( 0 ) lon = ctypes . c_double ( 0 ) z = ctypes . c_double ( 0 ) libspice . reccyl_c ( rectan , ctypes . byref ( radius ) , ctypes . byref ( lon ) , ctypes . byref ( z ) ) return radius . value , lon . value , z . value | Convert from rectangular to cylindrical coordinates . | 110 | 10 |
246,722 | def recgeo ( rectan , re , f ) : rectan = stypes . toDoubleVector ( rectan ) re = ctypes . c_double ( re ) f = ctypes . c_double ( f ) longitude = ctypes . c_double ( 0 ) latitude = ctypes . c_double ( 0 ) alt = ctypes . c_double ( 0 ) libspice . recgeo_c ( rectan , re , f , ctypes . byref ( longitude ) , ctypes . byref ( latitude ) , ctypes . byref ( alt ) ) return longitude . value , latitude . value , alt . value | Convert from rectangular coordinates to geodetic coordinates . | 140 | 11 |
246,723 | def reclat ( rectan ) : rectan = stypes . toDoubleVector ( rectan ) radius = ctypes . c_double ( 0 ) longitude = ctypes . c_double ( 0 ) latitude = ctypes . c_double ( 0 ) libspice . reclat_c ( rectan , ctypes . byref ( radius ) , ctypes . byref ( longitude ) , ctypes . byref ( latitude ) ) return radius . value , longitude . value , latitude . value | Convert from rectangular coordinates to latitudinal coordinates . | 108 | 10 |
246,724 | def recpgr ( body , rectan , re , f ) : body = stypes . stringToCharP ( body ) rectan = stypes . toDoubleVector ( rectan ) re = ctypes . c_double ( re ) f = ctypes . c_double ( f ) lon = ctypes . c_double ( ) lat = ctypes . c_double ( ) alt = ctypes . c_double ( ) libspice . recpgr_c ( body , rectan , re , f , ctypes . byref ( lon ) , ctypes . byref ( lat ) , ctypes . byref ( alt ) ) return lon . value , lat . value , alt . value | Convert rectangular coordinates to planetographic coordinates . | 153 | 9 |
246,725 | def recrad ( rectan ) : rectan = stypes . toDoubleVector ( rectan ) outrange = ctypes . c_double ( ) ra = ctypes . c_double ( ) dec = ctypes . c_double ( ) libspice . recrad_c ( rectan , ctypes . byref ( outrange ) , ctypes . byref ( ra ) , ctypes . byref ( dec ) ) return outrange . value , ra . value , dec . value | Convert rectangular coordinates to range right ascension and declination . | 105 | 13 |
246,726 | def recsph ( rectan ) : rectan = stypes . toDoubleVector ( rectan ) r = ctypes . c_double ( ) colat = ctypes . c_double ( ) lon = ctypes . c_double ( ) libspice . recsph_c ( rectan , ctypes . byref ( r ) , ctypes . byref ( colat ) , ctypes . byref ( lon ) ) return r . value , colat . value , lon . value | Convert from rectangular coordinates to spherical coordinates . | 110 | 9 |
246,727 | def removc ( item , inset ) : assert isinstance ( inset , stypes . SpiceCell ) assert inset . dtype == 0 item = stypes . stringToCharP ( item ) libspice . removc_c ( item , ctypes . byref ( inset ) ) | Remove an item from a character set . | 66 | 8 |
246,728 | def removd ( item , inset ) : assert isinstance ( inset , stypes . SpiceCell ) assert inset . dtype == 1 item = ctypes . c_double ( item ) libspice . removd_c ( item , ctypes . byref ( inset ) ) | Remove an item from a double precision set . | 65 | 9 |
246,729 | def removi ( item , inset ) : assert isinstance ( inset , stypes . SpiceCell ) assert inset . dtype == 2 item = ctypes . c_int ( item ) libspice . removi_c ( item , ctypes . byref ( inset ) ) | Remove an item from an integer set . | 63 | 8 |
246,730 | def reordc ( iorder , ndim , lenvals , array ) : iorder = stypes . toIntVector ( iorder ) ndim = ctypes . c_int ( ndim ) lenvals = ctypes . c_int ( lenvals + 1 ) array = stypes . listToCharArray ( array , xLen = lenvals , yLen = ndim ) libspice . reordc_c ( iorder , ndim , lenvals , array ) return [ stypes . toPythonString ( x . value ) for x in array ] | Re - order the elements of an array of character strings according to a given order vector . | 121 | 18 |
246,731 | def reordd ( iorder , ndim , array ) : iorder = stypes . toIntVector ( iorder ) ndim = ctypes . c_int ( ndim ) array = stypes . toDoubleVector ( array ) libspice . reordd_c ( iorder , ndim , array ) return stypes . cVectorToPython ( array ) | Re - order the elements of a double precision array according to a given order vector . | 80 | 17 |
246,732 | def reordi ( iorder , ndim , array ) : iorder = stypes . toIntVector ( iorder ) ndim = ctypes . c_int ( ndim ) array = stypes . toIntVector ( array ) libspice . reordi_c ( iorder , ndim , array ) return stypes . cVectorToPython ( array ) | Re - order the elements of an integer array according to a given order vector . | 80 | 16 |
246,733 | def repmc ( instr , marker , value , lenout = None ) : if lenout is None : lenout = ctypes . c_int ( len ( instr ) + len ( value ) + len ( marker ) + 15 ) instr = stypes . stringToCharP ( instr ) marker = stypes . stringToCharP ( marker ) value = stypes . stringToCharP ( value ) out = stypes . stringToCharP ( lenout ) libspice . repmc_c ( instr , marker , value , lenout , out ) return stypes . toPythonString ( out ) | Replace a marker with a character string . | 128 | 9 |
246,734 | def repmct ( instr , marker , value , repcase , lenout = None ) : if lenout is None : lenout = ctypes . c_int ( len ( instr ) + len ( marker ) + 15 ) instr = stypes . stringToCharP ( instr ) marker = stypes . stringToCharP ( marker ) value = ctypes . c_int ( value ) repcase = ctypes . c_char ( repcase . encode ( encoding = 'UTF-8' ) ) out = stypes . stringToCharP ( lenout ) libspice . repmct_c ( instr , marker , value , repcase , lenout , out ) return stypes . toPythonString ( out ) | Replace a marker with the text representation of a cardinal number . | 154 | 13 |
246,735 | def repmd ( instr , marker , value , sigdig ) : lenout = ctypes . c_int ( len ( instr ) + len ( marker ) + 15 ) instr = stypes . stringToCharP ( instr ) marker = stypes . stringToCharP ( marker ) value = ctypes . c_double ( value ) sigdig = ctypes . c_int ( sigdig ) out = stypes . stringToCharP ( lenout ) libspice . repmd_c ( instr , marker , value , sigdig , lenout , out ) return stypes . toPythonString ( out ) | Replace a marker with a double precision number . | 130 | 10 |
246,736 | def repmf ( instr , marker , value , sigdig , informat , lenout = None ) : if lenout is None : lenout = ctypes . c_int ( len ( instr ) + len ( marker ) + 15 ) instr = stypes . stringToCharP ( instr ) marker = stypes . stringToCharP ( marker ) value = ctypes . c_double ( value ) sigdig = ctypes . c_int ( sigdig ) informat = ctypes . c_char ( informat . encode ( encoding = 'UTF-8' ) ) out = stypes . stringToCharP ( lenout ) libspice . repmf_c ( instr , marker , value , sigdig , informat , lenout , out ) return stypes . toPythonString ( out ) | Replace a marker in a string with a formatted double precision value . | 173 | 14 |
246,737 | def repmi ( instr , marker , value , lenout = None ) : if lenout is None : lenout = ctypes . c_int ( len ( instr ) + len ( marker ) + 15 ) instr = stypes . stringToCharP ( instr ) marker = stypes . stringToCharP ( marker ) value = ctypes . c_int ( value ) out = stypes . stringToCharP ( lenout ) libspice . repmi_c ( instr , marker , value , lenout , out ) return stypes . toPythonString ( out ) | Replace a marker with an integer . | 122 | 8 |
246,738 | def rotate ( angle , iaxis ) : angle = ctypes . c_double ( angle ) iaxis = ctypes . c_int ( iaxis ) mout = stypes . emptyDoubleMatrix ( ) libspice . rotate_c ( angle , iaxis , mout ) return stypes . cMatrixToNumpy ( mout ) | Calculate the 3x3 rotation matrix generated by a rotation of a specified angle about a specified axis . This rotation is thought of as rotating the coordinate system . | 81 | 33 |
246,739 | def rotmat ( m1 , angle , iaxis ) : m1 = stypes . toDoubleMatrix ( m1 ) angle = ctypes . c_double ( angle ) iaxis = ctypes . c_int ( iaxis ) mout = stypes . emptyDoubleMatrix ( ) libspice . rotmat_c ( m1 , angle , iaxis , mout ) return stypes . cMatrixToNumpy ( mout ) | Rotmat applies a rotation of angle radians about axis iaxis to a matrix . This rotation is thought of as rotating the coordinate system . | 102 | 30 |
246,740 | def rotvec ( v1 , angle , iaxis ) : v1 = stypes . toDoubleVector ( v1 ) angle = ctypes . c_double ( angle ) iaxis = ctypes . c_int ( iaxis ) vout = stypes . emptyDoubleVector ( 3 ) libspice . rotvec_c ( v1 , angle , iaxis , vout ) return stypes . cVectorToPython ( vout ) | Transform a vector to a new coordinate system rotated by angle radians about axis iaxis . This transformation rotates v1 by angle radians about the specified axis . | 102 | 35 |
246,741 | def rquad ( a , b , c ) : a = ctypes . c_double ( a ) b = ctypes . c_double ( b ) c = ctypes . c_double ( c ) root1 = stypes . emptyDoubleVector ( 2 ) root2 = stypes . emptyDoubleVector ( 2 ) libspice . rquad_c ( a , b , c , root1 , root2 ) return stypes . cVectorToPython ( root1 ) , stypes . cVectorToPython ( root2 ) | Find the roots of a quadratic equation . | 113 | 10 |
246,742 | def saelgv ( vec1 , vec2 ) : vec1 = stypes . toDoubleVector ( vec1 ) vec2 = stypes . toDoubleVector ( vec2 ) smajor = stypes . emptyDoubleVector ( 3 ) sminor = stypes . emptyDoubleVector ( 3 ) libspice . saelgv_c ( vec1 , vec2 , smajor , sminor ) return stypes . cVectorToPython ( smajor ) , stypes . cVectorToPython ( sminor ) | Find semi - axis vectors of an ellipse generated by two arbitrary three - dimensional vectors . | 113 | 19 |
246,743 | def scard ( incard , cell ) : assert isinstance ( cell , stypes . SpiceCell ) incard = ctypes . c_int ( incard ) libspice . scard_c ( incard , ctypes . byref ( cell ) ) return cell | Set the cardinality of a SPICE cell of any data type . | 58 | 14 |
246,744 | def scdecd ( sc , sclkdp , lenout = _default_len_out , MXPART = None ) : # todo: figure out how to use mxpart sc = ctypes . c_int ( sc ) sclkdp = ctypes . c_double ( sclkdp ) sclkch = stypes . stringToCharP ( " " * lenout ) lenout = ctypes . c_int ( lenout ) libspice . scdecd_c ( sc , sclkdp , lenout , sclkch ) return stypes . toPythonString ( sclkch ) | Convert double precision encoding of spacecraft clock time into a character representation . | 138 | 14 |
246,745 | def scencd ( sc , sclkch , MXPART = None ) : sc = ctypes . c_int ( sc ) sclkch = stypes . stringToCharP ( sclkch ) sclkdp = ctypes . c_double ( ) libspice . scencd_c ( sc , sclkch , ctypes . byref ( sclkdp ) ) return sclkdp . value | Encode character representation of spacecraft clock time into a double precision number . | 94 | 14 |
246,746 | def scfmt ( sc , ticks , lenout = _default_len_out ) : sc = ctypes . c_int ( sc ) ticks = ctypes . c_double ( ticks ) clkstr = stypes . stringToCharP ( lenout ) lenout = ctypes . c_int ( lenout ) libspice . scfmt_c ( sc , ticks , lenout , clkstr ) return stypes . toPythonString ( clkstr ) | Convert encoded spacecraft clock ticks to character clock format . | 103 | 11 |
246,747 | def scpart ( sc ) : sc = ctypes . c_int ( sc ) nparts = ctypes . c_int ( ) pstart = stypes . emptyDoubleVector ( 9999 ) pstop = stypes . emptyDoubleVector ( 9999 ) libspice . scpart_c ( sc , nparts , pstart , pstop ) return stypes . cVectorToPython ( pstart ) [ 0 : nparts . value ] , stypes . cVectorToPython ( pstop ) [ 0 : nparts . value ] | Get spacecraft clock partition information from a spacecraft clock kernel file . | 115 | 12 |
246,748 | def sctiks ( sc , clkstr ) : sc = ctypes . c_int ( sc ) clkstr = stypes . stringToCharP ( clkstr ) ticks = ctypes . c_double ( ) libspice . sctiks_c ( sc , clkstr , ctypes . byref ( ticks ) ) return ticks . value | Convert a spacecraft clock format string to number of ticks . | 80 | 12 |
246,749 | def sdiff ( a , b ) : assert isinstance ( a , stypes . SpiceCell ) assert isinstance ( b , stypes . SpiceCell ) assert a . dtype == b . dtype # The next line was redundant with the [raise NotImplementedError] line below # assert a.dtype == 0 or a.dtype == 1 or a.dtype == 2 if a . dtype is 0 : c = stypes . SPICECHAR_CELL ( a . size , a . length ) elif a . dtype is 1 : c = stypes . SPICEDOUBLE_CELL ( a . size ) elif a . dtype is 2 : c = stypes . SPICEINT_CELL ( a . size ) else : raise NotImplementedError libspice . sdiff_c ( ctypes . byref ( a ) , ctypes . byref ( b ) , ctypes . byref ( c ) ) return c | Take the symmetric difference of two sets of any data type to form a third set . | 210 | 18 |
246,750 | def set_c ( a , op , b ) : assert isinstance ( a , stypes . SpiceCell ) assert isinstance ( b , stypes . SpiceCell ) assert a . dtype == b . dtype assert isinstance ( op , str ) op = stypes . stringToCharP ( op ) return bool ( libspice . set_c ( ctypes . byref ( a ) , op , ctypes . byref ( b ) ) ) | Given a relational operator compare two sets of any data type . | 98 | 12 |
246,751 | def shellc ( ndim , lenvals , array ) : # This works! looks like this is a mutable 2d char array array = stypes . listToCharArray ( array , xLen = lenvals , yLen = ndim ) ndim = ctypes . c_int ( ndim ) lenvals = ctypes . c_int ( lenvals ) libspice . shellc_c ( ndim , lenvals , ctypes . byref ( array ) ) return stypes . cVectorToPython ( array ) | Sort an array of character strings according to the ASCII collating sequence using the Shell Sort algorithm . | 113 | 19 |
246,752 | def shelld ( ndim , array ) : # Works!, use this as example for "I/O" parameters array = stypes . toDoubleVector ( array ) ndim = ctypes . c_int ( ndim ) libspice . shelld_c ( ndim , ctypes . cast ( array , ctypes . POINTER ( ctypes . c_double ) ) ) return stypes . cVectorToPython ( array ) | Sort a double precision array using the Shell Sort algorithm . | 93 | 11 |
246,753 | def shelli ( ndim , array ) : # Works!, use this as example for "I/O" parameters array = stypes . toIntVector ( array ) ndim = ctypes . c_int ( ndim ) libspice . shelli_c ( ndim , ctypes . cast ( array , ctypes . POINTER ( ctypes . c_int ) ) ) return stypes . cVectorToPython ( array ) | Sort an integer array using the Shell Sort algorithm . | 93 | 10 |
246,754 | def sincpt ( method , target , et , fixref , abcorr , obsrvr , dref , dvec ) : 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 ) dref = stypes . stringToCharP ( dref ) dvec = stypes . toDoubleVector ( dvec ) spoint = stypes . emptyDoubleVector ( 3 ) trgepc = ctypes . c_double ( 0 ) srfvec = stypes . emptyDoubleVector ( 3 ) found = ctypes . c_int ( 0 ) libspice . sincpt_c ( method , target , et , fixref , abcorr , obsrvr , dref , dvec , spoint , ctypes . byref ( trgepc ) , srfvec , ctypes . byref ( found ) ) return stypes . cVectorToPython ( spoint ) , trgepc . value , stypes . cVectorToPython ( srfvec ) , bool ( found . value ) | Given an observer and a direction vector defining a ray compute the surface intercept of the ray on a target body at a specified epoch optionally corrected for light time and stellar aberration . | 281 | 35 |
246,755 | def sphcyl ( radius , colat , slon ) : radius = ctypes . c_double ( radius ) colat = ctypes . c_double ( colat ) slon = ctypes . c_double ( slon ) r = ctypes . c_double ( ) lon = ctypes . c_double ( ) z = ctypes . c_double ( ) libspice . sphcyl_c ( radius , colat , slon , ctypes . byref ( r ) , ctypes . byref ( lon ) , ctypes . byref ( z ) ) return r . value , lon . value , z . value | This routine converts from spherical coordinates to cylindrical coordinates . | 141 | 12 |
246,756 | def sphlat ( r , colat , lons ) : r = ctypes . c_double ( r ) colat = ctypes . c_double ( colat ) lons = ctypes . c_double ( lons ) radius = ctypes . c_double ( ) lon = ctypes . c_double ( ) lat = ctypes . c_double ( ) libspice . sphcyl_c ( r , colat , lons , ctypes . byref ( radius ) , ctypes . byref ( lon ) , ctypes . byref ( lat ) ) return radius . value , lon . value , lat . value | Convert from spherical coordinates to latitudinal coordinates . | 141 | 10 |
246,757 | def sphrec ( r , colat , lon ) : r = ctypes . c_double ( r ) colat = ctypes . c_double ( colat ) lon = ctypes . c_double ( lon ) rectan = stypes . emptyDoubleVector ( 3 ) libspice . sphrec_c ( r , colat , lon , rectan ) return stypes . cVectorToPython ( rectan ) | Convert from spherical coordinates to rectangular coordinates . | 96 | 9 |
246,758 | def spkapo ( targ , et , ref , sobs , abcorr ) : targ = ctypes . c_int ( targ ) et = ctypes . c_double ( et ) ref = stypes . stringToCharP ( ref ) abcorr = stypes . stringToCharP ( abcorr ) sobs = stypes . toDoubleVector ( sobs ) ptarg = stypes . emptyDoubleVector ( 3 ) lt = ctypes . c_double ( ) libspice . spkapo_c ( targ , et , ref , sobs , abcorr , ptarg , ctypes . byref ( lt ) ) return stypes . cVectorToPython ( ptarg ) , lt . value | Return the position of a target body relative to an observer optionally corrected for light time and stellar aberration . | 158 | 21 |
246,759 | def spkcov ( spk , idcode , cover = None ) : spk = stypes . stringToCharP ( spk ) idcode = ctypes . c_int ( idcode ) if cover is None : cover = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( cover , stypes . SpiceCell ) assert cover . is_double ( ) libspice . spkcov_c ( spk , idcode , ctypes . byref ( cover ) ) return cover | Find the coverage window for a specified ephemeris object in a specified SPK file . | 115 | 18 |
246,760 | def spkcpo ( target , et , outref , refloc , abcorr , obspos , obsctr , obsref ) : target = stypes . stringToCharP ( target ) et = ctypes . c_double ( et ) outref = stypes . stringToCharP ( outref ) refloc = stypes . stringToCharP ( refloc ) abcorr = stypes . stringToCharP ( abcorr ) obspos = stypes . toDoubleVector ( obspos ) obsctr = stypes . stringToCharP ( obsctr ) obsref = stypes . stringToCharP ( obsref ) state = stypes . emptyDoubleVector ( 6 ) lt = ctypes . c_double ( ) libspice . spkcpo_c ( target , et , outref , refloc , abcorr , obspos , obsctr , obsref , state , ctypes . byref ( lt ) ) return stypes . cVectorToPython ( state ) , lt . value | Return the state of a specified target relative to an observer where the observer has constant position in a specified reference frame . The observer s position is provided by the calling program rather than by loaded SPK files . | 222 | 41 |
246,761 | def spkcpt ( trgpos , trgctr , trgref , et , outref , refloc , abcorr , obsrvr ) : trgpos = stypes . toDoubleVector ( trgpos ) trgctr = stypes . stringToCharP ( trgctr ) trgref = stypes . stringToCharP ( trgref ) et = ctypes . c_double ( et ) outref = stypes . stringToCharP ( outref ) refloc = stypes . stringToCharP ( refloc ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) state = stypes . emptyDoubleVector ( 6 ) lt = ctypes . c_double ( ) libspice . spkcpt_c ( trgpos , trgctr , trgref , et , outref , refloc , abcorr , obsrvr , state , ctypes . byref ( lt ) ) return stypes . cVectorToPython ( state ) , lt . value | Return the state relative to a specified observer of a target having constant position in a specified reference frame . The target s position is provided by the calling program rather than by loaded SPK files . | 242 | 38 |
246,762 | def spkcvo ( target , et , outref , refloc , abcorr , obssta , obsepc , obsctr , obsref ) : target = stypes . stringToCharP ( target ) et = ctypes . c_double ( et ) outref = stypes . stringToCharP ( outref ) refloc = stypes . stringToCharP ( refloc ) abcorr = stypes . stringToCharP ( abcorr ) obssta = stypes . toDoubleVector ( obssta ) obsepc = ctypes . c_double ( obsepc ) obsctr = stypes . stringToCharP ( obsctr ) obsref = stypes . stringToCharP ( obsref ) state = stypes . emptyDoubleVector ( 6 ) lt = ctypes . c_double ( ) libspice . spkcvo_c ( target , et , outref , refloc , abcorr , obssta , obsepc , obsctr , obsref , state , ctypes . byref ( lt ) ) return stypes . cVectorToPython ( state ) , lt . value | Return the state of a specified target relative to an observer where the observer has constant velocity in a specified reference frame . The observer s state is provided by the calling program rather than by loaded SPK files . | 245 | 41 |
246,763 | def spkcvt ( trgsta , trgepc , trgctr , trgref , et , outref , refloc , abcorr , obsrvr ) : trgpos = stypes . toDoubleVector ( trgsta ) trgepc = ctypes . c_double ( trgepc ) trgctr = stypes . stringToCharP ( trgctr ) trgref = stypes . stringToCharP ( trgref ) et = ctypes . c_double ( et ) outref = stypes . stringToCharP ( outref ) refloc = stypes . stringToCharP ( refloc ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) state = stypes . emptyDoubleVector ( 6 ) lt = ctypes . c_double ( ) libspice . spkcvt_c ( trgpos , trgepc , trgctr , trgref , et , outref , refloc , abcorr , obsrvr , state , ctypes . byref ( lt ) ) return stypes . cVectorToPython ( state ) , lt . value | Return the state relative to a specified observer of a target having constant velocity in a specified reference frame . The target s state is provided by the calling program rather than by loaded SPK files . | 265 | 38 |
246,764 | def spkgps ( targ , et , ref , obs ) : targ = ctypes . c_int ( targ ) et = ctypes . c_double ( et ) ref = stypes . stringToCharP ( ref ) obs = ctypes . c_int ( obs ) position = stypes . emptyDoubleVector ( 3 ) lt = ctypes . c_double ( ) libspice . spkgps_c ( targ , et , ref , obs , position , ctypes . byref ( lt ) ) return stypes . cVectorToPython ( position ) , lt . value | Compute the geometric position of a target body relative to an observing body . | 127 | 15 |
246,765 | def spklef ( filename ) : filename = stypes . stringToCharP ( filename ) handle = ctypes . c_int ( ) libspice . spklef_c ( filename , ctypes . byref ( handle ) ) return handle . value | Load an ephemeris file for use by the readers . Return that file s handle to be used by other SPK routines to refer to the file . | 57 | 31 |
246,766 | def spkobj ( spk , outCell = None ) : spk = stypes . stringToCharP ( spk ) if not outCell : outCell = stypes . SPICEINT_CELL ( 1000 ) assert isinstance ( outCell , stypes . SpiceCell ) assert outCell . dtype == 2 libspice . spkobj_c ( spk , ctypes . byref ( outCell ) ) return outCell | Find the set of ID codes of all objects in a specified SPK file . | 95 | 16 |
246,767 | def spkopa ( filename ) : filename = stypes . stringToCharP ( filename ) handle = ctypes . c_int ( ) libspice . spkopa_c ( filename , ctypes . byref ( handle ) ) return handle . value | Open an existing SPK file for subsequent write . | 55 | 10 |
246,768 | 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 . | 100 | 14 |
246,769 | 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 | 148 | 18 |
246,770 | def spksfs ( body , et , idlen ) : # spksfs has a Parameter SIDLEN, # sounds like an optional but is that possible? 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 . | 192 | 21 |
246,771 | 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 . | 127 | 17 |
246,772 | 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 . | 233 | 11 |
246,773 | 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 . | 230 | 11 |
246,774 | def spkw05 ( handle , body , center , inframe , first , last , segid , gm , n , states , epochs ) : # see libspice args for solution to array[][N] problem 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 . | 218 | 29 |
246,775 | def spkw08 ( handle , body , center , inframe , first , last , segid , degree , n , states , epoch1 , step ) : # see libspice args for solution to array[][N] problem 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 ) # X by 6 array 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 . | 234 | 11 |
246,776 | 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 ) # X by 6 array 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 . | 204 | 11 |
246,777 | 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 . | 207 | 19 |
246,778 | 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 ) # X by 6 array 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 . | 219 | 11 |
246,779 | 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 . | 313 | 15 |
246,780 | 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 . | 207 | 15 |
246,781 | 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 . | 224 | 11 |
246,782 | 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 . | 291 | 11 |
246,783 | 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 . | 90 | 21 |
246,784 | 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 . | 81 | 12 |
246,785 | 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 . | 174 | 26 |
246,786 | 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 . | 83 | 30 |
246,787 | 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 . | 160 | 30 |
246,788 | 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 . | 213 | 29 |
246,789 | 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 . | 46 | 12 |
246,790 | 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 . | 46 | 11 |
246,791 | 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 . | 98 | 24 |
246,792 | 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 . | 143 | 23 |
246,793 | 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 . | 84 | 22 |
246,794 | 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 . | 188 | 15 |
246,795 | 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 . | 82 | 7 |
246,796 | 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 ) # Clip the empty elements out of returned results 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 . | 484 | 34 |
246,797 | 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 . | 113 | 11 |
246,798 | 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 . | 175 | 36 |
246,799 | 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 . | 92 | 29 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.