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,600
def gdpool ( name , start , room ) : name = stypes . stringToCharP ( name ) start = ctypes . c_int ( start ) values = stypes . emptyDoubleVector ( room ) room = ctypes . c_int ( room ) n = ctypes . c_int ( ) found = ctypes . c_int ( ) libspice . gdpool_c ( name , start , room , ctypes . byref ( n ) , ctypes . cast ( values , ctypes . POINTER ( ctypes . c_double ) ) , ctypes . byref ( found ) ) return stypes . cVectorToPython ( values ) [ 0 : n . value ] , bool ( found . value )
Return the d . p . value of a kernel variable from the kernel pool .
158
16
246,601
def georec ( lon , lat , alt , re , f ) : lon = ctypes . c_double ( lon ) lat = ctypes . c_double ( lat ) alt = ctypes . c_double ( alt ) re = ctypes . c_double ( re ) f = ctypes . c_double ( f ) rectan = stypes . emptyDoubleVector ( 3 ) libspice . georec_c ( lon , lat , alt , re , f , rectan ) return stypes . cVectorToPython ( rectan )
Convert geodetic coordinates to rectangular coordinates .
122
10
246,602
def getelm ( frstyr , lineln , lines ) : frstyr = ctypes . c_int ( frstyr ) lineln = ctypes . c_int ( lineln ) lines = stypes . listToCharArrayPtr ( lines , xLen = lineln , yLen = 2 ) epoch = ctypes . c_double ( ) elems = stypes . emptyDoubleVector ( 10 ) # guess for length libspice . getelm_c ( frstyr , lineln , lines , ctypes . byref ( epoch ) , elems ) return epoch . value , stypes . cVectorToPython ( elems )
Given a the lines of a two - line element set parse the lines and return the elements in units suitable for use in SPICE software .
140
28
246,603
def getfat ( file ) : file = stypes . stringToCharP ( file ) arclen = ctypes . c_int ( 4 ) typlen = ctypes . c_int ( 4 ) arch = stypes . stringToCharP ( arclen ) rettype = stypes . stringToCharP ( typlen ) libspice . getfat_c ( file , arclen , typlen , arch , rettype ) return stypes . toPythonString ( arch ) , stypes . toPythonString ( rettype )
Determine the file architecture and file type of most SPICE kernel files .
119
16
246,604
def getmsg ( option , lenout = _default_len_out ) : option = stypes . stringToCharP ( option ) lenout = ctypes . c_int ( lenout ) msg = stypes . stringToCharP ( lenout ) libspice . getmsg_c ( option , lenout , msg ) return stypes . toPythonString ( msg )
Retrieve the current short error message the explanation of the short error message or the long error message .
81
20
246,605
def gfdist ( target , abcorr , obsrvr , relate , refval , adjust , step , nintvls , cnfine , result = None ) : assert isinstance ( cnfine , stypes . SpiceCell ) assert cnfine . is_double ( ) if result is None : result = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( result , stypes . SpiceCell ) assert result . is_double ( ) target = stypes . stringToCharP ( target ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) relate = stypes . stringToCharP ( relate ) refval = ctypes . c_double ( refval ) adjust = ctypes . c_double ( adjust ) step = ctypes . c_double ( step ) nintvls = ctypes . c_int ( nintvls ) libspice . gfdist_c ( target , abcorr , obsrvr , relate , refval , adjust , step , nintvls , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Return the time window over which a specified constraint on observer - target distance is met .
269
17
246,606
def gfevnt ( udstep , udrefn , gquant , qnpars , lenvals , qpnams , qcpars , qdpars , qipars , qlpars , op , refval , tol , adjust , rpt , udrepi , udrepu , udrepf , nintvls , bail , udbail , cnfine , result = None ) : assert isinstance ( cnfine , stypes . SpiceCell ) assert cnfine . is_double ( ) if result is None : result = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( result , stypes . SpiceCell ) assert result . is_double ( ) gquant = stypes . stringToCharP ( gquant ) qnpars = ctypes . c_int ( qnpars ) lenvals = ctypes . c_int ( lenvals ) qpnams = stypes . listToCharArrayPtr ( qpnams , xLen = lenvals , yLen = qnpars ) qcpars = stypes . listToCharArrayPtr ( qcpars , xLen = lenvals , yLen = qnpars ) qdpars = stypes . toDoubleVector ( qdpars ) qipars = stypes . toIntVector ( qipars ) qlpars = stypes . toIntVector ( qlpars ) op = stypes . stringToCharP ( op ) refval = ctypes . c_double ( refval ) tol = ctypes . c_double ( tol ) adjust = ctypes . c_double ( adjust ) rpt = ctypes . c_int ( rpt ) nintvls = ctypes . c_int ( nintvls ) bail = ctypes . c_int ( bail ) libspice . gfevnt_c ( udstep , udrefn , gquant , qnpars , lenvals , qpnams , qcpars , qdpars , qipars , qlpars , op , refval , tol , adjust , rpt , udrepi , udrepu , udrepf , nintvls , bail , udbail , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Determine time intervals when a specified geometric quantity satisfies a specified mathematical condition .
508
16
246,607
def gfilum ( method , angtyp , target , illumn , fixref , abcorr , obsrvr , spoint , relate , refval , adjust , step , nintvls , cnfine , result = None ) : assert isinstance ( cnfine , stypes . SpiceCell ) assert cnfine . is_double ( ) if result is None : result = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( result , stypes . SpiceCell ) assert result . is_double ( ) method = stypes . stringToCharP ( method ) angtyp = stypes . stringToCharP ( angtyp ) target = stypes . stringToCharP ( target ) illumn = stypes . stringToCharP ( illumn ) fixref = stypes . stringToCharP ( fixref ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) spoint = stypes . toDoubleVector ( spoint ) relate = stypes . stringToCharP ( relate ) refval = ctypes . c_double ( refval ) adjust = ctypes . c_double ( adjust ) step = ctypes . c_double ( step ) nintvls = ctypes . c_int ( nintvls ) libspice . gfilum_c ( method , angtyp , target , illumn , fixref , abcorr , obsrvr , spoint , relate , refval , adjust , step , nintvls , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Return the time window over which a specified constraint on the observed phase solar incidence or emission angle at a specifed target body surface point is met .
364
30
246,608
def gfocce ( occtyp , front , fshape , fframe , back , bshape , bframe , abcorr , obsrvr , tol , udstep , udrefn , rpt , udrepi , udrepu , udrepf , bail , udbail , cnfine , result = None ) : assert isinstance ( cnfine , stypes . SpiceCell ) assert cnfine . is_double ( ) if result is None : result = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( result , stypes . SpiceCell ) assert result . is_double ( ) occtyp = stypes . stringToCharP ( occtyp ) front = stypes . stringToCharP ( front ) fshape = stypes . stringToCharP ( fshape ) fframe = stypes . stringToCharP ( fframe ) back = stypes . stringToCharP ( back ) bshape = stypes . stringToCharP ( bshape ) bframe = stypes . stringToCharP ( bframe ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) tol = ctypes . c_double ( tol ) rpt = ctypes . c_int ( rpt ) bail = ctypes . c_int ( bail ) libspice . gfocce_c ( occtyp , front , fshape , fframe , back , bshape , bframe , abcorr , obsrvr , tol , udstep , udrefn , rpt , udrepi , udrepu , udrepf , bail , udbail , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Determine time intervals when an observer sees one target occulted by another . Report progress and handle interrupts if so commanded .
412
25
246,609
def gfoclt ( occtyp , front , fshape , fframe , back , bshape , bframe , abcorr , obsrvr , step , cnfine , result = None ) : assert isinstance ( cnfine , stypes . SpiceCell ) assert cnfine . is_double ( ) if result is None : result = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( result , stypes . SpiceCell ) assert result . is_double ( ) occtyp = stypes . stringToCharP ( occtyp ) front = stypes . stringToCharP ( front ) fshape = stypes . stringToCharP ( fshape ) fframe = stypes . stringToCharP ( fframe ) back = stypes . stringToCharP ( back ) bshape = stypes . stringToCharP ( bshape ) bframe = stypes . stringToCharP ( bframe ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) step = ctypes . c_double ( step ) libspice . gfoclt_c ( occtyp , front , fshape , fframe , back , bshape , bframe , abcorr , obsrvr , step , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Determine time intervals when an observer sees one target occulted by or in transit across another .
318
20
246,610
def gfpa ( target , illmin , abcorr , obsrvr , relate , refval , adjust , step , nintvals , cnfine , result = None ) : assert isinstance ( cnfine , stypes . SpiceCell ) assert cnfine . is_double ( ) if result is None : result = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( result , stypes . SpiceCell ) assert result . is_double ( ) target = stypes . stringToCharP ( target ) illmin = stypes . stringToCharP ( illmin ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) relate = stypes . stringToCharP ( relate ) refval = ctypes . c_double ( refval ) adjust = ctypes . c_double ( adjust ) step = ctypes . c_double ( step ) nintvals = ctypes . c_int ( nintvals ) libspice . gfpa_c ( target , illmin , abcorr , obsrvr , relate , refval , adjust , step , nintvals , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Determine time intervals for which a specified constraint on the phase angle between an illumination source a target and observer body centers is met .
285
27
246,611
def gfposc ( target , inframe , abcorr , obsrvr , crdsys , coord , relate , refval , adjust , step , nintvals , cnfine , result = None ) : assert isinstance ( cnfine , stypes . SpiceCell ) assert cnfine . is_double ( ) if result is None : result = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( result , stypes . SpiceCell ) assert result . is_double ( ) target = stypes . stringToCharP ( target ) inframe = stypes . stringToCharP ( inframe ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) crdsys = stypes . stringToCharP ( crdsys ) coord = stypes . stringToCharP ( coord ) relate = stypes . stringToCharP ( relate ) refval = ctypes . c_double ( refval ) adjust = ctypes . c_double ( adjust ) step = ctypes . c_double ( step ) nintvals = ctypes . c_int ( nintvals ) libspice . gfposc_c ( target , inframe , abcorr , obsrvr , crdsys , coord , relate , refval , adjust , step , nintvals , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Determine time intervals for which a coordinate of an observer - target position vector satisfies a numerical constraint .
327
21
246,612
def gfrefn ( t1 , t2 , s1 , s2 ) : t1 = ctypes . c_double ( t1 ) t2 = ctypes . c_double ( t2 ) s1 = ctypes . c_int ( s1 ) s2 = ctypes . c_int ( s2 ) t = ctypes . c_double ( ) libspice . gfrefn_c ( t1 , t2 , s1 , s2 , ctypes . byref ( t ) ) return t . value
For those times when we can t do better we use a bisection method to find the next time at which to test for state change .
117
28
246,613
def gfrepi ( window , begmss , endmss ) : begmss = stypes . stringToCharP ( begmss ) endmss = stypes . stringToCharP ( endmss ) # don't do anything if we were given a pointer to a SpiceCell, like if we were in a callback if not isinstance ( window , ctypes . POINTER ( stypes . SpiceCell ) ) : assert isinstance ( window , stypes . SpiceCell ) assert window . is_double ( ) window = ctypes . byref ( window ) libspice . gfrepi_c ( window , begmss , endmss )
This entry point initializes a search progress report .
144
10
246,614
def gfrepu ( ivbeg , ivend , time ) : ivbeg = ctypes . c_double ( ivbeg ) ivend = ctypes . c_double ( ivend ) time = ctypes . c_double ( time ) libspice . gfrepu_c ( ivbeg , ivend , time )
This function tells the progress reporting system how far a search has progressed .
75
14
246,615
def gfsep ( targ1 , shape1 , inframe1 , targ2 , shape2 , inframe2 , abcorr , obsrvr , relate , refval , adjust , step , nintvals , cnfine , result = None ) : assert isinstance ( cnfine , stypes . SpiceCell ) assert cnfine . is_double ( ) if result is None : result = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( result , stypes . SpiceCell ) assert result . is_double ( ) targ1 = stypes . stringToCharP ( targ1 ) shape1 = stypes . stringToCharP ( shape1 ) inframe1 = stypes . stringToCharP ( inframe1 ) targ2 = stypes . stringToCharP ( targ2 ) shape2 = stypes . stringToCharP ( shape2 ) inframe2 = stypes . stringToCharP ( inframe2 ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) relate = stypes . stringToCharP ( relate ) refval = ctypes . c_double ( refval ) adjust = ctypes . c_double ( adjust ) step = ctypes . c_double ( step ) nintvals = ctypes . c_int ( nintvals ) libspice . gfsep_c ( targ1 , shape1 , inframe1 , targ2 , shape2 , inframe2 , abcorr , obsrvr , relate , refval , adjust , step , nintvals , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Determine time intervals when the angular separation between the position vectors of two target bodies relative to an observer satisfies a numerical relationship .
379
26
246,616
def gfsntc ( target , fixref , method , abcorr , obsrvr , dref , dvec , crdsys , coord , relate , refval , adjust , step , nintvals , cnfine , result = None ) : assert isinstance ( cnfine , stypes . SpiceCell ) assert cnfine . is_double ( ) if result is None : result = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( result , stypes . SpiceCell ) assert result . is_double ( ) target = stypes . stringToCharP ( target ) fixref = stypes . stringToCharP ( fixref ) method = stypes . stringToCharP ( method ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) dref = stypes . stringToCharP ( dref ) dvec = stypes . toDoubleVector ( dvec ) crdsys = stypes . stringToCharP ( crdsys ) coord = stypes . stringToCharP ( coord ) relate = stypes . stringToCharP ( relate ) refval = ctypes . c_double ( refval ) adjust = ctypes . c_double ( adjust ) step = ctypes . c_double ( step ) nintvals = ctypes . c_int ( nintvals ) libspice . gfsntc_c ( target , fixref , method , abcorr , obsrvr , dref , dvec , crdsys , coord , relate , refval , adjust , step , nintvals , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Determine time intervals for which a coordinate of an surface intercept position vector satisfies a numerical constraint .
382
20
246,617
def gfsubc ( target , fixref , method , abcorr , obsrvr , crdsys , coord , relate , refval , adjust , step , nintvals , cnfine , result ) : assert isinstance ( cnfine , stypes . SpiceCell ) assert cnfine . is_double ( ) if result is None : result = stypes . SPICEDOUBLE_CELL ( 2000 ) else : assert isinstance ( result , stypes . SpiceCell ) assert result . is_double ( ) target = stypes . stringToCharP ( target ) fixref = stypes . stringToCharP ( fixref ) method = stypes . stringToCharP ( method ) abcorr = stypes . stringToCharP ( abcorr ) obsrvr = stypes . stringToCharP ( obsrvr ) crdsys = stypes . stringToCharP ( crdsys ) coord = stypes . stringToCharP ( coord ) relate = stypes . stringToCharP ( relate ) refval = ctypes . c_double ( refval ) adjust = ctypes . c_double ( adjust ) step = ctypes . c_double ( step ) nintvals = ctypes . c_int ( nintvals ) libspice . gfsubc_c ( target , fixref , method , abcorr , obsrvr , crdsys , coord , relate , refval , adjust , step , nintvals , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Determine time intervals for which a coordinate of an subpoint position vector satisfies a numerical constraint .
341
20
246,618
def gfudb ( udfuns , udfunb , step , cnfine , result ) : step = ctypes . c_double ( step ) libspice . gfudb_c ( udfuns , udfunb , step , ctypes . byref ( cnfine ) , ctypes . byref ( result ) )
Perform a GF search on a user defined boolean quantity .
77
12
246,619
def gfuds ( udfuns , udqdec , relate , refval , adjust , step , nintvls , cnfine , result ) : relate = stypes . stringToCharP ( relate ) refval = ctypes . c_double ( refval ) adjust = ctypes . c_double ( adjust ) step = ctypes . c_double ( step ) nintvls = ctypes . c_int ( nintvls ) libspice . gfuds_c ( udfuns , udqdec , relate , refval , adjust , step , nintvls , ctypes . byref ( cnfine ) , ctypes . byref ( result ) ) return result
Perform a GF search on a user defined scalar quantity .
152
13
246,620
def gipool ( name , start , room ) : name = stypes . stringToCharP ( name ) start = ctypes . c_int ( start ) ivals = stypes . emptyIntVector ( room ) room = ctypes . c_int ( room ) n = ctypes . c_int ( ) found = ctypes . c_int ( ) libspice . gipool_c ( name , start , room , ctypes . byref ( n ) , ivals , ctypes . byref ( found ) ) return stypes . cVectorToPython ( ivals ) [ 0 : n . value ] , bool ( found . value )
Return the integer value of a kernel variable from the kernel pool .
141
13
246,621
def gnpool ( name , start , room , lenout = _default_len_out ) : name = stypes . stringToCharP ( name ) start = ctypes . c_int ( start ) kvars = stypes . emptyCharArray ( yLen = room , xLen = lenout ) room = ctypes . c_int ( room ) lenout = ctypes . c_int ( lenout ) n = ctypes . c_int ( ) found = ctypes . c_int ( ) libspice . gnpool_c ( name , start , room , lenout , ctypes . byref ( n ) , kvars , ctypes . byref ( found ) ) return stypes . cVectorToPython ( kvars ) [ 0 : n . value ] , bool ( found . value )
Return names of kernel variables matching a specified template .
177
10
246,622
def hx2dp ( string ) : string = stypes . stringToCharP ( string ) lenout = ctypes . c_int ( 80 ) errmsg = stypes . stringToCharP ( lenout ) number = ctypes . c_double ( ) error = ctypes . c_int ( ) libspice . hx2dp_c ( string , lenout , ctypes . byref ( number ) , ctypes . byref ( error ) , errmsg ) if not error . value : return number . value else : return stypes . toPythonString ( errmsg )
Convert a string representing a double precision number in a base 16 scientific notation into its equivalent double precision number .
127
22
246,623
def ident ( ) : matrix = stypes . emptyDoubleMatrix ( ) libspice . ident_c ( matrix ) return stypes . cMatrixToNumpy ( matrix )
This routine returns the 3x3 identity matrix .
37
10
246,624
def inedpl ( a , b , c , plane ) : assert ( isinstance ( plane , stypes . Plane ) ) ellipse = stypes . Ellipse ( ) a = ctypes . c_double ( a ) b = ctypes . c_double ( b ) c = ctypes . c_double ( c ) found = ctypes . c_int ( ) libspice . inedpl_c ( a , b , c , ctypes . byref ( plane ) , ctypes . byref ( ellipse ) , ctypes . byref ( found ) ) return ellipse , bool ( found . value )
Find the intersection of a triaxial ellipsoid and a plane .
138
16
246,625
def inelpl ( ellips , plane ) : assert ( isinstance ( plane , stypes . Plane ) ) assert ( isinstance ( ellips , stypes . Ellipse ) ) nxpts = ctypes . c_int ( ) xpt1 = stypes . emptyDoubleVector ( 3 ) xpt2 = stypes . emptyDoubleVector ( 3 ) libspice . inelpl_c ( ctypes . byref ( ellips ) , ctypes . byref ( plane ) , ctypes . byref ( nxpts ) , xpt1 , xpt2 ) return nxpts . value , stypes . cVectorToPython ( xpt1 ) , stypes . cVectorToPython ( xpt2 )
Find the intersection of an ellipse and a plane .
161
12
246,626
def inrypl ( vertex , direct , plane ) : assert ( isinstance ( plane , stypes . Plane ) ) vertex = stypes . toDoubleVector ( vertex ) direct = stypes . toDoubleVector ( direct ) nxpts = ctypes . c_int ( ) xpt = stypes . emptyDoubleVector ( 3 ) libspice . inrypl_c ( vertex , direct , ctypes . byref ( plane ) , ctypes . byref ( nxpts ) , xpt ) return nxpts . value , stypes . cVectorToPython ( xpt )
Find the intersection of a ray and a plane .
129
10
246,627
def insrtc ( item , inset ) : assert isinstance ( inset , stypes . SpiceCell ) if isinstance ( item , list ) : for c in item : libspice . insrtc_c ( stypes . stringToCharP ( c ) , ctypes . byref ( inset ) ) else : item = stypes . stringToCharP ( item ) libspice . insrtc_c ( item , ctypes . byref ( inset ) )
Insert an item into a character set .
105
8
246,628
def insrtd ( item , inset ) : assert isinstance ( inset , stypes . SpiceCell ) if hasattr ( item , "__iter__" ) : for d in item : libspice . insrtd_c ( ctypes . c_double ( d ) , ctypes . byref ( inset ) ) else : item = ctypes . c_double ( item ) libspice . insrtd_c ( item , ctypes . byref ( inset ) )
Insert an item into a double precision set .
107
9
246,629
def insrti ( item , inset ) : assert isinstance ( inset , stypes . SpiceCell ) if hasattr ( item , "__iter__" ) : for i in item : libspice . insrti_c ( ctypes . c_int ( i ) , ctypes . byref ( inset ) ) else : item = ctypes . c_int ( item ) libspice . insrti_c ( item , ctypes . byref ( inset ) )
Insert an item into an integer set .
107
8
246,630
def inter ( a , b ) : assert isinstance ( a , stypes . SpiceCell ) assert isinstance ( b , stypes . SpiceCell ) assert a . dtype == b . dtype # Next line was redundant with [raise NotImpImplementedError] below # assert a.dtype == 0 or a.dtype == 1 or a.dtype == 2 if a . dtype is 0 : c = stypes . SPICECHAR_CELL ( max ( a . size , b . size ) , max ( a . length , b . length ) ) elif a . dtype is 1 : c = stypes . SPICEDOUBLE_CELL ( max ( a . size , b . size ) ) elif a . dtype is 2 : c = stypes . SPICEINT_CELL ( max ( a . size , b . size ) ) else : raise NotImplementedError libspice . inter_c ( ctypes . byref ( a ) , ctypes . byref ( b ) , ctypes . byref ( c ) ) return c
Intersect two sets of any data type to form a third set .
234
14
246,631
def invert ( m ) : m = stypes . toDoubleMatrix ( m ) mout = stypes . emptyDoubleMatrix ( ) libspice . invert_c ( m , mout ) return stypes . cMatrixToNumpy ( mout )
Generate the inverse of a 3x3 matrix .
56
11
246,632
def invort ( m ) : m = stypes . toDoubleMatrix ( m ) mout = stypes . emptyDoubleMatrix ( ) libspice . invort_c ( m , mout ) return stypes . cMatrixToNumpy ( mout )
Given a matrix construct the matrix whose rows are the columns of the first divided by the length squared of the the corresponding columns of the input matrix .
56
29
246,633
def isordv ( array , n ) : array = stypes . toIntVector ( array ) n = ctypes . c_int ( n ) return bool ( libspice . isordv_c ( array , n ) )
Determine whether an array of n items contains the integers 0 through n - 1 .
50
18
246,634
def isrchc ( value , ndim , lenvals , array ) : value = stypes . stringToCharP ( value ) array = stypes . listToCharArrayPtr ( array , xLen = lenvals , yLen = ndim ) ndim = ctypes . c_int ( ndim ) lenvals = ctypes . c_int ( lenvals ) return libspice . isrchc_c ( value , ndim , lenvals , array )
Search for a given value within a character string array . Return the index of the first matching array entry or - 1 if the key value was not found .
102
31
246,635
def isrchd ( value , ndim , array ) : value = ctypes . c_double ( value ) ndim = ctypes . c_int ( ndim ) array = stypes . toDoubleVector ( array ) return libspice . isrchd_c ( value , ndim , array )
Search for a given value within a double precision array . Return the index of the first matching array entry or - 1 if the key value was not found .
68
31
246,636
def isrchi ( value , ndim , array ) : value = ctypes . c_int ( value ) ndim = ctypes . c_int ( ndim ) array = stypes . toIntVector ( array ) return libspice . isrchi_c ( value , ndim , array )
Search for a given value within an integer array . Return the index of the first matching array entry or - 1 if the key value was not found .
66
30
246,637
def isrot ( m , ntol , dtol ) : m = stypes . toDoubleMatrix ( m ) ntol = ctypes . c_double ( ntol ) dtol = ctypes . c_double ( dtol ) return bool ( libspice . isrot_c ( m , ntol , dtol ) )
Indicate whether a 3x3 matrix is a rotation matrix .
79
13
246,638
def iswhsp ( string ) : string = stypes . stringToCharP ( string ) return bool ( libspice . iswhsp_c ( string ) )
Return a boolean value indicating whether a string contains only white space characters .
36
14
246,639
def kdata ( which , kind , fillen = _default_len_out , typlen = _default_len_out , srclen = _default_len_out ) : which = ctypes . c_int ( which ) kind = stypes . stringToCharP ( kind ) fillen = ctypes . c_int ( fillen ) typlen = ctypes . c_int ( typlen ) srclen = ctypes . c_int ( srclen ) file = stypes . stringToCharP ( fillen ) filtyp = stypes . stringToCharP ( typlen ) source = stypes . stringToCharP ( srclen ) handle = ctypes . c_int ( ) found = ctypes . c_int ( ) libspice . kdata_c ( which , kind , fillen , typlen , srclen , file , filtyp , source , ctypes . byref ( handle ) , ctypes . byref ( found ) ) return stypes . toPythonString ( file ) , stypes . toPythonString ( filtyp ) , stypes . toPythonString ( source ) , handle . value , bool ( found . value )
Return data for the nth kernel that is among a list of specified kernel types .
260
17
246,640
def kinfo ( file , typlen = _default_len_out , srclen = _default_len_out ) : typlen = ctypes . c_int ( typlen ) srclen = ctypes . c_int ( srclen ) file = stypes . stringToCharP ( file ) filtyp = stypes . stringToCharP ( " " * typlen . value ) source = stypes . stringToCharP ( " " * srclen . value ) handle = ctypes . c_int ( ) found = ctypes . c_int ( ) libspice . kinfo_c ( file , typlen , srclen , filtyp , source , ctypes . byref ( handle ) , ctypes . byref ( found ) ) return stypes . toPythonString ( filtyp ) , stypes . toPythonString ( source ) , handle . value , bool ( found . value )
Return information about a loaded kernel specified by name .
204
10
246,641
def kplfrm ( frmcls , outCell = None ) : if not outCell : outCell = stypes . SPICEINT_CELL ( 1000 ) frmcls = ctypes . c_int ( frmcls ) libspice . kplfrm_c ( frmcls , ctypes . byref ( outCell ) ) return outCell
Return a SPICE set containing the frame IDs of all reference frames of a given class having specifications in the kernel pool .
83
24
246,642
def ktotal ( kind ) : kind = stypes . stringToCharP ( kind ) count = ctypes . c_int ( ) libspice . ktotal_c ( kind , ctypes . byref ( count ) ) return count . value
Return the current number of kernels that have been loaded via the KEEPER interface that are of a specified type .
53
23
246,643
def kxtrct ( keywd , terms , nterms , instring , termlen = _default_len_out , stringlen = _default_len_out , substrlen = _default_len_out ) : assert nterms <= len ( terms ) # Python strings and string arrays => to C char pointers keywd = stypes . stringToCharP ( keywd ) terms = stypes . listToCharArrayPtr ( [ s [ : termlen - 1 ] for s in terms [ : nterms ] ] , xLen = termlen , yLen = nterms ) instring = stypes . stringToCharP ( instring [ : stringlen - 1 ] , inlen = stringlen ) substr = stypes . stringToCharP ( substrlen ) # Python ints => to C ints termlen = ctypes . c_int ( termlen ) nterms = ctypes . c_int ( nterms ) stringlen = ctypes . c_int ( stringlen ) substrlen = ctypes . c_int ( substrlen ) found = ctypes . c_int ( ) libspice . kxtrct_c ( keywd , termlen , terms , nterms , stringlen , substrlen , instring , ctypes . byref ( found ) , substr ) return stypes . toPythonString ( instring ) , stypes . toPythonString ( substr ) , bool ( found . value )
Locate a keyword in a string and extract the substring from the beginning of the first word following the keyword to the beginning of the first subsequent recognized terminator of a list .
305
36
246,644
def latcyl ( radius , lon , lat ) : radius = ctypes . c_double ( radius ) lon = ctypes . c_double ( lon ) lat = ctypes . c_double ( lat ) r = ctypes . c_double ( ) lonc = ctypes . c_double ( ) z = ctypes . c_double ( ) libspice . latcyl_c ( radius , lon , lat , ctypes . byref ( r ) , ctypes . byref ( lonc ) , ctypes . byref ( z ) ) return r . value , lonc . value , z . value
Convert from latitudinal coordinates to cylindrical coordinates .
138
12
246,645
def latrec ( radius , longitude , latitude ) : radius = ctypes . c_double ( radius ) longitude = ctypes . c_double ( longitude ) latitude = ctypes . c_double ( latitude ) rectan = stypes . emptyDoubleVector ( 3 ) libspice . latrec_c ( radius , longitude , latitude , rectan ) return stypes . cVectorToPython ( rectan )
Convert from latitudinal coordinates to rectangular coordinates .
90
10
246,646
def latsph ( radius , lon , lat ) : radius = ctypes . c_double ( radius ) lon = ctypes . c_double ( lon ) lat = ctypes . c_double ( lat ) rho = ctypes . c_double ( ) colat = ctypes . c_double ( ) lons = ctypes . c_double ( ) libspice . latsph_c ( radius , lon , lat , ctypes . byref ( rho ) , ctypes . byref ( colat ) , ctypes . byref ( lons ) ) return rho . value , colat . value , lons . value
Convert from latitudinal coordinates to spherical coordinates .
143
10
246,647
def lcase ( instr , lenout = _default_len_out ) : instr = stypes . stringToCharP ( instr ) lenout = ctypes . c_int ( lenout ) outstr = stypes . stringToCharP ( lenout ) libspice . lcase_c ( instr , lenout , outstr ) return stypes . toPythonString ( outstr )
Convert the characters in a string to lowercase .
84
11
246,648
def lmpool ( cvals ) : lenvals = ctypes . c_int ( len ( max ( cvals , key = len ) ) + 1 ) n = ctypes . c_int ( len ( cvals ) ) cvals = stypes . listToCharArrayPtr ( cvals , xLen = lenvals , yLen = n ) libspice . lmpool_c ( cvals , lenvals , n )
Load the variables contained in an internal buffer into the kernel pool .
93
13
246,649
def lparse ( inlist , delim , nmax ) : delim = stypes . stringToCharP ( delim ) lenout = ctypes . c_int ( len ( inlist ) ) inlist = stypes . stringToCharP ( inlist ) nmax = ctypes . c_int ( nmax ) items = stypes . emptyCharArray ( lenout , nmax ) n = ctypes . c_int ( ) libspice . lparse_c ( inlist , delim , nmax , lenout , ctypes . byref ( n ) , ctypes . byref ( items ) ) return [ stypes . toPythonString ( x . value ) for x in items [ 0 : n . value ] ]
Parse a list of items delimited by a single character .
156
13
246,650
def lparsm ( inlist , delims , nmax , lenout = None ) : if lenout is None : lenout = ctypes . c_int ( len ( inlist ) + 1 ) else : lenout = ctypes . c_int ( lenout ) inlist = stypes . stringToCharP ( inlist ) delims = stypes . stringToCharP ( delims ) items = stypes . emptyCharArray ( lenout . value , nmax ) nmax = ctypes . c_int ( nmax ) n = ctypes . c_int ( ) libspice . lparsm_c ( inlist , delims , nmax , lenout , ctypes . byref ( n ) , items ) return [ stypes . toPythonString ( x . value ) for x in items ] [ 0 : n . value ]
Parse a list of items separated by multiple delimiters .
187
13
246,651
def lparss ( inlist , delims , NMAX = 20 , LENGTH = 50 ) : inlist = stypes . stringToCharP ( inlist ) delims = stypes . stringToCharP ( delims ) returnSet = stypes . SPICECHAR_CELL ( NMAX , LENGTH ) libspice . lparss_c ( inlist , delims , ctypes . byref ( returnSet ) ) return returnSet
Parse a list of items separated by multiple delimiters placing the resulting items into a set .
99
20
246,652
def lspcn ( body , et , abcorr ) : body = stypes . stringToCharP ( body ) et = ctypes . c_double ( et ) abcorr = stypes . stringToCharP ( abcorr ) return libspice . lspcn_c ( body , et , abcorr )
Compute L_s the planetocentric longitude of the sun as seen from a specified body .
72
21
246,653
def lstlec ( string , n , lenvals , array ) : string = stypes . stringToCharP ( string ) array = stypes . listToCharArrayPtr ( array , xLen = lenvals , yLen = n ) n = ctypes . c_int ( n ) lenvals = ctypes . c_int ( lenvals ) return libspice . lstlec_c ( string , n , lenvals , array )
Given a character string and an ordered array of character strings find the index of the largest array element less than or equal to the given string .
97
28
246,654
def lstled ( x , n , array ) : array = stypes . toDoubleVector ( array ) x = ctypes . c_double ( x ) n = ctypes . c_int ( n ) return libspice . lstled_c ( x , n , array )
Given a number x and an array of non - decreasing floats find the index of the largest array element less than or equal to x .
62
27
246,655
def lstlei ( x , n , array ) : array = stypes . toIntVector ( array ) x = ctypes . c_int ( x ) n = ctypes . c_int ( n ) return libspice . lstlei_c ( x , n , array )
Given a number x and an array of non - decreasing ints find the index of the largest array element less than or equal to x .
64
28
246,656
def lstltc ( string , n , lenvals , array ) : string = stypes . stringToCharP ( string ) array = stypes . listToCharArrayPtr ( array , xLen = lenvals , yLen = n ) n = ctypes . c_int ( n ) lenvals = ctypes . c_int ( lenvals ) return libspice . lstltc_c ( string , n , lenvals , array )
Given a character string and an ordered array of character strings find the index of the largest array element less than the given string .
97
25
246,657
def lstltd ( x , n , array ) : array = stypes . toDoubleVector ( array ) x = ctypes . c_double ( x ) n = ctypes . c_int ( n ) return libspice . lstltd_c ( x , n , array )
Given a number x and an array of non - decreasing floats find the index of the largest array element less than x .
64
24
246,658
def lstlti ( x , n , array ) : array = stypes . toIntVector ( array ) x = ctypes . c_int ( x ) n = ctypes . c_int ( n ) return libspice . lstlti_c ( x , n , array )
Given a number x and an array of non - decreasing int find the index of the largest array element less than x .
64
24
246,659
def lx4dec ( string , first ) : string = stypes . stringToCharP ( string ) first = ctypes . c_int ( first ) last = ctypes . c_int ( ) nchar = ctypes . c_int ( ) libspice . lx4dec_c ( string , first , ctypes . byref ( last ) , ctypes . byref ( nchar ) ) return last . value , nchar . value
Scan a string from a specified starting position for the end of a decimal number .
98
16
246,660
def lx4num ( string , first ) : string = stypes . stringToCharP ( string ) first = ctypes . c_int ( first ) last = ctypes . c_int ( ) nchar = ctypes . c_int ( ) libspice . lx4num_c ( string , first , ctypes . byref ( last ) , ctypes . byref ( nchar ) ) return last . value , nchar . value
Scan a string from a specified starting position for the end of a number .
98
15
246,661
def lx4sgn ( string , first ) : string = stypes . stringToCharP ( string ) first = ctypes . c_int ( first ) last = ctypes . c_int ( ) nchar = ctypes . c_int ( ) libspice . lx4sgn_c ( string , first , ctypes . byref ( last ) , ctypes . byref ( nchar ) ) return last . value , nchar . value
Scan a string from a specified starting position for the end of a signed integer .
100
16
246,662
def lx4uns ( string , first ) : string = stypes . stringToCharP ( string ) first = ctypes . c_int ( first ) last = ctypes . c_int ( ) nchar = ctypes . c_int ( ) libspice . lx4uns_c ( string , first , ctypes . byref ( last ) , ctypes . byref ( nchar ) ) return last . value , nchar . value
Scan a string from a specified starting position for the end of an unsigned integer .
98
16
246,663
def m2eul ( r , axis3 , axis2 , axis1 ) : r = stypes . toDoubleMatrix ( r ) axis3 = ctypes . c_int ( axis3 ) axis2 = ctypes . c_int ( axis2 ) axis1 = ctypes . c_int ( axis1 ) angle3 = ctypes . c_double ( ) angle2 = ctypes . c_double ( ) angle1 = ctypes . c_double ( ) libspice . m2eul_c ( r , axis3 , axis2 , axis1 , ctypes . byref ( angle3 ) , ctypes . byref ( angle2 ) , ctypes . byref ( angle1 ) ) return angle3 . value , angle2 . value , angle1 . value
Factor a rotation matrix as a product of three rotations about specified coordinate axes .
168
16
246,664
def m2q ( r ) : r = stypes . toDoubleMatrix ( r ) q = stypes . emptyDoubleVector ( 4 ) libspice . m2q_c ( r , q ) return stypes . cVectorToPython ( q )
Find a unit quaternion corresponding to a specified rotation matrix .
55
13
246,665
def matchi ( string , templ , wstr , wchr ) : string = stypes . stringToCharP ( string ) templ = stypes . stringToCharP ( templ ) wstr = ctypes . c_char ( wstr . encode ( encoding = 'UTF-8' ) ) wchr = ctypes . c_char ( wchr . encode ( encoding = 'UTF-8' ) ) return bool ( libspice . matchi_c ( string , templ , wstr , wchr ) )
Determine whether a string is matched by a template containing wild cards . The pattern comparison is case - insensitive .
118
23
246,666
def matchw ( string , templ , wstr , wchr ) : # ctypes.c_char(wstr.encode(encoding='UTF-8') string = stypes . stringToCharP ( string ) templ = stypes . stringToCharP ( templ ) wstr = ctypes . c_char ( wstr . encode ( encoding = 'UTF-8' ) ) wchr = ctypes . c_char ( wchr . encode ( encoding = 'UTF-8' ) ) return bool ( libspice . matchw_c ( string , templ , wstr , wchr ) )
Determine whether a string is matched by a template containing wild cards .
139
15
246,667
def mequ ( m1 ) : m1 = stypes . toDoubleMatrix ( m1 ) mout = stypes . emptyDoubleMatrix ( ) libspice . mequ_c ( m1 , mout ) return stypes . cMatrixToNumpy ( mout )
Set one double precision 3x3 matrix equal to another .
60
12
246,668
def mequg ( m1 , nr , nc ) : m1 = stypes . toDoubleMatrix ( m1 ) mout = stypes . emptyDoubleMatrix ( x = nc , y = nr ) nc = ctypes . c_int ( nc ) nr = ctypes . c_int ( nr ) libspice . mequg_c ( m1 , nc , nr , mout ) return stypes . cMatrixToNumpy ( mout )
Set one double precision matrix of arbitrary size equal to another .
109
12
246,669
def mtxm ( m1 , m2 ) : m1 = stypes . toDoubleMatrix ( m1 ) m2 = stypes . toDoubleMatrix ( m2 ) mout = stypes . emptyDoubleMatrix ( ) libspice . mtxm_c ( m1 , m2 , mout ) return stypes . cMatrixToNumpy ( mout )
Multiply the transpose of a 3x3 matrix and a 3x3 matrix .
81
19
246,670
def mtxmg ( m1 , m2 , ncol1 , nr1r2 , ncol2 ) : m1 = stypes . toDoubleMatrix ( m1 ) m2 = stypes . toDoubleMatrix ( m2 ) mout = stypes . emptyDoubleMatrix ( x = ncol2 , y = ncol1 ) ncol1 = ctypes . c_int ( ncol1 ) nr1r2 = ctypes . c_int ( nr1r2 ) ncol2 = ctypes . c_int ( ncol2 ) libspice . mtxmg_c ( m1 , m2 , ncol1 , nr1r2 , ncol2 , mout ) return stypes . cMatrixToNumpy ( mout )
Multiply the transpose of a matrix with another matrix both of arbitrary size .
169
17
246,671
def mtxv ( m1 , vin ) : m1 = stypes . toDoubleMatrix ( m1 ) vin = stypes . toDoubleVector ( vin ) vout = stypes . emptyDoubleVector ( 3 ) libspice . mtxv_c ( m1 , vin , vout ) return stypes . cVectorToPython ( vout )
Multiplies the transpose of a 3x3 matrix on the left with a vector on the right .
81
22
246,672
def mtxvg ( m1 , v2 , ncol1 , nr1r2 ) : m1 = stypes . toDoubleMatrix ( m1 ) v2 = stypes . toDoubleVector ( v2 ) ncol1 = ctypes . c_int ( ncol1 ) nr1r2 = ctypes . c_int ( nr1r2 ) vout = stypes . emptyDoubleVector ( ncol1 . value ) libspice . mtxvg_c ( m1 , v2 , ncol1 , nr1r2 , vout ) return stypes . cVectorToPython ( vout )
Multiply the transpose of a matrix and a vector of arbitrary size .
139
16
246,673
def mxm ( m1 , m2 ) : m1 = stypes . toDoubleMatrix ( m1 ) m2 = stypes . toDoubleMatrix ( m2 ) mout = stypes . emptyDoubleMatrix ( ) libspice . mxm_c ( m1 , m2 , mout ) return stypes . cMatrixToNumpy ( mout )
Multiply two 3x3 matrices .
81
10
246,674
def mxmg ( m1 , m2 , nrow1 , ncol1 , ncol2 ) : m1 = stypes . toDoubleMatrix ( m1 ) m2 = stypes . toDoubleMatrix ( m2 ) mout = stypes . emptyDoubleMatrix ( x = ncol2 , y = nrow1 ) nrow1 = ctypes . c_int ( nrow1 ) ncol1 = ctypes . c_int ( ncol1 ) ncol2 = ctypes . c_int ( ncol2 ) libspice . mxmg_c ( m1 , m2 , nrow1 , ncol1 , ncol2 , mout ) return stypes . cMatrixToNumpy ( mout )
Multiply two double precision matrices of arbitrary size .
161
12
246,675
def mxmt ( m1 , m2 ) : m1 = stypes . toDoubleMatrix ( m1 ) m2 = stypes . toDoubleMatrix ( m2 ) mout = stypes . emptyDoubleMatrix ( ) libspice . mxmt_c ( m1 , m2 , mout ) return stypes . cMatrixToNumpy ( mout )
Multiply a 3x3 matrix and the transpose of another 3x3 matrix .
81
19
246,676
def mxmtg ( m1 , m2 , nrow1 , nc1c2 , nrow2 ) : m1 = stypes . toDoubleMatrix ( m1 ) m2 = stypes . toDoubleMatrix ( m2 ) mout = stypes . emptyDoubleMatrix ( x = nrow2 , y = nrow1 ) nrow1 = ctypes . c_int ( nrow1 ) nc1c2 = ctypes . c_int ( nc1c2 ) nrow2 = ctypes . c_int ( nrow2 ) libspice . mxmtg_c ( m1 , m2 , nrow1 , nc1c2 , nrow2 , mout ) return stypes . cMatrixToNumpy ( mout )
Multiply a matrix and the transpose of a matrix both of arbitrary size .
171
17
246,677
def mxv ( m1 , vin ) : m1 = stypes . toDoubleMatrix ( m1 ) vin = stypes . toDoubleVector ( vin ) vout = stypes . emptyDoubleVector ( 3 ) libspice . mxv_c ( m1 , vin , vout ) return stypes . cVectorToPython ( vout )
Multiply a 3x3 double precision matrix with a 3 - dimensional double precision vector .
81
19
246,678
def mxvg ( m1 , v2 , nrow1 , nc1r2 ) : m1 = stypes . toDoubleMatrix ( m1 ) v2 = stypes . toDoubleVector ( v2 ) nrow1 = ctypes . c_int ( nrow1 ) nc1r2 = ctypes . c_int ( nc1r2 ) vout = stypes . emptyDoubleVector ( nrow1 . value ) libspice . mxvg_c ( m1 , v2 , nrow1 , nc1r2 , vout ) return stypes . cVectorToPython ( vout )
Multiply a matrix and a vector of arbitrary size .
139
12
246,679
def namfrm ( frname ) : frname = stypes . stringToCharP ( frname ) frcode = ctypes . c_int ( ) libspice . namfrm_c ( frname , ctypes . byref ( frcode ) ) return frcode . value
Look up the frame ID code associated with a string .
64
11
246,680
def ncpos ( string , chars , start ) : string = stypes . stringToCharP ( string ) chars = stypes . stringToCharP ( chars ) start = ctypes . c_int ( start ) return libspice . ncpos_c ( string , chars , start )
Find the first occurrence in a string of a character NOT belonging to a collection of characters starting at a specified location searching forward .
64
25
246,681
def ncposr ( string , chars , start ) : string = stypes . stringToCharP ( string ) chars = stypes . stringToCharP ( chars ) start = ctypes . c_int ( start ) return libspice . ncposr_c ( string , chars , start )
Find the first occurrence in a string of a character NOT belonging to a collection of characters starting at a specified location searching in reverse .
66
26
246,682
def nearpt ( positn , a , b , c ) : positn = stypes . toDoubleVector ( positn ) a = ctypes . c_double ( a ) b = ctypes . c_double ( b ) c = ctypes . c_double ( c ) npoint = stypes . emptyDoubleVector ( 3 ) alt = ctypes . c_double ( ) libspice . nearpt_c ( positn , a , b , c , npoint , ctypes . byref ( alt ) ) return stypes . cVectorToPython ( npoint ) , alt . value
locates the point on the surface of an ellipsoid that is nearest to a specified position . It also returns the altitude of the position above the ellipsoid .
128
36
246,683
def npedln ( a , b , c , linept , linedr ) : a = ctypes . c_double ( a ) b = ctypes . c_double ( b ) c = ctypes . c_double ( c ) linept = stypes . toDoubleVector ( linept ) linedr = stypes . toDoubleVector ( linedr ) pnear = stypes . emptyDoubleVector ( 3 ) dist = ctypes . c_double ( ) libspice . npedln_c ( a , b , c , linept , linedr , pnear , ctypes . byref ( dist ) ) return stypes . cVectorToPython ( pnear ) , dist . value
Find nearest point on a triaxial ellipsoid to a specified line and the distance from the ellipsoid to the line .
149
29
246,684
def nplnpt ( linpt , lindir , point ) : linpt = stypes . toDoubleVector ( linpt ) lindir = stypes . toDoubleVector ( lindir ) point = stypes . toDoubleVector ( point ) pnear = stypes . emptyDoubleVector ( 3 ) dist = ctypes . c_double ( ) libspice . nplnpt_c ( linpt , lindir , point , pnear , ctypes . byref ( dist ) ) return stypes . cVectorToPython ( pnear ) , dist . value
Find the nearest point on a line to a specified point and find the distance between the two points .
125
20
246,685
def nvc2pl ( normal , constant ) : plane = stypes . Plane ( ) normal = stypes . toDoubleVector ( normal ) constant = ctypes . c_double ( constant ) libspice . nvc2pl_c ( normal , constant , ctypes . byref ( plane ) ) return plane
Make a plane from a normal vector and a constant .
67
11
246,686
def nvp2pl ( normal , point ) : normal = stypes . toDoubleVector ( normal ) point = stypes . toDoubleVector ( point ) plane = stypes . Plane ( ) libspice . nvp2pl_c ( normal , point , ctypes . byref ( plane ) ) return plane
Make a plane from a normal vector and a point .
67
11
246,687
def ordc ( item , inset ) : assert isinstance ( inset , stypes . SpiceCell ) assert inset . is_char ( ) assert isinstance ( item , str ) item = stypes . stringToCharP ( item ) return libspice . ordc_c ( item , ctypes . byref ( inset ) )
The function returns the ordinal position of any given item in a character set . If the item does not appear in the set the function returns - 1 .
74
31
246,688
def ordd ( item , inset ) : assert isinstance ( inset , stypes . SpiceCell ) assert inset . is_double ( ) item = ctypes . c_double ( item ) return libspice . ordd_c ( item , ctypes . byref ( inset ) )
The function returns the ordinal position of any given item in a double precision set . If the item does not appear in the set the function returns - 1 .
65
32
246,689
def ordi ( item , inset ) : assert isinstance ( inset , stypes . SpiceCell ) assert inset . is_int ( ) assert isinstance ( item , int ) item = ctypes . c_int ( item ) return libspice . ordi_c ( item , ctypes . byref ( inset ) )
The function returns the ordinal position of any given item in an integer set . If the item does not appear in the set the function returns - 1 .
73
31
246,690
def orderc ( array , ndim = None ) : if ndim is None : ndim = ctypes . c_int ( len ( array ) ) else : ndim = ctypes . c_int ( ndim ) lenvals = ctypes . c_int ( len ( max ( array , key = len ) ) + 1 ) iorder = stypes . emptyIntVector ( ndim ) array = stypes . listToCharArray ( array , lenvals , ndim ) libspice . orderc_c ( lenvals , array , ndim , iorder ) return stypes . cVectorToPython ( iorder )
Determine the order of elements in an array of character strings .
135
14
246,691
def orderd ( array , ndim = None ) : if ndim is None : ndim = ctypes . c_int ( len ( array ) ) else : ndim = ctypes . c_int ( ndim ) array = stypes . toDoubleVector ( array ) iorder = stypes . emptyIntVector ( ndim ) libspice . orderd_c ( array , ndim , iorder ) return stypes . cVectorToPython ( iorder )
Determine the order of elements in a double precision array .
101
13
246,692
def orderi ( array , ndim = None ) : if ndim is None : ndim = ctypes . c_int ( len ( array ) ) else : ndim = ctypes . c_int ( ndim ) array = stypes . toIntVector ( array ) iorder = stypes . emptyIntVector ( ndim ) libspice . orderi_c ( array , ndim , iorder ) return stypes . cVectorToPython ( iorder )
Determine the order of elements in an integer array .
101
12
246,693
def pckcov ( pck , idcode , cover ) : pck = stypes . stringToCharP ( pck ) idcode = ctypes . c_int ( idcode ) assert isinstance ( cover , stypes . SpiceCell ) assert cover . dtype == 1 libspice . pckcov_c ( pck , idcode , ctypes . byref ( cover ) )
Find the coverage window for a specified reference frame in a specified binary PCK file .
87
17
246,694
def pckfrm ( pck , ids ) : pck = stypes . stringToCharP ( pck ) assert isinstance ( ids , stypes . SpiceCell ) assert ids . dtype == 2 libspice . pckfrm_c ( pck , ctypes . byref ( ids ) )
Find the set of reference frame class ID codes of all frames in a specified binary PCK file .
72
20
246,695
def pcklof ( filename ) : filename = stypes . stringToCharP ( filename ) handle = ctypes . c_int ( ) libspice . pcklof_c ( filename , ctypes . byref ( handle ) ) return handle . value
Load a binary PCK file for use by the readers . Return the handle of the loaded file which is used by other PCK routines to refer to the file .
57
33
246,696
def pcpool ( name , cvals ) : name = stypes . stringToCharP ( name ) lenvals = ctypes . c_int ( len ( max ( cvals , key = len ) ) + 1 ) n = ctypes . c_int ( len ( cvals ) ) cvals = stypes . listToCharArray ( cvals , lenvals , n ) libspice . pcpool_c ( name , n , lenvals , cvals )
This entry point provides toolkit programmers a method for programmatically inserting character data into the kernel pool .
100
20
246,697
def pdpool ( name , dvals ) : name = stypes . stringToCharP ( name ) n = ctypes . c_int ( len ( dvals ) ) dvals = stypes . toDoubleVector ( dvals ) libspice . pdpool_c ( name , n , dvals )
This entry point provides toolkit programmers a method for programmatically inserting double precision data into the kernel pool .
68
21
246,698
def pgrrec ( body , lon , lat , alt , re , f ) : body = stypes . stringToCharP ( body ) lon = ctypes . c_double ( lon ) lat = ctypes . c_double ( lat ) alt = ctypes . c_double ( alt ) re = ctypes . c_double ( re ) f = ctypes . c_double ( f ) rectan = stypes . emptyDoubleVector ( 3 ) libspice . pgrrec_c ( body , lon , lat , alt , re , f , rectan ) return stypes . cVectorToPython ( rectan )
Convert planetographic coordinates to rectangular coordinates .
138
9
246,699
def phaseq ( et , target , illmn , obsrvr , abcorr ) : et = ctypes . c_double ( et ) target = stypes . stringToCharP ( target ) illmn = stypes . stringToCharP ( illmn ) obsrvr = stypes . stringToCharP ( obsrvr ) abcorr = stypes . stringToCharP ( abcorr ) return libspice . phaseq_c ( et , target , illmn , obsrvr , abcorr )
Compute the apparent phase angle for a target observer illuminator set of ephemeris objects .
114
20