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
sequence
docstring
stringlengths
3
17.3k
docstring_tokens
sequence
sha
stringlengths
40
40
url
stringlengths
87
242
partition
stringclasses
1 value
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkcpt
def spkcpt(trgpos, trgctr, trgref, et, outref, refloc, abcorr, obsrvr): """ Return the state, relative to a specified observer, of a target having constant position in a specified reference frame. The target's position is provided by the calling program rather than by loaded SPK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcpt_c.html :param trgpos: Target position relative to center of motion. :type trgpos: 3-Element Array of floats :param trgctr: Center of motion of target. :type trgctr: str :param trgref: Observation epoch. :type trgref: 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 obsrvr: Name of observing ephemeris object. :return: State of target with respect to observer, One way light time between target and observer. :rtype: tuple """ trgpos = stypes.toDoubleVector(trgpos) trgctr = stypes.stringToCharP(trgctr) trgref = stypes.stringToCharP(trgref) et = ctypes.c_double(et) outref = stypes.stringToCharP(outref) refloc = stypes.stringToCharP(refloc) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) state = stypes.emptyDoubleVector(6) lt = ctypes.c_double() libspice.spkcpt_c(trgpos, trgctr, trgref, et, outref, refloc, abcorr, obsrvr, state, ctypes.byref(lt)) return stypes.cVectorToPython(state), lt.value
python
def spkcpt(trgpos, trgctr, trgref, et, outref, refloc, abcorr, obsrvr): """ Return the state, relative to a specified observer, of a target having constant position in a specified reference frame. The target's position is provided by the calling program rather than by loaded SPK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcpt_c.html :param trgpos: Target position relative to center of motion. :type trgpos: 3-Element Array of floats :param trgctr: Center of motion of target. :type trgctr: str :param trgref: Observation epoch. :type trgref: 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 obsrvr: Name of observing ephemeris object. :return: State of target with respect to observer, One way light time between target and observer. :rtype: tuple """ trgpos = stypes.toDoubleVector(trgpos) trgctr = stypes.stringToCharP(trgctr) trgref = stypes.stringToCharP(trgref) et = ctypes.c_double(et) outref = stypes.stringToCharP(outref) refloc = stypes.stringToCharP(refloc) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) state = stypes.emptyDoubleVector(6) lt = ctypes.c_double() libspice.spkcpt_c(trgpos, trgctr, trgref, et, outref, refloc, abcorr, obsrvr, state, ctypes.byref(lt)) return stypes.cVectorToPython(state), lt.value
[ "def", "spkcpt", "(", "trgpos", ",", "trgctr", ",", "trgref", ",", "et", ",", "outref", ",", "refloc", ",", "abcorr", ",", "obsrvr", ")", ":", "trgpos", "=", "stypes", ".", "toDoubleVector", "(", "trgpos", ")", "trgctr", "=", "stypes", ".", "stringToCharP", "(", "trgctr", ")", "trgref", "=", "stypes", ".", "stringToCharP", "(", "trgref", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "outref", "=", "stypes", ".", "stringToCharP", "(", "outref", ")", "refloc", "=", "stypes", ".", "stringToCharP", "(", "refloc", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "state", "=", "stypes", ".", "emptyDoubleVector", "(", "6", ")", "lt", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "spkcpt_c", "(", "trgpos", ",", "trgctr", ",", "trgref", ",", "et", ",", "outref", ",", "refloc", ",", "abcorr", ",", "obsrvr", ",", "state", ",", "ctypes", ".", "byref", "(", "lt", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "state", ")", ",", "lt", ".", "value" ]
Return the state, relative to a specified observer, of a target having constant position in a specified reference frame. The target's position is provided by the calling program rather than by loaded SPK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcpt_c.html :param trgpos: Target position relative to center of motion. :type trgpos: 3-Element Array of floats :param trgctr: Center of motion of target. :type trgctr: str :param trgref: Observation epoch. :type trgref: 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 obsrvr: Name of observing ephemeris object. :return: State of target with respect to observer, One way light time between target and observer. :rtype: tuple
[ "Return", "the", "state", "relative", "to", "a", "specified", "observer", "of", "a", "target", "having", "constant", "position", "in", "a", "specified", "reference", "frame", ".", "The", "target", "s", "position", "is", "provided", "by", "the", "calling", "program", "rather", "than", "by", "loaded", "SPK", "files", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11720-L11761
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkcvo
def spkcvo(target, et, outref, refloc, abcorr, obssta, obsepc, obsctr, obsref): """ Return the state of a specified target relative to an "observer," where the observer has constant velocity in a specified reference frame. The observer's state is provided by the calling program rather than by loaded SPK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvo_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 obssta: Observer state relative to center of motion. :type obssta: 6-Element Array of floats :param obsepc: Epoch of observer state. :type obsepc: float :param obsctr: Center of motion of observer. :type obsctr: str :param obsref: Frame of observer state. :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) obssta = stypes.toDoubleVector(obssta) obsepc = ctypes.c_double(obsepc) obsctr = stypes.stringToCharP(obsctr) obsref = stypes.stringToCharP(obsref) state = stypes.emptyDoubleVector(6) lt = ctypes.c_double() libspice.spkcvo_c(target, et, outref, refloc, abcorr, obssta, obsepc, obsctr, obsref, state, ctypes.byref(lt)) return stypes.cVectorToPython(state), lt.value
python
def spkcvo(target, et, outref, refloc, abcorr, obssta, obsepc, obsctr, obsref): """ Return the state of a specified target relative to an "observer," where the observer has constant velocity in a specified reference frame. The observer's state is provided by the calling program rather than by loaded SPK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvo_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 obssta: Observer state relative to center of motion. :type obssta: 6-Element Array of floats :param obsepc: Epoch of observer state. :type obsepc: float :param obsctr: Center of motion of observer. :type obsctr: str :param obsref: Frame of observer state. :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) obssta = stypes.toDoubleVector(obssta) obsepc = ctypes.c_double(obsepc) obsctr = stypes.stringToCharP(obsctr) obsref = stypes.stringToCharP(obsref) state = stypes.emptyDoubleVector(6) lt = ctypes.c_double() libspice.spkcvo_c(target, et, outref, refloc, abcorr, obssta, obsepc, obsctr, obsref, state, ctypes.byref(lt)) return stypes.cVectorToPython(state), lt.value
[ "def", "spkcvo", "(", "target", ",", "et", ",", "outref", ",", "refloc", ",", "abcorr", ",", "obssta", ",", "obsepc", ",", "obsctr", ",", "obsref", ")", ":", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "outref", "=", "stypes", ".", "stringToCharP", "(", "outref", ")", "refloc", "=", "stypes", ".", "stringToCharP", "(", "refloc", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obssta", "=", "stypes", ".", "toDoubleVector", "(", "obssta", ")", "obsepc", "=", "ctypes", ".", "c_double", "(", "obsepc", ")", "obsctr", "=", "stypes", ".", "stringToCharP", "(", "obsctr", ")", "obsref", "=", "stypes", ".", "stringToCharP", "(", "obsref", ")", "state", "=", "stypes", ".", "emptyDoubleVector", "(", "6", ")", "lt", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "spkcvo_c", "(", "target", ",", "et", ",", "outref", ",", "refloc", ",", "abcorr", ",", "obssta", ",", "obsepc", ",", "obsctr", ",", "obsref", ",", "state", ",", "ctypes", ".", "byref", "(", "lt", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "state", ")", ",", "lt", ".", "value" ]
Return the state of a specified target relative to an "observer," where the observer has constant velocity in a specified reference frame. The observer's state is provided by the calling program rather than by loaded SPK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvo_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 obssta: Observer state relative to center of motion. :type obssta: 6-Element Array of floats :param obsepc: Epoch of observer state. :type obsepc: float :param obsctr: Center of motion of observer. :type obsctr: str :param obsref: Frame of observer state. :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", "velocity", "in", "a", "specified", "reference", "frame", ".", "The", "observer", "s", "state", "is", "provided", "by", "the", "calling", "program", "rather", "than", "by", "loaded", "SPK", "files", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11765-L11810
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkcvt
def spkcvt(trgsta, trgepc, trgctr, trgref, et, outref, refloc, abcorr, obsrvr): """ Return the state, relative to a specified observer, of a target having constant velocity in a specified reference frame. The target's state is provided by the calling program rather than by loaded SPK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvt_c.html :param trgsta: Target state relative to center of motion. :type trgsta: 6-Element Array of floats :param trgepc: Epoch of target state. :type trgepc: float :param trgctr: Center of motion of target. :type trgctr: str :param trgref: Frame of target state. :type trgref: 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 obsrvr: Name of observing ephemeris object. :type obsrvr: str :return: State of target with respect to observer, One way light time between target and observer. :rtype: tuple """ trgpos = stypes.toDoubleVector(trgsta) trgepc = ctypes.c_double(trgepc) trgctr = stypes.stringToCharP(trgctr) trgref = stypes.stringToCharP(trgref) et = ctypes.c_double(et) outref = stypes.stringToCharP(outref) refloc = stypes.stringToCharP(refloc) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) state = stypes.emptyDoubleVector(6) lt = ctypes.c_double() libspice.spkcvt_c(trgpos, trgepc, trgctr, trgref, et, outref, refloc, abcorr, obsrvr, state, ctypes.byref(lt)) return stypes.cVectorToPython(state), lt.value
python
def spkcvt(trgsta, trgepc, trgctr, trgref, et, outref, refloc, abcorr, obsrvr): """ Return the state, relative to a specified observer, of a target having constant velocity in a specified reference frame. The target's state is provided by the calling program rather than by loaded SPK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvt_c.html :param trgsta: Target state relative to center of motion. :type trgsta: 6-Element Array of floats :param trgepc: Epoch of target state. :type trgepc: float :param trgctr: Center of motion of target. :type trgctr: str :param trgref: Frame of target state. :type trgref: 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 obsrvr: Name of observing ephemeris object. :type obsrvr: str :return: State of target with respect to observer, One way light time between target and observer. :rtype: tuple """ trgpos = stypes.toDoubleVector(trgsta) trgepc = ctypes.c_double(trgepc) trgctr = stypes.stringToCharP(trgctr) trgref = stypes.stringToCharP(trgref) et = ctypes.c_double(et) outref = stypes.stringToCharP(outref) refloc = stypes.stringToCharP(refloc) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) state = stypes.emptyDoubleVector(6) lt = ctypes.c_double() libspice.spkcvt_c(trgpos, trgepc, trgctr, trgref, et, outref, refloc, abcorr, obsrvr, state, ctypes.byref(lt)) return stypes.cVectorToPython(state), lt.value
[ "def", "spkcvt", "(", "trgsta", ",", "trgepc", ",", "trgctr", ",", "trgref", ",", "et", ",", "outref", ",", "refloc", ",", "abcorr", ",", "obsrvr", ")", ":", "trgpos", "=", "stypes", ".", "toDoubleVector", "(", "trgsta", ")", "trgepc", "=", "ctypes", ".", "c_double", "(", "trgepc", ")", "trgctr", "=", "stypes", ".", "stringToCharP", "(", "trgctr", ")", "trgref", "=", "stypes", ".", "stringToCharP", "(", "trgref", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "outref", "=", "stypes", ".", "stringToCharP", "(", "outref", ")", "refloc", "=", "stypes", ".", "stringToCharP", "(", "refloc", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "state", "=", "stypes", ".", "emptyDoubleVector", "(", "6", ")", "lt", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "spkcvt_c", "(", "trgpos", ",", "trgepc", ",", "trgctr", ",", "trgref", ",", "et", ",", "outref", ",", "refloc", ",", "abcorr", ",", "obsrvr", ",", "state", ",", "ctypes", ".", "byref", "(", "lt", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "state", ")", ",", "lt", ".", "value" ]
Return the state, relative to a specified observer, of a target having constant velocity in a specified reference frame. The target's state is provided by the calling program rather than by loaded SPK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvt_c.html :param trgsta: Target state relative to center of motion. :type trgsta: 6-Element Array of floats :param trgepc: Epoch of target state. :type trgepc: float :param trgctr: Center of motion of target. :type trgctr: str :param trgref: Frame of target state. :type trgref: 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 obsrvr: Name of observing ephemeris object. :type obsrvr: str :return: State of target with respect to observer, One way light time between target and observer. :rtype: tuple
[ "Return", "the", "state", "relative", "to", "a", "specified", "observer", "of", "a", "target", "having", "constant", "velocity", "in", "a", "specified", "reference", "frame", ".", "The", "target", "s", "state", "is", "provided", "by", "the", "calling", "program", "rather", "than", "by", "loaded", "SPK", "files", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11814-L11859
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkgps
def spkgps(targ, et, ref, obs): """ Compute the geometric position of a target body relative to an observing body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkgps_c.html :param targ: Target body. :type targ: int :param et: Target epoch. :type et: float :param ref: Target reference frame. :type ref: str :param obs: Observing body. :type obs: int :return: Position of target, Light time. :rtype: tuple """ targ = ctypes.c_int(targ) et = ctypes.c_double(et) ref = stypes.stringToCharP(ref) obs = ctypes.c_int(obs) position = stypes.emptyDoubleVector(3) lt = ctypes.c_double() libspice.spkgps_c(targ, et, ref, obs, position, ctypes.byref(lt)) return stypes.cVectorToPython(position), lt.value
python
def spkgps(targ, et, ref, obs): """ Compute the geometric position of a target body relative to an observing body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkgps_c.html :param targ: Target body. :type targ: int :param et: Target epoch. :type et: float :param ref: Target reference frame. :type ref: str :param obs: Observing body. :type obs: int :return: Position of target, Light time. :rtype: tuple """ targ = ctypes.c_int(targ) et = ctypes.c_double(et) ref = stypes.stringToCharP(ref) obs = ctypes.c_int(obs) position = stypes.emptyDoubleVector(3) lt = ctypes.c_double() libspice.spkgps_c(targ, et, ref, obs, position, ctypes.byref(lt)) return stypes.cVectorToPython(position), lt.value
[ "def", "spkgps", "(", "targ", ",", "et", ",", "ref", ",", "obs", ")", ":", "targ", "=", "ctypes", ".", "c_int", "(", "targ", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "ref", "=", "stypes", ".", "stringToCharP", "(", "ref", ")", "obs", "=", "ctypes", ".", "c_int", "(", "obs", ")", "position", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "lt", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "spkgps_c", "(", "targ", ",", "et", ",", "ref", ",", "obs", ",", "position", ",", "ctypes", ".", "byref", "(", "lt", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "position", ")", ",", "lt", ".", "value" ]
Compute the geometric position of a target body relative to an observing body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkgps_c.html :param targ: Target body. :type targ: int :param et: Target epoch. :type et: float :param ref: Target reference frame. :type ref: str :param obs: Observing body. :type obs: int :return: Position of target, Light time. :rtype: tuple
[ "Compute", "the", "geometric", "position", "of", "a", "target", "body", "relative", "to", "an", "observing", "body", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12005-L12030
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spklef
def spklef(filename): """ Load an ephemeris file for use by the readers. Return that file's handle, to be used by other SPK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spklef_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.spklef_c(filename, ctypes.byref(handle)) return handle.value
python
def spklef(filename): """ Load an ephemeris file for use by the readers. Return that file's handle, to be used by other SPK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spklef_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.spklef_c(filename, ctypes.byref(handle)) return handle.value
[ "def", "spklef", "(", "filename", ")", ":", "filename", "=", "stypes", ".", "stringToCharP", "(", "filename", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "spklef_c", "(", "filename", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Load an ephemeris file for use by the readers. Return that file's handle, to be used by other SPK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spklef_c.html :param filename: Name of the file to be loaded. :type filename: str :return: Loaded file's handle. :rtype: int
[ "Load", "an", "ephemeris", "file", "for", "use", "by", "the", "readers", ".", "Return", "that", "file", "s", "handle", "to", "be", "used", "by", "other", "SPK", "routines", "to", "refer", "to", "the", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12034-L12049
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkobj
def spkobj(spk, outCell=None): """ Find the set of ID codes of all objects in a specified SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkobj_c.html :param spk: Name of SPK file. :type spk: str :param outCell: Optional Spice Int Cell. :type outCell: spiceypy.utils.support_types.SpiceCell """ spk = stypes.stringToCharP(spk) if not outCell: outCell = stypes.SPICEINT_CELL(1000) assert isinstance(outCell, stypes.SpiceCell) assert outCell.dtype == 2 libspice.spkobj_c(spk, ctypes.byref(outCell)) return outCell
python
def spkobj(spk, outCell=None): """ Find the set of ID codes of all objects in a specified SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkobj_c.html :param spk: Name of SPK file. :type spk: str :param outCell: Optional Spice Int Cell. :type outCell: spiceypy.utils.support_types.SpiceCell """ spk = stypes.stringToCharP(spk) if not outCell: outCell = stypes.SPICEINT_CELL(1000) assert isinstance(outCell, stypes.SpiceCell) assert outCell.dtype == 2 libspice.spkobj_c(spk, ctypes.byref(outCell)) return outCell
[ "def", "spkobj", "(", "spk", ",", "outCell", "=", "None", ")", ":", "spk", "=", "stypes", ".", "stringToCharP", "(", "spk", ")", "if", "not", "outCell", ":", "outCell", "=", "stypes", ".", "SPICEINT_CELL", "(", "1000", ")", "assert", "isinstance", "(", "outCell", ",", "stypes", ".", "SpiceCell", ")", "assert", "outCell", ".", "dtype", "==", "2", "libspice", ".", "spkobj_c", "(", "spk", ",", "ctypes", ".", "byref", "(", "outCell", ")", ")", "return", "outCell" ]
Find the set of ID codes of all objects in a specified SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkobj_c.html :param spk: Name of SPK file. :type spk: str :param outCell: Optional Spice Int Cell. :type outCell: spiceypy.utils.support_types.SpiceCell
[ "Find", "the", "set", "of", "ID", "codes", "of", "all", "objects", "in", "a", "specified", "SPK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12091-L12108
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkopa
def spkopa(filename): """ Open an existing SPK file for subsequent write. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopa_c.html :param filename: The name of an existing SPK file. :type filename: str :return: A handle attached to the SPK file opened to append. :rtype: int """ filename = stypes.stringToCharP(filename) handle = ctypes.c_int() libspice.spkopa_c(filename, ctypes.byref(handle)) return handle.value
python
def spkopa(filename): """ Open an existing SPK file for subsequent write. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopa_c.html :param filename: The name of an existing SPK file. :type filename: str :return: A handle attached to the SPK file opened to append. :rtype: int """ filename = stypes.stringToCharP(filename) handle = ctypes.c_int() libspice.spkopa_c(filename, ctypes.byref(handle)) return handle.value
[ "def", "spkopa", "(", "filename", ")", ":", "filename", "=", "stypes", ".", "stringToCharP", "(", "filename", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "spkopa_c", "(", "filename", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Open an existing SPK file for subsequent write. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopa_c.html :param filename: The name of an existing SPK file. :type filename: str :return: A handle attached to the SPK file opened to append. :rtype: int
[ "Open", "an", "existing", "SPK", "file", "for", "subsequent", "write", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12112-L12126
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkopn
def spkopn(filename, ifname, ncomch): """ Create a new SPK file, returning the handle of the opened file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopn_c.html :param filename: The name of the new SPK file to be created. :type filename: str :param ifname: The internal filename for the SPK file. :type ifname: str :param ncomch: The number of characters to reserve for comments. :type ncomch: int :return: The handle of the opened SPK file. :rtype: int """ filename = stypes.stringToCharP(filename) ifname = stypes.stringToCharP(ifname) ncomch = ctypes.c_int(ncomch) handle = ctypes.c_int() libspice.spkopn_c(filename, ifname, ncomch, ctypes.byref(handle)) return handle.value
python
def spkopn(filename, ifname, ncomch): """ Create a new SPK file, returning the handle of the opened file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopn_c.html :param filename: The name of the new SPK file to be created. :type filename: str :param ifname: The internal filename for the SPK file. :type ifname: str :param ncomch: The number of characters to reserve for comments. :type ncomch: int :return: The handle of the opened SPK file. :rtype: int """ filename = stypes.stringToCharP(filename) ifname = stypes.stringToCharP(ifname) ncomch = ctypes.c_int(ncomch) handle = ctypes.c_int() libspice.spkopn_c(filename, ifname, ncomch, ctypes.byref(handle)) return handle.value
[ "def", "spkopn", "(", "filename", ",", "ifname", ",", "ncomch", ")", ":", "filename", "=", "stypes", ".", "stringToCharP", "(", "filename", ")", "ifname", "=", "stypes", ".", "stringToCharP", "(", "ifname", ")", "ncomch", "=", "ctypes", ".", "c_int", "(", "ncomch", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "spkopn_c", "(", "filename", ",", "ifname", ",", "ncomch", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Create a new SPK file, returning the handle of the opened file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopn_c.html :param filename: The name of the new SPK file to be created. :type filename: str :param ifname: The internal filename for the SPK file. :type ifname: str :param ncomch: The number of characters to reserve for comments. :type ncomch: int :return: The handle of the opened SPK file. :rtype: int
[ "Create", "a", "new", "SPK", "file", "returning", "the", "handle", "of", "the", "opened", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12130-L12150
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkpds
def spkpds(body, center, framestr, typenum, first, last): """ Perform routine error checks and if all check pass, pack the descriptor for an SPK segment http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkpds_c.html :param body: The NAIF ID code for the body of the segment. :type body: int :param center: The center of motion for body. :type center: int :param framestr: The frame for this segment. :type framestr: str :param typenum: The type of SPK segment to create. :type typenum: int :param first: The first epoch for which the segment is valid. :type first: float :param last: The last epoch for which the segment is valid. :type last: float :return: An SPK segment descriptor. :rtype: 5-Element Array of floats """ body = ctypes.c_int(body) center = ctypes.c_int(center) framestr = stypes.stringToCharP(framestr) typenum = ctypes.c_int(typenum) first = ctypes.c_double(first) last = ctypes.c_double(last) descr = stypes.emptyDoubleVector(5) libspice.spkpds_c(body, center, framestr, typenum, first, last, descr) return stypes.cVectorToPython(descr)
python
def spkpds(body, center, framestr, typenum, first, last): """ Perform routine error checks and if all check pass, pack the descriptor for an SPK segment http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkpds_c.html :param body: The NAIF ID code for the body of the segment. :type body: int :param center: The center of motion for body. :type center: int :param framestr: The frame for this segment. :type framestr: str :param typenum: The type of SPK segment to create. :type typenum: int :param first: The first epoch for which the segment is valid. :type first: float :param last: The last epoch for which the segment is valid. :type last: float :return: An SPK segment descriptor. :rtype: 5-Element Array of floats """ body = ctypes.c_int(body) center = ctypes.c_int(center) framestr = stypes.stringToCharP(framestr) typenum = ctypes.c_int(typenum) first = ctypes.c_double(first) last = ctypes.c_double(last) descr = stypes.emptyDoubleVector(5) libspice.spkpds_c(body, center, framestr, typenum, first, last, descr) return stypes.cVectorToPython(descr)
[ "def", "spkpds", "(", "body", ",", "center", ",", "framestr", ",", "typenum", ",", "first", ",", "last", ")", ":", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "framestr", "=", "stypes", ".", "stringToCharP", "(", "framestr", ")", "typenum", "=", "ctypes", ".", "c_int", "(", "typenum", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "descr", "=", "stypes", ".", "emptyDoubleVector", "(", "5", ")", "libspice", ".", "spkpds_c", "(", "body", ",", "center", ",", "framestr", ",", "typenum", ",", "first", ",", "last", ",", "descr", ")", "return", "stypes", ".", "cVectorToPython", "(", "descr", ")" ]
Perform routine error checks and if all check pass, pack the descriptor for an SPK segment http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkpds_c.html :param body: The NAIF ID code for the body of the segment. :type body: int :param center: The center of motion for body. :type center: int :param framestr: The frame for this segment. :type framestr: str :param typenum: The type of SPK segment to create. :type typenum: int :param first: The first epoch for which the segment is valid. :type first: float :param last: The last epoch for which the segment is valid. :type last: float :return: An SPK segment descriptor. :rtype: 5-Element Array of floats
[ "Perform", "routine", "error", "checks", "and", "if", "all", "check", "pass", "pack", "the", "descriptor", "for", "an", "SPK", "segment" ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12154-L12184
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spksfs
def spksfs(body, et, idlen): # spksfs has a Parameter SIDLEN, # sounds like an optional but is that possible? """ Search through loaded SPK files to find the highest-priority segment applicable to the body and time specified. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksfs_c.html :param body: Body ID. :type body: int :param et: Ephemeris time. :type et: float :param idlen: Length of output segment ID string. :type idlen: int :return: Handle of file containing the applicable segment, Descriptor of the applicable segment, Identifier of the applicable segment. :rtype: tuple """ body = ctypes.c_int(body) et = ctypes.c_double(et) idlen = ctypes.c_int(idlen) handle = ctypes.c_int() descr = stypes.emptyDoubleVector(5) identstring = stypes.stringToCharP(idlen) found = ctypes.c_int() libspice.spksfs_c(body, et, idlen, ctypes.byref(handle), descr, identstring, ctypes.byref(found)) return handle.value, stypes.cVectorToPython(descr), \ stypes.toPythonString(identstring), bool(found.value)
python
def spksfs(body, et, idlen): # spksfs has a Parameter SIDLEN, # sounds like an optional but is that possible? """ Search through loaded SPK files to find the highest-priority segment applicable to the body and time specified. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksfs_c.html :param body: Body ID. :type body: int :param et: Ephemeris time. :type et: float :param idlen: Length of output segment ID string. :type idlen: int :return: Handle of file containing the applicable segment, Descriptor of the applicable segment, Identifier of the applicable segment. :rtype: tuple """ body = ctypes.c_int(body) et = ctypes.c_double(et) idlen = ctypes.c_int(idlen) handle = ctypes.c_int() descr = stypes.emptyDoubleVector(5) identstring = stypes.stringToCharP(idlen) found = ctypes.c_int() libspice.spksfs_c(body, et, idlen, ctypes.byref(handle), descr, identstring, ctypes.byref(found)) return handle.value, stypes.cVectorToPython(descr), \ stypes.toPythonString(identstring), bool(found.value)
[ "def", "spksfs", "(", "body", ",", "et", ",", "idlen", ")", ":", "# spksfs has a Parameter SIDLEN,", "# sounds like an optional but is that possible?", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "idlen", "=", "ctypes", ".", "c_int", "(", "idlen", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "descr", "=", "stypes", ".", "emptyDoubleVector", "(", "5", ")", "identstring", "=", "stypes", ".", "stringToCharP", "(", "idlen", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "spksfs_c", "(", "body", ",", "et", ",", "idlen", ",", "ctypes", ".", "byref", "(", "handle", ")", ",", "descr", ",", "identstring", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "handle", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "descr", ")", ",", "stypes", ".", "toPythonString", "(", "identstring", ")", ",", "bool", "(", "found", ".", "value", ")" ]
Search through loaded SPK files to find the highest-priority segment applicable to the body and time specified. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksfs_c.html :param body: Body ID. :type body: int :param et: Ephemeris time. :type et: float :param idlen: Length of output segment ID string. :type idlen: int :return: Handle of file containing the applicable segment, Descriptor of the applicable segment, Identifier of the applicable segment. :rtype: tuple
[ "Search", "through", "loaded", "SPK", "files", "to", "find", "the", "highest", "-", "priority", "segment", "applicable", "to", "the", "body", "and", "time", "specified", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12265-L12296
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spksub
def spksub(handle, descr, identin, begin, end, newh): """ Extract a subset of the data in an SPK segment into a separate segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksub_c.html :param handle: Handle of source segment. :type handle: int :param descr: Descriptor of source segment. :type descr: 5-Element Array of floats :param identin: Indentifier of source segment. :type identin: str :param begin: Beginning (initial epoch) of subset. :type begin: int :param end: End (fincal epoch) of subset. :type end: int :param newh: Handle of new segment. :type newh: int """ assert len(descr) is 5 handle = ctypes.c_int(handle) descr = stypes.toDoubleVector(descr) identin = stypes.stringToCharP(identin) begin = ctypes.c_double(begin) end = ctypes.c_double(end) newh = ctypes.c_int(newh) libspice.spksub_c(handle, descr, identin, begin, end, newh)
python
def spksub(handle, descr, identin, begin, end, newh): """ Extract a subset of the data in an SPK segment into a separate segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksub_c.html :param handle: Handle of source segment. :type handle: int :param descr: Descriptor of source segment. :type descr: 5-Element Array of floats :param identin: Indentifier of source segment. :type identin: str :param begin: Beginning (initial epoch) of subset. :type begin: int :param end: End (fincal epoch) of subset. :type end: int :param newh: Handle of new segment. :type newh: int """ assert len(descr) is 5 handle = ctypes.c_int(handle) descr = stypes.toDoubleVector(descr) identin = stypes.stringToCharP(identin) begin = ctypes.c_double(begin) end = ctypes.c_double(end) newh = ctypes.c_int(newh) libspice.spksub_c(handle, descr, identin, begin, end, newh)
[ "def", "spksub", "(", "handle", ",", "descr", ",", "identin", ",", "begin", ",", "end", ",", "newh", ")", ":", "assert", "len", "(", "descr", ")", "is", "5", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "descr", "=", "stypes", ".", "toDoubleVector", "(", "descr", ")", "identin", "=", "stypes", ".", "stringToCharP", "(", "identin", ")", "begin", "=", "ctypes", ".", "c_double", "(", "begin", ")", "end", "=", "ctypes", ".", "c_double", "(", "end", ")", "newh", "=", "ctypes", ".", "c_int", "(", "newh", ")", "libspice", ".", "spksub_c", "(", "handle", ",", "descr", ",", "identin", ",", "begin", ",", "end", ",", "newh", ")" ]
Extract a subset of the data in an SPK segment into a separate segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksub_c.html :param handle: Handle of source segment. :type handle: int :param descr: Descriptor of source segment. :type descr: 5-Element Array of floats :param identin: Indentifier of source segment. :type identin: str :param begin: Beginning (initial epoch) of subset. :type begin: int :param end: End (fincal epoch) of subset. :type end: int :param newh: Handle of new segment. :type newh: int
[ "Extract", "a", "subset", "of", "the", "data", "in", "an", "SPK", "segment", "into", "a", "separate", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12325-L12352
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkuds
def spkuds(descr): """ Unpack the contents of an SPK segment descriptor. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkuds_c.html :param descr: An SPK segment descriptor. :type descr: 5-Element Array of floats :return: The NAIF ID code for the body of the segment, The center of motion for body, The ID code for the frame of this segment, The type of SPK segment, The first epoch for which the segment is valid, The last epoch for which the segment is valid, Beginning DAF address of the segment, Ending DAF address of the segment. :rtype: tuple """ assert len(descr) is 5 descr = stypes.toDoubleVector(descr) body = ctypes.c_int() center = ctypes.c_int() framenum = ctypes.c_int() typenum = ctypes.c_int() first = ctypes.c_double() last = ctypes.c_double() begin = ctypes.c_int() end = ctypes.c_int() libspice.spkuds_c(descr, ctypes.byref(body), ctypes.byref(center), ctypes.byref(framenum), ctypes.byref(typenum), ctypes.byref(first), ctypes.byref(last), ctypes.byref(begin), ctypes.byref(end)) return body.value, center.value, framenum.value, typenum.value, \ first.value, last.value, begin.value, end.value
python
def spkuds(descr): """ Unpack the contents of an SPK segment descriptor. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkuds_c.html :param descr: An SPK segment descriptor. :type descr: 5-Element Array of floats :return: The NAIF ID code for the body of the segment, The center of motion for body, The ID code for the frame of this segment, The type of SPK segment, The first epoch for which the segment is valid, The last epoch for which the segment is valid, Beginning DAF address of the segment, Ending DAF address of the segment. :rtype: tuple """ assert len(descr) is 5 descr = stypes.toDoubleVector(descr) body = ctypes.c_int() center = ctypes.c_int() framenum = ctypes.c_int() typenum = ctypes.c_int() first = ctypes.c_double() last = ctypes.c_double() begin = ctypes.c_int() end = ctypes.c_int() libspice.spkuds_c(descr, ctypes.byref(body), ctypes.byref(center), ctypes.byref(framenum), ctypes.byref(typenum), ctypes.byref(first), ctypes.byref(last), ctypes.byref(begin), ctypes.byref(end)) return body.value, center.value, framenum.value, typenum.value, \ first.value, last.value, begin.value, end.value
[ "def", "spkuds", "(", "descr", ")", ":", "assert", "len", "(", "descr", ")", "is", "5", "descr", "=", "stypes", ".", "toDoubleVector", "(", "descr", ")", "body", "=", "ctypes", ".", "c_int", "(", ")", "center", "=", "ctypes", ".", "c_int", "(", ")", "framenum", "=", "ctypes", ".", "c_int", "(", ")", "typenum", "=", "ctypes", ".", "c_int", "(", ")", "first", "=", "ctypes", ".", "c_double", "(", ")", "last", "=", "ctypes", ".", "c_double", "(", ")", "begin", "=", "ctypes", ".", "c_int", "(", ")", "end", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "spkuds_c", "(", "descr", ",", "ctypes", ".", "byref", "(", "body", ")", ",", "ctypes", ".", "byref", "(", "center", ")", ",", "ctypes", ".", "byref", "(", "framenum", ")", ",", "ctypes", ".", "byref", "(", "typenum", ")", ",", "ctypes", ".", "byref", "(", "first", ")", ",", "ctypes", ".", "byref", "(", "last", ")", ",", "ctypes", ".", "byref", "(", "begin", ")", ",", "ctypes", ".", "byref", "(", "end", ")", ")", "return", "body", ".", "value", ",", "center", ".", "value", ",", "framenum", ".", "value", ",", "typenum", ".", "value", ",", "first", ".", "value", ",", "last", ".", "value", ",", "begin", ".", "value", ",", "end", ".", "value" ]
Unpack the contents of an SPK segment descriptor. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkuds_c.html :param descr: An SPK segment descriptor. :type descr: 5-Element Array of floats :return: The NAIF ID code for the body of the segment, The center of motion for body, The ID code for the frame of this segment, The type of SPK segment, The first epoch for which the segment is valid, The last epoch for which the segment is valid, Beginning DAF address of the segment, Ending DAF address of the segment. :rtype: tuple
[ "Unpack", "the", "contents", "of", "an", "SPK", "segment", "descriptor", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12356-L12390
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkw02
def spkw02(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, btime): """ Write a type 2 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw02_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param intlen: Length of time covered by logical record. :type intlen: float :param n: Number of coefficient sets. :type n: int :param polydg: Chebyshev polynomial degree. :type polydg: int :param cdata: Array of Chebyshev coefficients. :type cdata: Array of floats :param btime: Begin time of first logical record. :type btime: float """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) intlen = ctypes.c_double(intlen) n = ctypes.c_int(n) polydg = ctypes.c_int(polydg) cdata = stypes.toDoubleVector(cdata) btime = ctypes.c_double(btime) libspice.spkw02_c(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, btime)
python
def spkw02(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, btime): """ Write a type 2 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw02_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param intlen: Length of time covered by logical record. :type intlen: float :param n: Number of coefficient sets. :type n: int :param polydg: Chebyshev polynomial degree. :type polydg: int :param cdata: Array of Chebyshev coefficients. :type cdata: Array of floats :param btime: Begin time of first logical record. :type btime: float """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) intlen = ctypes.c_double(intlen) n = ctypes.c_int(n) polydg = ctypes.c_int(polydg) cdata = stypes.toDoubleVector(cdata) btime = ctypes.c_double(btime) libspice.spkw02_c(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, btime)
[ "def", "spkw02", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "intlen", ",", "n", ",", "polydg", ",", "cdata", ",", "btime", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "intlen", "=", "ctypes", ".", "c_double", "(", "intlen", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "polydg", "=", "ctypes", ".", "c_int", "(", "polydg", ")", "cdata", "=", "stypes", ".", "toDoubleVector", "(", "cdata", ")", "btime", "=", "ctypes", ".", "c_double", "(", "btime", ")", "libspice", ".", "spkw02_c", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "intlen", ",", "n", ",", "polydg", ",", "cdata", ",", "btime", ")" ]
Write a type 2 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw02_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param intlen: Length of time covered by logical record. :type intlen: float :param n: Number of coefficient sets. :type n: int :param polydg: Chebyshev polynomial degree. :type polydg: int :param cdata: Array of Chebyshev coefficients. :type cdata: Array of floats :param btime: Begin time of first logical record. :type btime: float
[ "Write", "a", "type", "2", "segment", "to", "an", "SPK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12409-L12454
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkw05
def spkw05(handle, body, center, inframe, first, last, segid, gm, n, states, epochs): # see libspice args for solution to array[][N] problem """ Write an SPK segment of type 5 given a time-ordered set of discrete states and epochs, and the gravitational parameter of a central body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw05_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param gm: Gravitational parameter of central body. :type gm: float :param n: Number of states and epochs. :type n: int :param states: States. :type states: Nx6-Element Array of floats :param epochs: Epochs. :type epochs: Array of floats """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) gm = ctypes.c_double(gm) n = ctypes.c_int(n) states = stypes.toDoubleMatrix(states) epochs = stypes.toDoubleVector(epochs) libspice.spkw05_c(handle, body, center, inframe, first, last, segid, gm, n, states, epochs)
python
def spkw05(handle, body, center, inframe, first, last, segid, gm, n, states, epochs): # see libspice args for solution to array[][N] problem """ Write an SPK segment of type 5 given a time-ordered set of discrete states and epochs, and the gravitational parameter of a central body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw05_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param gm: Gravitational parameter of central body. :type gm: float :param n: Number of states and epochs. :type n: int :param states: States. :type states: Nx6-Element Array of floats :param epochs: Epochs. :type epochs: Array of floats """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) gm = ctypes.c_double(gm) n = ctypes.c_int(n) states = stypes.toDoubleMatrix(states) epochs = stypes.toDoubleVector(epochs) libspice.spkw05_c(handle, body, center, inframe, first, last, segid, gm, n, states, epochs)
[ "def", "spkw05", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "gm", ",", "n", ",", "states", ",", "epochs", ")", ":", "# see libspice args for solution to array[][N] problem", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "gm", "=", "ctypes", ".", "c_double", "(", "gm", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "states", "=", "stypes", ".", "toDoubleMatrix", "(", "states", ")", "epochs", "=", "stypes", ".", "toDoubleVector", "(", "epochs", ")", "libspice", ".", "spkw05_c", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "gm", ",", "n", ",", "states", ",", "epochs", ")" ]
Write an SPK segment of type 5 given a time-ordered set of discrete states and epochs, and the gravitational parameter of a central body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw05_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param gm: Gravitational parameter of central body. :type gm: float :param n: Number of states and epochs. :type n: int :param states: States. :type states: Nx6-Element Array of floats :param epochs: Epochs. :type epochs: Array of floats
[ "Write", "an", "SPK", "segment", "of", "type", "5", "given", "a", "time", "-", "ordered", "set", "of", "discrete", "states", "and", "epochs", "and", "the", "gravitational", "parameter", "of", "a", "central", "body", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12507-L12552
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkw08
def spkw08(handle, body, center, inframe, first, last, segid, degree, n, states, epoch1, step): # see libspice args for solution to array[][N] problem """ Write a type 8 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw08_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: NAIF code for an ephemeris object. :type body: int :param center: NAIF code for center of motion of "body". :type center: int :param inframe: Reference frame name. :type inframe: str :param first: Start time of interval covered by segment. :type first: float :param last: End time of interval covered by segment. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param n: Number of states. :type n: int :param states: Array of states. :type states: Nx6-Element Array of floats :param epoch1: Epoch of first state in states array. :type epoch1: float :param step: Time step separating epochs of states. :type step: float """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) degree = ctypes.c_int(degree) n = ctypes.c_int(n) states = stypes.toDoubleMatrix(states) # X by 6 array epoch1 = ctypes.c_double(epoch1) step = ctypes.c_double(step) libspice.spkw08_c(handle, body, center, inframe, first, last, segid, degree, n, states, epoch1, step)
python
def spkw08(handle, body, center, inframe, first, last, segid, degree, n, states, epoch1, step): # see libspice args for solution to array[][N] problem """ Write a type 8 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw08_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: NAIF code for an ephemeris object. :type body: int :param center: NAIF code for center of motion of "body". :type center: int :param inframe: Reference frame name. :type inframe: str :param first: Start time of interval covered by segment. :type first: float :param last: End time of interval covered by segment. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param n: Number of states. :type n: int :param states: Array of states. :type states: Nx6-Element Array of floats :param epoch1: Epoch of first state in states array. :type epoch1: float :param step: Time step separating epochs of states. :type step: float """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) degree = ctypes.c_int(degree) n = ctypes.c_int(n) states = stypes.toDoubleMatrix(states) # X by 6 array epoch1 = ctypes.c_double(epoch1) step = ctypes.c_double(step) libspice.spkw08_c(handle, body, center, inframe, first, last, segid, degree, n, states, epoch1, step)
[ "def", "spkw08", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "degree", ",", "n", ",", "states", ",", "epoch1", ",", "step", ")", ":", "# see libspice args for solution to array[][N] problem", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "degree", "=", "ctypes", ".", "c_int", "(", "degree", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "states", "=", "stypes", ".", "toDoubleMatrix", "(", "states", ")", "# X by 6 array", "epoch1", "=", "ctypes", ".", "c_double", "(", "epoch1", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "libspice", ".", "spkw08_c", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "degree", ",", "n", ",", "states", ",", "epoch1", ",", "step", ")" ]
Write a type 8 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw08_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: NAIF code for an ephemeris object. :type body: int :param center: NAIF code for center of motion of "body". :type center: int :param inframe: Reference frame name. :type inframe: str :param first: Start time of interval covered by segment. :type first: float :param last: End time of interval covered by segment. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param n: Number of states. :type n: int :param states: Array of states. :type states: Nx6-Element Array of floats :param epoch1: Epoch of first state in states array. :type epoch1: float :param step: Time step separating epochs of states. :type step: float
[ "Write", "a", "type", "8", "segment", "to", "an", "SPK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12556-L12602
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkw09
def spkw09(handle, body, center, inframe, first, last, segid, degree, n, states, epochs): """ Write a type 9 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw09_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: NAIF code for an ephemeris object. :type body: int :param center: NAIF code for center of motion of "body". :type center: int :param inframe: Reference frame name. :type inframe: str :param first: Start time of interval covered by segment. :type first: float :param last: End time of interval covered by segment. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param n: Number of states. :type n: int :param states: Array of states. :type states: Nx6-Element Array of floats :param epochs: Array of epochs corresponding to states. :type epochs: Array of floats """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) degree = ctypes.c_int(degree) n = ctypes.c_int(n) states = stypes.toDoubleMatrix(states) # X by 6 array epochs = stypes.toDoubleVector(epochs) libspice.spkw09_c(handle, body, center, inframe, first, last, segid, degree, n, states, epochs)
python
def spkw09(handle, body, center, inframe, first, last, segid, degree, n, states, epochs): """ Write a type 9 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw09_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: NAIF code for an ephemeris object. :type body: int :param center: NAIF code for center of motion of "body". :type center: int :param inframe: Reference frame name. :type inframe: str :param first: Start time of interval covered by segment. :type first: float :param last: End time of interval covered by segment. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param n: Number of states. :type n: int :param states: Array of states. :type states: Nx6-Element Array of floats :param epochs: Array of epochs corresponding to states. :type epochs: Array of floats """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) degree = ctypes.c_int(degree) n = ctypes.c_int(n) states = stypes.toDoubleMatrix(states) # X by 6 array epochs = stypes.toDoubleVector(epochs) libspice.spkw09_c(handle, body, center, inframe, first, last, segid, degree, n, states, epochs)
[ "def", "spkw09", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "degree", ",", "n", ",", "states", ",", "epochs", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "degree", "=", "ctypes", ".", "c_int", "(", "degree", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "states", "=", "stypes", ".", "toDoubleMatrix", "(", "states", ")", "# X by 6 array", "epochs", "=", "stypes", ".", "toDoubleVector", "(", "epochs", ")", "libspice", ".", "spkw09_c", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "degree", ",", "n", ",", "states", ",", "epochs", ")" ]
Write a type 9 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw09_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: NAIF code for an ephemeris object. :type body: int :param center: NAIF code for center of motion of "body". :type center: int :param inframe: Reference frame name. :type inframe: str :param first: Start time of interval covered by segment. :type first: float :param last: End time of interval covered by segment. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param n: Number of states. :type n: int :param states: Array of states. :type states: Nx6-Element Array of floats :param epochs: Array of epochs corresponding to states. :type epochs: Array of floats
[ "Write", "a", "type", "9", "segment", "to", "an", "SPK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12606-L12648
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkw10
def spkw10(handle, body, center, inframe, first, last, segid, consts, n, elems, epochs): """ Write an SPK type 10 segment to the DAF open and attached to the input handle. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw10_c.html :param handle: The handle of a DAF file open for writing. :type handle: int :param body: The NAIF ID code for the body of the segment. :type body: int :param center: The center of motion for body. :type center: int :param inframe: The reference frame for this segment. :type inframe: str :param first: The first epoch for which the segment is valid. :type first: float :param last: The last epoch for which the segment is valid. :type last: float :param segid: The string to use for segment identifier. :type segid: str :param consts: The array of geophysical constants for the segment. :type consts: 8-Element Array of floats :param n: The number of element/epoch pairs to be stored. :type n: int :param elems: The collection of "two-line" element sets. :type elems: Array of floats :param epochs: The epochs associated with the element sets. :type epochs: Array of floats """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) consts = stypes.toDoubleVector(consts) n = ctypes.c_int(n) elems = stypes.toDoubleVector(elems) epochs = stypes.toDoubleVector(epochs) libspice.spkw10_c(handle, body, center, inframe, first, last, segid, consts, n, elems, epochs)
python
def spkw10(handle, body, center, inframe, first, last, segid, consts, n, elems, epochs): """ Write an SPK type 10 segment to the DAF open and attached to the input handle. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw10_c.html :param handle: The handle of a DAF file open for writing. :type handle: int :param body: The NAIF ID code for the body of the segment. :type body: int :param center: The center of motion for body. :type center: int :param inframe: The reference frame for this segment. :type inframe: str :param first: The first epoch for which the segment is valid. :type first: float :param last: The last epoch for which the segment is valid. :type last: float :param segid: The string to use for segment identifier. :type segid: str :param consts: The array of geophysical constants for the segment. :type consts: 8-Element Array of floats :param n: The number of element/epoch pairs to be stored. :type n: int :param elems: The collection of "two-line" element sets. :type elems: Array of floats :param epochs: The epochs associated with the element sets. :type epochs: Array of floats """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) consts = stypes.toDoubleVector(consts) n = ctypes.c_int(n) elems = stypes.toDoubleVector(elems) epochs = stypes.toDoubleVector(epochs) libspice.spkw10_c(handle, body, center, inframe, first, last, segid, consts, n, elems, epochs)
[ "def", "spkw10", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "consts", ",", "n", ",", "elems", ",", "epochs", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "consts", "=", "stypes", ".", "toDoubleVector", "(", "consts", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "elems", "=", "stypes", ".", "toDoubleVector", "(", "elems", ")", "epochs", "=", "stypes", ".", "toDoubleVector", "(", "epochs", ")", "libspice", ".", "spkw10_c", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "consts", ",", "n", ",", "elems", ",", "epochs", ")" ]
Write an SPK type 10 segment to the DAF open and attached to the input handle. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw10_c.html :param handle: The handle of a DAF file open for writing. :type handle: int :param body: The NAIF ID code for the body of the segment. :type body: int :param center: The center of motion for body. :type center: int :param inframe: The reference frame for this segment. :type inframe: str :param first: The first epoch for which the segment is valid. :type first: float :param last: The last epoch for which the segment is valid. :type last: float :param segid: The string to use for segment identifier. :type segid: str :param consts: The array of geophysical constants for the segment. :type consts: 8-Element Array of floats :param n: The number of element/epoch pairs to be stored. :type n: int :param elems: The collection of "two-line" element sets. :type elems: Array of floats :param epochs: The epochs associated with the element sets. :type epochs: Array of floats
[ "Write", "an", "SPK", "type", "10", "segment", "to", "the", "DAF", "open", "and", "attached", "to", "the", "input", "handle", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12652-L12695
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkw12
def spkw12(handle, body, center, inframe, first, last, segid, degree, n, states, epoch0, step): """ Write a type 12 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw12_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: NAIF code for an ephemeris object. :type body: int :param center: NAIF code for center of motion of body. :type center: int :param inframe: Reference frame name. :type inframe: str :param first: Start time of interval covered by segment. :type first: float :param last: End time of interval covered by segment. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param n: Number of states. :type n: int :param states: Array of states. :type states: Nx6-Element Array of floats :param epoch0: Epoch of first state in states array. :type epoch0: float :param step: Time step separating epochs of states. :type step: float """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) degree = ctypes.c_int(degree) n = ctypes.c_int(n) states = stypes.toDoubleMatrix(states) # X by 6 array epoch0 = ctypes.c_double(epoch0) step = ctypes.c_double(step) libspice.spkw12_c(handle, body, center, inframe, first, last, segid, degree, n, states, epoch0, step)
python
def spkw12(handle, body, center, inframe, first, last, segid, degree, n, states, epoch0, step): """ Write a type 12 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw12_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: NAIF code for an ephemeris object. :type body: int :param center: NAIF code for center of motion of body. :type center: int :param inframe: Reference frame name. :type inframe: str :param first: Start time of interval covered by segment. :type first: float :param last: End time of interval covered by segment. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param n: Number of states. :type n: int :param states: Array of states. :type states: Nx6-Element Array of floats :param epoch0: Epoch of first state in states array. :type epoch0: float :param step: Time step separating epochs of states. :type step: float """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) degree = ctypes.c_int(degree) n = ctypes.c_int(n) states = stypes.toDoubleMatrix(states) # X by 6 array epoch0 = ctypes.c_double(epoch0) step = ctypes.c_double(step) libspice.spkw12_c(handle, body, center, inframe, first, last, segid, degree, n, states, epoch0, step)
[ "def", "spkw12", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "degree", ",", "n", ",", "states", ",", "epoch0", ",", "step", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "degree", "=", "ctypes", ".", "c_int", "(", "degree", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "states", "=", "stypes", ".", "toDoubleMatrix", "(", "states", ")", "# X by 6 array", "epoch0", "=", "ctypes", ".", "c_double", "(", "epoch0", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "libspice", ".", "spkw12_c", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "degree", ",", "n", ",", "states", ",", "epoch0", ",", "step", ")" ]
Write a type 12 segment to an SPK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw12_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: NAIF code for an ephemeris object. :type body: int :param center: NAIF code for center of motion of body. :type center: int :param inframe: Reference frame name. :type inframe: str :param first: Start time of interval covered by segment. :type first: float :param last: End time of interval covered by segment. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param n: Number of states. :type n: int :param states: Array of states. :type states: Nx6-Element Array of floats :param epoch0: Epoch of first state in states array. :type epoch0: float :param step: Time step separating epochs of states. :type step: float
[ "Write", "a", "type", "12", "segment", "to", "an", "SPK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12699-L12744
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkw15
def spkw15(handle, body, center, inframe, first, last, segid, epoch, tp, pa, p, ecc, j2flg, pv, gm, j2, radius): """ Write an SPK segment of type 15 given a type 15 data record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw15_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param epoch: Epoch of the periapse. :type epoch: float :param tp: Trajectory pole vector. :type tp: 3-Element Array of floats :param pa: Periapsis vector. :type pa: 3-Element Array of floats :param p: Semi-latus rectum. :type p: float :param ecc: Eccentricity. :type ecc: float :param j2flg: J2 processing flag. :type j2flg: float :param pv: Central body pole vector. :type pv: 3-Element Array of floats :param gm: Central body GM. :type gm: float :param j2: Central body J2. :type j2: float :param radius: Equatorial radius of central body. :type radius: float """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) epoch = ctypes.c_double(epoch) tp = stypes.toDoubleVector(tp) pa = stypes.toDoubleVector(pa) p = ctypes.c_double(p) ecc = ctypes.c_double(ecc) j2flg = ctypes.c_double(j2flg) pv = stypes.toDoubleVector(pv) gm = ctypes.c_double(gm) j2 = ctypes.c_double(j2) radius = ctypes.c_double(radius) libspice.spkw15_c(handle, body, center, inframe, first, last, segid, epoch, tp, pa, p, ecc, j2flg, pv, gm, j2, radius)
python
def spkw15(handle, body, center, inframe, first, last, segid, epoch, tp, pa, p, ecc, j2flg, pv, gm, j2, radius): """ Write an SPK segment of type 15 given a type 15 data record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw15_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param epoch: Epoch of the periapse. :type epoch: float :param tp: Trajectory pole vector. :type tp: 3-Element Array of floats :param pa: Periapsis vector. :type pa: 3-Element Array of floats :param p: Semi-latus rectum. :type p: float :param ecc: Eccentricity. :type ecc: float :param j2flg: J2 processing flag. :type j2flg: float :param pv: Central body pole vector. :type pv: 3-Element Array of floats :param gm: Central body GM. :type gm: float :param j2: Central body J2. :type j2: float :param radius: Equatorial radius of central body. :type radius: float """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) epoch = ctypes.c_double(epoch) tp = stypes.toDoubleVector(tp) pa = stypes.toDoubleVector(pa) p = ctypes.c_double(p) ecc = ctypes.c_double(ecc) j2flg = ctypes.c_double(j2flg) pv = stypes.toDoubleVector(pv) gm = ctypes.c_double(gm) j2 = ctypes.c_double(j2) radius = ctypes.c_double(radius) libspice.spkw15_c(handle, body, center, inframe, first, last, segid, epoch, tp, pa, p, ecc, j2flg, pv, gm, j2, radius)
[ "def", "spkw15", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "epoch", ",", "tp", ",", "pa", ",", "p", ",", "ecc", ",", "j2flg", ",", "pv", ",", "gm", ",", "j2", ",", "radius", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "epoch", "=", "ctypes", ".", "c_double", "(", "epoch", ")", "tp", "=", "stypes", ".", "toDoubleVector", "(", "tp", ")", "pa", "=", "stypes", ".", "toDoubleVector", "(", "pa", ")", "p", "=", "ctypes", ".", "c_double", "(", "p", ")", "ecc", "=", "ctypes", ".", "c_double", "(", "ecc", ")", "j2flg", "=", "ctypes", ".", "c_double", "(", "j2flg", ")", "pv", "=", "stypes", ".", "toDoubleVector", "(", "pv", ")", "gm", "=", "ctypes", ".", "c_double", "(", "gm", ")", "j2", "=", "ctypes", ".", "c_double", "(", "j2", ")", "radius", "=", "ctypes", ".", "c_double", "(", "radius", ")", "libspice", ".", "spkw15_c", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "epoch", ",", "tp", ",", "pa", ",", "p", ",", "ecc", ",", "j2flg", ",", "pv", ",", "gm", ",", "j2", ",", "radius", ")" ]
Write an SPK segment of type 15 given a type 15 data record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw15_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param epoch: Epoch of the periapse. :type epoch: float :param tp: Trajectory pole vector. :type tp: 3-Element Array of floats :param pa: Periapsis vector. :type pa: 3-Element Array of floats :param p: Semi-latus rectum. :type p: float :param ecc: Eccentricity. :type ecc: float :param j2flg: J2 processing flag. :type j2flg: float :param pv: Central body pole vector. :type pv: 3-Element Array of floats :param gm: Central body GM. :type gm: float :param j2: Central body J2. :type j2: float :param radius: Equatorial radius of central body. :type radius: float
[ "Write", "an", "SPK", "segment", "of", "type", "15", "given", "a", "type", "15", "data", "record", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12794-L12854
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkw17
def spkw17(handle, body, center, inframe, first, last, segid, epoch, eqel, rapol, decpol): """ Write an SPK segment of type 17 given a type 17 data record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw17_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param epoch: Epoch of elements in seconds past J2000. :type epoch: float :param eqel: Array of equinoctial elements. :type eqel: 9-Element Array of floats :param rapol: Right Ascension of the pole of the reference plane. :type rapol: float :param decpol: Declination of the pole of the reference plane. :type decpol: float """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) epoch = ctypes.c_double(epoch) eqel = stypes.toDoubleVector(eqel) rapol = ctypes.c_double(rapol) decpol = ctypes.c_double(decpol) libspice.spkw17_c(handle, body, center, inframe, first, last, segid, epoch, eqel, rapol, decpol)
python
def spkw17(handle, body, center, inframe, first, last, segid, epoch, eqel, rapol, decpol): """ Write an SPK segment of type 17 given a type 17 data record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw17_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param epoch: Epoch of elements in seconds past J2000. :type epoch: float :param eqel: Array of equinoctial elements. :type eqel: 9-Element Array of floats :param rapol: Right Ascension of the pole of the reference plane. :type rapol: float :param decpol: Declination of the pole of the reference plane. :type decpol: float """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) epoch = ctypes.c_double(epoch) eqel = stypes.toDoubleVector(eqel) rapol = ctypes.c_double(rapol) decpol = ctypes.c_double(decpol) libspice.spkw17_c(handle, body, center, inframe, first, last, segid, epoch, eqel, rapol, decpol)
[ "def", "spkw17", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "epoch", ",", "eqel", ",", "rapol", ",", "decpol", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "epoch", "=", "ctypes", ".", "c_double", "(", "epoch", ")", "eqel", "=", "stypes", ".", "toDoubleVector", "(", "eqel", ")", "rapol", "=", "ctypes", ".", "c_double", "(", "rapol", ")", "decpol", "=", "ctypes", ".", "c_double", "(", "decpol", ")", "libspice", ".", "spkw17_c", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "epoch", ",", "eqel", ",", "rapol", ",", "decpol", ")" ]
Write an SPK segment of type 17 given a type 17 data record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw17_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param epoch: Epoch of elements in seconds past J2000. :type epoch: float :param eqel: Array of equinoctial elements. :type eqel: 9-Element Array of floats :param rapol: Right Ascension of the pole of the reference plane. :type rapol: float :param decpol: Declination of the pole of the reference plane. :type decpol: float
[ "Write", "an", "SPK", "segment", "of", "type", "17", "given", "a", "type", "17", "data", "record", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12858-L12900
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkw18
def spkw18(handle, subtyp, body, center, inframe, first, last, segid, degree, packts, epochs): """ Write a type 18 segment to an SPK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw18_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param subtyp: SPK type 18 subtype code. :type subtyp: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param packts: data packets :type packts: 2D Array of floats :param epochs: Array of epochs corresponding to states. :type epochs: N-Element Array of floats """ handle = ctypes.c_int(handle) subtyp = ctypes.c_int(subtyp) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) degree = ctypes.c_int(degree) n = ctypes.c_int(len(packts)) packts = stypes.toDoubleMatrix(packts) epochs = stypes.toDoubleVector(epochs) libspice.spkw18_c(handle, subtyp, body, center, inframe, first, last, segid, degree, n, packts, epochs)
python
def spkw18(handle, subtyp, body, center, inframe, first, last, segid, degree, packts, epochs): """ Write a type 18 segment to an SPK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw18_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param subtyp: SPK type 18 subtype code. :type subtyp: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param packts: data packets :type packts: 2D Array of floats :param epochs: Array of epochs corresponding to states. :type epochs: N-Element Array of floats """ handle = ctypes.c_int(handle) subtyp = ctypes.c_int(subtyp) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) degree = ctypes.c_int(degree) n = ctypes.c_int(len(packts)) packts = stypes.toDoubleMatrix(packts) epochs = stypes.toDoubleVector(epochs) libspice.spkw18_c(handle, subtyp, body, center, inframe, first, last, segid, degree, n, packts, epochs)
[ "def", "spkw18", "(", "handle", ",", "subtyp", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "degree", ",", "packts", ",", "epochs", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "subtyp", "=", "ctypes", ".", "c_int", "(", "subtyp", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "degree", "=", "ctypes", ".", "c_int", "(", "degree", ")", "n", "=", "ctypes", ".", "c_int", "(", "len", "(", "packts", ")", ")", "packts", "=", "stypes", ".", "toDoubleMatrix", "(", "packts", ")", "epochs", "=", "stypes", ".", "toDoubleVector", "(", "epochs", ")", "libspice", ".", "spkw18_c", "(", "handle", ",", "subtyp", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "degree", ",", "n", ",", "packts", ",", "epochs", ")" ]
Write a type 18 segment to an SPK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw18_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param subtyp: SPK type 18 subtype code. :type subtyp: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param degree: Degree of interpolating polynomials. :type degree: int :param packts: data packets :type packts: 2D Array of floats :param epochs: Array of epochs corresponding to states. :type epochs: N-Element Array of floats
[ "Write", "a", "type", "18", "segment", "to", "an", "SPK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12904-L12945
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spkw20
def spkw20(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, dscale, tscale, initjd, initfr): """ Write a type 20 segment to an SPK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw20_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param intlen: Length of time covered by logical record (days). :param n: Number of logical records in segment. :param polydg: Chebyshev polynomial degree. :param cdata: Array of Chebyshev coefficients and positions. :param dscale: Distance scale of data. :param tscale: Time scale of data. :param initjd: Integer part of begin time (TDB Julian date) of first record. :param initfr: Fractional part of begin time (TDB Julian date) of first record. """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) intlen = ctypes.c_double(intlen) n = ctypes.c_int(n) polydg = ctypes.c_int(polydg) cdata = stypes.toDoubleVector(cdata) dscale = ctypes.c_double(dscale) tscale = ctypes.c_double(tscale) initjd = ctypes.c_double(initjd) initfr = ctypes.c_double(initfr) libspice.spkw20_c(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, dscale, tscale, initjd, initfr)
python
def spkw20(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, dscale, tscale, initjd, initfr): """ Write a type 20 segment to an SPK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw20_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param intlen: Length of time covered by logical record (days). :param n: Number of logical records in segment. :param polydg: Chebyshev polynomial degree. :param cdata: Array of Chebyshev coefficients and positions. :param dscale: Distance scale of data. :param tscale: Time scale of data. :param initjd: Integer part of begin time (TDB Julian date) of first record. :param initfr: Fractional part of begin time (TDB Julian date) of first record. """ handle = ctypes.c_int(handle) body = ctypes.c_int(body) center = ctypes.c_int(center) inframe = stypes.stringToCharP(inframe) first = ctypes.c_double(first) last = ctypes.c_double(last) segid = stypes.stringToCharP(segid) intlen = ctypes.c_double(intlen) n = ctypes.c_int(n) polydg = ctypes.c_int(polydg) cdata = stypes.toDoubleVector(cdata) dscale = ctypes.c_double(dscale) tscale = ctypes.c_double(tscale) initjd = ctypes.c_double(initjd) initfr = ctypes.c_double(initfr) libspice.spkw20_c(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, dscale, tscale, initjd, initfr)
[ "def", "spkw20", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "intlen", ",", "n", ",", "polydg", ",", "cdata", ",", "dscale", ",", "tscale", ",", "initjd", ",", "initfr", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "intlen", "=", "ctypes", ".", "c_double", "(", "intlen", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "polydg", "=", "ctypes", ".", "c_int", "(", "polydg", ")", "cdata", "=", "stypes", ".", "toDoubleVector", "(", "cdata", ")", "dscale", "=", "ctypes", ".", "c_double", "(", "dscale", ")", "tscale", "=", "ctypes", ".", "c_double", "(", "tscale", ")", "initjd", "=", "ctypes", ".", "c_double", "(", "initjd", ")", "initfr", "=", "ctypes", ".", "c_double", "(", "initfr", ")", "libspice", ".", "spkw20_c", "(", "handle", ",", "body", ",", "center", ",", "inframe", ",", "first", ",", "last", ",", "segid", ",", "intlen", ",", "n", ",", "polydg", ",", "cdata", ",", "dscale", ",", "tscale", ",", "initjd", ",", "initfr", ")" ]
Write a type 20 segment to an SPK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw20_c.html :param handle: Handle of an SPK file open for writing. :type handle: int :param body: Body code for ephemeris object. :type body: int :param center: Body code for the center of motion of the body. :type center: int :param inframe: The reference frame of the states. :type inframe: str :param first: First valid time for which states can be computed. :type first: float :param last: Last valid time for which states can be computed. :type last: float :param segid: Segment identifier. :type segid: str :param intlen: Length of time covered by logical record (days). :param n: Number of logical records in segment. :param polydg: Chebyshev polynomial degree. :param cdata: Array of Chebyshev coefficients and positions. :param dscale: Distance scale of data. :param tscale: Time scale of data. :param initjd: Integer part of begin time (TDB Julian date) of first record. :param initfr: Fractional part of begin time (TDB Julian date) of first record.
[ "Write", "a", "type", "20", "segment", "to", "an", "SPK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12949-L12993
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
srfrec
def srfrec(body, longitude, latitude): """ Convert planetocentric latitude and longitude of a surface point on a specified body to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/srfrec_c.html :param body: NAIF integer code of an extended body. :type body: int :param longitude: Longitude of point in radians. :type longitude: float :param latitude: Latitude of point in radians. :type latitude: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats """ body = ctypes.c_int(body) longitude = ctypes.c_double(longitude) latitude = ctypes.c_double(latitude) rectan = stypes.emptyDoubleVector(3) libspice.srfrec_c(body, longitude, latitude, rectan) return stypes.cVectorToPython(rectan)
python
def srfrec(body, longitude, latitude): """ Convert planetocentric latitude and longitude of a surface point on a specified body to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/srfrec_c.html :param body: NAIF integer code of an extended body. :type body: int :param longitude: Longitude of point in radians. :type longitude: float :param latitude: Latitude of point in radians. :type latitude: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats """ body = ctypes.c_int(body) longitude = ctypes.c_double(longitude) latitude = ctypes.c_double(latitude) rectan = stypes.emptyDoubleVector(3) libspice.srfrec_c(body, longitude, latitude, rectan) return stypes.cVectorToPython(rectan)
[ "def", "srfrec", "(", "body", ",", "longitude", ",", "latitude", ")", ":", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "longitude", "=", "ctypes", ".", "c_double", "(", "longitude", ")", "latitude", "=", "ctypes", ".", "c_double", "(", "latitude", ")", "rectan", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "srfrec_c", "(", "body", ",", "longitude", ",", "latitude", ",", "rectan", ")", "return", "stypes", ".", "cVectorToPython", "(", "rectan", ")" ]
Convert planetocentric latitude and longitude of a surface point on a specified body to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/srfrec_c.html :param body: NAIF integer code of an extended body. :type body: int :param longitude: Longitude of point in radians. :type longitude: float :param latitude: Latitude of point in radians. :type latitude: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats
[ "Convert", "planetocentric", "latitude", "and", "longitude", "of", "a", "surface", "point", "on", "a", "specified", "body", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13090-L13111
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
stelab
def stelab(pobj, vobs): """ Correct the apparent position of an object for stellar aberration. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stelab_c.html :param pobj: Position of an object with respect to the observer. :type pobj: 3-Element Array of floats :param vobs: Velocity of the observer with respect to the Solar System barycenter. :type vobs: 3-Element Array of floats :return: Apparent position of the object with respect to the observer, corrected for stellar aberration. :rtype: 3-Element Array of floats """ pobj = stypes.toDoubleVector(pobj) vobs = stypes.toDoubleVector(vobs) appobj = stypes.emptyDoubleVector(3) libspice.stelab_c(pobj, vobs, appobj) return stypes.cVectorToPython(appobj)
python
def stelab(pobj, vobs): """ Correct the apparent position of an object for stellar aberration. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stelab_c.html :param pobj: Position of an object with respect to the observer. :type pobj: 3-Element Array of floats :param vobs: Velocity of the observer with respect to the Solar System barycenter. :type vobs: 3-Element Array of floats :return: Apparent position of the object with respect to the observer, corrected for stellar aberration. :rtype: 3-Element Array of floats """ pobj = stypes.toDoubleVector(pobj) vobs = stypes.toDoubleVector(vobs) appobj = stypes.emptyDoubleVector(3) libspice.stelab_c(pobj, vobs, appobj) return stypes.cVectorToPython(appobj)
[ "def", "stelab", "(", "pobj", ",", "vobs", ")", ":", "pobj", "=", "stypes", ".", "toDoubleVector", "(", "pobj", ")", "vobs", "=", "stypes", ".", "toDoubleVector", "(", "vobs", ")", "appobj", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "stelab_c", "(", "pobj", ",", "vobs", ",", "appobj", ")", "return", "stypes", ".", "cVectorToPython", "(", "appobj", ")" ]
Correct the apparent position of an object for stellar aberration. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stelab_c.html :param pobj: Position of an object with respect to the observer. :type pobj: 3-Element Array of floats :param vobs: Velocity of the observer with respect to the Solar System barycenter. :type vobs: 3-Element Array of floats :return: Apparent position of the object with respect to the observer, corrected for stellar aberration. :rtype: 3-Element Array of floats
[ "Correct", "the", "apparent", "position", "of", "an", "object", "for", "stellar", "aberration", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13255-L13277
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
stpool
def stpool(item, nth, contin, lenout=_default_len_out): """ Retrieve the nth string from the kernel pool variable, where the string may be continued across several components of the kernel pool variable. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stpool_c.html :param item: Name of the kernel pool variable. :type item: str :param nth: Index of the full string to retrieve. :type nth: int :param contin: Character sequence used to indicate continuation. :type contin: str :param lenout: Available space in output string. :type lenout: int :return: A full string concatenated across continuations, The number of characters in the full string value. :rtype: tuple """ item = stypes.stringToCharP(item) contin = stypes.stringToCharP(contin) nth = ctypes.c_int(nth) strout = stypes.stringToCharP(lenout) lenout = ctypes.c_int(lenout) found = ctypes.c_int() sizet = ctypes.c_int() libspice.stpool_c(item, nth, contin, lenout, strout, ctypes.byref(sizet), ctypes.byref(found)) return stypes.toPythonString(strout), sizet.value, bool(found.value)
python
def stpool(item, nth, contin, lenout=_default_len_out): """ Retrieve the nth string from the kernel pool variable, where the string may be continued across several components of the kernel pool variable. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stpool_c.html :param item: Name of the kernel pool variable. :type item: str :param nth: Index of the full string to retrieve. :type nth: int :param contin: Character sequence used to indicate continuation. :type contin: str :param lenout: Available space in output string. :type lenout: int :return: A full string concatenated across continuations, The number of characters in the full string value. :rtype: tuple """ item = stypes.stringToCharP(item) contin = stypes.stringToCharP(contin) nth = ctypes.c_int(nth) strout = stypes.stringToCharP(lenout) lenout = ctypes.c_int(lenout) found = ctypes.c_int() sizet = ctypes.c_int() libspice.stpool_c(item, nth, contin, lenout, strout, ctypes.byref(sizet), ctypes.byref(found)) return stypes.toPythonString(strout), sizet.value, bool(found.value)
[ "def", "stpool", "(", "item", ",", "nth", ",", "contin", ",", "lenout", "=", "_default_len_out", ")", ":", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "contin", "=", "stypes", ".", "stringToCharP", "(", "contin", ")", "nth", "=", "ctypes", ".", "c_int", "(", "nth", ")", "strout", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "sizet", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "stpool_c", "(", "item", ",", "nth", ",", "contin", ",", "lenout", ",", "strout", ",", "ctypes", ".", "byref", "(", "sizet", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "stypes", ".", "toPythonString", "(", "strout", ")", ",", "sizet", ".", "value", ",", "bool", "(", "found", ".", "value", ")" ]
Retrieve the nth string from the kernel pool variable, where the string may be continued across several components of the kernel pool variable. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stpool_c.html :param item: Name of the kernel pool variable. :type item: str :param nth: Index of the full string to retrieve. :type nth: int :param contin: Character sequence used to indicate continuation. :type contin: str :param lenout: Available space in output string. :type lenout: int :return: A full string concatenated across continuations, The number of characters in the full string value. :rtype: tuple
[ "Retrieve", "the", "nth", "string", "from", "the", "kernel", "pool", "variable", "where", "the", "string", "may", "be", "continued", "across", "several", "components", "of", "the", "kernel", "pool", "variable", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13282-L13312
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
str2et
def str2et(time): """ Convert a string representing an epoch to a double precision value representing the number of TDB seconds past the J2000 epoch corresponding to the input epoch. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/str2et_c.html :param time: A string representing an epoch. :type time: str :return: The equivalent value in seconds past J2000, TDB. :rtype: float """ if isinstance(time, list): return numpy.array([str2et(t) for t in time]) time = stypes.stringToCharP(time) et = ctypes.c_double() libspice.str2et_c(time, ctypes.byref(et)) return et.value
python
def str2et(time): """ Convert a string representing an epoch to a double precision value representing the number of TDB seconds past the J2000 epoch corresponding to the input epoch. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/str2et_c.html :param time: A string representing an epoch. :type time: str :return: The equivalent value in seconds past J2000, TDB. :rtype: float """ if isinstance(time, list): return numpy.array([str2et(t) for t in time]) time = stypes.stringToCharP(time) et = ctypes.c_double() libspice.str2et_c(time, ctypes.byref(et)) return et.value
[ "def", "str2et", "(", "time", ")", ":", "if", "isinstance", "(", "time", ",", "list", ")", ":", "return", "numpy", ".", "array", "(", "[", "str2et", "(", "t", ")", "for", "t", "in", "time", "]", ")", "time", "=", "stypes", ".", "stringToCharP", "(", "time", ")", "et", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "str2et_c", "(", "time", ",", "ctypes", ".", "byref", "(", "et", ")", ")", "return", "et", ".", "value" ]
Convert a string representing an epoch to a double precision value representing the number of TDB seconds past the J2000 epoch corresponding to the input epoch. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/str2et_c.html :param time: A string representing an epoch. :type time: str :return: The equivalent value in seconds past J2000, TDB. :rtype: float
[ "Convert", "a", "string", "representing", "an", "epoch", "to", "a", "double", "precision", "value", "representing", "the", "number", "of", "TDB", "seconds", "past", "the", "J2000", "epoch", "corresponding", "to", "the", "input", "epoch", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13316-L13334
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
datetime2et
def datetime2et(dt): """ Converts a standard Python datetime to a double precision value representing the number of TDB seconds past the J2000 epoch corresponding to the input epoch. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/time.html#The%20J2000%20Epoch :param dt: A standard Python datetime :type time: datetime :return: The equivalent value in seconds past J2000, TDB. :rtype: float """ lt = ctypes.c_double() if hasattr(dt, "__iter__"): ets = [] for t in dt: libspice.utc2et_c(stypes.stringToCharP(t.isoformat()),ctypes.byref(lt)) checkForSpiceError(None) ets.append(lt.value) return ets dt = stypes.stringToCharP(dt.isoformat()) et = ctypes.c_double() libspice.utc2et_c(dt, ctypes.byref(et)) return et.value
python
def datetime2et(dt): """ Converts a standard Python datetime to a double precision value representing the number of TDB seconds past the J2000 epoch corresponding to the input epoch. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/time.html#The%20J2000%20Epoch :param dt: A standard Python datetime :type time: datetime :return: The equivalent value in seconds past J2000, TDB. :rtype: float """ lt = ctypes.c_double() if hasattr(dt, "__iter__"): ets = [] for t in dt: libspice.utc2et_c(stypes.stringToCharP(t.isoformat()),ctypes.byref(lt)) checkForSpiceError(None) ets.append(lt.value) return ets dt = stypes.stringToCharP(dt.isoformat()) et = ctypes.c_double() libspice.utc2et_c(dt, ctypes.byref(et)) return et.value
[ "def", "datetime2et", "(", "dt", ")", ":", "lt", "=", "ctypes", ".", "c_double", "(", ")", "if", "hasattr", "(", "dt", ",", "\"__iter__\"", ")", ":", "ets", "=", "[", "]", "for", "t", "in", "dt", ":", "libspice", ".", "utc2et_c", "(", "stypes", ".", "stringToCharP", "(", "t", ".", "isoformat", "(", ")", ")", ",", "ctypes", ".", "byref", "(", "lt", ")", ")", "checkForSpiceError", "(", "None", ")", "ets", ".", "append", "(", "lt", ".", "value", ")", "return", "ets", "dt", "=", "stypes", ".", "stringToCharP", "(", "dt", ".", "isoformat", "(", ")", ")", "et", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "utc2et_c", "(", "dt", ",", "ctypes", ".", "byref", "(", "et", ")", ")", "return", "et", ".", "value" ]
Converts a standard Python datetime to a double precision value representing the number of TDB seconds past the J2000 epoch corresponding to the input epoch. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/time.html#The%20J2000%20Epoch :param dt: A standard Python datetime :type time: datetime :return: The equivalent value in seconds past J2000, TDB. :rtype: float
[ "Converts", "a", "standard", "Python", "datetime", "to", "a", "double", "precision", "value", "representing", "the", "number", "of", "TDB", "seconds", "past", "the", "J2000", "epoch", "corresponding", "to", "the", "input", "epoch", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13337-L13361
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
subpnt
def subpnt(method, target, et, fixref, abcorr, obsrvr): """ Compute the rectangular coordinates of the sub-observer point on a target body at a specified epoch, optionally corrected for light time and stellar aberration. This routine supersedes :func:`subpt`. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/subpnt_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 :return: Sub-observer point on the target body, Sub-observer point epoch, Vector from observer to sub-observer 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) spoint = stypes.emptyDoubleVector(3) trgepc = ctypes.c_double(0) srfvec = stypes.emptyDoubleVector(3) libspice.subpnt_c(method, target, et, fixref, abcorr, obsrvr, spoint, ctypes.byref(trgepc), srfvec) return stypes.cVectorToPython(spoint), trgepc.value, stypes.cVectorToPython( srfvec)
python
def subpnt(method, target, et, fixref, abcorr, obsrvr): """ Compute the rectangular coordinates of the sub-observer point on a target body at a specified epoch, optionally corrected for light time and stellar aberration. This routine supersedes :func:`subpt`. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/subpnt_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 :return: Sub-observer point on the target body, Sub-observer point epoch, Vector from observer to sub-observer 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) spoint = stypes.emptyDoubleVector(3) trgepc = ctypes.c_double(0) srfvec = stypes.emptyDoubleVector(3) libspice.subpnt_c(method, target, et, fixref, abcorr, obsrvr, spoint, ctypes.byref(trgepc), srfvec) return stypes.cVectorToPython(spoint), trgepc.value, stypes.cVectorToPython( srfvec)
[ "def", "subpnt", "(", "method", ",", "target", ",", "et", ",", "fixref", ",", "abcorr", ",", "obsrvr", ")", ":", "method", "=", "stypes", ".", "stringToCharP", "(", "method", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "fixref", "=", "stypes", ".", "stringToCharP", "(", "fixref", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "spoint", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "trgepc", "=", "ctypes", ".", "c_double", "(", "0", ")", "srfvec", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "subpnt_c", "(", "method", ",", "target", ",", "et", ",", "fixref", ",", "abcorr", ",", "obsrvr", ",", "spoint", ",", "ctypes", ".", "byref", "(", "trgepc", ")", ",", "srfvec", ")", "return", "stypes", ".", "cVectorToPython", "(", "spoint", ")", ",", "trgepc", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "srfvec", ")" ]
Compute the rectangular coordinates of the sub-observer point on a target body at a specified epoch, optionally corrected for light time and stellar aberration. This routine supersedes :func:`subpt`. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/subpnt_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 :return: Sub-observer point on the target body, Sub-observer point epoch, Vector from observer to sub-observer point. :rtype: tuple
[ "Compute", "the", "rectangular", "coordinates", "of", "the", "sub", "-", "observer", "point", "on", "a", "target", "body", "at", "a", "specified", "epoch", "optionally", "corrected", "for", "light", "time", "and", "stellar", "aberration", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13364-L13404
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
sumad
def sumad(array): """ Return the sum of the elements of a double precision array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumad_c.html :param array: Input Array. :type array: Array of floats :return: The sum of the array. :rtype: float """ n = ctypes.c_int(len(array)) array = stypes.toDoubleVector(array) return libspice.sumad_c(array, n)
python
def sumad(array): """ Return the sum of the elements of a double precision array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumad_c.html :param array: Input Array. :type array: Array of floats :return: The sum of the array. :rtype: float """ n = ctypes.c_int(len(array)) array = stypes.toDoubleVector(array) return libspice.sumad_c(array, n)
[ "def", "sumad", "(", "array", ")", ":", "n", "=", "ctypes", ".", "c_int", "(", "len", "(", "array", ")", ")", "array", "=", "stypes", ".", "toDoubleVector", "(", "array", ")", "return", "libspice", ".", "sumad_c", "(", "array", ",", "n", ")" ]
Return the sum of the elements of a double precision array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumad_c.html :param array: Input Array. :type array: Array of floats :return: The sum of the array. :rtype: float
[ "Return", "the", "sum", "of", "the", "elements", "of", "a", "double", "precision", "array", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13541-L13554
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
sumai
def sumai(array): """ Return the sum of the elements of an integer array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumai_c.html :param array: Input Array. :type array: Array of ints :return: The sum of the array. :rtype: int """ n = ctypes.c_int(len(array)) array = stypes.toIntVector(array) return libspice.sumai_c(array, n)
python
def sumai(array): """ Return the sum of the elements of an integer array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumai_c.html :param array: Input Array. :type array: Array of ints :return: The sum of the array. :rtype: int """ n = ctypes.c_int(len(array)) array = stypes.toIntVector(array) return libspice.sumai_c(array, n)
[ "def", "sumai", "(", "array", ")", ":", "n", "=", "ctypes", ".", "c_int", "(", "len", "(", "array", ")", ")", "array", "=", "stypes", ".", "toIntVector", "(", "array", ")", "return", "libspice", ".", "sumai_c", "(", "array", ",", "n", ")" ]
Return the sum of the elements of an integer array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumai_c.html :param array: Input Array. :type array: Array of ints :return: The sum of the array. :rtype: int
[ "Return", "the", "sum", "of", "the", "elements", "of", "an", "integer", "array", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13558-L13571
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
surfnm
def surfnm(a, b, c, point): """ This routine computes the outward-pointing, unit normal vector from a point on the surface of an ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfnm_c.html :param a: Length of the ellisoid semi-axis along the x-axis. :type a: float :param b: Length of the ellisoid semi-axis along the y-axis. :type b: float :param c: Length of the ellisoid semi-axis along the z-axis. :type c: float :param point: Body-fixed coordinates of a point on the ellipsoid' :type point: 3-Element Array of floats :return: Outward pointing unit normal to ellipsoid at point. :rtype: 3-Element Array of floats """ a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) point = stypes.toDoubleVector(point) normal = stypes.emptyDoubleVector(3) libspice.surfnm_c(a, b, c, point, normal) return stypes.cVectorToPython(normal)
python
def surfnm(a, b, c, point): """ This routine computes the outward-pointing, unit normal vector from a point on the surface of an ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfnm_c.html :param a: Length of the ellisoid semi-axis along the x-axis. :type a: float :param b: Length of the ellisoid semi-axis along the y-axis. :type b: float :param c: Length of the ellisoid semi-axis along the z-axis. :type c: float :param point: Body-fixed coordinates of a point on the ellipsoid' :type point: 3-Element Array of floats :return: Outward pointing unit normal to ellipsoid at point. :rtype: 3-Element Array of floats """ a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) point = stypes.toDoubleVector(point) normal = stypes.emptyDoubleVector(3) libspice.surfnm_c(a, b, c, point, normal) return stypes.cVectorToPython(normal)
[ "def", "surfnm", "(", "a", ",", "b", ",", "c", ",", "point", ")", ":", "a", "=", "ctypes", ".", "c_double", "(", "a", ")", "b", "=", "ctypes", ".", "c_double", "(", "b", ")", "c", "=", "ctypes", ".", "c_double", "(", "c", ")", "point", "=", "stypes", ".", "toDoubleVector", "(", "point", ")", "normal", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "surfnm_c", "(", "a", ",", "b", ",", "c", ",", "point", ",", "normal", ")", "return", "stypes", ".", "cVectorToPython", "(", "normal", ")" ]
This routine computes the outward-pointing, unit normal vector from a point on the surface of an ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfnm_c.html :param a: Length of the ellisoid semi-axis along the x-axis. :type a: float :param b: Length of the ellisoid semi-axis along the y-axis. :type b: float :param c: Length of the ellisoid semi-axis along the z-axis. :type c: float :param point: Body-fixed coordinates of a point on the ellipsoid' :type point: 3-Element Array of floats :return: Outward pointing unit normal to ellipsoid at point. :rtype: 3-Element Array of floats
[ "This", "routine", "computes", "the", "outward", "-", "pointing", "unit", "normal", "vector", "from", "a", "point", "on", "the", "surface", "of", "an", "ellipsoid", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13575-L13599
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
surfpt
def surfpt(positn, u, a, b, c): """ Determine the intersection of a line-of-sight vector with the surface of an ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfpt_c.html :param positn: Position of the observer in body-fixed frame. :type positn: 3-Element Array of floats :param u: Vector from the observer in some direction. :type u: 3-Element Array of floats :param a: Length of the ellisoid semi-axis along the x-axis. :type a: float :param b: Length of the ellisoid semi-axis along the y-axis. :type b: float :param c: Length of the ellisoid semi-axis along the z-axis. :type c: float :return: Point on the ellipsoid pointed to by u. :rtype: 3-Element Array of floats """ a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) positn = stypes.toDoubleVector(positn) u = stypes.toDoubleVector(u) point = stypes.emptyDoubleVector(3) found = ctypes.c_int() libspice.surfpt_c(positn, u, a, b, c, point, ctypes.byref(found)) return stypes.cVectorToPython(point), bool(found.value)
python
def surfpt(positn, u, a, b, c): """ Determine the intersection of a line-of-sight vector with the surface of an ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfpt_c.html :param positn: Position of the observer in body-fixed frame. :type positn: 3-Element Array of floats :param u: Vector from the observer in some direction. :type u: 3-Element Array of floats :param a: Length of the ellisoid semi-axis along the x-axis. :type a: float :param b: Length of the ellisoid semi-axis along the y-axis. :type b: float :param c: Length of the ellisoid semi-axis along the z-axis. :type c: float :return: Point on the ellipsoid pointed to by u. :rtype: 3-Element Array of floats """ a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) positn = stypes.toDoubleVector(positn) u = stypes.toDoubleVector(u) point = stypes.emptyDoubleVector(3) found = ctypes.c_int() libspice.surfpt_c(positn, u, a, b, c, point, ctypes.byref(found)) return stypes.cVectorToPython(point), bool(found.value)
[ "def", "surfpt", "(", "positn", ",", "u", ",", "a", ",", "b", ",", "c", ")", ":", "a", "=", "ctypes", ".", "c_double", "(", "a", ")", "b", "=", "ctypes", ".", "c_double", "(", "b", ")", "c", "=", "ctypes", ".", "c_double", "(", "c", ")", "positn", "=", "stypes", ".", "toDoubleVector", "(", "positn", ")", "u", "=", "stypes", ".", "toDoubleVector", "(", "u", ")", "point", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "surfpt_c", "(", "positn", ",", "u", ",", "a", ",", "b", ",", "c", ",", "point", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "point", ")", ",", "bool", "(", "found", ".", "value", ")" ]
Determine the intersection of a line-of-sight vector with the surface of an ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfpt_c.html :param positn: Position of the observer in body-fixed frame. :type positn: 3-Element Array of floats :param u: Vector from the observer in some direction. :type u: 3-Element Array of floats :param a: Length of the ellisoid semi-axis along the x-axis. :type a: float :param b: Length of the ellisoid semi-axis along the y-axis. :type b: float :param c: Length of the ellisoid semi-axis along the z-axis. :type c: float :return: Point on the ellipsoid pointed to by u. :rtype: 3-Element Array of floats
[ "Determine", "the", "intersection", "of", "a", "line", "-", "of", "-", "sight", "vector", "with", "the", "surface", "of", "an", "ellipsoid", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13604-L13632
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
swpool
def swpool(agent, nnames, lenvals, names): """ Add a name to the list of agents to notify whenever a member of a list of kernel variables is updated. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/swpool_c.html :param agent: The name of an agent to be notified after updates. :type agent: str :param nnames: The number of variables to associate with agent. :type nnames: int :param lenvals: Length of strings in the names array. :type lenvals: int :param names: Variable names whose update causes the notice. :type names: list of strs. """ agent = stypes.stringToCharP(agent) nnames = ctypes.c_int(nnames) lenvals = ctypes.c_int(lenvals) names = stypes.listToCharArray(names) libspice.swpool_c(agent, nnames, lenvals, names)
python
def swpool(agent, nnames, lenvals, names): """ Add a name to the list of agents to notify whenever a member of a list of kernel variables is updated. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/swpool_c.html :param agent: The name of an agent to be notified after updates. :type agent: str :param nnames: The number of variables to associate with agent. :type nnames: int :param lenvals: Length of strings in the names array. :type lenvals: int :param names: Variable names whose update causes the notice. :type names: list of strs. """ agent = stypes.stringToCharP(agent) nnames = ctypes.c_int(nnames) lenvals = ctypes.c_int(lenvals) names = stypes.listToCharArray(names) libspice.swpool_c(agent, nnames, lenvals, names)
[ "def", "swpool", "(", "agent", ",", "nnames", ",", "lenvals", ",", "names", ")", ":", "agent", "=", "stypes", ".", "stringToCharP", "(", "agent", ")", "nnames", "=", "ctypes", ".", "c_int", "(", "nnames", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "lenvals", ")", "names", "=", "stypes", ".", "listToCharArray", "(", "names", ")", "libspice", ".", "swpool_c", "(", "agent", ",", "nnames", ",", "lenvals", ",", "names", ")" ]
Add a name to the list of agents to notify whenever a member of a list of kernel variables is updated. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/swpool_c.html :param agent: The name of an agent to be notified after updates. :type agent: str :param nnames: The number of variables to associate with agent. :type nnames: int :param lenvals: Length of strings in the names array. :type lenvals: int :param names: Variable names whose update causes the notice. :type names: list of strs.
[ "Add", "a", "name", "to", "the", "list", "of", "agents", "to", "notify", "whenever", "a", "member", "of", "a", "list", "of", "kernel", "variables", "is", "updated", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13669-L13689
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
sxform
def sxform(instring, tostring, et): """ Return the state transformation matrix from one frame to another at a specified epoch. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sxform_c.html :param instring: Name of the frame to transform from. :type instring: str :param tostring: Name of the frame to transform to. :type tostring: str :param et: Epoch of the state transformation matrix. :type et: Union[float,Iterable[float]] :return: A state transformation matrix. :rtype: 6x6-Element Array of floats """ instring = stypes.stringToCharP(instring) tostring = stypes.stringToCharP(tostring) xform = stypes.emptyDoubleMatrix(x=6, y=6) if hasattr(et, "__iter__"): xforms = [] for t in et: libspice.sxform_c(instring, tostring, ctypes.c_double(t), xform) checkForSpiceError(None) xforms.append(stypes.cMatrixToNumpy(xform)) return xforms else: et = ctypes.c_double(et) libspice.sxform_c(instring, tostring, et, xform) return stypes.cMatrixToNumpy(xform)
python
def sxform(instring, tostring, et): """ Return the state transformation matrix from one frame to another at a specified epoch. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sxform_c.html :param instring: Name of the frame to transform from. :type instring: str :param tostring: Name of the frame to transform to. :type tostring: str :param et: Epoch of the state transformation matrix. :type et: Union[float,Iterable[float]] :return: A state transformation matrix. :rtype: 6x6-Element Array of floats """ instring = stypes.stringToCharP(instring) tostring = stypes.stringToCharP(tostring) xform = stypes.emptyDoubleMatrix(x=6, y=6) if hasattr(et, "__iter__"): xforms = [] for t in et: libspice.sxform_c(instring, tostring, ctypes.c_double(t), xform) checkForSpiceError(None) xforms.append(stypes.cMatrixToNumpy(xform)) return xforms else: et = ctypes.c_double(et) libspice.sxform_c(instring, tostring, et, xform) return stypes.cMatrixToNumpy(xform)
[ "def", "sxform", "(", "instring", ",", "tostring", ",", "et", ")", ":", "instring", "=", "stypes", ".", "stringToCharP", "(", "instring", ")", "tostring", "=", "stypes", ".", "stringToCharP", "(", "tostring", ")", "xform", "=", "stypes", ".", "emptyDoubleMatrix", "(", "x", "=", "6", ",", "y", "=", "6", ")", "if", "hasattr", "(", "et", ",", "\"__iter__\"", ")", ":", "xforms", "=", "[", "]", "for", "t", "in", "et", ":", "libspice", ".", "sxform_c", "(", "instring", ",", "tostring", ",", "ctypes", ".", "c_double", "(", "t", ")", ",", "xform", ")", "checkForSpiceError", "(", "None", ")", "xforms", ".", "append", "(", "stypes", ".", "cMatrixToNumpy", "(", "xform", ")", ")", "return", "xforms", "else", ":", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "libspice", ".", "sxform_c", "(", "instring", ",", "tostring", ",", "et", ",", "xform", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "xform", ")" ]
Return the state transformation matrix from one frame to another at a specified epoch. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sxform_c.html :param instring: Name of the frame to transform from. :type instring: str :param tostring: Name of the frame to transform to. :type tostring: str :param et: Epoch of the state transformation matrix. :type et: Union[float,Iterable[float]] :return: A state transformation matrix. :rtype: 6x6-Element Array of floats
[ "Return", "the", "state", "transformation", "matrix", "from", "one", "frame", "to", "another", "at", "a", "specified", "epoch", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13693-L13723
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
szpool
def szpool(name): """ Return the kernel pool size limitations. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/szpool_c.html :param name: Name of the parameter to be returned. :type name: str :return: Value of parameter specified by name, :rtype: int """ name = stypes.stringToCharP(name) n = ctypes.c_int() found = ctypes.c_int(0) libspice.szpool_c(name, ctypes.byref(n), ctypes.byref(found)) return n.value, bool(found.value)
python
def szpool(name): """ Return the kernel pool size limitations. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/szpool_c.html :param name: Name of the parameter to be returned. :type name: str :return: Value of parameter specified by name, :rtype: int """ name = stypes.stringToCharP(name) n = ctypes.c_int() found = ctypes.c_int(0) libspice.szpool_c(name, ctypes.byref(n), ctypes.byref(found)) return n.value, bool(found.value)
[ "def", "szpool", "(", "name", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "found", "=", "ctypes", ".", "c_int", "(", "0", ")", "libspice", ".", "szpool_c", "(", "name", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "n", ".", "value", ",", "bool", "(", "found", ".", "value", ")" ]
Return the kernel pool size limitations. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/szpool_c.html :param name: Name of the parameter to be returned. :type name: str :return: Value of parameter specified by name, :rtype: int
[ "Return", "the", "kernel", "pool", "size", "limitations", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13728-L13743
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
termpt
def termpt(method, ilusrc, target, et, fixref, abcorr, corloc, obsrvr, refvec, rolstp, ncuts, schstp, soltol, maxn): """ Find terminator points on a target body. The caller specifies half-planes, bounded by the illumination source center-target center vector, in which to search for terminator points. The terminator can be either umbral or penumbral. The umbral terminator is the boundary of the region on the target surface where no light from the source is visible. The penumbral terminator is the boundary of the region on the target surface where none of the light from the source is blocked by the target itself. The surface of the target body may be represented either by a triaxial ellipsoid or by topographic data. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/termpt_c.html :param method: Computation method. :type method: str :param ilusrc: Illumination source. :type ilusrc: 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 corloc: Aberration correction locus. :type corloc: str :param obsrvr: Name of observing body. :type obsrvr: str :param refvec: Reference vector for cutting half-planes. :type refvec: 3-Element Array of floats :param rolstp: Roll angular step for cutting half-planes. :type rolstp: float :param ncuts: Number of cutting half-planes. :type ncuts: int :param schstp: Angular step size for searching. :type schstp: float :param soltol: Solution convergence tolerance. :type soltol: float :param maxn: Maximum number of entries in output arrays. :type maxn: int :return: Counts of terminator points corresponding to cuts, Terminator points, Times associated with terminator points, Terminator vectors emanating from the observer :rtype: tuple """ method = stypes.stringToCharP(method) ilusrc = stypes.stringToCharP(ilusrc) target = stypes.stringToCharP(target) et = ctypes.c_double(et) fixref = stypes.stringToCharP(fixref) abcorr = stypes.stringToCharP(abcorr) corloc = stypes.stringToCharP(corloc) obsrvr = stypes.stringToCharP(obsrvr) refvec = stypes.toDoubleVector(refvec) rolstp = ctypes.c_double(rolstp) ncuts = ctypes.c_int(ncuts) schstp = ctypes.c_double(schstp) soltol = ctypes.c_double(soltol) maxn = ctypes.c_int(maxn) npts = stypes.emptyIntVector(maxn.value) points = stypes.emptyDoubleMatrix(3, maxn.value) epochs = stypes.emptyDoubleVector(maxn) trmvcs = stypes.emptyDoubleMatrix(3, maxn.value) libspice.termpt_c(method, ilusrc, target, et, fixref, abcorr, corloc, obsrvr, refvec, rolstp, ncuts, schstp, soltol, maxn, npts, points, epochs, trmvcs) # Clip the empty elements out of returned results npts = stypes.cVectorToPython(npts) valid_points = numpy.where(npts >= 1) return npts[valid_points], stypes.cMatrixToNumpy(points)[valid_points], \ stypes.cVectorToPython(epochs)[valid_points], \ stypes.cMatrixToNumpy(trmvcs)[valid_points]
python
def termpt(method, ilusrc, target, et, fixref, abcorr, corloc, obsrvr, refvec, rolstp, ncuts, schstp, soltol, maxn): """ Find terminator points on a target body. The caller specifies half-planes, bounded by the illumination source center-target center vector, in which to search for terminator points. The terminator can be either umbral or penumbral. The umbral terminator is the boundary of the region on the target surface where no light from the source is visible. The penumbral terminator is the boundary of the region on the target surface where none of the light from the source is blocked by the target itself. The surface of the target body may be represented either by a triaxial ellipsoid or by topographic data. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/termpt_c.html :param method: Computation method. :type method: str :param ilusrc: Illumination source. :type ilusrc: 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 corloc: Aberration correction locus. :type corloc: str :param obsrvr: Name of observing body. :type obsrvr: str :param refvec: Reference vector for cutting half-planes. :type refvec: 3-Element Array of floats :param rolstp: Roll angular step for cutting half-planes. :type rolstp: float :param ncuts: Number of cutting half-planes. :type ncuts: int :param schstp: Angular step size for searching. :type schstp: float :param soltol: Solution convergence tolerance. :type soltol: float :param maxn: Maximum number of entries in output arrays. :type maxn: int :return: Counts of terminator points corresponding to cuts, Terminator points, Times associated with terminator points, Terminator vectors emanating from the observer :rtype: tuple """ method = stypes.stringToCharP(method) ilusrc = stypes.stringToCharP(ilusrc) target = stypes.stringToCharP(target) et = ctypes.c_double(et) fixref = stypes.stringToCharP(fixref) abcorr = stypes.stringToCharP(abcorr) corloc = stypes.stringToCharP(corloc) obsrvr = stypes.stringToCharP(obsrvr) refvec = stypes.toDoubleVector(refvec) rolstp = ctypes.c_double(rolstp) ncuts = ctypes.c_int(ncuts) schstp = ctypes.c_double(schstp) soltol = ctypes.c_double(soltol) maxn = ctypes.c_int(maxn) npts = stypes.emptyIntVector(maxn.value) points = stypes.emptyDoubleMatrix(3, maxn.value) epochs = stypes.emptyDoubleVector(maxn) trmvcs = stypes.emptyDoubleMatrix(3, maxn.value) libspice.termpt_c(method, ilusrc, target, et, fixref, abcorr, corloc, obsrvr, refvec, rolstp, ncuts, schstp, soltol, maxn, npts, points, epochs, trmvcs) # Clip the empty elements out of returned results npts = stypes.cVectorToPython(npts) valid_points = numpy.where(npts >= 1) return npts[valid_points], stypes.cMatrixToNumpy(points)[valid_points], \ stypes.cVectorToPython(epochs)[valid_points], \ stypes.cMatrixToNumpy(trmvcs)[valid_points]
[ "def", "termpt", "(", "method", ",", "ilusrc", ",", "target", ",", "et", ",", "fixref", ",", "abcorr", ",", "corloc", ",", "obsrvr", ",", "refvec", ",", "rolstp", ",", "ncuts", ",", "schstp", ",", "soltol", ",", "maxn", ")", ":", "method", "=", "stypes", ".", "stringToCharP", "(", "method", ")", "ilusrc", "=", "stypes", ".", "stringToCharP", "(", "ilusrc", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "fixref", "=", "stypes", ".", "stringToCharP", "(", "fixref", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "corloc", "=", "stypes", ".", "stringToCharP", "(", "corloc", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "refvec", "=", "stypes", ".", "toDoubleVector", "(", "refvec", ")", "rolstp", "=", "ctypes", ".", "c_double", "(", "rolstp", ")", "ncuts", "=", "ctypes", ".", "c_int", "(", "ncuts", ")", "schstp", "=", "ctypes", ".", "c_double", "(", "schstp", ")", "soltol", "=", "ctypes", ".", "c_double", "(", "soltol", ")", "maxn", "=", "ctypes", ".", "c_int", "(", "maxn", ")", "npts", "=", "stypes", ".", "emptyIntVector", "(", "maxn", ".", "value", ")", "points", "=", "stypes", ".", "emptyDoubleMatrix", "(", "3", ",", "maxn", ".", "value", ")", "epochs", "=", "stypes", ".", "emptyDoubleVector", "(", "maxn", ")", "trmvcs", "=", "stypes", ".", "emptyDoubleMatrix", "(", "3", ",", "maxn", ".", "value", ")", "libspice", ".", "termpt_c", "(", "method", ",", "ilusrc", ",", "target", ",", "et", ",", "fixref", ",", "abcorr", ",", "corloc", ",", "obsrvr", ",", "refvec", ",", "rolstp", ",", "ncuts", ",", "schstp", ",", "soltol", ",", "maxn", ",", "npts", ",", "points", ",", "epochs", ",", "trmvcs", ")", "# Clip the empty elements out of returned results", "npts", "=", "stypes", ".", "cVectorToPython", "(", "npts", ")", "valid_points", "=", "numpy", ".", "where", "(", "npts", ">=", "1", ")", "return", "npts", "[", "valid_points", "]", ",", "stypes", ".", "cMatrixToNumpy", "(", "points", ")", "[", "valid_points", "]", ",", "stypes", ".", "cVectorToPython", "(", "epochs", ")", "[", "valid_points", "]", ",", "stypes", ".", "cMatrixToNumpy", "(", "trmvcs", ")", "[", "valid_points", "]" ]
Find terminator points on a target body. The caller specifies half-planes, bounded by the illumination source center-target center vector, in which to search for terminator points. The terminator can be either umbral or penumbral. The umbral terminator is the boundary of the region on the target surface where no light from the source is visible. The penumbral terminator is the boundary of the region on the target surface where none of the light from the source is blocked by the target itself. The surface of the target body may be represented either by a triaxial ellipsoid or by topographic data. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/termpt_c.html :param method: Computation method. :type method: str :param ilusrc: Illumination source. :type ilusrc: 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 corloc: Aberration correction locus. :type corloc: str :param obsrvr: Name of observing body. :type obsrvr: str :param refvec: Reference vector for cutting half-planes. :type refvec: 3-Element Array of floats :param rolstp: Roll angular step for cutting half-planes. :type rolstp: float :param ncuts: Number of cutting half-planes. :type ncuts: int :param schstp: Angular step size for searching. :type schstp: float :param soltol: Solution convergence tolerance. :type soltol: float :param maxn: Maximum number of entries in output arrays. :type maxn: int :return: Counts of terminator points corresponding to cuts, Terminator points, Times associated with terminator points, Terminator vectors emanating from the observer :rtype: tuple
[ "Find", "terminator", "points", "on", "a", "target", "body", ".", "The", "caller", "specifies", "half", "-", "planes", "bounded", "by", "the", "illumination", "source", "center", "-", "target", "center", "vector", "in", "which", "to", "search", "for", "terminator", "points", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13751-L13828
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
timdef
def timdef(action, item, lenout, value=None): """ Set and retrieve the defaults associated with calendar input strings. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timdef_c.html :param action: the kind of action to take "SET" or "GET". :type action: str :param item: the default item of interest. :type item: str :param lenout: the length of list for output. :type lenout: int :param value: the optional string used if action is "SET" :type value: str :return: the value associated with the default item. :rtype: str """ action = stypes.stringToCharP(action) item = stypes.stringToCharP(item) lenout = ctypes.c_int(lenout) if value is None: value = stypes.stringToCharP(lenout) else: value = stypes.stringToCharP(value) libspice.timdef_c(action, item, lenout, value) return stypes.toPythonString(value)
python
def timdef(action, item, lenout, value=None): """ Set and retrieve the defaults associated with calendar input strings. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timdef_c.html :param action: the kind of action to take "SET" or "GET". :type action: str :param item: the default item of interest. :type item: str :param lenout: the length of list for output. :type lenout: int :param value: the optional string used if action is "SET" :type value: str :return: the value associated with the default item. :rtype: str """ action = stypes.stringToCharP(action) item = stypes.stringToCharP(item) lenout = ctypes.c_int(lenout) if value is None: value = stypes.stringToCharP(lenout) else: value = stypes.stringToCharP(value) libspice.timdef_c(action, item, lenout, value) return stypes.toPythonString(value)
[ "def", "timdef", "(", "action", ",", "item", ",", "lenout", ",", "value", "=", "None", ")", ":", "action", "=", "stypes", ".", "stringToCharP", "(", "action", ")", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "if", "value", "is", "None", ":", "value", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "else", ":", "value", "=", "stypes", ".", "stringToCharP", "(", "value", ")", "libspice", ".", "timdef_c", "(", "action", ",", "item", ",", "lenout", ",", "value", ")", "return", "stypes", ".", "toPythonString", "(", "value", ")" ]
Set and retrieve the defaults associated with calendar input strings. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timdef_c.html :param action: the kind of action to take "SET" or "GET". :type action: str :param item: the default item of interest. :type item: str :param lenout: the length of list for output. :type lenout: int :param value: the optional string used if action is "SET" :type value: str :return: the value associated with the default item. :rtype: str
[ "Set", "and", "retrieve", "the", "defaults", "associated", "with", "calendar", "input", "strings", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13832-L13857
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
timout
def timout(et, pictur, lenout=_default_len_out): """ This vectorized routine converts an input epoch represented in TDB seconds past the TDB epoch of J2000 to a character string formatted to the specifications of a user's format picture. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timout_c.html :param et: An epoch in seconds past the ephemeris epoch J2000. :type et: Union[float,Iterable[float]] :param pictur: A format specification for the output string. :type pictur: str :param lenout: The length of the output string plus 1. :type lenout: int :return: A string representation of the input epoch. :rtype: str or array of str """ pictur = stypes.stringToCharP(pictur) output = stypes.stringToCharP(lenout) lenout = ctypes.c_int(lenout) if hasattr(et, "__iter__"): times = [] for t in et: libspice.timout_c(ctypes.c_double(t), pictur, lenout, output) checkForSpiceError(None) times.append(stypes.toPythonString(output)) return times else: et = ctypes.c_double(et) libspice.timout_c(et, pictur, lenout, output) return stypes.toPythonString(output)
python
def timout(et, pictur, lenout=_default_len_out): """ This vectorized routine converts an input epoch represented in TDB seconds past the TDB epoch of J2000 to a character string formatted to the specifications of a user's format picture. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timout_c.html :param et: An epoch in seconds past the ephemeris epoch J2000. :type et: Union[float,Iterable[float]] :param pictur: A format specification for the output string. :type pictur: str :param lenout: The length of the output string plus 1. :type lenout: int :return: A string representation of the input epoch. :rtype: str or array of str """ pictur = stypes.stringToCharP(pictur) output = stypes.stringToCharP(lenout) lenout = ctypes.c_int(lenout) if hasattr(et, "__iter__"): times = [] for t in et: libspice.timout_c(ctypes.c_double(t), pictur, lenout, output) checkForSpiceError(None) times.append(stypes.toPythonString(output)) return times else: et = ctypes.c_double(et) libspice.timout_c(et, pictur, lenout, output) return stypes.toPythonString(output)
[ "def", "timout", "(", "et", ",", "pictur", ",", "lenout", "=", "_default_len_out", ")", ":", "pictur", "=", "stypes", ".", "stringToCharP", "(", "pictur", ")", "output", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "if", "hasattr", "(", "et", ",", "\"__iter__\"", ")", ":", "times", "=", "[", "]", "for", "t", "in", "et", ":", "libspice", ".", "timout_c", "(", "ctypes", ".", "c_double", "(", "t", ")", ",", "pictur", ",", "lenout", ",", "output", ")", "checkForSpiceError", "(", "None", ")", "times", ".", "append", "(", "stypes", ".", "toPythonString", "(", "output", ")", ")", "return", "times", "else", ":", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "libspice", ".", "timout_c", "(", "et", ",", "pictur", ",", "lenout", ",", "output", ")", "return", "stypes", ".", "toPythonString", "(", "output", ")" ]
This vectorized routine converts an input epoch represented in TDB seconds past the TDB epoch of J2000 to a character string formatted to the specifications of a user's format picture. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timout_c.html :param et: An epoch in seconds past the ephemeris epoch J2000. :type et: Union[float,Iterable[float]] :param pictur: A format specification for the output string. :type pictur: str :param lenout: The length of the output string plus 1. :type lenout: int :return: A string representation of the input epoch. :rtype: str or array of str
[ "This", "vectorized", "routine", "converts", "an", "input", "epoch", "represented", "in", "TDB", "seconds", "past", "the", "TDB", "epoch", "of", "J2000", "to", "a", "character", "string", "formatted", "to", "the", "specifications", "of", "a", "user", "s", "format", "picture", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13861-L13891
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
tipbod
def tipbod(ref, body, et): """ Return a 3x3 matrix that transforms positions in inertial coordinates to positions in body-equator-and-prime-meridian coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tipbod_c.html :param ref: ID of inertial reference frame to transform from. :type ref: str :param body: ID code of body. :type body: int :param et: Epoch of transformation. :type et: float :return: Transformation (position), inertial to prime meridian. :rtype: 3x3-Element Array of floats """ ref = stypes.stringToCharP(ref) body = ctypes.c_int(body) et = ctypes.c_double(et) retmatrix = stypes.emptyDoubleMatrix() libspice.tipbod_c(ref, body, et, retmatrix) return stypes.cMatrixToNumpy(retmatrix)
python
def tipbod(ref, body, et): """ Return a 3x3 matrix that transforms positions in inertial coordinates to positions in body-equator-and-prime-meridian coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tipbod_c.html :param ref: ID of inertial reference frame to transform from. :type ref: str :param body: ID code of body. :type body: int :param et: Epoch of transformation. :type et: float :return: Transformation (position), inertial to prime meridian. :rtype: 3x3-Element Array of floats """ ref = stypes.stringToCharP(ref) body = ctypes.c_int(body) et = ctypes.c_double(et) retmatrix = stypes.emptyDoubleMatrix() libspice.tipbod_c(ref, body, et, retmatrix) return stypes.cMatrixToNumpy(retmatrix)
[ "def", "tipbod", "(", "ref", ",", "body", ",", "et", ")", ":", "ref", "=", "stypes", ".", "stringToCharP", "(", "ref", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "retmatrix", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "tipbod_c", "(", "ref", ",", "body", ",", "et", ",", "retmatrix", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "retmatrix", ")" ]
Return a 3x3 matrix that transforms positions in inertial coordinates to positions in body-equator-and-prime-meridian coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tipbod_c.html :param ref: ID of inertial reference frame to transform from. :type ref: str :param body: ID code of body. :type body: int :param et: Epoch of transformation. :type et: float :return: Transformation (position), inertial to prime meridian. :rtype: 3x3-Element Array of floats
[ "Return", "a", "3x3", "matrix", "that", "transforms", "positions", "in", "inertial", "coordinates", "to", "positions", "in", "body", "-", "equator", "-", "and", "-", "prime", "-", "meridian", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13895-L13917
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
tisbod
def tisbod(ref, body, et): """ Return a 6x6 matrix that transforms states in inertial coordinates to states in body-equator-and-prime-meridian coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tisbod_c.html :param ref: ID of inertial reference frame to transform from. :type ref: str :param body: ID code of body. :type body: int :param et: Epoch of transformation. :type et: float :return: Transformation (state), inertial to prime meridian. :rtype: 6x6-Element Array of floats """ ref = stypes.stringToCharP(ref) body = ctypes.c_int(body) et = ctypes.c_double(et) retmatrix = stypes.emptyDoubleMatrix(x=6, y=6) libspice.tisbod_c(ref, body, et, retmatrix) return stypes.cMatrixToNumpy(retmatrix)
python
def tisbod(ref, body, et): """ Return a 6x6 matrix that transforms states in inertial coordinates to states in body-equator-and-prime-meridian coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tisbod_c.html :param ref: ID of inertial reference frame to transform from. :type ref: str :param body: ID code of body. :type body: int :param et: Epoch of transformation. :type et: float :return: Transformation (state), inertial to prime meridian. :rtype: 6x6-Element Array of floats """ ref = stypes.stringToCharP(ref) body = ctypes.c_int(body) et = ctypes.c_double(et) retmatrix = stypes.emptyDoubleMatrix(x=6, y=6) libspice.tisbod_c(ref, body, et, retmatrix) return stypes.cMatrixToNumpy(retmatrix)
[ "def", "tisbod", "(", "ref", ",", "body", ",", "et", ")", ":", "ref", "=", "stypes", ".", "stringToCharP", "(", "ref", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "retmatrix", "=", "stypes", ".", "emptyDoubleMatrix", "(", "x", "=", "6", ",", "y", "=", "6", ")", "libspice", ".", "tisbod_c", "(", "ref", ",", "body", ",", "et", ",", "retmatrix", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "retmatrix", ")" ]
Return a 6x6 matrix that transforms states in inertial coordinates to states in body-equator-and-prime-meridian coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tisbod_c.html :param ref: ID of inertial reference frame to transform from. :type ref: str :param body: ID code of body. :type body: int :param et: Epoch of transformation. :type et: float :return: Transformation (state), inertial to prime meridian. :rtype: 6x6-Element Array of floats
[ "Return", "a", "6x6", "matrix", "that", "transforms", "states", "in", "inertial", "coordinates", "to", "states", "in", "body", "-", "equator", "-", "and", "-", "prime", "-", "meridian", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13921-L13942
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
tkvrsn
def tkvrsn(item): """ Given an item such as the Toolkit or an entry point name, return the latest version string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tkvrsn_c.html :param item: Item for which a version string is desired. :type item: str :return: the latest version string. :rtype: str """ item = stypes.stringToCharP(item) return stypes.toPythonString(libspice.tkvrsn_c(item))
python
def tkvrsn(item): """ Given an item such as the Toolkit or an entry point name, return the latest version string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tkvrsn_c.html :param item: Item for which a version string is desired. :type item: str :return: the latest version string. :rtype: str """ item = stypes.stringToCharP(item) return stypes.toPythonString(libspice.tkvrsn_c(item))
[ "def", "tkvrsn", "(", "item", ")", ":", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "return", "stypes", ".", "toPythonString", "(", "libspice", ".", "tkvrsn_c", "(", "item", ")", ")" ]
Given an item such as the Toolkit or an entry point name, return the latest version string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tkvrsn_c.html :param item: Item for which a version string is desired. :type item: str :return: the latest version string. :rtype: str
[ "Given", "an", "item", "such", "as", "the", "Toolkit", "or", "an", "entry", "point", "name", "return", "the", "latest", "version", "string", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13946-L13959
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
tparse
def tparse(instring, lenout=_default_len_out): """ Parse a time string and return seconds past the J2000 epoch on a formal calendar. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tparse_c.html :param instring: Input time string, UTC. :type instring: str :param lenout: Available space in output error message string. :type lenout: int :return: Equivalent UTC seconds past J2000, Descriptive error message. :rtype: tuple """ errmsg = stypes.stringToCharP(lenout) lenout = ctypes.c_int(lenout) instring = stypes.stringToCharP(instring) sp2000 = ctypes.c_double() libspice.tparse_c(instring, lenout, ctypes.byref(sp2000), errmsg) return sp2000.value, stypes.toPythonString(errmsg)
python
def tparse(instring, lenout=_default_len_out): """ Parse a time string and return seconds past the J2000 epoch on a formal calendar. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tparse_c.html :param instring: Input time string, UTC. :type instring: str :param lenout: Available space in output error message string. :type lenout: int :return: Equivalent UTC seconds past J2000, Descriptive error message. :rtype: tuple """ errmsg = stypes.stringToCharP(lenout) lenout = ctypes.c_int(lenout) instring = stypes.stringToCharP(instring) sp2000 = ctypes.c_double() libspice.tparse_c(instring, lenout, ctypes.byref(sp2000), errmsg) return sp2000.value, stypes.toPythonString(errmsg)
[ "def", "tparse", "(", "instring", ",", "lenout", "=", "_default_len_out", ")", ":", "errmsg", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "instring", "=", "stypes", ".", "stringToCharP", "(", "instring", ")", "sp2000", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "tparse_c", "(", "instring", ",", "lenout", ",", "ctypes", ".", "byref", "(", "sp2000", ")", ",", "errmsg", ")", "return", "sp2000", ".", "value", ",", "stypes", ".", "toPythonString", "(", "errmsg", ")" ]
Parse a time string and return seconds past the J2000 epoch on a formal calendar. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tparse_c.html :param instring: Input time string, UTC. :type instring: str :param lenout: Available space in output error message string. :type lenout: int :return: Equivalent UTC seconds past J2000, Descriptive error message. :rtype: tuple
[ "Parse", "a", "time", "string", "and", "return", "seconds", "past", "the", "J2000", "epoch", "on", "a", "formal", "calendar", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13963-L13982
train