id
int32 0
252k
| repo
stringlengths 7
55
| path
stringlengths 4
127
| func_name
stringlengths 1
88
| original_string
stringlengths 75
19.8k
| language
stringclasses 1
value | code
stringlengths 75
19.8k
| code_tokens
list | docstring
stringlengths 3
17.3k
| docstring_tokens
list | sha
stringlengths 40
40
| url
stringlengths 87
242
|
|---|---|---|---|---|---|---|---|---|---|---|---|
14,800
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
lx4sgn
|
def lx4sgn(string, first):
"""
Scan a string from a specified starting position for the
end of a signed integer.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4sgn_c.html
:param string: Any character string.
:type string: str
:param first: First character to scan from in string.
:type first: int
:return: last and nchar
:rtype: tuple
"""
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
|
python
|
def lx4sgn(string, first):
"""
Scan a string from a specified starting position for the
end of a signed integer.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4sgn_c.html
:param string: Any character string.
:type string: str
:param first: First character to scan from in string.
:type first: int
:return: last and nchar
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4sgn_c.html
:param string: Any character string.
:type string: str
:param first: First character to scan from in string.
:type first: int
:return: last and nchar
:rtype: tuple
|
[
"Scan",
"a",
"string",
"from",
"a",
"specified",
"starting",
"position",
"for",
"the",
"end",
"of",
"a",
"signed",
"integer",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8305-L8324
|
14,801
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
lx4uns
|
def lx4uns(string, first):
"""
Scan a string from a specified starting position for the
end of an unsigned integer.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4uns_c.html
:param string: Any character string.
:type string: str
:param first: First character to scan from in string.
:type first: int
:return: last and nchar
:rtype: tuple
"""
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
|
python
|
def lx4uns(string, first):
"""
Scan a string from a specified starting position for the
end of an unsigned integer.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4uns_c.html
:param string: Any character string.
:type string: str
:param first: First character to scan from in string.
:type first: int
:return: last and nchar
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4uns_c.html
:param string: Any character string.
:type string: str
:param first: First character to scan from in string.
:type first: int
:return: last and nchar
:rtype: tuple
|
[
"Scan",
"a",
"string",
"from",
"a",
"specified",
"starting",
"position",
"for",
"the",
"end",
"of",
"an",
"unsigned",
"integer",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8328-L8347
|
14,802
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
m2eul
|
def m2eul(r, axis3, axis2, axis1):
"""
Factor a rotation matrix as a product of three rotations
about specified coordinate axes.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2eul_c.html
:param r: A rotation matrix to be factored
:type r: 3x3-Element Array of floats
:param axis3: third rotation axes.
:type axis3: int
:param axis2: second rotation axes.
:type axis2: int
:param axis1: first rotation axes.
:type axis1: int
:return: Third, second, and first Euler angles, in radians.
:rtype: tuple
"""
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
|
python
|
def m2eul(r, axis3, axis2, axis1):
"""
Factor a rotation matrix as a product of three rotations
about specified coordinate axes.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2eul_c.html
:param r: A rotation matrix to be factored
:type r: 3x3-Element Array of floats
:param axis3: third rotation axes.
:type axis3: int
:param axis2: second rotation axes.
:type axis2: int
:param axis1: first rotation axes.
:type axis1: int
:return: Third, second, and first Euler angles, in radians.
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2eul_c.html
:param r: A rotation matrix to be factored
:type r: 3x3-Element Array of floats
:param axis3: third rotation axes.
:type axis3: int
:param axis2: second rotation axes.
:type axis2: int
:param axis1: first rotation axes.
:type axis1: int
:return: Third, second, and first Euler angles, in radians.
:rtype: tuple
|
[
"Factor",
"a",
"rotation",
"matrix",
"as",
"a",
"product",
"of",
"three",
"rotations",
"about",
"specified",
"coordinate",
"axes",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8381-L8408
|
14,803
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
m2q
|
def m2q(r):
"""
Find a unit quaternion corresponding to a specified rotation matrix.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2q_c.html
:param r: A rotation matrix to be factored
:type r: 3x3-Element Array of floats
:return: A unit quaternion representing the rotation matrix
:rtype: 4-Element Array of floats
"""
r = stypes.toDoubleMatrix(r)
q = stypes.emptyDoubleVector(4)
libspice.m2q_c(r, q)
return stypes.cVectorToPython(q)
|
python
|
def m2q(r):
"""
Find a unit quaternion corresponding to a specified rotation matrix.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2q_c.html
:param r: A rotation matrix to be factored
:type r: 3x3-Element Array of floats
:return: A unit quaternion representing the rotation matrix
:rtype: 4-Element Array of floats
"""
r = stypes.toDoubleMatrix(r)
q = stypes.emptyDoubleVector(4)
libspice.m2q_c(r, q)
return stypes.cVectorToPython(q)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2q_c.html
:param r: A rotation matrix to be factored
:type r: 3x3-Element Array of floats
:return: A unit quaternion representing the rotation matrix
:rtype: 4-Element Array of floats
|
[
"Find",
"a",
"unit",
"quaternion",
"corresponding",
"to",
"a",
"specified",
"rotation",
"matrix",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8412-L8426
|
14,804
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
matchi
|
def matchi(string, templ, wstr, wchr):
"""
Determine whether a string is matched by a template containing wild cards.
The pattern comparison is case-insensitive.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchi_c.html
:param string: String to be tested.
:type string: str
:param templ: Template (with wild cards) to test against string.
:type templ: str
:param wstr: Wild string token.
:type wstr: str of length 1
:param wchr: Wild character token.
:type wchr: str of length 1
:return: The function returns True if string matches templ, else False
:rtype: bool
"""
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))
|
python
|
def matchi(string, templ, wstr, wchr):
"""
Determine whether a string is matched by a template containing wild cards.
The pattern comparison is case-insensitive.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchi_c.html
:param string: String to be tested.
:type string: str
:param templ: Template (with wild cards) to test against string.
:type templ: str
:param wstr: Wild string token.
:type wstr: str of length 1
:param wchr: Wild character token.
:type wchr: str of length 1
:return: The function returns True if string matches templ, else False
:rtype: bool
"""
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))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchi_c.html
:param string: String to be tested.
:type string: str
:param templ: Template (with wild cards) to test against string.
:type templ: str
:param wstr: Wild string token.
:type wstr: str of length 1
:param wchr: Wild character token.
:type wchr: str of length 1
:return: The function returns True if string matches templ, else False
:rtype: bool
|
[
"Determine",
"whether",
"a",
"string",
"is",
"matched",
"by",
"a",
"template",
"containing",
"wild",
"cards",
".",
"The",
"pattern",
"comparison",
"is",
"case",
"-",
"insensitive",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8430-L8452
|
14,805
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
matchw
|
def matchw(string, templ, wstr, wchr):
# ctypes.c_char(wstr.encode(encoding='UTF-8')
"""
Determine whether a string is matched by a template containing wild cards.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchw_c.html
:param string: String to be tested.
:type string: str
:param templ: Template (with wild cards) to test against string.
:type templ: str
:param wstr: Wild string token.
:type wstr: str of length 1
:param wchr: Wild character token.
:type wchr: str of length 1
:return: The function returns True if string matches templ, else False
:rtype: bool
"""
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))
|
python
|
def matchw(string, templ, wstr, wchr):
# ctypes.c_char(wstr.encode(encoding='UTF-8')
"""
Determine whether a string is matched by a template containing wild cards.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchw_c.html
:param string: String to be tested.
:type string: str
:param templ: Template (with wild cards) to test against string.
:type templ: str
:param wstr: Wild string token.
:type wstr: str of length 1
:param wchr: Wild character token.
:type wchr: str of length 1
:return: The function returns True if string matches templ, else False
:rtype: bool
"""
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))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchw_c.html
:param string: String to be tested.
:type string: str
:param templ: Template (with wild cards) to test against string.
:type templ: str
:param wstr: Wild string token.
:type wstr: str of length 1
:param wchr: Wild character token.
:type wchr: str of length 1
:return: The function returns True if string matches templ, else False
:rtype: bool
|
[
"Determine",
"whether",
"a",
"string",
"is",
"matched",
"by",
"a",
"template",
"containing",
"wild",
"cards",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8456-L8478
|
14,806
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mequ
|
def mequ(m1):
"""
Set one double precision 3x3 matrix equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequ_c.html
:param m1: input matrix.
:type m1: 3x3-Element Array of floats
:return: Output matrix equal to m1.
:rtype: 3x3-Element Array of floats
"""
m1 = stypes.toDoubleMatrix(m1)
mout = stypes.emptyDoubleMatrix()
libspice.mequ_c(m1, mout)
return stypes.cMatrixToNumpy(mout)
|
python
|
def mequ(m1):
"""
Set one double precision 3x3 matrix equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequ_c.html
:param m1: input matrix.
:type m1: 3x3-Element Array of floats
:return: Output matrix equal to m1.
:rtype: 3x3-Element Array of floats
"""
m1 = stypes.toDoubleMatrix(m1)
mout = stypes.emptyDoubleMatrix()
libspice.mequ_c(m1, mout)
return stypes.cMatrixToNumpy(mout)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequ_c.html
:param m1: input matrix.
:type m1: 3x3-Element Array of floats
:return: Output matrix equal to m1.
:rtype: 3x3-Element Array of floats
|
[
"Set",
"one",
"double",
"precision",
"3x3",
"matrix",
"equal",
"to",
"another",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8490-L8504
|
14,807
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mequg
|
def mequg(m1, nr, nc):
"""
Set one double precision matrix of arbitrary size equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequg_c.html
:param m1: Input matrix.
:type m1: NxM-Element Array of floats
:param nr: Row dimension of m1.
:type nr: int
:param nc: Column dimension of m1.
:type nc: int
:return: Output matrix equal to m1
:rtype: NxM-Element Array of floats
"""
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)
|
python
|
def mequg(m1, nr, nc):
"""
Set one double precision matrix of arbitrary size equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequg_c.html
:param m1: Input matrix.
:type m1: NxM-Element Array of floats
:param nr: Row dimension of m1.
:type nr: int
:param nc: Column dimension of m1.
:type nc: int
:return: Output matrix equal to m1
:rtype: NxM-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequg_c.html
:param m1: Input matrix.
:type m1: NxM-Element Array of floats
:param nr: Row dimension of m1.
:type nr: int
:param nc: Column dimension of m1.
:type nc: int
:return: Output matrix equal to m1
:rtype: NxM-Element Array of floats
|
[
"Set",
"one",
"double",
"precision",
"matrix",
"of",
"arbitrary",
"size",
"equal",
"to",
"another",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8508-L8528
|
14,808
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mtxm
|
def mtxm(m1, m2):
"""
Multiply the transpose of a 3x3 matrix and a 3x3 matrix.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxm_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param m2: 3x3 double precision matrix.
:type m2: 3x3-Element Array of floats
:return: The produce m1 transpose times m2.
:rtype: 3x3-Element Array of floats
"""
m1 = stypes.toDoubleMatrix(m1)
m2 = stypes.toDoubleMatrix(m2)
mout = stypes.emptyDoubleMatrix()
libspice.mtxm_c(m1, m2, mout)
return stypes.cMatrixToNumpy(mout)
|
python
|
def mtxm(m1, m2):
"""
Multiply the transpose of a 3x3 matrix and a 3x3 matrix.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxm_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param m2: 3x3 double precision matrix.
:type m2: 3x3-Element Array of floats
:return: The produce m1 transpose times m2.
:rtype: 3x3-Element Array of floats
"""
m1 = stypes.toDoubleMatrix(m1)
m2 = stypes.toDoubleMatrix(m2)
mout = stypes.emptyDoubleMatrix()
libspice.mtxm_c(m1, m2, mout)
return stypes.cMatrixToNumpy(mout)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxm_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param m2: 3x3 double precision matrix.
:type m2: 3x3-Element Array of floats
:return: The produce m1 transpose times m2.
:rtype: 3x3-Element Array of floats
|
[
"Multiply",
"the",
"transpose",
"of",
"a",
"3x3",
"matrix",
"and",
"a",
"3x3",
"matrix",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8540-L8557
|
14,809
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mtxmg
|
def mtxmg(m1, m2, ncol1, nr1r2, ncol2):
"""
Multiply the transpose of a matrix with
another matrix, both of arbitrary size.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxmg_c.html
:param m1: nr1r2 X ncol1 double precision matrix.
:type m1: NxM-Element Array of floats
:param m2: nr1r2 X ncol2 double precision matrix.
:type m2: NxM-Element Array of floats
:param ncol1: Column dimension of m1 and row dimension of mout.
:type ncol1: int
:param nr1r2: Row dimension of m1 and m2.
:type nr1r2: int
:param ncol2: Column dimension of m2.
:type ncol2: int
:return: Transpose of m1 times m2.
:rtype: NxM-Element Array of floats
"""
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)
|
python
|
def mtxmg(m1, m2, ncol1, nr1r2, ncol2):
"""
Multiply the transpose of a matrix with
another matrix, both of arbitrary size.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxmg_c.html
:param m1: nr1r2 X ncol1 double precision matrix.
:type m1: NxM-Element Array of floats
:param m2: nr1r2 X ncol2 double precision matrix.
:type m2: NxM-Element Array of floats
:param ncol1: Column dimension of m1 and row dimension of mout.
:type ncol1: int
:param nr1r2: Row dimension of m1 and m2.
:type nr1r2: int
:param ncol2: Column dimension of m2.
:type ncol2: int
:return: Transpose of m1 times m2.
:rtype: NxM-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxmg_c.html
:param m1: nr1r2 X ncol1 double precision matrix.
:type m1: NxM-Element Array of floats
:param m2: nr1r2 X ncol2 double precision matrix.
:type m2: NxM-Element Array of floats
:param ncol1: Column dimension of m1 and row dimension of mout.
:type ncol1: int
:param nr1r2: Row dimension of m1 and m2.
:type nr1r2: int
:param ncol2: Column dimension of m2.
:type ncol2: int
:return: Transpose of m1 times m2.
:rtype: NxM-Element Array of floats
|
[
"Multiply",
"the",
"transpose",
"of",
"a",
"matrix",
"with",
"another",
"matrix",
"both",
"of",
"arbitrary",
"size",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8561-L8588
|
14,810
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mtxv
|
def mtxv(m1, vin):
"""
Multiplies the transpose of a 3x3 matrix
on the left with a vector on the right.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxv_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param vin: 3-dimensional double precision vector.
:type vin: 3-Element Array of floats
:return: 3-dimensional double precision vector.
:rtype: 3-Element Array of floats
"""
m1 = stypes.toDoubleMatrix(m1)
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(3)
libspice.mtxv_c(m1, vin, vout)
return stypes.cVectorToPython(vout)
|
python
|
def mtxv(m1, vin):
"""
Multiplies the transpose of a 3x3 matrix
on the left with a vector on the right.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxv_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param vin: 3-dimensional double precision vector.
:type vin: 3-Element Array of floats
:return: 3-dimensional double precision vector.
:rtype: 3-Element Array of floats
"""
m1 = stypes.toDoubleMatrix(m1)
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(3)
libspice.mtxv_c(m1, vin, vout)
return stypes.cVectorToPython(vout)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxv_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param vin: 3-dimensional double precision vector.
:type vin: 3-Element Array of floats
:return: 3-dimensional double precision vector.
:rtype: 3-Element Array of floats
|
[
"Multiplies",
"the",
"transpose",
"of",
"a",
"3x3",
"matrix",
"on",
"the",
"left",
"with",
"a",
"vector",
"on",
"the",
"right",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8592-L8610
|
14,811
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mtxvg
|
def mtxvg(m1, v2, ncol1, nr1r2):
"""
Multiply the transpose of a matrix and
a vector of arbitrary size.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxvg_c.html
:param m1: Left-hand matrix to be multiplied.
:type m1: NxM-Element Array of floats
:param v2: Right-hand vector to be multiplied.
:type v2: Array of floats
:param ncol1: Column dimension of m1 and length of vout.
:type ncol1: int
:param nr1r2: Row dimension of m1 and length of v2.
:type nr1r2: int
:return: Product vector m1 transpose * v2.
:rtype: Array of floats
"""
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)
|
python
|
def mtxvg(m1, v2, ncol1, nr1r2):
"""
Multiply the transpose of a matrix and
a vector of arbitrary size.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxvg_c.html
:param m1: Left-hand matrix to be multiplied.
:type m1: NxM-Element Array of floats
:param v2: Right-hand vector to be multiplied.
:type v2: Array of floats
:param ncol1: Column dimension of m1 and length of vout.
:type ncol1: int
:param nr1r2: Row dimension of m1 and length of v2.
:type nr1r2: int
:return: Product vector m1 transpose * v2.
:rtype: Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxvg_c.html
:param m1: Left-hand matrix to be multiplied.
:type m1: NxM-Element Array of floats
:param v2: Right-hand vector to be multiplied.
:type v2: Array of floats
:param ncol1: Column dimension of m1 and length of vout.
:type ncol1: int
:param nr1r2: Row dimension of m1 and length of v2.
:type nr1r2: int
:return: Product vector m1 transpose * v2.
:rtype: Array of floats
|
[
"Multiply",
"the",
"transpose",
"of",
"a",
"matrix",
"and",
"a",
"vector",
"of",
"arbitrary",
"size",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8614-L8638
|
14,812
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mxm
|
def mxm(m1, m2):
"""
Multiply two 3x3 matrices.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxm_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param m2: 3x3 double precision matrix.
:type m2: 3x3-Element Array of floats
:return: 3x3 double precision matrix.
:rtype: 3x3-Element Array of floats
"""
m1 = stypes.toDoubleMatrix(m1)
m2 = stypes.toDoubleMatrix(m2)
mout = stypes.emptyDoubleMatrix()
libspice.mxm_c(m1, m2, mout)
return stypes.cMatrixToNumpy(mout)
|
python
|
def mxm(m1, m2):
"""
Multiply two 3x3 matrices.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxm_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param m2: 3x3 double precision matrix.
:type m2: 3x3-Element Array of floats
:return: 3x3 double precision matrix.
:rtype: 3x3-Element Array of floats
"""
m1 = stypes.toDoubleMatrix(m1)
m2 = stypes.toDoubleMatrix(m2)
mout = stypes.emptyDoubleMatrix()
libspice.mxm_c(m1, m2, mout)
return stypes.cMatrixToNumpy(mout)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxm_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param m2: 3x3 double precision matrix.
:type m2: 3x3-Element Array of floats
:return: 3x3 double precision matrix.
:rtype: 3x3-Element Array of floats
|
[
"Multiply",
"two",
"3x3",
"matrices",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8642-L8659
|
14,813
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mxmg
|
def mxmg(m1, m2, nrow1, ncol1, ncol2):
"""
Multiply two double precision matrices of arbitrary size.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmg_c.html
:param m1: nrow1 X ncol1 double precision matrix.
:type m1: NxM-Element Array of floats
:param m2: ncol1 X ncol2 double precision matrix.
:type m2: NxM-Element Array of floats
:param nrow1: Row dimension of m1
:type nrow1: int
:param ncol1: Column dimension of m1 and row dimension of m2.
:type ncol1: int
:param ncol2: Column dimension of m2
:type ncol2: int
:return: nrow1 X ncol2 double precision matrix.
:rtype: NxM-Element Array of floats
"""
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)
|
python
|
def mxmg(m1, m2, nrow1, ncol1, ncol2):
"""
Multiply two double precision matrices of arbitrary size.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmg_c.html
:param m1: nrow1 X ncol1 double precision matrix.
:type m1: NxM-Element Array of floats
:param m2: ncol1 X ncol2 double precision matrix.
:type m2: NxM-Element Array of floats
:param nrow1: Row dimension of m1
:type nrow1: int
:param ncol1: Column dimension of m1 and row dimension of m2.
:type ncol1: int
:param ncol2: Column dimension of m2
:type ncol2: int
:return: nrow1 X ncol2 double precision matrix.
:rtype: NxM-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmg_c.html
:param m1: nrow1 X ncol1 double precision matrix.
:type m1: NxM-Element Array of floats
:param m2: ncol1 X ncol2 double precision matrix.
:type m2: NxM-Element Array of floats
:param nrow1: Row dimension of m1
:type nrow1: int
:param ncol1: Column dimension of m1 and row dimension of m2.
:type ncol1: int
:param ncol2: Column dimension of m2
:type ncol2: int
:return: nrow1 X ncol2 double precision matrix.
:rtype: NxM-Element Array of floats
|
[
"Multiply",
"two",
"double",
"precision",
"matrices",
"of",
"arbitrary",
"size",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8663-L8689
|
14,814
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mxmt
|
def mxmt(m1, m2):
"""
Multiply a 3x3 matrix and the transpose of another 3x3 matrix.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmt_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param m2: 3x3 double precision matrix.
:type m2: 3x3-Element Array of floats
:return: The product m1 times m2 transpose.
:rtype: float
"""
m1 = stypes.toDoubleMatrix(m1)
m2 = stypes.toDoubleMatrix(m2)
mout = stypes.emptyDoubleMatrix()
libspice.mxmt_c(m1, m2, mout)
return stypes.cMatrixToNumpy(mout)
|
python
|
def mxmt(m1, m2):
"""
Multiply a 3x3 matrix and the transpose of another 3x3 matrix.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmt_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param m2: 3x3 double precision matrix.
:type m2: 3x3-Element Array of floats
:return: The product m1 times m2 transpose.
:rtype: float
"""
m1 = stypes.toDoubleMatrix(m1)
m2 = stypes.toDoubleMatrix(m2)
mout = stypes.emptyDoubleMatrix()
libspice.mxmt_c(m1, m2, mout)
return stypes.cMatrixToNumpy(mout)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmt_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param m2: 3x3 double precision matrix.
:type m2: 3x3-Element Array of floats
:return: The product m1 times m2 transpose.
:rtype: float
|
[
"Multiply",
"a",
"3x3",
"matrix",
"and",
"the",
"transpose",
"of",
"another",
"3x3",
"matrix",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8693-L8710
|
14,815
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mxmtg
|
def mxmtg(m1, m2, nrow1, nc1c2, nrow2):
"""
Multiply a matrix and the transpose of a matrix, both of arbitrary size.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmtg_c.html
:param m1: Left-hand matrix to be multiplied.
:type m1: NxM-Element Array of floats
:param m2: Right-hand matrix whose transpose is to be multiplied
:type m2: NxM-Element Array of floats
:param nrow1: Row dimension of m1 and row dimension of mout.
:type nrow1: int
:param nc1c2: Column dimension of m1 and column dimension of m2.
:type nc1c2: int
:param nrow2: Row dimension of m2 and column dimension of mout.
:type nrow2: int
:return: Product matrix.
:rtype: NxM-Element Array of floats
"""
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)
|
python
|
def mxmtg(m1, m2, nrow1, nc1c2, nrow2):
"""
Multiply a matrix and the transpose of a matrix, both of arbitrary size.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmtg_c.html
:param m1: Left-hand matrix to be multiplied.
:type m1: NxM-Element Array of floats
:param m2: Right-hand matrix whose transpose is to be multiplied
:type m2: NxM-Element Array of floats
:param nrow1: Row dimension of m1 and row dimension of mout.
:type nrow1: int
:param nc1c2: Column dimension of m1 and column dimension of m2.
:type nc1c2: int
:param nrow2: Row dimension of m2 and column dimension of mout.
:type nrow2: int
:return: Product matrix.
:rtype: NxM-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmtg_c.html
:param m1: Left-hand matrix to be multiplied.
:type m1: NxM-Element Array of floats
:param m2: Right-hand matrix whose transpose is to be multiplied
:type m2: NxM-Element Array of floats
:param nrow1: Row dimension of m1 and row dimension of mout.
:type nrow1: int
:param nc1c2: Column dimension of m1 and column dimension of m2.
:type nc1c2: int
:param nrow2: Row dimension of m2 and column dimension of mout.
:type nrow2: int
:return: Product matrix.
:rtype: NxM-Element Array of floats
|
[
"Multiply",
"a",
"matrix",
"and",
"the",
"transpose",
"of",
"a",
"matrix",
"both",
"of",
"arbitrary",
"size",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8714-L8740
|
14,816
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mxv
|
def mxv(m1, vin):
"""
Multiply a 3x3 double precision matrix with a
3-dimensional double precision vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxv_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param vin: 3-dimensional double precision vector.
:type vin: 3-Element Array of floats
:return: 3-dimensional double precision vector.
:rtype: 3-Element Array of floats
"""
m1 = stypes.toDoubleMatrix(m1)
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(3)
libspice.mxv_c(m1, vin, vout)
return stypes.cVectorToPython(vout)
|
python
|
def mxv(m1, vin):
"""
Multiply a 3x3 double precision matrix with a
3-dimensional double precision vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxv_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param vin: 3-dimensional double precision vector.
:type vin: 3-Element Array of floats
:return: 3-dimensional double precision vector.
:rtype: 3-Element Array of floats
"""
m1 = stypes.toDoubleMatrix(m1)
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(3)
libspice.mxv_c(m1, vin, vout)
return stypes.cVectorToPython(vout)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxv_c.html
:param m1: 3x3 double precision matrix.
:type m1: 3x3-Element Array of floats
:param vin: 3-dimensional double precision vector.
:type vin: 3-Element Array of floats
:return: 3-dimensional double precision vector.
:rtype: 3-Element Array of floats
|
[
"Multiply",
"a",
"3x3",
"double",
"precision",
"matrix",
"with",
"a",
"3",
"-",
"dimensional",
"double",
"precision",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8744-L8762
|
14,817
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
mxvg
|
def mxvg(m1, v2, nrow1, nc1r2):
"""
Multiply a matrix and a vector of arbitrary size.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxvg_c.html
:param m1: Left-hand matrix to be multiplied.
:type m1: NxM-Element Array of floats
:param v2: Right-hand vector to be multiplied.
:type v2: Array of floats
:param nrow1: Row dimension of m1 and length of vout.
:type nrow1: int
:param nc1r2: Column dimension of m1 and length of v2.
:type nc1r2: int
:return: Product vector m1*v2
:rtype: Array of floats
"""
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)
|
python
|
def mxvg(m1, v2, nrow1, nc1r2):
"""
Multiply a matrix and a vector of arbitrary size.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxvg_c.html
:param m1: Left-hand matrix to be multiplied.
:type m1: NxM-Element Array of floats
:param v2: Right-hand vector to be multiplied.
:type v2: Array of floats
:param nrow1: Row dimension of m1 and length of vout.
:type nrow1: int
:param nc1r2: Column dimension of m1 and length of v2.
:type nc1r2: int
:return: Product vector m1*v2
:rtype: Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxvg_c.html
:param m1: Left-hand matrix to be multiplied.
:type m1: NxM-Element Array of floats
:param v2: Right-hand vector to be multiplied.
:type v2: Array of floats
:param nrow1: Row dimension of m1 and length of vout.
:type nrow1: int
:param nc1r2: Column dimension of m1 and length of v2.
:type nc1r2: int
:return: Product vector m1*v2
:rtype: Array of floats
|
[
"Multiply",
"a",
"matrix",
"and",
"a",
"vector",
"of",
"arbitrary",
"size",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8766-L8789
|
14,818
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
namfrm
|
def namfrm(frname):
"""
Look up the frame ID code associated with a string.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/namfrm_c.html
:param frname: The name of some reference frame.
:type frname: str
:return: The SPICE ID code of the frame.
:rtype: int
"""
frname = stypes.stringToCharP(frname)
frcode = ctypes.c_int()
libspice.namfrm_c(frname, ctypes.byref(frcode))
return frcode.value
|
python
|
def namfrm(frname):
"""
Look up the frame ID code associated with a string.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/namfrm_c.html
:param frname: The name of some reference frame.
:type frname: str
:return: The SPICE ID code of the frame.
:rtype: int
"""
frname = stypes.stringToCharP(frname)
frcode = ctypes.c_int()
libspice.namfrm_c(frname, ctypes.byref(frcode))
return frcode.value
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/namfrm_c.html
:param frname: The name of some reference frame.
:type frname: str
:return: The SPICE ID code of the frame.
:rtype: int
|
[
"Look",
"up",
"the",
"frame",
"ID",
"code",
"associated",
"with",
"a",
"string",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8797-L8811
|
14,819
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ncpos
|
def ncpos(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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncpos_c.html
:param string: Any character string.
:type string: str
:param chars: A collection of characters.
:type chars: str
:param start: Position to begin looking for one not in chars.
:type start: int
:return: index
:rtype: int
"""
string = stypes.stringToCharP(string)
chars = stypes.stringToCharP(chars)
start = ctypes.c_int(start)
return libspice.ncpos_c(string, chars, start)
|
python
|
def ncpos(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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncpos_c.html
:param string: Any character string.
:type string: str
:param chars: A collection of characters.
:type chars: str
:param start: Position to begin looking for one not in chars.
:type start: int
:return: index
:rtype: int
"""
string = stypes.stringToCharP(string)
chars = stypes.stringToCharP(chars)
start = ctypes.c_int(start)
return libspice.ncpos_c(string, chars, start)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncpos_c.html
:param string: Any character string.
:type string: str
:param chars: A collection of characters.
:type chars: str
:param start: Position to begin looking for one not in chars.
:type start: int
:return: index
:rtype: int
|
[
"Find",
"the",
"first",
"occurrence",
"in",
"a",
"string",
"of",
"a",
"character",
"NOT",
"belonging",
"to",
"a",
"collection",
"of",
"characters",
"starting",
"at",
"a",
"specified",
"location",
"searching",
"forward",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8815-L8835
|
14,820
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ncposr
|
def ncposr(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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncposr_c.html
:param string: Any character string.
:type string: str
:param chars: A collection of characters.
:type chars: str
:param start: Position to begin looking for one of chars.
:type start: int
:return: index
:rtype: int
"""
string = stypes.stringToCharP(string)
chars = stypes.stringToCharP(chars)
start = ctypes.c_int(start)
return libspice.ncposr_c(string, chars, start)
|
python
|
def ncposr(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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncposr_c.html
:param string: Any character string.
:type string: str
:param chars: A collection of characters.
:type chars: str
:param start: Position to begin looking for one of chars.
:type start: int
:return: index
:rtype: int
"""
string = stypes.stringToCharP(string)
chars = stypes.stringToCharP(chars)
start = ctypes.c_int(start)
return libspice.ncposr_c(string, chars, start)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncposr_c.html
:param string: Any character string.
:type string: str
:param chars: A collection of characters.
:type chars: str
:param start: Position to begin looking for one of chars.
:type start: int
:return: index
:rtype: int
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8839-L8859
|
14,821
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
nearpt
|
def nearpt(positn, a, b, c):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nearpt_c.html
:param positn: Position of a point in bodyfixed frame.
:type positn: 3-Element Array of floats
:param a: Length of semi-axis parallel to x-axis.
:type a: float
:param b: Length of semi-axis parallel to y-axis.
:type b: float
:param c: Length on semi-axis parallel to z-axis.
:type c: float
:return:
Point on the ellipsoid closest to positn,
Altitude of positn above the ellipsoid.
:rtype: tuple
"""
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
|
python
|
def nearpt(positn, a, b, c):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nearpt_c.html
:param positn: Position of a point in bodyfixed frame.
:type positn: 3-Element Array of floats
:param a: Length of semi-axis parallel to x-axis.
:type a: float
:param b: Length of semi-axis parallel to y-axis.
:type b: float
:param c: Length on semi-axis parallel to z-axis.
:type c: float
:return:
Point on the ellipsoid closest to positn,
Altitude of positn above the ellipsoid.
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nearpt_c.html
:param positn: Position of a point in bodyfixed frame.
:type positn: 3-Element Array of floats
:param a: Length of semi-axis parallel to x-axis.
:type a: float
:param b: Length of semi-axis parallel to y-axis.
:type b: float
:param c: Length on semi-axis parallel to z-axis.
:type c: float
:return:
Point on the ellipsoid closest to positn,
Altitude of positn above the ellipsoid.
:rtype: tuple
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8863-L8891
|
14,822
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
npedln
|
def npedln(a, b, c, linept, linedr):
"""
Find nearest point on a triaxial ellipsoid to a specified
line and the distance from the ellipsoid to the line.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/npedln_c.html
:param a: Length of ellipsoid's semi-axis in the x direction
:type a: float
:param b: Length of ellipsoid's semi-axis in the y direction
:type b: float
:param c: Length of ellipsoid's semi-axis in the z direction
:type c: float
:param linept: Length of ellipsoid's semi-axis in the z direction
:type linept: 3-Element Array of floats
:param linedr: Direction vector of line
:type linedr: 3-Element Array of floats
:return: Nearest point on ellipsoid to line, Distance of ellipsoid from line
:rtype: tuple
"""
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
|
python
|
def npedln(a, b, c, linept, linedr):
"""
Find nearest point on a triaxial ellipsoid to a specified
line and the distance from the ellipsoid to the line.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/npedln_c.html
:param a: Length of ellipsoid's semi-axis in the x direction
:type a: float
:param b: Length of ellipsoid's semi-axis in the y direction
:type b: float
:param c: Length of ellipsoid's semi-axis in the z direction
:type c: float
:param linept: Length of ellipsoid's semi-axis in the z direction
:type linept: 3-Element Array of floats
:param linedr: Direction vector of line
:type linedr: 3-Element Array of floats
:return: Nearest point on ellipsoid to line, Distance of ellipsoid from line
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/npedln_c.html
:param a: Length of ellipsoid's semi-axis in the x direction
:type a: float
:param b: Length of ellipsoid's semi-axis in the y direction
:type b: float
:param c: Length of ellipsoid's semi-axis in the z direction
:type c: float
:param linept: Length of ellipsoid's semi-axis in the z direction
:type linept: 3-Element Array of floats
:param linedr: Direction vector of line
:type linedr: 3-Element Array of floats
:return: Nearest point on ellipsoid to line, Distance of ellipsoid from line
:rtype: tuple
|
[
"Find",
"nearest",
"point",
"on",
"a",
"triaxial",
"ellipsoid",
"to",
"a",
"specified",
"line",
"and",
"the",
"distance",
"from",
"the",
"ellipsoid",
"to",
"the",
"line",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8895-L8923
|
14,823
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
nplnpt
|
def nplnpt(linpt, lindir, point):
"""
Find the nearest point on a line to a specified point,
and find the distance between the two points.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nplnpt_c.html
:param linpt: Point on a line
:type linpt: 3-Element Array of floats
:param lindir: line's direction vector
:type lindir: 3-Element Array of floats
:param point: A second point.
:type point: 3-Element Array of floats
:return:
Nearest point on the line to point,
Distance between point and pnear
:rtype: tuple
"""
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
|
python
|
def nplnpt(linpt, lindir, point):
"""
Find the nearest point on a line to a specified point,
and find the distance between the two points.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nplnpt_c.html
:param linpt: Point on a line
:type linpt: 3-Element Array of floats
:param lindir: line's direction vector
:type lindir: 3-Element Array of floats
:param point: A second point.
:type point: 3-Element Array of floats
:return:
Nearest point on the line to point,
Distance between point and pnear
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nplnpt_c.html
:param linpt: Point on a line
:type linpt: 3-Element Array of floats
:param lindir: line's direction vector
:type lindir: 3-Element Array of floats
:param point: A second point.
:type point: 3-Element Array of floats
:return:
Nearest point on the line to point,
Distance between point and pnear
:rtype: tuple
|
[
"Find",
"the",
"nearest",
"point",
"on",
"a",
"line",
"to",
"a",
"specified",
"point",
"and",
"find",
"the",
"distance",
"between",
"the",
"two",
"points",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8950-L8974
|
14,824
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
nvc2pl
|
def nvc2pl(normal, constant):
"""
Make a plane from a normal vector and a constant.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvc2pl_c.html
:param normal: A normal vector defining a plane.
:type normal: 3-Element Array of floats
:param constant: A constant defining a plane.
:type constant: float
:return: plane
:rtype: spiceypy.utils.support_types.Plane
"""
plane = stypes.Plane()
normal = stypes.toDoubleVector(normal)
constant = ctypes.c_double(constant)
libspice.nvc2pl_c(normal, constant, ctypes.byref(plane))
return plane
|
python
|
def nvc2pl(normal, constant):
"""
Make a plane from a normal vector and a constant.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvc2pl_c.html
:param normal: A normal vector defining a plane.
:type normal: 3-Element Array of floats
:param constant: A constant defining a plane.
:type constant: float
:return: plane
:rtype: spiceypy.utils.support_types.Plane
"""
plane = stypes.Plane()
normal = stypes.toDoubleVector(normal)
constant = ctypes.c_double(constant)
libspice.nvc2pl_c(normal, constant, ctypes.byref(plane))
return plane
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvc2pl_c.html
:param normal: A normal vector defining a plane.
:type normal: 3-Element Array of floats
:param constant: A constant defining a plane.
:type constant: float
:return: plane
:rtype: spiceypy.utils.support_types.Plane
|
[
"Make",
"a",
"plane",
"from",
"a",
"normal",
"vector",
"and",
"a",
"constant",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8978-L8995
|
14,825
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
nvp2pl
|
def nvp2pl(normal, point):
"""
Make a plane from a normal vector and a point.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvp2pl_c.html
:param normal: A normal vector defining a plane.
:type normal: 3-Element Array of floats
:param point: A point defining a plane.
:type point: 3-Element Array of floats
:return: plane
:rtype: spiceypy.utils.support_types.Plane
"""
normal = stypes.toDoubleVector(normal)
point = stypes.toDoubleVector(point)
plane = stypes.Plane()
libspice.nvp2pl_c(normal, point, ctypes.byref(plane))
return plane
|
python
|
def nvp2pl(normal, point):
"""
Make a plane from a normal vector and a point.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvp2pl_c.html
:param normal: A normal vector defining a plane.
:type normal: 3-Element Array of floats
:param point: A point defining a plane.
:type point: 3-Element Array of floats
:return: plane
:rtype: spiceypy.utils.support_types.Plane
"""
normal = stypes.toDoubleVector(normal)
point = stypes.toDoubleVector(point)
plane = stypes.Plane()
libspice.nvp2pl_c(normal, point, ctypes.byref(plane))
return plane
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvp2pl_c.html
:param normal: A normal vector defining a plane.
:type normal: 3-Element Array of floats
:param point: A point defining a plane.
:type point: 3-Element Array of floats
:return: plane
:rtype: spiceypy.utils.support_types.Plane
|
[
"Make",
"a",
"plane",
"from",
"a",
"normal",
"vector",
"and",
"a",
"point",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8999-L9016
|
14,826
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ordc
|
def ordc(item, 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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordc_c.html
:param item: An item to locate within a set.
:type item: str
:param inset: A set to search for a given item.
:type inset: SpiceCharCell
:return: the ordinal position of item within the set
:rtype: int
"""
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))
|
python
|
def ordc(item, 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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordc_c.html
:param item: An item to locate within a set.
:type item: str
:param inset: A set to search for a given item.
:type inset: SpiceCharCell
:return: the ordinal position of item within the set
:rtype: int
"""
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))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordc_c.html
:param item: An item to locate within a set.
:type item: str
:param inset: A set to search for a given item.
:type inset: SpiceCharCell
:return: the ordinal position of item within the set
:rtype: int
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9069-L9088
|
14,827
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ordd
|
def ordd(item, 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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordd_c.html
:param item: An item to locate within a set.
:type item: float
:param inset: A set to search for a given item.
:type inset: SpiceDoubleCell
:return: the ordinal position of item within the set
:rtype: int
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.is_double()
item = ctypes.c_double(item)
return libspice.ordd_c(item, ctypes.byref(inset))
|
python
|
def ordd(item, 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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordd_c.html
:param item: An item to locate within a set.
:type item: float
:param inset: A set to search for a given item.
:type inset: SpiceDoubleCell
:return: the ordinal position of item within the set
:rtype: int
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.is_double()
item = ctypes.c_double(item)
return libspice.ordd_c(item, ctypes.byref(inset))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordd_c.html
:param item: An item to locate within a set.
:type item: float
:param inset: A set to search for a given item.
:type inset: SpiceDoubleCell
:return: the ordinal position of item within the set
:rtype: int
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9092-L9110
|
14,828
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ordi
|
def ordi(item, 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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordi_c.html
:param item: An item to locate within a set.
:type item: int
:param inset: A set to search for a given item.
:type inset: SpiceIntCell
:return: the ordinal position of item within the set
:rtype: int
"""
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))
|
python
|
def ordi(item, 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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordi_c.html
:param item: An item to locate within a set.
:type item: int
:param inset: A set to search for a given item.
:type inset: SpiceIntCell
:return: the ordinal position of item within the set
:rtype: int
"""
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))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordi_c.html
:param item: An item to locate within a set.
:type item: int
:param inset: A set to search for a given item.
:type inset: SpiceIntCell
:return: the ordinal position of item within the set
:rtype: int
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9114-L9133
|
14,829
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
orderc
|
def orderc(array, ndim=None):
"""
Determine the order of elements in an array of character strings.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderc_c.html
:param array: Input array.
:type array: Array of strings.
:param ndim: Optional Length of input array
:type ndim: int
:return: Order vector for array.
:rtype: array of ints
"""
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)
|
python
|
def orderc(array, ndim=None):
"""
Determine the order of elements in an array of character strings.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderc_c.html
:param array: Input array.
:type array: Array of strings.
:param ndim: Optional Length of input array
:type ndim: int
:return: Order vector for array.
:rtype: array of ints
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderc_c.html
:param array: Input array.
:type array: Array of strings.
:param ndim: Optional Length of input array
:type ndim: int
:return: Order vector for array.
:rtype: array of ints
|
[
"Determine",
"the",
"order",
"of",
"elements",
"in",
"an",
"array",
"of",
"character",
"strings",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9137-L9158
|
14,830
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
orderd
|
def orderd(array, ndim=None):
"""
Determine the order of elements in a double precision array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderd_c.html
:param array: Input array.
:type array: Array of floats
:param ndim: Optional Length of input array
:type ndim: int
:return: Order vector for array.
:rtype: array of ints
"""
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)
|
python
|
def orderd(array, ndim=None):
"""
Determine the order of elements in a double precision array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderd_c.html
:param array: Input array.
:type array: Array of floats
:param ndim: Optional Length of input array
:type ndim: int
:return: Order vector for array.
:rtype: array of ints
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderd_c.html
:param array: Input array.
:type array: Array of floats
:param ndim: Optional Length of input array
:type ndim: int
:return: Order vector for array.
:rtype: array of ints
|
[
"Determine",
"the",
"order",
"of",
"elements",
"in",
"a",
"double",
"precision",
"array",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9162-L9182
|
14,831
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
orderi
|
def orderi(array, ndim=None):
"""
Determine the order of elements in an integer array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderi_c.html
:param array: Input array.
:type array: Array of ints
:param ndim: Optional Length of input array
:type ndim: int
:return: Order vector for array.
:rtype: array of ints
"""
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)
|
python
|
def orderi(array, ndim=None):
"""
Determine the order of elements in an integer array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderi_c.html
:param array: Input array.
:type array: Array of ints
:param ndim: Optional Length of input array
:type ndim: int
:return: Order vector for array.
:rtype: array of ints
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderi_c.html
:param array: Input array.
:type array: Array of ints
:param ndim: Optional Length of input array
:type ndim: int
:return: Order vector for array.
:rtype: array of ints
|
[
"Determine",
"the",
"order",
"of",
"elements",
"in",
"an",
"integer",
"array",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9186-L9206
|
14,832
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pckcov
|
def pckcov(pck, idcode, cover):
"""
Find the coverage window for a specified reference frame in a
specified binary PCK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckcov_c.html
:param pck: Name of PCK file.
:type pck: str
:param idcode: Class ID code of PCK reference frame.
:type idcode: int
:param cover: Window giving coverage in pck for idcode.
:type cover: SpiceCell
"""
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))
|
python
|
def pckcov(pck, idcode, cover):
"""
Find the coverage window for a specified reference frame in a
specified binary PCK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckcov_c.html
:param pck: Name of PCK file.
:type pck: str
:param idcode: Class ID code of PCK reference frame.
:type idcode: int
:param cover: Window giving coverage in pck for idcode.
:type cover: SpiceCell
"""
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))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckcov_c.html
:param pck: Name of PCK file.
:type pck: str
:param idcode: Class ID code of PCK reference frame.
:type idcode: int
:param cover: Window giving coverage in pck for idcode.
:type cover: SpiceCell
|
[
"Find",
"the",
"coverage",
"window",
"for",
"a",
"specified",
"reference",
"frame",
"in",
"a",
"specified",
"binary",
"PCK",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9277-L9295
|
14,833
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pckfrm
|
def pckfrm(pck, ids):
"""
Find the set of reference frame class ID codes of all frames
in a specified binary PCK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckfrm_c.html
:param pck: Name of PCK file.
:type pck: str
:param ids: Set of frame class ID codes of frames in PCK file.
:type ids: SpiceCell
"""
pck = stypes.stringToCharP(pck)
assert isinstance(ids, stypes.SpiceCell)
assert ids.dtype == 2
libspice.pckfrm_c(pck, ctypes.byref(ids))
|
python
|
def pckfrm(pck, ids):
"""
Find the set of reference frame class ID codes of all frames
in a specified binary PCK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckfrm_c.html
:param pck: Name of PCK file.
:type pck: str
:param ids: Set of frame class ID codes of frames in PCK file.
:type ids: SpiceCell
"""
pck = stypes.stringToCharP(pck)
assert isinstance(ids, stypes.SpiceCell)
assert ids.dtype == 2
libspice.pckfrm_c(pck, ctypes.byref(ids))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckfrm_c.html
:param pck: Name of PCK file.
:type pck: str
:param ids: Set of frame class ID codes of frames in PCK file.
:type ids: SpiceCell
|
[
"Find",
"the",
"set",
"of",
"reference",
"frame",
"class",
"ID",
"codes",
"of",
"all",
"frames",
"in",
"a",
"specified",
"binary",
"PCK",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9299-L9314
|
14,834
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pcklof
|
def pcklof(filename):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcklof_c.html
:param filename: Name of the file to be loaded.
:type filename: str
:return: Loaded file's handle.
:rtype: int
"""
filename = stypes.stringToCharP(filename)
handle = ctypes.c_int()
libspice.pcklof_c(filename, ctypes.byref(handle))
return handle.value
|
python
|
def pcklof(filename):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcklof_c.html
:param filename: Name of the file to be loaded.
:type filename: str
:return: Loaded file's handle.
:rtype: int
"""
filename = stypes.stringToCharP(filename)
handle = ctypes.c_int()
libspice.pcklof_c(filename, ctypes.byref(handle))
return handle.value
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcklof_c.html
:param filename: Name of the file to be loaded.
:type filename: str
:return: Loaded file's handle.
:rtype: int
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9318-L9334
|
14,835
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pcpool
|
def pcpool(name, cvals):
"""
This entry point provides toolkit programmers a method for
programmatically inserting character data into the
kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcpool_c.html
:param name: The kernel pool name to associate with cvals.
:type name: str
:param cvals: An array of strings to insert into the kernel pool.
:type cvals: Array of str
"""
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)
|
python
|
def pcpool(name, cvals):
"""
This entry point provides toolkit programmers a method for
programmatically inserting character data into the
kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcpool_c.html
:param name: The kernel pool name to associate with cvals.
:type name: str
:param cvals: An array of strings to insert into the kernel pool.
:type cvals: Array of str
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcpool_c.html
:param name: The kernel pool name to associate with cvals.
:type name: str
:param cvals: An array of strings to insert into the kernel pool.
:type cvals: Array of str
|
[
"This",
"entry",
"point",
"provides",
"toolkit",
"programmers",
"a",
"method",
"for",
"programmatically",
"inserting",
"character",
"data",
"into",
"the",
"kernel",
"pool",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9423-L9440
|
14,836
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pdpool
|
def pdpool(name, dvals):
"""
This entry point provides toolkit programmers a method for
programmatically inserting double precision data into the
kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pdpool_c.html
:param name: The kernel pool name to associate with dvals.
:type name: str
:param dvals: An array of values to insert into the kernel pool.
:type dvals: SpiceCell
"""
name = stypes.stringToCharP(name)
n = ctypes.c_int(len(dvals))
dvals = stypes.toDoubleVector(dvals)
libspice.pdpool_c(name, n, dvals)
|
python
|
def pdpool(name, dvals):
"""
This entry point provides toolkit programmers a method for
programmatically inserting double precision data into the
kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pdpool_c.html
:param name: The kernel pool name to associate with dvals.
:type name: str
:param dvals: An array of values to insert into the kernel pool.
:type dvals: SpiceCell
"""
name = stypes.stringToCharP(name)
n = ctypes.c_int(len(dvals))
dvals = stypes.toDoubleVector(dvals)
libspice.pdpool_c(name, n, dvals)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pdpool_c.html
:param name: The kernel pool name to associate with dvals.
:type name: str
:param dvals: An array of values to insert into the kernel pool.
:type dvals: SpiceCell
|
[
"This",
"entry",
"point",
"provides",
"toolkit",
"programmers",
"a",
"method",
"for",
"programmatically",
"inserting",
"double",
"precision",
"data",
"into",
"the",
"kernel",
"pool",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9444-L9460
|
14,837
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pgrrec
|
def pgrrec(body, lon, lat, alt, re, f):
"""
Convert planetographic coordinates to rectangular coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pgrrec_c.html
:param body: Body with which coordinate system is associated.
:type body: str
:param lon: Planetographic longitude of a point (radians).
:type lon: float
:param lat: Planetographic latitude of a point (radians).
:type lat: float
:param alt: Altitude of a point above reference spheroid.
:type alt: float
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
"""
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)
|
python
|
def pgrrec(body, lon, lat, alt, re, f):
"""
Convert planetographic coordinates to rectangular coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pgrrec_c.html
:param body: Body with which coordinate system is associated.
:type body: str
:param lon: Planetographic longitude of a point (radians).
:type lon: float
:param lat: Planetographic latitude of a point (radians).
:type lat: float
:param alt: Altitude of a point above reference spheroid.
:type alt: float
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pgrrec_c.html
:param body: Body with which coordinate system is associated.
:type body: str
:param lon: Planetographic longitude of a point (radians).
:type lon: float
:param lat: Planetographic latitude of a point (radians).
:type lat: float
:param alt: Altitude of a point above reference spheroid.
:type alt: float
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
|
[
"Convert",
"planetographic",
"coordinates",
"to",
"rectangular",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9464-L9493
|
14,838
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
phaseq
|
def phaseq(et, target, illmn, obsrvr, abcorr):
"""
Compute the apparent phase angle for a target, observer,
illuminator set of ephemeris objects.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/phaseq_c.html
:param et: Ephemeris seconds past J2000 TDB.
:type et: float
:param target: Target body name.
:type target: str
:param illmn: Illuminating body name.
:type illmn: str
:param obsrvr: Observer body.
:type obsrvr: str
:param abcorr: Aberration correction flag.
:type abcorr: str
:return: Value of phase angle.
:rtype: float
"""
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)
|
python
|
def phaseq(et, target, illmn, obsrvr, abcorr):
"""
Compute the apparent phase angle for a target, observer,
illuminator set of ephemeris objects.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/phaseq_c.html
:param et: Ephemeris seconds past J2000 TDB.
:type et: float
:param target: Target body name.
:type target: str
:param illmn: Illuminating body name.
:type illmn: str
:param obsrvr: Observer body.
:type obsrvr: str
:param abcorr: Aberration correction flag.
:type abcorr: str
:return: Value of phase angle.
:rtype: float
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/phaseq_c.html
:param et: Ephemeris seconds past J2000 TDB.
:type et: float
:param target: Target body name.
:type target: str
:param illmn: Illuminating body name.
:type illmn: str
:param obsrvr: Observer body.
:type obsrvr: str
:param abcorr: Aberration correction flag.
:type abcorr: str
:return: Value of phase angle.
:rtype: float
|
[
"Compute",
"the",
"apparent",
"phase",
"angle",
"for",
"a",
"target",
"observer",
"illuminator",
"set",
"of",
"ephemeris",
"objects",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9497-L9522
|
14,839
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pipool
|
def pipool(name, ivals):
"""
This entry point provides toolkit programmers a method for
programmatically inserting integer data into the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pipool_c.html
:param name: The kernel pool name to associate with values.
:type name: str
:param ivals: An array of integers to insert into the pool.
:type ivals: Array of ints
"""
name = stypes.stringToCharP(name)
n = ctypes.c_int(len(ivals))
ivals = stypes.toIntVector(ivals)
libspice.pipool_c(name, n, ivals)
|
python
|
def pipool(name, ivals):
"""
This entry point provides toolkit programmers a method for
programmatically inserting integer data into the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pipool_c.html
:param name: The kernel pool name to associate with values.
:type name: str
:param ivals: An array of integers to insert into the pool.
:type ivals: Array of ints
"""
name = stypes.stringToCharP(name)
n = ctypes.c_int(len(ivals))
ivals = stypes.toIntVector(ivals)
libspice.pipool_c(name, n, ivals)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pipool_c.html
:param name: The kernel pool name to associate with values.
:type name: str
:param ivals: An array of integers to insert into the pool.
:type ivals: Array of ints
|
[
"This",
"entry",
"point",
"provides",
"toolkit",
"programmers",
"a",
"method",
"for",
"programmatically",
"inserting",
"integer",
"data",
"into",
"the",
"kernel",
"pool",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9540-L9555
|
14,840
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pjelpl
|
def pjelpl(elin, plane):
"""
Project an ellipse onto a plane, orthogonally.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pjelpl_c.html
:param elin: A SPICE ellipse to be projected.
:type elin: spiceypy.utils.support_types.Ellipse
:param plane: A plane onto which elin is to be projected.
:type plane: supporttypes.Plane
:return: A SPICE ellipse resulting from the projection.
:rtype: spiceypy.utils.support_types.Ellipse
"""
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
|
python
|
def pjelpl(elin, plane):
"""
Project an ellipse onto a plane, orthogonally.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pjelpl_c.html
:param elin: A SPICE ellipse to be projected.
:type elin: spiceypy.utils.support_types.Ellipse
:param plane: A plane onto which elin is to be projected.
:type plane: supporttypes.Plane
:return: A SPICE ellipse resulting from the projection.
:rtype: spiceypy.utils.support_types.Ellipse
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pjelpl_c.html
:param elin: A SPICE ellipse to be projected.
:type elin: spiceypy.utils.support_types.Ellipse
:param plane: A plane onto which elin is to be projected.
:type plane: supporttypes.Plane
:return: A SPICE ellipse resulting from the projection.
:rtype: spiceypy.utils.support_types.Ellipse
|
[
"Project",
"an",
"ellipse",
"onto",
"a",
"plane",
"orthogonally",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9559-L9577
|
14,841
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pl2nvc
|
def pl2nvc(plane):
"""
Return a unit normal vector and constant that define a specified plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2nvc_c.html
:param plane: A SPICE plane.
:type plane: supporttypes.Plane
:return:
A normal vector and constant defining
the geometric plane represented by plane.
:rtype: tuple
"""
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
|
python
|
def pl2nvc(plane):
"""
Return a unit normal vector and constant that define a specified plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2nvc_c.html
:param plane: A SPICE plane.
:type plane: supporttypes.Plane
:return:
A normal vector and constant defining
the geometric plane represented by plane.
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2nvc_c.html
:param plane: A SPICE plane.
:type plane: supporttypes.Plane
:return:
A normal vector and constant defining
the geometric plane represented by plane.
:rtype: tuple
|
[
"Return",
"a",
"unit",
"normal",
"vector",
"and",
"constant",
"that",
"define",
"a",
"specified",
"plane",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9581-L9598
|
14,842
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pl2nvp
|
def pl2nvp(plane):
"""
Return a unit normal vector and point that define a specified plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2nvp_c.html
:param plane: A SPICE plane.
:type plane: supporttypes.Plane
:return: A unit normal vector and point that define plane.
:rtype: tuple
"""
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)
|
python
|
def pl2nvp(plane):
"""
Return a unit normal vector and point that define a specified plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2nvp_c.html
:param plane: A SPICE plane.
:type plane: supporttypes.Plane
:return: A unit normal vector and point that define plane.
:rtype: tuple
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2nvp_c.html
:param plane: A SPICE plane.
:type plane: supporttypes.Plane
:return: A unit normal vector and point that define plane.
:rtype: tuple
|
[
"Return",
"a",
"unit",
"normal",
"vector",
"and",
"point",
"that",
"define",
"a",
"specified",
"plane",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9602-L9618
|
14,843
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pl2psv
|
def pl2psv(plane):
"""
Return a point and two orthogonal spanning vectors that generate
a specified plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2psv_c.html
:param plane: A SPICE plane.
:type plane: supporttypes.Plane
:return:
A point in the input plane and two vectors
spanning the input plane.
:rtype: tuple
"""
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)
|
python
|
def pl2psv(plane):
"""
Return a point and two orthogonal spanning vectors that generate
a specified plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2psv_c.html
:param plane: A SPICE plane.
:type plane: supporttypes.Plane
:return:
A point in the input plane and two vectors
spanning the input plane.
:rtype: tuple
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2psv_c.html
:param plane: A SPICE plane.
:type plane: supporttypes.Plane
:return:
A point in the input plane and two vectors
spanning the input plane.
:rtype: tuple
|
[
"Return",
"a",
"point",
"and",
"two",
"orthogonal",
"spanning",
"vectors",
"that",
"generate",
"a",
"specified",
"plane",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9622-L9642
|
14,844
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pos
|
def pos(string, substr, start):
"""
Find the first occurrence in a string of a substring, starting at
a specified location, searching forward.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pos_c.html
:param string: Any character string.
:type string: str
:param substr: Substring to locate in the character string.
:type substr: str
:param start: Position to begin looking for substr in string.
:type start: int
:return:
The index of the first occurrence of substr
in string at or following index start.
:rtype: int
"""
string = stypes.stringToCharP(string)
substr = stypes.stringToCharP(substr)
start = ctypes.c_int(start)
return libspice.pos_c(string, substr, start)
|
python
|
def pos(string, substr, start):
"""
Find the first occurrence in a string of a substring, starting at
a specified location, searching forward.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pos_c.html
:param string: Any character string.
:type string: str
:param substr: Substring to locate in the character string.
:type substr: str
:param start: Position to begin looking for substr in string.
:type start: int
:return:
The index of the first occurrence of substr
in string at or following index start.
:rtype: int
"""
string = stypes.stringToCharP(string)
substr = stypes.stringToCharP(substr)
start = ctypes.c_int(start)
return libspice.pos_c(string, substr, start)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pos_c.html
:param string: Any character string.
:type string: str
:param substr: Substring to locate in the character string.
:type substr: str
:param start: Position to begin looking for substr in string.
:type start: int
:return:
The index of the first occurrence of substr
in string at or following index start.
:rtype: int
|
[
"Find",
"the",
"first",
"occurrence",
"in",
"a",
"string",
"of",
"a",
"substring",
"starting",
"at",
"a",
"specified",
"location",
"searching",
"forward",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9793-L9814
|
14,845
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
posr
|
def posr(string, substr, start):
"""
Find the first occurrence in a string of a substring, starting at
a specified location, searching backward.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/posr_c.html
:param string: Any character string.
:type string: str
:param substr: Substring to locate in the character string.
:type substr: str
:param start: Position to begin looking for substr in string.
:type start: int
:return:
The index of the last occurrence of substr
in string at or preceding index start.
:rtype: int
"""
string = stypes.stringToCharP(string)
substr = stypes.stringToCharP(substr)
start = ctypes.c_int(start)
return libspice.posr_c(string, substr, start)
|
python
|
def posr(string, substr, start):
"""
Find the first occurrence in a string of a substring, starting at
a specified location, searching backward.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/posr_c.html
:param string: Any character string.
:type string: str
:param substr: Substring to locate in the character string.
:type substr: str
:param start: Position to begin looking for substr in string.
:type start: int
:return:
The index of the last occurrence of substr
in string at or preceding index start.
:rtype: int
"""
string = stypes.stringToCharP(string)
substr = stypes.stringToCharP(substr)
start = ctypes.c_int(start)
return libspice.posr_c(string, substr, start)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/posr_c.html
:param string: Any character string.
:type string: str
:param substr: Substring to locate in the character string.
:type substr: str
:param start: Position to begin looking for substr in string.
:type start: int
:return:
The index of the last occurrence of substr
in string at or preceding index start.
:rtype: int
|
[
"Find",
"the",
"first",
"occurrence",
"in",
"a",
"string",
"of",
"a",
"substring",
"starting",
"at",
"a",
"specified",
"location",
"searching",
"backward",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9818-L9839
|
14,846
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
prop2b
|
def prop2b(gm, pvinit, dt):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/prop2b_c.html
:param gm: Gravity of the central mass.
:type gm: float
:param pvinit: Initial state from which to propagate a state.
:type pvinit: 6-Element Array of floats
:param dt: Time offset from initial state to propagate to.
:type dt: float
:return: The propagated state.
:rtype: 6-Element Array of floats
"""
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)
|
python
|
def prop2b(gm, pvinit, dt):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/prop2b_c.html
:param gm: Gravity of the central mass.
:type gm: float
:param pvinit: Initial state from which to propagate a state.
:type pvinit: 6-Element Array of floats
:param dt: Time offset from initial state to propagate to.
:type dt: float
:return: The propagated state.
:rtype: 6-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/prop2b_c.html
:param gm: Gravity of the central mass.
:type gm: float
:param pvinit: Initial state from which to propagate a state.
:type pvinit: 6-Element Array of floats
:param dt: Time offset from initial state to propagate to.
:type dt: float
:return: The propagated state.
:rtype: 6-Element Array of floats
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9847-L9869
|
14,847
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
prsdp
|
def prsdp(string):
"""
Parse a string as a double precision number, encapsulating error handling.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/prsdp_c.html
:param string: String representing a d.p. number.
:type string: str
:return: D.p. value obtained by parsing string.
:rtype: float
"""
string = stypes.stringToCharP(string)
dpval = ctypes.c_double()
libspice.prsdp_c(string, ctypes.byref(dpval))
return dpval.value
|
python
|
def prsdp(string):
"""
Parse a string as a double precision number, encapsulating error handling.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/prsdp_c.html
:param string: String representing a d.p. number.
:type string: str
:return: D.p. value obtained by parsing string.
:rtype: float
"""
string = stypes.stringToCharP(string)
dpval = ctypes.c_double()
libspice.prsdp_c(string, ctypes.byref(dpval))
return dpval.value
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/prsdp_c.html
:param string: String representing a d.p. number.
:type string: str
:return: D.p. value obtained by parsing string.
:rtype: float
|
[
"Parse",
"a",
"string",
"as",
"a",
"double",
"precision",
"number",
"encapsulating",
"error",
"handling",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9873-L9887
|
14,848
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
prsint
|
def prsint(string):
"""
Parse a string as an integer, encapsulating error handling.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/prsint_c.html
:param string: String representing an integer.
:type string: str
:return: Integer value obtained by parsing string.
:rtype: int
"""
string = stypes.stringToCharP(string)
intval = ctypes.c_int()
libspice.prsint_c(string, ctypes.byref(intval))
return intval.value
|
python
|
def prsint(string):
"""
Parse a string as an integer, encapsulating error handling.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/prsint_c.html
:param string: String representing an integer.
:type string: str
:return: Integer value obtained by parsing string.
:rtype: int
"""
string = stypes.stringToCharP(string)
intval = ctypes.c_int()
libspice.prsint_c(string, ctypes.byref(intval))
return intval.value
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/prsint_c.html
:param string: String representing an integer.
:type string: str
:return: Integer value obtained by parsing string.
:rtype: int
|
[
"Parse",
"a",
"string",
"as",
"an",
"integer",
"encapsulating",
"error",
"handling",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9891-L9905
|
14,849
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
psv2pl
|
def psv2pl(point, span1, span2):
"""
Make a CSPICE plane from a point and two spanning vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/psv2pl_c.html
:param point: A Point.
:type point: 3-Element Array of floats
:param span1: First Spanning vector.
:type span1: 3-Element Array of floats
:param span2: Second Spanning vector.
:type span2: 3-Element Array of floats
:return: A SPICE plane.
:rtype: supportypes.Plane
"""
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
|
python
|
def psv2pl(point, span1, span2):
"""
Make a CSPICE plane from a point and two spanning vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/psv2pl_c.html
:param point: A Point.
:type point: 3-Element Array of floats
:param span1: First Spanning vector.
:type span1: 3-Element Array of floats
:param span2: Second Spanning vector.
:type span2: 3-Element Array of floats
:return: A SPICE plane.
:rtype: supportypes.Plane
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/psv2pl_c.html
:param point: A Point.
:type point: 3-Element Array of floats
:param span1: First Spanning vector.
:type span1: 3-Element Array of floats
:param span2: Second Spanning vector.
:type span2: 3-Element Array of floats
:return: A SPICE plane.
:rtype: supportypes.Plane
|
[
"Make",
"a",
"CSPICE",
"plane",
"from",
"a",
"point",
"and",
"two",
"spanning",
"vectors",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9909-L9929
|
14,850
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pxform
|
def pxform(fromstr, tostr, et):
"""
Return the matrix that transforms position vectors from one
specified frame to another at a specified epoch.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pxform_c.html
:param fromstr: Name of the frame to transform from.
:type fromstr: str
:param tostr: Name of the frame to transform to.
:type tostr: str
:param et: Epoch of the rotation matrix.
:type et: float
:return: A rotation matrix.
:rtype: 3x3 Element Array of floats
"""
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)
|
python
|
def pxform(fromstr, tostr, et):
"""
Return the matrix that transforms position vectors from one
specified frame to another at a specified epoch.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pxform_c.html
:param fromstr: Name of the frame to transform from.
:type fromstr: str
:param tostr: Name of the frame to transform to.
:type tostr: str
:param et: Epoch of the rotation matrix.
:type et: float
:return: A rotation matrix.
:rtype: 3x3 Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pxform_c.html
:param fromstr: Name of the frame to transform from.
:type fromstr: str
:param tostr: Name of the frame to transform to.
:type tostr: str
:param et: Epoch of the rotation matrix.
:type et: float
:return: A rotation matrix.
:rtype: 3x3 Element Array of floats
|
[
"Return",
"the",
"matrix",
"that",
"transforms",
"position",
"vectors",
"from",
"one",
"specified",
"frame",
"to",
"another",
"at",
"a",
"specified",
"epoch",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9936-L9957
|
14,851
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
pxfrm2
|
def pxfrm2(frame_from, frame_to, etfrom, etto):
"""
Return the 3x3 matrix that transforms position vectors from one
specified frame at a specified epoch to another specified
frame at another specified epoch.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pxfrm2_c.html
:param frame_from: Name of the frame to transform from.
:type frame_from: str
:param frame_to: Name of the frame to transform to.
:type frame_to: str
:param etfrom: Evaluation time of frame_from.
:type etfrom: float
:param etto: Evaluation time of frame_to.
:type etto: float
:return: A position transformation matrix from frame_from to frame_to
:rtype: 3x3 Element Array of floats
"""
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)
|
python
|
def pxfrm2(frame_from, frame_to, etfrom, etto):
"""
Return the 3x3 matrix that transforms position vectors from one
specified frame at a specified epoch to another specified
frame at another specified epoch.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pxfrm2_c.html
:param frame_from: Name of the frame to transform from.
:type frame_from: str
:param frame_to: Name of the frame to transform to.
:type frame_to: str
:param etfrom: Evaluation time of frame_from.
:type etfrom: float
:param etto: Evaluation time of frame_to.
:type etto: float
:return: A position transformation matrix from frame_from to frame_to
:rtype: 3x3 Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pxfrm2_c.html
:param frame_from: Name of the frame to transform from.
:type frame_from: str
:param frame_to: Name of the frame to transform to.
:type frame_to: str
:param etfrom: Evaluation time of frame_from.
:type etfrom: float
:param etto: Evaluation time of frame_to.
:type etto: float
:return: A position transformation matrix from frame_from to frame_to
:rtype: 3x3 Element Array of floats
|
[
"Return",
"the",
"3x3",
"matrix",
"that",
"transforms",
"position",
"vectors",
"from",
"one",
"specified",
"frame",
"at",
"a",
"specified",
"epoch",
"to",
"another",
"specified",
"frame",
"at",
"another",
"specified",
"epoch",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9961-L9986
|
14,852
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
q2m
|
def q2m(q):
"""
Find the rotation matrix corresponding to a specified unit quaternion.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/q2m_c.html
:param q: A unit quaternion.
:type q: 4-Element Array of floats
:return: A rotation matrix corresponding to q
:rtype: 3x3-Element Array of floats
"""
q = stypes.toDoubleVector(q)
mout = stypes.emptyDoubleMatrix()
libspice.q2m_c(q, mout)
return stypes.cMatrixToNumpy(mout)
|
python
|
def q2m(q):
"""
Find the rotation matrix corresponding to a specified unit quaternion.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/q2m_c.html
:param q: A unit quaternion.
:type q: 4-Element Array of floats
:return: A rotation matrix corresponding to q
:rtype: 3x3-Element Array of floats
"""
q = stypes.toDoubleVector(q)
mout = stypes.emptyDoubleMatrix()
libspice.q2m_c(q, mout)
return stypes.cMatrixToNumpy(mout)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/q2m_c.html
:param q: A unit quaternion.
:type q: 4-Element Array of floats
:return: A rotation matrix corresponding to q
:rtype: 3x3-Element Array of floats
|
[
"Find",
"the",
"rotation",
"matrix",
"corresponding",
"to",
"a",
"specified",
"unit",
"quaternion",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9994-L10008
|
14,853
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
qcktrc
|
def qcktrc(tracelen=_default_len_out):
"""
Return a string containing a traceback.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/qcktrc_c.html
:param tracelen: Maximum length of output traceback string.
:type tracelen: int
:return: A traceback string.
:rtype: str
"""
tracestr = stypes.stringToCharP(tracelen)
tracelen = ctypes.c_int(tracelen)
libspice.qcktrc_c(tracelen, tracestr)
return stypes.toPythonString(tracestr)
|
python
|
def qcktrc(tracelen=_default_len_out):
"""
Return a string containing a traceback.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/qcktrc_c.html
:param tracelen: Maximum length of output traceback string.
:type tracelen: int
:return: A traceback string.
:rtype: str
"""
tracestr = stypes.stringToCharP(tracelen)
tracelen = ctypes.c_int(tracelen)
libspice.qcktrc_c(tracelen, tracestr)
return stypes.toPythonString(tracestr)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/qcktrc_c.html
:param tracelen: Maximum length of output traceback string.
:type tracelen: int
:return: A traceback string.
:rtype: str
|
[
"Return",
"a",
"string",
"containing",
"a",
"traceback",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10012-L10026
|
14,854
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
qdq2av
|
def qdq2av(q, dq):
"""
Derive angular velocity from a unit quaternion and its derivative
with respect to time.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/qdq2av_c.html
:param q: Unit SPICE quaternion.
:type q: 4-Element Array of floats
:param dq: Derivative of q with respect to time
:type dq: 4-Element Array of floats
:return: Angular velocity defined by q and dq.
:rtype: 3-Element Array of floats
"""
q = stypes.toDoubleVector(q)
dq = stypes.toDoubleVector(dq)
vout = stypes.emptyDoubleVector(3)
libspice.qdq2av_c(q, dq, vout)
return stypes.cVectorToPython(vout)
|
python
|
def qdq2av(q, dq):
"""
Derive angular velocity from a unit quaternion and its derivative
with respect to time.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/qdq2av_c.html
:param q: Unit SPICE quaternion.
:type q: 4-Element Array of floats
:param dq: Derivative of q with respect to time
:type dq: 4-Element Array of floats
:return: Angular velocity defined by q and dq.
:rtype: 3-Element Array of floats
"""
q = stypes.toDoubleVector(q)
dq = stypes.toDoubleVector(dq)
vout = stypes.emptyDoubleVector(3)
libspice.qdq2av_c(q, dq, vout)
return stypes.cVectorToPython(vout)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/qdq2av_c.html
:param q: Unit SPICE quaternion.
:type q: 4-Element Array of floats
:param dq: Derivative of q with respect to time
:type dq: 4-Element Array of floats
:return: Angular velocity defined by q and dq.
:rtype: 3-Element Array of floats
|
[
"Derive",
"angular",
"velocity",
"from",
"a",
"unit",
"quaternion",
"and",
"its",
"derivative",
"with",
"respect",
"to",
"time",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10030-L10048
|
14,855
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
qxq
|
def qxq(q1, q2):
"""
Multiply two quaternions.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/qxq_c.html
:param q1: First SPICE quaternion.
:type q1: 4-Element Array of floats
:param q2: Second SPICE quaternion.
:type q2: 4-Element Array of floats
:return: Product of q1 and q2.
:rtype: 4-Element Array of floats
"""
q1 = stypes.toDoubleVector(q1)
q2 = stypes.toDoubleVector(q2)
vout = stypes.emptyDoubleVector(4)
libspice.qxq_c(q1, q2, vout)
return stypes.cVectorToPython(vout)
|
python
|
def qxq(q1, q2):
"""
Multiply two quaternions.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/qxq_c.html
:param q1: First SPICE quaternion.
:type q1: 4-Element Array of floats
:param q2: Second SPICE quaternion.
:type q2: 4-Element Array of floats
:return: Product of q1 and q2.
:rtype: 4-Element Array of floats
"""
q1 = stypes.toDoubleVector(q1)
q2 = stypes.toDoubleVector(q2)
vout = stypes.emptyDoubleVector(4)
libspice.qxq_c(q1, q2, vout)
return stypes.cVectorToPython(vout)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/qxq_c.html
:param q1: First SPICE quaternion.
:type q1: 4-Element Array of floats
:param q2: Second SPICE quaternion.
:type q2: 4-Element Array of floats
:return: Product of q1 and q2.
:rtype: 4-Element Array of floats
|
[
"Multiply",
"two",
"quaternions",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10052-L10069
|
14,856
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
radrec
|
def radrec(inrange, re, dec):
"""
Convert from range, right ascension, and declination to rectangular
coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/radrec_c.html
:param inrange: Distance of a point from the origin.
:type inrange: float
:param re: Right ascension of point in radians.
:type re: float
:param dec: Declination of point in radians.
:type dec: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
"""
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)
|
python
|
def radrec(inrange, re, dec):
"""
Convert from range, right ascension, and declination to rectangular
coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/radrec_c.html
:param inrange: Distance of a point from the origin.
:type inrange: float
:param re: Right ascension of point in radians.
:type re: float
:param dec: Declination of point in radians.
:type dec: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/radrec_c.html
:param inrange: Distance of a point from the origin.
:type inrange: float
:param re: Right ascension of point in radians.
:type re: float
:param dec: Declination of point in radians.
:type dec: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
|
[
"Convert",
"from",
"range",
"right",
"ascension",
"and",
"declination",
"to",
"rectangular",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10077-L10098
|
14,857
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
rav2xf
|
def rav2xf(rot, av):
"""
This routine determines a state transformation matrix
from a rotation matrix and the angular velocity of the
rotation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rav2xf_c.html
:param rot: Rotation matrix.
:type rot: 3x3-Element Array of floats
:param av: Angular velocity vector.
:type av: 3-Element Array of floats
:return: State transformation associated with rot and av.
:rtype: 6x6-Element Array of floats
"""
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)
|
python
|
def rav2xf(rot, av):
"""
This routine determines a state transformation matrix
from a rotation matrix and the angular velocity of the
rotation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rav2xf_c.html
:param rot: Rotation matrix.
:type rot: 3x3-Element Array of floats
:param av: Angular velocity vector.
:type av: 3-Element Array of floats
:return: State transformation associated with rot and av.
:rtype: 6x6-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rav2xf_c.html
:param rot: Rotation matrix.
:type rot: 3x3-Element Array of floats
:param av: Angular velocity vector.
:type av: 3-Element Array of floats
:return: State transformation associated with rot and av.
:rtype: 6x6-Element Array of floats
|
[
"This",
"routine",
"determines",
"a",
"state",
"transformation",
"matrix",
"from",
"a",
"rotation",
"matrix",
"and",
"the",
"angular",
"velocity",
"of",
"the",
"rotation",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10102-L10121
|
14,858
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
raxisa
|
def raxisa(matrix):
"""
Compute the axis of the rotation given by an input matrix
and the angle of the rotation about that axis.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/raxisa_c.html
:param matrix: Rotation matrix.
:type matrix: 3x3-Element Array of floats
:return: Axis of the rotation, Angle through which the rotation is performed
:rtype: tuple
"""
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
|
python
|
def raxisa(matrix):
"""
Compute the axis of the rotation given by an input matrix
and the angle of the rotation about that axis.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/raxisa_c.html
:param matrix: Rotation matrix.
:type matrix: 3x3-Element Array of floats
:return: Axis of the rotation, Angle through which the rotation is performed
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/raxisa_c.html
:param matrix: Rotation matrix.
:type matrix: 3x3-Element Array of floats
:return: Axis of the rotation, Angle through which the rotation is performed
:rtype: tuple
|
[
"Compute",
"the",
"axis",
"of",
"the",
"rotation",
"given",
"by",
"an",
"input",
"matrix",
"and",
"the",
"angle",
"of",
"the",
"rotation",
"about",
"that",
"axis",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10125-L10141
|
14,859
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
rdtext
|
def rdtext(file, lenout=_default_len_out): # pragma: no cover
"""
Read the next line of text from a text file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rdtext_c.html
:param file: Name of text file.
:type file: str
:param lenout: Available room in output line.
:type lenout: int
:return: Next line from the text file, End-of-file indicator
:rtype: tuple
"""
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)
|
python
|
def rdtext(file, lenout=_default_len_out): # pragma: no cover
"""
Read the next line of text from a text file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rdtext_c.html
:param file: Name of text file.
:type file: str
:param lenout: Available room in output line.
:type lenout: int
:return: Next line from the text file, End-of-file indicator
:rtype: tuple
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rdtext_c.html
:param file: Name of text file.
:type file: str
:param lenout: Available room in output line.
:type lenout: int
:return: Next line from the text file, End-of-file indicator
:rtype: tuple
|
[
"Read",
"the",
"next",
"line",
"of",
"text",
"from",
"a",
"text",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10145-L10163
|
14,860
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
reccyl
|
def reccyl(rectan):
"""
Convert from rectangular to cylindrical coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reccyl_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return:
Distance from z axis,
Angle (radians) from xZ plane,
Height above xY plane.
:rtype: tuple
"""
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
|
python
|
def reccyl(rectan):
"""
Convert from rectangular to cylindrical coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reccyl_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return:
Distance from z axis,
Angle (radians) from xZ plane,
Height above xY plane.
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reccyl_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return:
Distance from z axis,
Angle (radians) from xZ plane,
Height above xY plane.
:rtype: tuple
|
[
"Convert",
"from",
"rectangular",
"to",
"cylindrical",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10167-L10187
|
14,861
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
recgeo
|
def recgeo(rectan, re, f):
"""
Convert from rectangular coordinates to geodetic coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recgeo_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return:
Geodetic longitude (radians),
Geodetic latitude (radians),
Altitude above reference spheroid
:rtype: tuple
"""
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
|
python
|
def recgeo(rectan, re, f):
"""
Convert from rectangular coordinates to geodetic coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recgeo_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return:
Geodetic longitude (radians),
Geodetic latitude (radians),
Altitude above reference spheroid
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recgeo_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return:
Geodetic longitude (radians),
Geodetic latitude (radians),
Altitude above reference spheroid
:rtype: tuple
|
[
"Convert",
"from",
"rectangular",
"coordinates",
"to",
"geodetic",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10191-L10217
|
14,862
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
reclat
|
def reclat(rectan):
"""
Convert from rectangular coordinates to latitudinal coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reclat_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return: Distance from the origin, Longitude in radians, Latitude in radians
:rtype: tuple
"""
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
|
python
|
def reclat(rectan):
"""
Convert from rectangular coordinates to latitudinal coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reclat_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return: Distance from the origin, Longitude in radians, Latitude in radians
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reclat_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return: Distance from the origin, Longitude in radians, Latitude in radians
:rtype: tuple
|
[
"Convert",
"from",
"rectangular",
"coordinates",
"to",
"latitudinal",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10221-L10238
|
14,863
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
recpgr
|
def recpgr(body, rectan, re, f):
"""
Convert rectangular coordinates to planetographic coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recpgr_c.html
:param body: Body with which coordinate system is associated.
:type body: str
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return:
Planetographic longitude (radians),
Planetographic latitude (radians),
Altitude above reference spheroid
:rtype: tuple
"""
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
|
python
|
def recpgr(body, rectan, re, f):
"""
Convert rectangular coordinates to planetographic coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recpgr_c.html
:param body: Body with which coordinate system is associated.
:type body: str
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return:
Planetographic longitude (radians),
Planetographic latitude (radians),
Altitude above reference spheroid
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recpgr_c.html
:param body: Body with which coordinate system is associated.
:type body: str
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return:
Planetographic longitude (radians),
Planetographic latitude (radians),
Altitude above reference spheroid
:rtype: tuple
|
[
"Convert",
"rectangular",
"coordinates",
"to",
"planetographic",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10242-L10271
|
14,864
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
recrad
|
def recrad(rectan):
"""
Convert rectangular coordinates to range, right ascension, and declination.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recrad_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return:
Distance of the point from the origin,
Right ascension in radians,
Declination in radians
:rtype: tuple
"""
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
|
python
|
def recrad(rectan):
"""
Convert rectangular coordinates to range, right ascension, and declination.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recrad_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return:
Distance of the point from the origin,
Right ascension in radians,
Declination in radians
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recrad_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return:
Distance of the point from the origin,
Right ascension in radians,
Declination in radians
:rtype: tuple
|
[
"Convert",
"rectangular",
"coordinates",
"to",
"range",
"right",
"ascension",
"and",
"declination",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10275-L10295
|
14,865
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
recsph
|
def recsph(rectan):
"""
Convert from rectangular coordinates to spherical coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recrad_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return:
Distance from the origin,
Angle from the positive Z-axis,
Longitude in radians.
:rtype: tuple
"""
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
|
python
|
def recsph(rectan):
"""
Convert from rectangular coordinates to spherical coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recrad_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return:
Distance from the origin,
Angle from the positive Z-axis,
Longitude in radians.
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/recrad_c.html
:param rectan: Rectangular coordinates of a point.
:type rectan: 3-Element Array of floats
:return:
Distance from the origin,
Angle from the positive Z-axis,
Longitude in radians.
:rtype: tuple
|
[
"Convert",
"from",
"rectangular",
"coordinates",
"to",
"spherical",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10299-L10319
|
14,866
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
removc
|
def removc(item, inset):
"""
Remove an item from a character set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/removc_c.html
:param item: Item to be removed.
:type item: str
:param inset: Set to be updated.
:type inset: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.dtype == 0
item = stypes.stringToCharP(item)
libspice.removc_c(item, ctypes.byref(inset))
|
python
|
def removc(item, inset):
"""
Remove an item from a character set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/removc_c.html
:param item: Item to be removed.
:type item: str
:param inset: Set to be updated.
:type inset: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.dtype == 0
item = stypes.stringToCharP(item)
libspice.removc_c(item, ctypes.byref(inset))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/removc_c.html
:param item: Item to be removed.
:type item: str
:param inset: Set to be updated.
:type inset: spiceypy.utils.support_types.SpiceCell
|
[
"Remove",
"an",
"item",
"from",
"a",
"character",
"set",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10323-L10337
|
14,867
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
removd
|
def removd(item, inset):
"""
Remove an item from a double precision set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/removd_c.html
:param item: Item to be removed.
:type item: float
:param inset: Set to be updated.
:type inset: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.dtype == 1
item = ctypes.c_double(item)
libspice.removd_c(item, ctypes.byref(inset))
|
python
|
def removd(item, inset):
"""
Remove an item from a double precision set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/removd_c.html
:param item: Item to be removed.
:type item: float
:param inset: Set to be updated.
:type inset: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.dtype == 1
item = ctypes.c_double(item)
libspice.removd_c(item, ctypes.byref(inset))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/removd_c.html
:param item: Item to be removed.
:type item: float
:param inset: Set to be updated.
:type inset: spiceypy.utils.support_types.SpiceCell
|
[
"Remove",
"an",
"item",
"from",
"a",
"double",
"precision",
"set",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10341-L10355
|
14,868
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
removi
|
def removi(item, inset):
"""
Remove an item from an integer set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/removi_c.html
:param item: Item to be removed.
:type item: int
:param inset: Set to be updated.
:type inset: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.dtype == 2
item = ctypes.c_int(item)
libspice.removi_c(item, ctypes.byref(inset))
|
python
|
def removi(item, inset):
"""
Remove an item from an integer set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/removi_c.html
:param item: Item to be removed.
:type item: int
:param inset: Set to be updated.
:type inset: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.dtype == 2
item = ctypes.c_int(item)
libspice.removi_c(item, ctypes.byref(inset))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/removi_c.html
:param item: Item to be removed.
:type item: int
:param inset: Set to be updated.
:type inset: spiceypy.utils.support_types.SpiceCell
|
[
"Remove",
"an",
"item",
"from",
"an",
"integer",
"set",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10359-L10373
|
14,869
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
reordc
|
def reordc(iorder, ndim, lenvals, array):
"""
Re-order the elements of an array of character strings
according to a given order vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reordc_c.html
:param iorder: Order vector to be used to re-order array.
:type iorder: Array of ints
:param ndim: Dimension of array.
:type ndim: int
:param lenvals: String length.
:type lenvals: int
:param array: Array to be re-ordered.
:type array: Array of strs
:return: Re-ordered Array.
:rtype: Array of strs
"""
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]
|
python
|
def reordc(iorder, ndim, lenvals, array):
"""
Re-order the elements of an array of character strings
according to a given order vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reordc_c.html
:param iorder: Order vector to be used to re-order array.
:type iorder: Array of ints
:param ndim: Dimension of array.
:type ndim: int
:param lenvals: String length.
:type lenvals: int
:param array: Array to be re-ordered.
:type array: Array of strs
:return: Re-ordered Array.
:rtype: Array of strs
"""
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]
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reordc_c.html
:param iorder: Order vector to be used to re-order array.
:type iorder: Array of ints
:param ndim: Dimension of array.
:type ndim: int
:param lenvals: String length.
:type lenvals: int
:param array: Array to be re-ordered.
:type array: Array of strs
:return: Re-ordered Array.
:rtype: Array of strs
|
[
"Re",
"-",
"order",
"the",
"elements",
"of",
"an",
"array",
"of",
"character",
"strings",
"according",
"to",
"a",
"given",
"order",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10377-L10400
|
14,870
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
reordd
|
def reordd(iorder, ndim, array):
"""
Re-order the elements of a double precision array according to
a given order vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reordd_c.html
:param iorder: Order vector to be used to re-order array.
:type iorder: Array of ints
:param ndim: Dimension of array.
:type ndim: int
:param array: Array to be re-ordered.
:type array: Array of floats
:return: Re-ordered Array.
:rtype: Array of floats
"""
iorder = stypes.toIntVector(iorder)
ndim = ctypes.c_int(ndim)
array = stypes.toDoubleVector(array)
libspice.reordd_c(iorder, ndim, array)
return stypes.cVectorToPython(array)
|
python
|
def reordd(iorder, ndim, array):
"""
Re-order the elements of a double precision array according to
a given order vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reordd_c.html
:param iorder: Order vector to be used to re-order array.
:type iorder: Array of ints
:param ndim: Dimension of array.
:type ndim: int
:param array: Array to be re-ordered.
:type array: Array of floats
:return: Re-ordered Array.
:rtype: Array of floats
"""
iorder = stypes.toIntVector(iorder)
ndim = ctypes.c_int(ndim)
array = stypes.toDoubleVector(array)
libspice.reordd_c(iorder, ndim, array)
return stypes.cVectorToPython(array)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reordd_c.html
:param iorder: Order vector to be used to re-order array.
:type iorder: Array of ints
:param ndim: Dimension of array.
:type ndim: int
:param array: Array to be re-ordered.
:type array: Array of floats
:return: Re-ordered Array.
:rtype: Array of floats
|
[
"Re",
"-",
"order",
"the",
"elements",
"of",
"a",
"double",
"precision",
"array",
"according",
"to",
"a",
"given",
"order",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10404-L10424
|
14,871
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
reordi
|
def reordi(iorder, ndim, array):
"""
Re-order the elements of an integer array according to
a given order vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reordi_c.html
:param iorder: Order vector to be used to re-order array.
:type iorder: Array of ints
:param ndim: Dimension of array.
:type ndim: int
:param array: Array to be re-ordered.
:type array: Array of ints
:return: Re-ordered Array.
:rtype: Array of ints
"""
iorder = stypes.toIntVector(iorder)
ndim = ctypes.c_int(ndim)
array = stypes.toIntVector(array)
libspice.reordi_c(iorder, ndim, array)
return stypes.cVectorToPython(array)
|
python
|
def reordi(iorder, ndim, array):
"""
Re-order the elements of an integer array according to
a given order vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reordi_c.html
:param iorder: Order vector to be used to re-order array.
:type iorder: Array of ints
:param ndim: Dimension of array.
:type ndim: int
:param array: Array to be re-ordered.
:type array: Array of ints
:return: Re-ordered Array.
:rtype: Array of ints
"""
iorder = stypes.toIntVector(iorder)
ndim = ctypes.c_int(ndim)
array = stypes.toIntVector(array)
libspice.reordi_c(iorder, ndim, array)
return stypes.cVectorToPython(array)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reordi_c.html
:param iorder: Order vector to be used to re-order array.
:type iorder: Array of ints
:param ndim: Dimension of array.
:type ndim: int
:param array: Array to be re-ordered.
:type array: Array of ints
:return: Re-ordered Array.
:rtype: Array of ints
|
[
"Re",
"-",
"order",
"the",
"elements",
"of",
"an",
"integer",
"array",
"according",
"to",
"a",
"given",
"order",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10428-L10448
|
14,872
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
repmc
|
def repmc(instr, marker, value, lenout=None):
"""
Replace a marker with a character string.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmc_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: str
:param lenout: Optional available space in output string
:type lenout: int
:return: Output string.
:rtype: str
"""
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)
|
python
|
def repmc(instr, marker, value, lenout=None):
"""
Replace a marker with a character string.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmc_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: str
:param lenout: Optional available space in output string
:type lenout: int
:return: Output string.
:rtype: str
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmc_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: str
:param lenout: Optional available space in output string
:type lenout: int
:return: Output string.
:rtype: str
|
[
"Replace",
"a",
"marker",
"with",
"a",
"character",
"string",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10476-L10500
|
14,873
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
repmct
|
def repmct(instr, marker, value, repcase, lenout=None):
"""
Replace a marker with the text representation of a
cardinal number.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmc_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: int
:param repcase: Case of replacement text.
:type repcase: str
:param lenout: Optional available space in output string
:type lenout: int
:return: Output string.
:rtype: str
"""
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)
|
python
|
def repmct(instr, marker, value, repcase, lenout=None):
"""
Replace a marker with the text representation of a
cardinal number.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmc_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: int
:param repcase: Case of replacement text.
:type repcase: str
:param lenout: Optional available space in output string
:type lenout: int
:return: Output string.
:rtype: str
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmc_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: int
:param repcase: Case of replacement text.
:type repcase: str
:param lenout: Optional available space in output string
:type lenout: int
:return: Output string.
:rtype: str
|
[
"Replace",
"a",
"marker",
"with",
"the",
"text",
"representation",
"of",
"a",
"cardinal",
"number",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10504-L10532
|
14,874
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
repmd
|
def repmd(instr, marker, value, sigdig):
"""
Replace a marker with a double precision number.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmd_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: float
:param sigdig: Significant digits in replacement text.
:type sigdig: int
:return: Output string.
:rtype: str
"""
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)
|
python
|
def repmd(instr, marker, value, sigdig):
"""
Replace a marker with a double precision number.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmd_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: float
:param sigdig: Significant digits in replacement text.
:type sigdig: int
:return: Output string.
:rtype: str
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmd_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: float
:param sigdig: Significant digits in replacement text.
:type sigdig: int
:return: Output string.
:rtype: str
|
[
"Replace",
"a",
"marker",
"with",
"a",
"double",
"precision",
"number",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10536-L10560
|
14,875
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
repmf
|
def repmf(instr, marker, value, sigdig, informat, lenout=None):
"""
Replace a marker in a string with a formatted double precision value.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmf_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: float
:param sigdig: Significant digits in replacement text.
:type sigdig: int
:param informat: Format 'E' or 'F'.
:type informat: str
:param lenout: Optional available space in output string.
:type lenout: int
:return: Output string.
:rtype: str
"""
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)
|
python
|
def repmf(instr, marker, value, sigdig, informat, lenout=None):
"""
Replace a marker in a string with a formatted double precision value.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmf_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: float
:param sigdig: Significant digits in replacement text.
:type sigdig: int
:param informat: Format 'E' or 'F'.
:type informat: str
:param lenout: Optional available space in output string.
:type lenout: int
:return: Output string.
:rtype: str
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmf_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: float
:param sigdig: Significant digits in replacement text.
:type sigdig: int
:param informat: Format 'E' or 'F'.
:type informat: str
:param lenout: Optional available space in output string.
:type lenout: int
:return: Output string.
:rtype: str
|
[
"Replace",
"a",
"marker",
"in",
"a",
"string",
"with",
"a",
"formatted",
"double",
"precision",
"value",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10564-L10594
|
14,876
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
repmi
|
def repmi(instr, marker, value, lenout=None):
"""
Replace a marker with an integer.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmi_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: int
:param lenout: Optional available space in output string.
:type lenout: int
:return: Output string.
:rtype: str
"""
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)
|
python
|
def repmi(instr, marker, value, lenout=None):
"""
Replace a marker with an integer.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmi_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: int
:param lenout: Optional available space in output string.
:type lenout: int
:return: Output string.
:rtype: str
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/repmi_c.html
:param instr: Input string.
:type instr: str
:param marker: Marker to be replaced.
:type marker: str
:param value: Replacement value.
:type value: int
:param lenout: Optional available space in output string.
:type lenout: int
:return: Output string.
:rtype: str
|
[
"Replace",
"a",
"marker",
"with",
"an",
"integer",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10598-L10622
|
14,877
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
rotate
|
def rotate(angle, iaxis):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rotate_c.html
:param angle: Angle of rotation (radians).
:type angle: float
:param iaxis: Axis of rotation X=1, Y=2, Z=3.
:type iaxis: int
:return: Resulting rotation matrix
:rtype: 3x3-Element Array of floats
"""
angle = ctypes.c_double(angle)
iaxis = ctypes.c_int(iaxis)
mout = stypes.emptyDoubleMatrix()
libspice.rotate_c(angle, iaxis, mout)
return stypes.cMatrixToNumpy(mout)
|
python
|
def rotate(angle, iaxis):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rotate_c.html
:param angle: Angle of rotation (radians).
:type angle: float
:param iaxis: Axis of rotation X=1, Y=2, Z=3.
:type iaxis: int
:return: Resulting rotation matrix
:rtype: 3x3-Element Array of floats
"""
angle = ctypes.c_double(angle)
iaxis = ctypes.c_int(iaxis)
mout = stypes.emptyDoubleMatrix()
libspice.rotate_c(angle, iaxis, mout)
return stypes.cMatrixToNumpy(mout)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rotate_c.html
:param angle: Angle of rotation (radians).
:type angle: float
:param iaxis: Axis of rotation X=1, Y=2, Z=3.
:type iaxis: int
:return: Resulting rotation matrix
:rtype: 3x3-Element Array of floats
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10682-L10701
|
14,878
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
rotmat
|
def rotmat(m1, angle, iaxis):
"""
Rotmat applies a rotation of angle radians about axis iaxis to a
matrix. This rotation is thought of as rotating the coordinate
system.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rotmat_c.html
:param m1: Matrix to be rotated.
:type m1: 3x3-Element Array of floats
:param angle: Angle of rotation (radians).
:type angle: float
:param iaxis: Axis of rotation X=1, Y=2, Z=3.
:type iaxis: int
:return: Resulting rotated matrix.
:rtype: 3x3-Element Array of floats
"""
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)
|
python
|
def rotmat(m1, angle, iaxis):
"""
Rotmat applies a rotation of angle radians about axis iaxis to a
matrix. This rotation is thought of as rotating the coordinate
system.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rotmat_c.html
:param m1: Matrix to be rotated.
:type m1: 3x3-Element Array of floats
:param angle: Angle of rotation (radians).
:type angle: float
:param iaxis: Axis of rotation X=1, Y=2, Z=3.
:type iaxis: int
:return: Resulting rotated matrix.
:rtype: 3x3-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rotmat_c.html
:param m1: Matrix to be rotated.
:type m1: 3x3-Element Array of floats
:param angle: Angle of rotation (radians).
:type angle: float
:param iaxis: Axis of rotation X=1, Y=2, Z=3.
:type iaxis: int
:return: Resulting rotated matrix.
:rtype: 3x3-Element Array of floats
|
[
"Rotmat",
"applies",
"a",
"rotation",
"of",
"angle",
"radians",
"about",
"axis",
"iaxis",
"to",
"a",
"matrix",
".",
"This",
"rotation",
"is",
"thought",
"of",
"as",
"rotating",
"the",
"coordinate",
"system",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10705-L10727
|
14,879
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
rotvec
|
def rotvec(v1, angle, iaxis):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rotvec_c.html
:param v1: Vector whose coordinate system is to be rotated.
:type v1: 3-Element Array of floats
:param angle: Angle of rotation (radians).
:type angle: float
:param iaxis: Axis of rotation X=1, Y=2, Z=3.
:type iaxis: int
:return: the vector expressed in the new coordinate system.
:rtype: 3-Element Array of floats
"""
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)
|
python
|
def rotvec(v1, angle, iaxis):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rotvec_c.html
:param v1: Vector whose coordinate system is to be rotated.
:type v1: 3-Element Array of floats
:param angle: Angle of rotation (radians).
:type angle: float
:param iaxis: Axis of rotation X=1, Y=2, Z=3.
:type iaxis: int
:return: the vector expressed in the new coordinate system.
:rtype: 3-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rotvec_c.html
:param v1: Vector whose coordinate system is to be rotated.
:type v1: 3-Element Array of floats
:param angle: Angle of rotation (radians).
:type angle: float
:param iaxis: Axis of rotation X=1, Y=2, Z=3.
:type iaxis: int
:return: the vector expressed in the new coordinate system.
:rtype: 3-Element Array of floats
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10731-L10753
|
14,880
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
rquad
|
def rquad(a, b, c):
"""
Find the roots of a quadratic equation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rquad_c.html
:param a: Coefficient of quadratic term.
:type a: float
:param b: Coefficient of linear term.
:type b: float
:param c: Constant.
:type c: float
:return: Root built from positive and negative discriminant term.
:rtype: tuple
"""
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)
|
python
|
def rquad(a, b, c):
"""
Find the roots of a quadratic equation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rquad_c.html
:param a: Coefficient of quadratic term.
:type a: float
:param b: Coefficient of linear term.
:type b: float
:param c: Constant.
:type c: float
:return: Root built from positive and negative discriminant term.
:rtype: tuple
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/rquad_c.html
:param a: Coefficient of quadratic term.
:type a: float
:param b: Coefficient of linear term.
:type b: float
:param c: Constant.
:type c: float
:return: Root built from positive and negative discriminant term.
:rtype: tuple
|
[
"Find",
"the",
"roots",
"of",
"a",
"quadratic",
"equation",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10770-L10791
|
14,881
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
saelgv
|
def saelgv(vec1, vec2):
"""
Find semi-axis vectors of an ellipse generated by two arbitrary
three-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/saelgv_c.html
:param vec1: First vector used to generate an ellipse.
:type vec1: 3-Element Array of floats
:param vec2: Second vector used to generate an ellipse.
:type vec2: 3-Element Array of floats
:return: Semi-major axis of ellipse, Semi-minor axis of ellipse.
:rtype: tuple
"""
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)
|
python
|
def saelgv(vec1, vec2):
"""
Find semi-axis vectors of an ellipse generated by two arbitrary
three-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/saelgv_c.html
:param vec1: First vector used to generate an ellipse.
:type vec1: 3-Element Array of floats
:param vec2: Second vector used to generate an ellipse.
:type vec2: 3-Element Array of floats
:return: Semi-major axis of ellipse, Semi-minor axis of ellipse.
:rtype: tuple
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/saelgv_c.html
:param vec1: First vector used to generate an ellipse.
:type vec1: 3-Element Array of floats
:param vec2: Second vector used to generate an ellipse.
:type vec2: 3-Element Array of floats
:return: Semi-major axis of ellipse, Semi-minor axis of ellipse.
:rtype: tuple
|
[
"Find",
"semi",
"-",
"axis",
"vectors",
"of",
"an",
"ellipse",
"generated",
"by",
"two",
"arbitrary",
"three",
"-",
"dimensional",
"vectors",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10799-L10818
|
14,882
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
scard
|
def scard(incard, cell):
"""
Set the cardinality of a SPICE cell of any data type.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scard_c.html
:param incard: Cardinality of (number of elements in) the cell.
:type incard: int
:param cell: The cell.
:type cell: spiceypy.utils.support_types.SpiceCell
:return: The updated Cell.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(cell, stypes.SpiceCell)
incard = ctypes.c_int(incard)
libspice.scard_c(incard, ctypes.byref(cell))
return cell
|
python
|
def scard(incard, cell):
"""
Set the cardinality of a SPICE cell of any data type.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scard_c.html
:param incard: Cardinality of (number of elements in) the cell.
:type incard: int
:param cell: The cell.
:type cell: spiceypy.utils.support_types.SpiceCell
:return: The updated Cell.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(cell, stypes.SpiceCell)
incard = ctypes.c_int(incard)
libspice.scard_c(incard, ctypes.byref(cell))
return cell
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scard_c.html
:param incard: Cardinality of (number of elements in) the cell.
:type incard: int
:param cell: The cell.
:type cell: spiceypy.utils.support_types.SpiceCell
:return: The updated Cell.
:rtype: spiceypy.utils.support_types.SpiceCell
|
[
"Set",
"the",
"cardinality",
"of",
"a",
"SPICE",
"cell",
"of",
"any",
"data",
"type",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10822-L10838
|
14,883
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
scdecd
|
def scdecd(sc, sclkdp, lenout=_default_len_out, MXPART=None):
# todo: figure out how to use mxpart
"""
Convert double precision encoding of spacecraft clock time into
a character representation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scdecd_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param sclkdp: Encoded representation of a spacecraft clock count.
:type sclkdp: float
:param lenout: Maximum allowed length of output SCLK string.
:type lenout: int
:param MXPART: Maximum number of spacecraft clock partitions.
:type MXPART: int
:return: Character representation of a clock count.
:rtype: str
"""
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)
|
python
|
def scdecd(sc, sclkdp, lenout=_default_len_out, MXPART=None):
# todo: figure out how to use mxpart
"""
Convert double precision encoding of spacecraft clock time into
a character representation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scdecd_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param sclkdp: Encoded representation of a spacecraft clock count.
:type sclkdp: float
:param lenout: Maximum allowed length of output SCLK string.
:type lenout: int
:param MXPART: Maximum number of spacecraft clock partitions.
:type MXPART: int
:return: Character representation of a clock count.
:rtype: str
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scdecd_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param sclkdp: Encoded representation of a spacecraft clock count.
:type sclkdp: float
:param lenout: Maximum allowed length of output SCLK string.
:type lenout: int
:param MXPART: Maximum number of spacecraft clock partitions.
:type MXPART: int
:return: Character representation of a clock count.
:rtype: str
|
[
"Convert",
"double",
"precision",
"encoding",
"of",
"spacecraft",
"clock",
"time",
"into",
"a",
"character",
"representation",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10842-L10866
|
14,884
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
scencd
|
def scencd(sc, sclkch, MXPART=None):
"""
Encode character representation of spacecraft clock time into a
double precision number.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scencd_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param sclkch: Character representation of a spacecraft clock.
:type sclkch: str
:param MXPART: Maximum number of spacecraft clock partitions.
:type MXPART: int
:return: Encoded representation of the clock count.
:rtype: float
"""
sc = ctypes.c_int(sc)
sclkch = stypes.stringToCharP(sclkch)
sclkdp = ctypes.c_double()
libspice.scencd_c(sc, sclkch, ctypes.byref(sclkdp))
return sclkdp.value
|
python
|
def scencd(sc, sclkch, MXPART=None):
"""
Encode character representation of spacecraft clock time into a
double precision number.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scencd_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param sclkch: Character representation of a spacecraft clock.
:type sclkch: str
:param MXPART: Maximum number of spacecraft clock partitions.
:type MXPART: int
:return: Encoded representation of the clock count.
:rtype: float
"""
sc = ctypes.c_int(sc)
sclkch = stypes.stringToCharP(sclkch)
sclkdp = ctypes.c_double()
libspice.scencd_c(sc, sclkch, ctypes.byref(sclkdp))
return sclkdp.value
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scencd_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param sclkch: Character representation of a spacecraft clock.
:type sclkch: str
:param MXPART: Maximum number of spacecraft clock partitions.
:type MXPART: int
:return: Encoded representation of the clock count.
:rtype: float
|
[
"Encode",
"character",
"representation",
"of",
"spacecraft",
"clock",
"time",
"into",
"a",
"double",
"precision",
"number",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10944-L10964
|
14,885
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
scfmt
|
def scfmt(sc, ticks, lenout=_default_len_out):
"""
Convert encoded spacecraft clock ticks to character clock format.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scfmt_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param ticks: Encoded representation of a spacecraft clock count.
:type ticks: float
:param lenout: Maximum allowed length of output string.
:type lenout: int
:return: Character representation of a clock count.
:rtype: str
"""
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)
|
python
|
def scfmt(sc, ticks, lenout=_default_len_out):
"""
Convert encoded spacecraft clock ticks to character clock format.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scfmt_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param ticks: Encoded representation of a spacecraft clock count.
:type ticks: float
:param lenout: Maximum allowed length of output string.
:type lenout: int
:return: Character representation of a clock count.
:rtype: str
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scfmt_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param ticks: Encoded representation of a spacecraft clock count.
:type ticks: float
:param lenout: Maximum allowed length of output string.
:type lenout: int
:return: Character representation of a clock count.
:rtype: str
|
[
"Convert",
"encoded",
"spacecraft",
"clock",
"ticks",
"to",
"character",
"clock",
"format",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10968-L10988
|
14,886
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
scpart
|
def scpart(sc):
"""
Get spacecraft clock partition information from a spacecraft
clock kernel file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scpart_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:return:
The number of spacecraft clock partitions,
Array of partition start times,
Array of partition stop times.
:rtype: tuple
"""
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]
|
python
|
def scpart(sc):
"""
Get spacecraft clock partition information from a spacecraft
clock kernel file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scpart_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:return:
The number of spacecraft clock partitions,
Array of partition start times,
Array of partition stop times.
:rtype: tuple
"""
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]
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/scpart_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:return:
The number of spacecraft clock partitions,
Array of partition start times,
Array of partition stop times.
:rtype: tuple
|
[
"Get",
"spacecraft",
"clock",
"partition",
"information",
"from",
"a",
"spacecraft",
"clock",
"kernel",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L10992-L11013
|
14,887
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
sctiks
|
def sctiks(sc, clkstr):
"""
Convert a spacecraft clock format string to number of "ticks".
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sctiks_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param clkstr: Character representation of a spacecraft clock.
:type clkstr: str
:return: Number of ticks represented by the clock string.
:rtype: float
"""
sc = ctypes.c_int(sc)
clkstr = stypes.stringToCharP(clkstr)
ticks = ctypes.c_double()
libspice.sctiks_c(sc, clkstr, ctypes.byref(ticks))
return ticks.value
|
python
|
def sctiks(sc, clkstr):
"""
Convert a spacecraft clock format string to number of "ticks".
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sctiks_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param clkstr: Character representation of a spacecraft clock.
:type clkstr: str
:return: Number of ticks represented by the clock string.
:rtype: float
"""
sc = ctypes.c_int(sc)
clkstr = stypes.stringToCharP(clkstr)
ticks = ctypes.c_double()
libspice.sctiks_c(sc, clkstr, ctypes.byref(ticks))
return ticks.value
|
[
"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".
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sctiks_c.html
:param sc: NAIF spacecraft identification code.
:type sc: int
:param clkstr: Character representation of a spacecraft clock.
:type clkstr: str
:return: Number of ticks represented by the clock string.
:rtype: float
|
[
"Convert",
"a",
"spacecraft",
"clock",
"format",
"string",
"to",
"number",
"of",
"ticks",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11060-L11077
|
14,888
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
sdiff
|
def sdiff(a, b):
"""
Take the symmetric difference of two sets of any data type to form a
third set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sdiff_c.html
:param a: First input set.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Second input set.
:type b: spiceypy.utils.support_types.SpiceCell
:return: Symmetric difference of a and b.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
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
|
python
|
def sdiff(a, b):
"""
Take the symmetric difference of two sets of any data type to form a
third set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sdiff_c.html
:param a: First input set.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Second input set.
:type b: spiceypy.utils.support_types.SpiceCell
:return: Symmetric difference of a and b.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sdiff_c.html
:param a: First input set.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Second input set.
:type b: spiceypy.utils.support_types.SpiceCell
:return: Symmetric difference of a and b.
:rtype: spiceypy.utils.support_types.SpiceCell
|
[
"Take",
"the",
"symmetric",
"difference",
"of",
"two",
"sets",
"of",
"any",
"data",
"type",
"to",
"form",
"a",
"third",
"set",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11081-L11109
|
14,889
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
set_c
|
def set_c(a, op, b):
"""
Given a relational operator, compare two sets of any data type.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/set_c.html
:param a: First set.
:type a: spiceypy.utils.support_types.SpiceCell
:param op: Comparison operator.
:type op: str
:param b: Second set.
:type b: spiceypy.utils.support_types.SpiceCell
:return: The function returns the result of the comparison.
:rtype: bool
"""
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)))
|
python
|
def set_c(a, op, b):
"""
Given a relational operator, compare two sets of any data type.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/set_c.html
:param a: First set.
:type a: spiceypy.utils.support_types.SpiceCell
:param op: Comparison operator.
:type op: str
:param b: Second set.
:type b: spiceypy.utils.support_types.SpiceCell
:return: The function returns the result of the comparison.
:rtype: bool
"""
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)))
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/set_c.html
:param a: First set.
:type a: spiceypy.utils.support_types.SpiceCell
:param op: Comparison operator.
:type op: str
:param b: Second set.
:type b: spiceypy.utils.support_types.SpiceCell
:return: The function returns the result of the comparison.
:rtype: bool
|
[
"Given",
"a",
"relational",
"operator",
"compare",
"two",
"sets",
"of",
"any",
"data",
"type",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11113-L11133
|
14,890
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
shellc
|
def shellc(ndim, lenvals, array):
# This works! looks like this is a mutable 2d char array
"""
Sort an array of character strings according to the ASCII
collating sequence using the Shell Sort algorithm.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shellc_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param lenvals: String length.
:type lenvals: int
:param array: The array to be sorted.
:type array: list of str.
:return: The sorted array.
:rtype: list of str.
"""
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)
|
python
|
def shellc(ndim, lenvals, array):
# This works! looks like this is a mutable 2d char array
"""
Sort an array of character strings according to the ASCII
collating sequence using the Shell Sort algorithm.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shellc_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param lenvals: String length.
:type lenvals: int
:param array: The array to be sorted.
:type array: list of str.
:return: The sorted array.
:rtype: list of str.
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shellc_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param lenvals: String length.
:type lenvals: int
:param array: The array to be sorted.
:type array: list of str.
:return: The sorted array.
:rtype: list of str.
|
[
"Sort",
"an",
"array",
"of",
"character",
"strings",
"according",
"to",
"the",
"ASCII",
"collating",
"sequence",
"using",
"the",
"Shell",
"Sort",
"algorithm",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11151-L11172
|
14,891
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
shelld
|
def shelld(ndim, array):
# Works!, use this as example for "I/O" parameters
"""
Sort a double precision array using the Shell Sort algorithm.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shelld_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param array: The array to be sorted.
:type array: Array of floats
:return: The sorted array.
:rtype: Array of floats
"""
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)
|
python
|
def shelld(ndim, array):
# Works!, use this as example for "I/O" parameters
"""
Sort a double precision array using the Shell Sort algorithm.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shelld_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param array: The array to be sorted.
:type array: Array of floats
:return: The sorted array.
:rtype: Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shelld_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param array: The array to be sorted.
:type array: Array of floats
:return: The sorted array.
:rtype: Array of floats
|
[
"Sort",
"a",
"double",
"precision",
"array",
"using",
"the",
"Shell",
"Sort",
"algorithm",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11176-L11193
|
14,892
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
shelli
|
def shelli(ndim, array):
# Works!, use this as example for "I/O" parameters
"""
Sort an integer array using the Shell Sort algorithm.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shelli_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param array: The array to be sorted.
:type array: Array of ints
:return: The sorted array.
:rtype: Array of ints
"""
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)
|
python
|
def shelli(ndim, array):
# Works!, use this as example for "I/O" parameters
"""
Sort an integer array using the Shell Sort algorithm.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shelli_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param array: The array to be sorted.
:type array: Array of ints
:return: The sorted array.
:rtype: Array of ints
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shelli_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param array: The array to be sorted.
:type array: Array of ints
:return: The sorted array.
:rtype: Array of ints
|
[
"Sort",
"an",
"integer",
"array",
"using",
"the",
"Shell",
"Sort",
"algorithm",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11197-L11214
|
14,893
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
sincpt
|
def sincpt(method, target, et, fixref, abcorr, obsrvr, dref, dvec):
"""
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.
This routine supersedes :func:`srfxpt`.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sincpt_c.html
:param method: Computation method.
:type method: str
:param target: Name of target body.
:type target: str
:param et: Epoch in ephemeris seconds past J2000 TDB.
:type et: float
:param fixref: Body-fixed, body-centered target body frame.
:type fixref: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing body.
:type obsrvr: str
:param dref: Reference frame of ray's direction vector.
:type dref: str
:param dvec: Ray's direction vector.
:type dvec: 3-Element Array of floats
:return:
Surface intercept point on the target body,
Intercept epoch,
Vector from observer to intercept point.
:rtype: tuple
"""
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)
|
python
|
def sincpt(method, target, et, fixref, abcorr, obsrvr, dref, dvec):
"""
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.
This routine supersedes :func:`srfxpt`.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sincpt_c.html
:param method: Computation method.
:type method: str
:param target: Name of target body.
:type target: str
:param et: Epoch in ephemeris seconds past J2000 TDB.
:type et: float
:param fixref: Body-fixed, body-centered target body frame.
:type fixref: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing body.
:type obsrvr: str
:param dref: Reference frame of ray's direction vector.
:type dref: str
:param dvec: Ray's direction vector.
:type dvec: 3-Element Array of floats
:return:
Surface intercept point on the target body,
Intercept epoch,
Vector from observer to intercept point.
:rtype: tuple
"""
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)
|
[
"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.
This routine supersedes :func:`srfxpt`.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sincpt_c.html
:param method: Computation method.
:type method: str
:param target: Name of target body.
:type target: str
:param et: Epoch in ephemeris seconds past J2000 TDB.
:type et: float
:param fixref: Body-fixed, body-centered target body frame.
:type fixref: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing body.
:type obsrvr: str
:param dref: Reference frame of ray's direction vector.
:type dref: str
:param dvec: Ray's direction vector.
:type dvec: 3-Element Array of floats
:return:
Surface intercept point on the target body,
Intercept epoch,
Vector from observer to intercept point.
:rtype: tuple
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11233-L11281
|
14,894
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
sphcyl
|
def sphcyl(radius, colat, slon):
"""
This routine converts from spherical coordinates to cylindrical
coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sphcyl_c.html
:param radius: Distance of point from origin.
:type radius: float
:param colat: Polar angle (co-latitude in radians) of point.
:type colat: float
:param slon: Azimuthal angle (longitude) of point (radians).
:type slon: float
:return:
Distance of point from z axis,
angle (radians) of point from XZ plane,
Height of point above XY plane.
:rtype: tuple
"""
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
|
python
|
def sphcyl(radius, colat, slon):
"""
This routine converts from spherical coordinates to cylindrical
coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sphcyl_c.html
:param radius: Distance of point from origin.
:type radius: float
:param colat: Polar angle (co-latitude in radians) of point.
:type colat: float
:param slon: Azimuthal angle (longitude) of point (radians).
:type slon: float
:return:
Distance of point from z axis,
angle (radians) of point from XZ plane,
Height of point above XY plane.
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sphcyl_c.html
:param radius: Distance of point from origin.
:type radius: float
:param colat: Polar angle (co-latitude in radians) of point.
:type colat: float
:param slon: Azimuthal angle (longitude) of point (radians).
:type slon: float
:return:
Distance of point from z axis,
angle (radians) of point from XZ plane,
Height of point above XY plane.
:rtype: tuple
|
[
"This",
"routine",
"converts",
"from",
"spherical",
"coordinates",
"to",
"cylindrical",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11315-L11342
|
14,895
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
sphlat
|
def sphlat(r, colat, lons):
"""
Convert from spherical coordinates to latitudinal coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sphlat_c.html
:param r: Distance of the point from the origin.
:type r: float
:param colat: Angle of the point from positive z axis (radians).
:type colat: float
:param lons: Angle of the point from the XZ plane (radians).
:type lons: float
:return:
Distance of a point from the origin,
Angle of the point from the XZ plane in radians,
Angle of the point from the XY plane in radians.
:rtype: tuple
"""
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
|
python
|
def sphlat(r, colat, lons):
"""
Convert from spherical coordinates to latitudinal coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sphlat_c.html
:param r: Distance of the point from the origin.
:type r: float
:param colat: Angle of the point from positive z axis (radians).
:type colat: float
:param lons: Angle of the point from the XZ plane (radians).
:type lons: float
:return:
Distance of a point from the origin,
Angle of the point from the XZ plane in radians,
Angle of the point from the XY plane in radians.
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sphlat_c.html
:param r: Distance of the point from the origin.
:type r: float
:param colat: Angle of the point from positive z axis (radians).
:type colat: float
:param lons: Angle of the point from the XZ plane (radians).
:type lons: float
:return:
Distance of a point from the origin,
Angle of the point from the XZ plane in radians,
Angle of the point from the XY plane in radians.
:rtype: tuple
|
[
"Convert",
"from",
"spherical",
"coordinates",
"to",
"latitudinal",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11346-L11372
|
14,896
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
sphrec
|
def sphrec(r, colat, lon):
"""
Convert from spherical coordinates to rectangular coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sphrec_c.html
:param r: Distance of a point from the origin.
:type r: float
:param colat: Angle of the point from the positive Z-axis.
:type colat: float
:param lon: Angle of the point from the XZ plane in radians.
:type lon: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
"""
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)
|
python
|
def sphrec(r, colat, lon):
"""
Convert from spherical coordinates to rectangular coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sphrec_c.html
:param r: Distance of a point from the origin.
:type r: float
:param colat: Angle of the point from the positive Z-axis.
:type colat: float
:param lon: Angle of the point from the XZ plane in radians.
:type lon: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
"""
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)
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sphrec_c.html
:param r: Distance of a point from the origin.
:type r: float
:param colat: Angle of the point from the positive Z-axis.
:type colat: float
:param lon: Angle of the point from the XZ plane in radians.
:type lon: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
|
[
"Convert",
"from",
"spherical",
"coordinates",
"to",
"rectangular",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11376-L11396
|
14,897
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkapo
|
def spkapo(targ, et, ref, sobs, abcorr):
"""
Return the position of a target body relative to an observer,
optionally corrected for light time and stellar aberration.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkapo_c.html
:param targ: Target body.
:type targ: int
:param et: Observer epoch.
:type et: float
:param ref: Inertial reference frame of observer's state.
:type ref: str
:param sobs: State of observer wrt. solar system barycenter.
:type sobs: 6-Element Array of floats
:param abcorr: Aberration correction flag.
:type abcorr: str
:return:
Position of target,
One way light time between observer and target.
:rtype: tuple
"""
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
|
python
|
def spkapo(targ, et, ref, sobs, abcorr):
"""
Return the position of a target body relative to an observer,
optionally corrected for light time and stellar aberration.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkapo_c.html
:param targ: Target body.
:type targ: int
:param et: Observer epoch.
:type et: float
:param ref: Inertial reference frame of observer's state.
:type ref: str
:param sobs: State of observer wrt. solar system barycenter.
:type sobs: 6-Element Array of floats
:param abcorr: Aberration correction flag.
:type abcorr: str
:return:
Position of target,
One way light time between observer and target.
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkapo_c.html
:param targ: Target body.
:type targ: int
:param et: Observer epoch.
:type et: float
:param ref: Inertial reference frame of observer's state.
:type ref: str
:param sobs: State of observer wrt. solar system barycenter.
:type sobs: 6-Element Array of floats
:param abcorr: Aberration correction flag.
:type abcorr: str
:return:
Position of target,
One way light time between observer and target.
:rtype: tuple
|
[
"Return",
"the",
"position",
"of",
"a",
"target",
"body",
"relative",
"to",
"an",
"observer",
"optionally",
"corrected",
"for",
"light",
"time",
"and",
"stellar",
"aberration",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11439-L11469
|
14,898
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkcov
|
def spkcov(spk, idcode, cover=None):
"""
Find the coverage window for a specified ephemeris object in a
specified SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcov_c.html
:param spk: Name of SPK file.
:type spk: str
:param idcode: ID code of ephemeris object.
:type idcode: int
:param cover: Optional SPICE Window giving coverage in "spk" for "idcode".
:type cover: spiceypy.utils.support_types.SpiceCell
"""
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
|
python
|
def spkcov(spk, idcode, cover=None):
"""
Find the coverage window for a specified ephemeris object in a
specified SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcov_c.html
:param spk: Name of SPK file.
:type spk: str
:param idcode: ID code of ephemeris object.
:type idcode: int
:param cover: Optional SPICE Window giving coverage in "spk" for "idcode".
:type cover: spiceypy.utils.support_types.SpiceCell
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcov_c.html
:param spk: Name of SPK file.
:type spk: str
:param idcode: ID code of ephemeris object.
:type idcode: int
:param cover: Optional SPICE Window giving coverage in "spk" for "idcode".
:type cover: spiceypy.utils.support_types.SpiceCell
|
[
"Find",
"the",
"coverage",
"window",
"for",
"a",
"specified",
"ephemeris",
"object",
"in",
"a",
"specified",
"SPK",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11648-L11670
|
14,899
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkcpo
|
def spkcpo(target, et, outref, refloc, abcorr, obspos, obsctr, obsref):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcpo_c.html
:param target: Name of target ephemeris object.
:type target: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obspos: Observer position relative to center of motion.
:type obspos: 3-Element Array of floats
:param obsctr: Center of motion of observer.
:type obsctr: str
:param obsref: Frame of observer position.
:type obsref: str
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
"""
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
|
python
|
def spkcpo(target, et, outref, refloc, abcorr, obspos, obsctr, obsref):
"""
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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcpo_c.html
:param target: Name of target ephemeris object.
:type target: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obspos: Observer position relative to center of motion.
:type obspos: 3-Element Array of floats
:param obsctr: Center of motion of observer.
:type obsctr: str
:param obsref: Frame of observer position.
:type obsref: str
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
"""
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
|
[
"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.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcpo_c.html
:param target: Name of target ephemeris object.
:type target: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obspos: Observer position relative to center of motion.
:type obspos: 3-Element Array of floats
:param obsctr: Center of motion of observer.
:type obsctr: str
:param obsref: Frame of observer position.
:type obsref: str
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
|
[
"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",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11674-L11716
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.