idx
int64
0
252k
question
stringlengths
48
5.28k
target
stringlengths
5
1.23k
247,700
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 .
247,701
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 ....
Return a point and two orthogonal spanning vectors that generate a specified plane .
247,702
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 .
247,703
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 .
247,704
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 .
247,705
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 .
247,706
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 .
247,707
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 .
247,708
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 .
247,709
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...
Return the 3x3 matrix that transforms position vectors from one specified frame at a specified epoch to another specified frame at another specified epoch .
247,710
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 .
247,711
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 .
247,712
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 .
247,713
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 .
247,714
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 .
247,715
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 .
247,716
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 .
247,717
def rdtext ( file , lenout = _default_len_out ) : 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 .
247,718
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 .
247,719
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 . byre...
Convert from rectangular coordinates to geodetic coordinates .
247,720
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 , long...
Convert from rectangular coordinates to latitudinal coordinates .
247,721
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 ....
Convert rectangular coordinates to planetographic coordinates .
247,722
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 .
247,723
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 .
247,724
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 .
247,725
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 .
247,726
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 .
247,727
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 . toPythonSt...
Re - order the elements of an array of character strings according to a given order vector .
247,728
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 .
247,729
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 .
247,730
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 ) ...
Replace a marker with a character string .
247,731
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 ( encodi...
Replace a marker with the text representation of a cardinal number .
247,732
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 . re...
Replace a marker with a double precision number .
247,733
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 ) inform...
Replace a marker in a string with a formatted double precision value .
247,734
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 ( ins...
Replace a marker with an integer .
247,735
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 .
247,736
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 .
247,737
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 .
247,738
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 .
247,739
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 ( s...
Find semi - axis vectors of an ellipse generated by two arbitrary three - dimensional vectors .
247,740
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 .
247,741
def scdecd ( sc , sclkdp , lenout = _default_len_out , MXPART = None ) : 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 .
247,742
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 .
247,743
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 .
247,744
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 ) ...
Get spacecraft clock partition information from a spacecraft clock kernel file .
247,745
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 .
247,746
def sdiff ( a , b ) : assert isinstance ( a , stypes . SpiceCell ) assert isinstance ( b , stypes . SpiceCell ) assert a . dtype == b . dtype 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 . SPIC...
Take the symmetric difference of two sets of any data type to form a third set .
247,747
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 .
247,748
def shellc ( ndim , lenvals , 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 .
247,749
def shelld ( ndim , array ) : 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 .
247,750
def shelli ( ndim , array ) : 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 .
247,751
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 ( obsrv...
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 .
247,752
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 ) ,...
This routine converts from spherical coordinates to cylindrical coordinates .
247,753
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 ...
Convert from spherical coordinates to latitudinal coordinates .
247,754
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 .
247,755
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 ( ...
Return the position of a target body relative to an observer optionally corrected for light time and stellar aberration .
247,756
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 ( co...
Find the coverage window for a specified ephemeris object in a specified SPK file .
247,757
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 ( ...
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 .
247,758
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 ( ...
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 .
247,759
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 . toDouble...
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 .
247,760
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 . stringToChar...
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 .
247,761
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 ) ) re...
Compute the geometric position of a target body relative to an observing body .
247,762
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 .
247,763
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 .
247,764
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 .
247,765
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 .
247,766
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 . emptyDoubleVecto...
Perform routine error checks and if all check pass pack the descriptor for an SPK segment
247,767
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...
Search through loaded SPK files to find the highest - priority segment applicable to the body and time specified .
247,768
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 ....
Extract a subset of the data in an SPK segment into a separate segment .
247,769
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 ( ) libsp...
Unpack the contents of an SPK segment descriptor .
247,770
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 ( ...
Write a type 2 segment to an SPK file .
247,771
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 ) segi...
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 .
247,772
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 ( ...
Write a type 8 segment to an SPK file .
247,773
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 ) ...
Write a type 9 segment to an SPK file .
247,774
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 ) s...
Write an SPK type 10 segment to the DAF open and attached to the input handle .
247,775
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 ( ...
Write a type 12 segment to an SPK file .
247,776
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 ...
Write an SPK segment of type 15 given a type 15 data record .
247,777
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 )...
Write an SPK segment of type 17 given a type 17 data record .
247,778
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 ( fi...
Write a type 18 segment to an SPK file .
247,779
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 )...
Write a type 20 segment to an SPK file .
247,780
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 .
247,781
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 .
247,782
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 . s...
Retrieve the nth string from the kernel pool variable where the string may be continued across several components of the kernel pool variable .
247,783
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 .
247,784
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 ( ) ) ...
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 .
247,785
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 = s...
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 .
247,786
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 .
247,787
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 .
247,788
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 .
247,789
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 , poi...
Determine the intersection of a line - of - sight vector with the surface of an ellipsoid .
247,790
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 .
247,791
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 ) , x...
Return the state transformation matrix from one frame to another at a specified epoch .
247,792
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 .
247,793
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 . stringToC...
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 .
247,794
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 , l...
Set and retrieve the defaults associated with calendar input strings .
247,795
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 ) checkFor...
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 .
247,796
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 .
247,797
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 .
247,798
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 .
247,799
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 ...
Parse a time string and return seconds past the J2000 epoch on a formal calendar .