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
dafec
def dafec(handle, bufsiz, lenout=_default_len_out): """ Extract comments from the comment area of a binary DAF. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafec_c.html :param handle: Handle of binary DAF opened with read access. :type handle: int :param bufsiz: Maximum size, in lines, of buffer. :type bufsiz: int :param lenout: Length of strings in output buffer. :type lenout: int :return: Number of extracted comment lines, buffer where extracted comment lines are placed, Indicates whether all comments have been extracted. :rtype: tuple """ handle = ctypes.c_int(handle) buffer = stypes.emptyCharArray(yLen=bufsiz, xLen=lenout) bufsiz = ctypes.c_int(bufsiz) lenout = ctypes.c_int(lenout) n = ctypes.c_int() done = ctypes.c_int() libspice.dafec_c(handle, bufsiz, lenout, ctypes.byref(n), ctypes.byref(buffer), ctypes.byref(done)) return n.value, stypes.cVectorToPython(buffer), bool(done.value)
python
def dafec(handle, bufsiz, lenout=_default_len_out): """ Extract comments from the comment area of a binary DAF. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafec_c.html :param handle: Handle of binary DAF opened with read access. :type handle: int :param bufsiz: Maximum size, in lines, of buffer. :type bufsiz: int :param lenout: Length of strings in output buffer. :type lenout: int :return: Number of extracted comment lines, buffer where extracted comment lines are placed, Indicates whether all comments have been extracted. :rtype: tuple """ handle = ctypes.c_int(handle) buffer = stypes.emptyCharArray(yLen=bufsiz, xLen=lenout) bufsiz = ctypes.c_int(bufsiz) lenout = ctypes.c_int(lenout) n = ctypes.c_int() done = ctypes.c_int() libspice.dafec_c(handle, bufsiz, lenout, ctypes.byref(n), ctypes.byref(buffer), ctypes.byref(done)) return n.value, stypes.cVectorToPython(buffer), bool(done.value)
[ "def", "dafec", "(", "handle", ",", "bufsiz", ",", "lenout", "=", "_default_len_out", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "buffer", "=", "stypes", ".", "emptyCharArray", "(", "yLen", "=", "bufsiz", ",", "xLen", "=", "lenout", ")", "bufsiz", "=", "ctypes", ".", "c_int", "(", "bufsiz", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "done", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "dafec_c", "(", "handle", ",", "bufsiz", ",", "lenout", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "ctypes", ".", "byref", "(", "buffer", ")", ",", "ctypes", ".", "byref", "(", "done", ")", ")", "return", "n", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "buffer", ")", ",", "bool", "(", "done", ".", "value", ")" ]
Extract comments from the comment area of a binary DAF. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafec_c.html :param handle: Handle of binary DAF opened with read access. :type handle: int :param bufsiz: Maximum size, in lines, of buffer. :type bufsiz: int :param lenout: Length of strings in output buffer. :type lenout: int :return: Number of extracted comment lines, buffer where extracted comment lines are placed, Indicates whether all comments have been extracted. :rtype: tuple
[ "Extract", "comments", "from", "the", "comment", "area", "of", "a", "binary", "DAF", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1798-L1824
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dafopr
def dafopr(fname): """ Open a DAF for subsequent read requests. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafopr_c.html :param fname: Name of DAF to be opened. :type fname: str :return: Handle assigned to DAF. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.dafopr_c(fname, ctypes.byref(handle)) return handle.value
python
def dafopr(fname): """ Open a DAF for subsequent read requests. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafopr_c.html :param fname: Name of DAF to be opened. :type fname: str :return: Handle assigned to DAF. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.dafopr_c(fname, ctypes.byref(handle)) return handle.value
[ "def", "dafopr", "(", "fname", ")", ":", "fname", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "dafopr_c", "(", "fname", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Open a DAF for subsequent read requests. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafopr_c.html :param fname: Name of DAF to be opened. :type fname: str :return: Handle assigned to DAF. :rtype: int
[ "Open", "a", "DAF", "for", "subsequent", "read", "requests", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1964-L1978
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dafopw
def dafopw(fname): """ Open a DAF for subsequent write requests. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafopw_c.html :param fname: Name of DAF to be opened. :type fname: str :return: Handle assigned to DAF. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.dafopw_c(fname, ctypes.byref(handle)) return handle.value
python
def dafopw(fname): """ Open a DAF for subsequent write requests. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafopw_c.html :param fname: Name of DAF to be opened. :type fname: str :return: Handle assigned to DAF. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.dafopw_c(fname, ctypes.byref(handle)) return handle.value
[ "def", "dafopw", "(", "fname", ")", ":", "fname", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "dafopw_c", "(", "fname", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Open a DAF for subsequent write requests. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafopw_c.html :param fname: Name of DAF to be opened. :type fname: str :return: Handle assigned to DAF. :rtype: int
[ "Open", "a", "DAF", "for", "subsequent", "write", "requests", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1982-L1996
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dafrfr
def dafrfr(handle, lenout=_default_len_out): """ Read the contents of the file record of a DAF. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafrfr_c.html :param handle: Handle of an open DAF file. :type handle: int :param lenout: Available room in the output string :type lenout: int :return: Number of double precision components in summaries, Number of integer components in summaries, Internal file name, Forward list pointer, Backward list pointer, Free address pointer. :rtype: tuple """ handle = ctypes.c_int(handle) lenout = ctypes.c_int(lenout) nd = ctypes.c_int() ni = ctypes.c_int() ifname = stypes.stringToCharP(lenout) fward = ctypes.c_int() bward = ctypes.c_int() free = ctypes.c_int() libspice.dafrfr_c(handle, lenout, ctypes.byref(nd), ctypes.byref(ni), ifname, ctypes.byref(fward), ctypes.byref(bward), ctypes.byref(free)) return nd.value, ni.value, stypes.toPythonString( ifname), fward.value, bward.value, free.value
python
def dafrfr(handle, lenout=_default_len_out): """ Read the contents of the file record of a DAF. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafrfr_c.html :param handle: Handle of an open DAF file. :type handle: int :param lenout: Available room in the output string :type lenout: int :return: Number of double precision components in summaries, Number of integer components in summaries, Internal file name, Forward list pointer, Backward list pointer, Free address pointer. :rtype: tuple """ handle = ctypes.c_int(handle) lenout = ctypes.c_int(lenout) nd = ctypes.c_int() ni = ctypes.c_int() ifname = stypes.stringToCharP(lenout) fward = ctypes.c_int() bward = ctypes.c_int() free = ctypes.c_int() libspice.dafrfr_c(handle, lenout, ctypes.byref(nd), ctypes.byref(ni), ifname, ctypes.byref(fward), ctypes.byref(bward), ctypes.byref(free)) return nd.value, ni.value, stypes.toPythonString( ifname), fward.value, bward.value, free.value
[ "def", "dafrfr", "(", "handle", ",", "lenout", "=", "_default_len_out", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "nd", "=", "ctypes", ".", "c_int", "(", ")", "ni", "=", "ctypes", ".", "c_int", "(", ")", "ifname", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "fward", "=", "ctypes", ".", "c_int", "(", ")", "bward", "=", "ctypes", ".", "c_int", "(", ")", "free", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "dafrfr_c", "(", "handle", ",", "lenout", ",", "ctypes", ".", "byref", "(", "nd", ")", ",", "ctypes", ".", "byref", "(", "ni", ")", ",", "ifname", ",", "ctypes", ".", "byref", "(", "fward", ")", ",", "ctypes", ".", "byref", "(", "bward", ")", ",", "ctypes", ".", "byref", "(", "free", ")", ")", "return", "nd", ".", "value", ",", "ni", ".", "value", ",", "stypes", ".", "toPythonString", "(", "ifname", ")", ",", "fward", ".", "value", ",", "bward", ".", "value", ",", "free", ".", "value" ]
Read the contents of the file record of a DAF. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafrfr_c.html :param handle: Handle of an open DAF file. :type handle: int :param lenout: Available room in the output string :type lenout: int :return: Number of double precision components in summaries, Number of integer components in summaries, Internal file name, Forward list pointer, Backward list pointer, Free address pointer. :rtype: tuple
[ "Read", "the", "contents", "of", "the", "file", "record", "of", "a", "DAF", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2056-L2086
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dafrs
def dafrs(insum): """ Change the summary for the current array in the current DAF. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafrs_c.html :param insum: New summary for current array. :type insum: Array of floats """ insum = stypes.toDoubleVector(insum) libspice.dafrs_c(ctypes.byref(insum))
python
def dafrs(insum): """ Change the summary for the current array in the current DAF. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafrs_c.html :param insum: New summary for current array. :type insum: Array of floats """ insum = stypes.toDoubleVector(insum) libspice.dafrs_c(ctypes.byref(insum))
[ "def", "dafrs", "(", "insum", ")", ":", "insum", "=", "stypes", ".", "toDoubleVector", "(", "insum", ")", "libspice", ".", "dafrs_c", "(", "ctypes", ".", "byref", "(", "insum", ")", ")" ]
Change the summary for the current array in the current DAF. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafrs_c.html :param insum: New summary for current array. :type insum: Array of floats
[ "Change", "the", "summary", "for", "the", "current", "array", "in", "the", "current", "DAF", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2090-L2100
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dafus
def dafus(insum, nd, ni): """ Unpack an array summary into its double precision and integer components. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafus_c.html :param insum: Array summary. :type insum: Array of floats :param nd: Number of double precision components. :type nd: int :param ni: Number of integer components. :type ni: int :return: Double precision components, Integer components. :rtype: tuple """ insum = stypes.toDoubleVector(insum) dc = stypes.emptyDoubleVector(nd) ic = stypes.emptyIntVector(ni) nd = ctypes.c_int(nd) ni = ctypes.c_int(ni) libspice.dafus_c(insum, nd, ni, dc, ic) return stypes.cVectorToPython(dc), stypes.cVectorToPython(ic)
python
def dafus(insum, nd, ni): """ Unpack an array summary into its double precision and integer components. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafus_c.html :param insum: Array summary. :type insum: Array of floats :param nd: Number of double precision components. :type nd: int :param ni: Number of integer components. :type ni: int :return: Double precision components, Integer components. :rtype: tuple """ insum = stypes.toDoubleVector(insum) dc = stypes.emptyDoubleVector(nd) ic = stypes.emptyIntVector(ni) nd = ctypes.c_int(nd) ni = ctypes.c_int(ni) libspice.dafus_c(insum, nd, ni, dc, ic) return stypes.cVectorToPython(dc), stypes.cVectorToPython(ic)
[ "def", "dafus", "(", "insum", ",", "nd", ",", "ni", ")", ":", "insum", "=", "stypes", ".", "toDoubleVector", "(", "insum", ")", "dc", "=", "stypes", ".", "emptyDoubleVector", "(", "nd", ")", "ic", "=", "stypes", ".", "emptyIntVector", "(", "ni", ")", "nd", "=", "ctypes", ".", "c_int", "(", "nd", ")", "ni", "=", "ctypes", ".", "c_int", "(", "ni", ")", "libspice", ".", "dafus_c", "(", "insum", ",", "nd", ",", "ni", ",", "dc", ",", "ic", ")", "return", "stypes", ".", "cVectorToPython", "(", "dc", ")", ",", "stypes", ".", "cVectorToPython", "(", "ic", ")" ]
Unpack an array summary into its double precision and integer components. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dafus_c.html :param insum: Array summary. :type insum: Array of floats :param nd: Number of double precision components. :type nd: int :param ni: Number of integer components. :type ni: int :return: Double precision components, Integer components. :rtype: tuple
[ "Unpack", "an", "array", "summary", "into", "its", "double", "precision", "and", "integer", "components", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2104-L2125
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dasac
def dasac(handle, buffer): """ Add comments from a buffer of character strings to the comment area of a binary DAS file, appending them to any comments which are already present in the file's comment area. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasac_c.html :param handle: DAS handle of a file opened with write access. :type handle: int :param buffer: Buffer of lines to be put into the comment area. :type buffer: Array of strs """ handle = ctypes.c_int(handle) n = ctypes.c_int(len(buffer)) buflen = ctypes.c_int(max(len(s) for s in buffer) + 1) buffer = stypes.listToCharArrayPtr(buffer) libspice.dasac_c(handle, n, buflen, buffer)
python
def dasac(handle, buffer): """ Add comments from a buffer of character strings to the comment area of a binary DAS file, appending them to any comments which are already present in the file's comment area. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasac_c.html :param handle: DAS handle of a file opened with write access. :type handle: int :param buffer: Buffer of lines to be put into the comment area. :type buffer: Array of strs """ handle = ctypes.c_int(handle) n = ctypes.c_int(len(buffer)) buflen = ctypes.c_int(max(len(s) for s in buffer) + 1) buffer = stypes.listToCharArrayPtr(buffer) libspice.dasac_c(handle, n, buflen, buffer)
[ "def", "dasac", "(", "handle", ",", "buffer", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "n", "=", "ctypes", ".", "c_int", "(", "len", "(", "buffer", ")", ")", "buflen", "=", "ctypes", ".", "c_int", "(", "max", "(", "len", "(", "s", ")", "for", "s", "in", "buffer", ")", "+", "1", ")", "buffer", "=", "stypes", ".", "listToCharArrayPtr", "(", "buffer", ")", "libspice", ".", "dasac_c", "(", "handle", ",", "n", ",", "buflen", ",", "buffer", ")" ]
Add comments from a buffer of character strings to the comment area of a binary DAS file, appending them to any comments which are already present in the file's comment area. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasac_c.html :param handle: DAS handle of a file opened with write access. :type handle: int :param buffer: Buffer of lines to be put into the comment area. :type buffer: Array of strs
[ "Add", "comments", "from", "a", "buffer", "of", "character", "strings", "to", "the", "comment", "area", "of", "a", "binary", "DAS", "file", "appending", "them", "to", "any", "comments", "which", "are", "already", "present", "in", "the", "file", "s", "comment", "area", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2129-L2146
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dasec
def dasec(handle, bufsiz=_default_len_out, buflen=_default_len_out): """ Extract comments from the comment area of a binary DAS file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasec_c.html :param handle: Handle of binary DAS file open with read access. :type handle: int :param bufsiz: Maximum size, in lines, of buffer. :type bufsiz: int :param buflen: Line length associated with buffer. :type buflen: int :return: Number of comments extracted from the DAS file, Buffer in which extracted comments are placed, Indicates whether all comments have been extracted. :rtype: tuple """ handle = ctypes.c_int(handle) buffer = stypes.emptyCharArray(buflen, bufsiz) bufsiz = ctypes.c_int(bufsiz) buflen = ctypes.c_int(buflen) n = ctypes.c_int(0) done = ctypes.c_int() libspice.dasec_c(handle, bufsiz, buflen, ctypes.byref(n), ctypes.byref(buffer), ctypes.byref(done)) return n.value, stypes.cVectorToPython(buffer), done.value
python
def dasec(handle, bufsiz=_default_len_out, buflen=_default_len_out): """ Extract comments from the comment area of a binary DAS file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasec_c.html :param handle: Handle of binary DAS file open with read access. :type handle: int :param bufsiz: Maximum size, in lines, of buffer. :type bufsiz: int :param buflen: Line length associated with buffer. :type buflen: int :return: Number of comments extracted from the DAS file, Buffer in which extracted comments are placed, Indicates whether all comments have been extracted. :rtype: tuple """ handle = ctypes.c_int(handle) buffer = stypes.emptyCharArray(buflen, bufsiz) bufsiz = ctypes.c_int(bufsiz) buflen = ctypes.c_int(buflen) n = ctypes.c_int(0) done = ctypes.c_int() libspice.dasec_c(handle, bufsiz, buflen, ctypes.byref(n), ctypes.byref(buffer), ctypes.byref(done)) return n.value, stypes.cVectorToPython(buffer), done.value
[ "def", "dasec", "(", "handle", ",", "bufsiz", "=", "_default_len_out", ",", "buflen", "=", "_default_len_out", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "buffer", "=", "stypes", ".", "emptyCharArray", "(", "buflen", ",", "bufsiz", ")", "bufsiz", "=", "ctypes", ".", "c_int", "(", "bufsiz", ")", "buflen", "=", "ctypes", ".", "c_int", "(", "buflen", ")", "n", "=", "ctypes", ".", "c_int", "(", "0", ")", "done", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "dasec_c", "(", "handle", ",", "bufsiz", ",", "buflen", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "ctypes", ".", "byref", "(", "buffer", ")", ",", "ctypes", ".", "byref", "(", "done", ")", ")", "return", "n", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "buffer", ")", ",", "done", ".", "value" ]
Extract comments from the comment area of a binary DAS file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasec_c.html :param handle: Handle of binary DAS file open with read access. :type handle: int :param bufsiz: Maximum size, in lines, of buffer. :type bufsiz: int :param buflen: Line length associated with buffer. :type buflen: int :return: Number of comments extracted from the DAS file, Buffer in which extracted comments are placed, Indicates whether all comments have been extracted. :rtype: tuple
[ "Extract", "comments", "from", "the", "comment", "area", "of", "a", "binary", "DAS", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2179-L2205
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dasopr
def dasopr(fname): """ Open a DAS file for reading. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasopr_c.html :param fname: Name of a DAS file to be opened. :type fname: str :return: Handle assigned to the opened DAS file. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.dasopr_c(fname, ctypes.byref(handle)) return handle.value
python
def dasopr(fname): """ Open a DAS file for reading. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasopr_c.html :param fname: Name of a DAS file to be opened. :type fname: str :return: Handle assigned to the opened DAS file. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.dasopr_c(fname, ctypes.byref(handle)) return handle.value
[ "def", "dasopr", "(", "fname", ")", ":", "fname", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "dasopr_c", "(", "fname", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Open a DAS file for reading. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasopr_c.html :param fname: Name of a DAS file to be opened. :type fname: str :return: Handle assigned to the opened DAS file. :rtype: int
[ "Open", "a", "DAS", "file", "for", "reading", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2258-L2272
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dcyldr
def dcyldr(x, y, z): """ This routine computes the Jacobian of the transformation from rectangular to cylindrical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dcyldr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coordinate of point. :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ x = ctypes.c_double(x) y = ctypes.c_double(y) z = ctypes.c_double(z) jacobi = stypes.emptyDoubleMatrix() libspice.dcyldr_c(x, y, z, jacobi) return stypes.cMatrixToNumpy(jacobi)
python
def dcyldr(x, y, z): """ This routine computes the Jacobian of the transformation from rectangular to cylindrical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dcyldr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coordinate of point. :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ x = ctypes.c_double(x) y = ctypes.c_double(y) z = ctypes.c_double(z) jacobi = stypes.emptyDoubleMatrix() libspice.dcyldr_c(x, y, z, jacobi) return stypes.cMatrixToNumpy(jacobi)
[ "def", "dcyldr", "(", "x", ",", "y", ",", "z", ")", ":", "x", "=", "ctypes", ".", "c_double", "(", "x", ")", "y", "=", "ctypes", ".", "c_double", "(", "y", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "jacobi", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "dcyldr_c", "(", "x", ",", "y", ",", "z", ",", "jacobi", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "jacobi", ")" ]
This routine computes the Jacobian of the transformation from rectangular to cylindrical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dcyldr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coordinate of point. :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats
[ "This", "routine", "computes", "the", "Jacobian", "of", "the", "transformation", "from", "rectangular", "to", "cylindrical", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2323-L2344
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dgeodr
def dgeodr(x, y, z, re, f): """ This routine computes the Jacobian of the transformation from rectangular to geodetic coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dgeodr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coord :type z: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ x = ctypes.c_double(x) y = ctypes.c_double(y) z = ctypes.c_double(z) re = ctypes.c_double(re) f = ctypes.c_double(f) jacobi = stypes.emptyDoubleMatrix() libspice.dgeodr_c(x, y, z, re, f, jacobi) return stypes.cMatrixToNumpy(jacobi)
python
def dgeodr(x, y, z, re, f): """ This routine computes the Jacobian of the transformation from rectangular to geodetic coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dgeodr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coord :type z: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ x = ctypes.c_double(x) y = ctypes.c_double(y) z = ctypes.c_double(z) re = ctypes.c_double(re) f = ctypes.c_double(f) jacobi = stypes.emptyDoubleMatrix() libspice.dgeodr_c(x, y, z, re, f, jacobi) return stypes.cMatrixToNumpy(jacobi)
[ "def", "dgeodr", "(", "x", ",", "y", ",", "z", ",", "re", ",", "f", ")", ":", "x", "=", "ctypes", ".", "c_double", "(", "x", ")", "y", "=", "ctypes", ".", "c_double", "(", "y", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "re", "=", "ctypes", ".", "c_double", "(", "re", ")", "f", "=", "ctypes", ".", "c_double", "(", "f", ")", "jacobi", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "dgeodr_c", "(", "x", ",", "y", ",", "z", ",", "re", ",", "f", ",", "jacobi", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "jacobi", ")" ]
This routine computes the Jacobian of the transformation from rectangular to geodetic coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dgeodr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coord :type z: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats
[ "This", "routine", "computes", "the", "Jacobian", "of", "the", "transformation", "from", "rectangular", "to", "geodetic", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2385-L2412
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
diags2
def diags2(symmat): """ Diagonalize a symmetric 2x2 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/diags2_c.html :param symmat: A symmetric 2x2 matrix. :type symmat: 2x2-Element Array of floats :return: A diagonal matrix similar to symmat, A rotation used as the similarity transformation. :rtype: tuple """ symmat = stypes.toDoubleMatrix(symmat) diag = stypes.emptyDoubleMatrix(x=2, y=2) rotateout = stypes.emptyDoubleMatrix(x=2, y=2) libspice.diags2_c(symmat, diag, rotateout) return stypes.cMatrixToNumpy(diag), stypes.cMatrixToNumpy(rotateout)
python
def diags2(symmat): """ Diagonalize a symmetric 2x2 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/diags2_c.html :param symmat: A symmetric 2x2 matrix. :type symmat: 2x2-Element Array of floats :return: A diagonal matrix similar to symmat, A rotation used as the similarity transformation. :rtype: tuple """ symmat = stypes.toDoubleMatrix(symmat) diag = stypes.emptyDoubleMatrix(x=2, y=2) rotateout = stypes.emptyDoubleMatrix(x=2, y=2) libspice.diags2_c(symmat, diag, rotateout) return stypes.cMatrixToNumpy(diag), stypes.cMatrixToNumpy(rotateout)
[ "def", "diags2", "(", "symmat", ")", ":", "symmat", "=", "stypes", ".", "toDoubleMatrix", "(", "symmat", ")", "diag", "=", "stypes", ".", "emptyDoubleMatrix", "(", "x", "=", "2", ",", "y", "=", "2", ")", "rotateout", "=", "stypes", ".", "emptyDoubleMatrix", "(", "x", "=", "2", ",", "y", "=", "2", ")", "libspice", ".", "diags2_c", "(", "symmat", ",", "diag", ",", "rotateout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "diag", ")", ",", "stypes", ".", "cMatrixToNumpy", "(", "rotateout", ")" ]
Diagonalize a symmetric 2x2 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/diags2_c.html :param symmat: A symmetric 2x2 matrix. :type symmat: 2x2-Element Array of floats :return: A diagonal matrix similar to symmat, A rotation used as the similarity transformation. :rtype: tuple
[ "Diagonalize", "a", "symmetric", "2x2", "matrix", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2416-L2433
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dlatdr
def dlatdr(x, y, z): """ This routine computes the Jacobian of the transformation from rectangular to latitudinal coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dlatdr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coord :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ x = ctypes.c_double(x) y = ctypes.c_double(y) z = ctypes.c_double(z) jacobi = stypes.emptyDoubleMatrix() libspice.dlatdr_c(x, y, z, jacobi) return stypes.cMatrixToNumpy(jacobi)
python
def dlatdr(x, y, z): """ This routine computes the Jacobian of the transformation from rectangular to latitudinal coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dlatdr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coord :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ x = ctypes.c_double(x) y = ctypes.c_double(y) z = ctypes.c_double(z) jacobi = stypes.emptyDoubleMatrix() libspice.dlatdr_c(x, y, z, jacobi) return stypes.cMatrixToNumpy(jacobi)
[ "def", "dlatdr", "(", "x", ",", "y", ",", "z", ")", ":", "x", "=", "ctypes", ".", "c_double", "(", "x", ")", "y", "=", "ctypes", ".", "c_double", "(", "y", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "jacobi", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "dlatdr_c", "(", "x", ",", "y", ",", "z", ",", "jacobi", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "jacobi", ")" ]
This routine computes the Jacobian of the transformation from rectangular to latitudinal coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dlatdr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coord :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats
[ "This", "routine", "computes", "the", "Jacobian", "of", "the", "transformation", "from", "rectangular", "to", "latitudinal", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2554-L2575
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dp2hx
def dp2hx(number, lenout=_default_len_out): """ Convert a double precision number to an equivalent character string using base 16 "scientific notation." http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dp2hx_c.html :param number: D.p. number to be converted. :type number: float :param lenout: Available space for output string. :type lenout: int :return: Equivalent character string, left justified. :rtype: str """ number = ctypes.c_double(number) lenout = ctypes.c_int(lenout) string = stypes.stringToCharP(lenout) length = ctypes.c_int() libspice.dp2hx_c(number, lenout, string, ctypes.byref(length)) return stypes.toPythonString(string)
python
def dp2hx(number, lenout=_default_len_out): """ Convert a double precision number to an equivalent character string using base 16 "scientific notation." http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dp2hx_c.html :param number: D.p. number to be converted. :type number: float :param lenout: Available space for output string. :type lenout: int :return: Equivalent character string, left justified. :rtype: str """ number = ctypes.c_double(number) lenout = ctypes.c_int(lenout) string = stypes.stringToCharP(lenout) length = ctypes.c_int() libspice.dp2hx_c(number, lenout, string, ctypes.byref(length)) return stypes.toPythonString(string)
[ "def", "dp2hx", "(", "number", ",", "lenout", "=", "_default_len_out", ")", ":", "number", "=", "ctypes", ".", "c_double", "(", "number", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "string", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "length", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "dp2hx_c", "(", "number", ",", "lenout", ",", "string", ",", "ctypes", ".", "byref", "(", "length", ")", ")", "return", "stypes", ".", "toPythonString", "(", "string", ")" ]
Convert a double precision number to an equivalent character string using base 16 "scientific notation." http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dp2hx_c.html :param number: D.p. number to be converted. :type number: float :param lenout: Available space for output string. :type lenout: int :return: Equivalent character string, left justified. :rtype: str
[ "Convert", "a", "double", "precision", "number", "to", "an", "equivalent", "character", "string", "using", "base", "16", "scientific", "notation", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2579-L2598
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dpgrdr
def dpgrdr(body, x, y, z, re, f): """ This routine computes the Jacobian matrix of the transformation from rectangular to planetographic coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dpgrdr_c.html :param body: Body with which coordinate system is associated. :type body: str :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coordinate of point. :type z: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ body = stypes.stringToCharP(body) x = ctypes.c_double(x) y = ctypes.c_double(y) z = ctypes.c_double(z) re = ctypes.c_double(re) f = ctypes.c_double(f) jacobi = stypes.emptyDoubleMatrix() libspice.dpgrdr_c(body, x, y, z, re, f, jacobi) return stypes.cMatrixToNumpy(jacobi)
python
def dpgrdr(body, x, y, z, re, f): """ This routine computes the Jacobian matrix of the transformation from rectangular to planetographic coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dpgrdr_c.html :param body: Body with which coordinate system is associated. :type body: str :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coordinate of point. :type z: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ body = stypes.stringToCharP(body) x = ctypes.c_double(x) y = ctypes.c_double(y) z = ctypes.c_double(z) re = ctypes.c_double(re) f = ctypes.c_double(f) jacobi = stypes.emptyDoubleMatrix() libspice.dpgrdr_c(body, x, y, z, re, f, jacobi) return stypes.cMatrixToNumpy(jacobi)
[ "def", "dpgrdr", "(", "body", ",", "x", ",", "y", ",", "z", ",", "re", ",", "f", ")", ":", "body", "=", "stypes", ".", "stringToCharP", "(", "body", ")", "x", "=", "ctypes", ".", "c_double", "(", "x", ")", "y", "=", "ctypes", ".", "c_double", "(", "y", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "re", "=", "ctypes", ".", "c_double", "(", "re", ")", "f", "=", "ctypes", ".", "c_double", "(", "f", ")", "jacobi", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "dpgrdr_c", "(", "body", ",", "x", ",", "y", ",", "z", ",", "re", ",", "f", ",", "jacobi", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "jacobi", ")" ]
This routine computes the Jacobian matrix of the transformation from rectangular to planetographic coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dpgrdr_c.html :param body: Body with which coordinate system is associated. :type body: str :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coordinate of point. :type z: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats
[ "This", "routine", "computes", "the", "Jacobian", "matrix", "of", "the", "transformation", "from", "rectangular", "to", "planetographic", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2602-L2632
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
drdcyl
def drdcyl(r, lon, z): """ This routine computes the Jacobian of the transformation from cylindrical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdcyl_c.html :param r: Distance of a point from the origin. :type r: float :param lon: Angle of the point from the xz plane in radians. :type lon: float :param z: Height of the point above the xy plane. :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ r = ctypes.c_double(r) lon = ctypes.c_double(lon) z = ctypes.c_double(z) jacobi = stypes.emptyDoubleMatrix() libspice.drdcyl_c(r, lon, z, jacobi) return stypes.cMatrixToNumpy(jacobi)
python
def drdcyl(r, lon, z): """ This routine computes the Jacobian of the transformation from cylindrical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdcyl_c.html :param r: Distance of a point from the origin. :type r: float :param lon: Angle of the point from the xz plane in radians. :type lon: float :param z: Height of the point above the xy plane. :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ r = ctypes.c_double(r) lon = ctypes.c_double(lon) z = ctypes.c_double(z) jacobi = stypes.emptyDoubleMatrix() libspice.drdcyl_c(r, lon, z, jacobi) return stypes.cMatrixToNumpy(jacobi)
[ "def", "drdcyl", "(", "r", ",", "lon", ",", "z", ")", ":", "r", "=", "ctypes", ".", "c_double", "(", "r", ")", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "jacobi", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "drdcyl_c", "(", "r", ",", "lon", ",", "z", ",", "jacobi", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "jacobi", ")" ]
This routine computes the Jacobian of the transformation from cylindrical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdcyl_c.html :param r: Distance of a point from the origin. :type r: float :param lon: Angle of the point from the xz plane in radians. :type lon: float :param z: Height of the point above the xy plane. :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats
[ "This", "routine", "computes", "the", "Jacobian", "of", "the", "transformation", "from", "cylindrical", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2681-L2702
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
drdgeo
def drdgeo(lon, lat, alt, re, f): """ This routine computes the Jacobian of the transformation from geodetic to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdgeo_c.html :param lon: Geodetic longitude of point (radians). :type lon: float :param lat: Geodetic latitude of point (radians). :type lat: float :param alt: Altitude of point above the reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) alt = ctypes.c_double(alt) re = ctypes.c_double(re) f = ctypes.c_double(f) jacobi = stypes.emptyDoubleMatrix() libspice.drdgeo_c(lon, lat, alt, re, f, jacobi) return stypes.cMatrixToNumpy(jacobi)
python
def drdgeo(lon, lat, alt, re, f): """ This routine computes the Jacobian of the transformation from geodetic to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdgeo_c.html :param lon: Geodetic longitude of point (radians). :type lon: float :param lat: Geodetic latitude of point (radians). :type lat: float :param alt: Altitude of point above the reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) alt = ctypes.c_double(alt) re = ctypes.c_double(re) f = ctypes.c_double(f) jacobi = stypes.emptyDoubleMatrix() libspice.drdgeo_c(lon, lat, alt, re, f, jacobi) return stypes.cMatrixToNumpy(jacobi)
[ "def", "drdgeo", "(", "lon", ",", "lat", ",", "alt", ",", "re", ",", "f", ")", ":", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "lat", "=", "ctypes", ".", "c_double", "(", "lat", ")", "alt", "=", "ctypes", ".", "c_double", "(", "alt", ")", "re", "=", "ctypes", ".", "c_double", "(", "re", ")", "f", "=", "ctypes", ".", "c_double", "(", "f", ")", "jacobi", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "drdgeo_c", "(", "lon", ",", "lat", ",", "alt", ",", "re", ",", "f", ",", "jacobi", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "jacobi", ")" ]
This routine computes the Jacobian of the transformation from geodetic to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdgeo_c.html :param lon: Geodetic longitude of point (radians). :type lon: float :param lat: Geodetic latitude of point (radians). :type lat: float :param alt: Altitude of point above the reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats
[ "This", "routine", "computes", "the", "Jacobian", "of", "the", "transformation", "from", "geodetic", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2706-L2733
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
drdlat
def drdlat(r, lon, lat): """ Compute the Jacobian of the transformation from latitudinal to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdlat_c.html :param r: Distance of a point from the origin. :type r: float :param lon: Angle of the point from the XZ plane in radians. :type lon: float :param lat: Angle of the point from the XY plane in radians. :type lat: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ r = ctypes.c_double(r) lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) jacobi = stypes.emptyDoubleMatrix() libspice.drdlat_c(r, lon, lat, jacobi) return stypes.cMatrixToNumpy(jacobi)
python
def drdlat(r, lon, lat): """ Compute the Jacobian of the transformation from latitudinal to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdlat_c.html :param r: Distance of a point from the origin. :type r: float :param lon: Angle of the point from the XZ plane in radians. :type lon: float :param lat: Angle of the point from the XY plane in radians. :type lat: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ r = ctypes.c_double(r) lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) jacobi = stypes.emptyDoubleMatrix() libspice.drdlat_c(r, lon, lat, jacobi) return stypes.cMatrixToNumpy(jacobi)
[ "def", "drdlat", "(", "r", ",", "lon", ",", "lat", ")", ":", "r", "=", "ctypes", ".", "c_double", "(", "r", ")", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "lat", "=", "ctypes", ".", "c_double", "(", "lat", ")", "jacobi", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "drdlat_c", "(", "r", ",", "lon", ",", "lat", ",", "jacobi", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "jacobi", ")" ]
Compute the Jacobian of the transformation from latitudinal to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdlat_c.html :param r: Distance of a point from the origin. :type r: float :param lon: Angle of the point from the XZ plane in radians. :type lon: float :param lat: Angle of the point from the XY plane in radians. :type lat: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats
[ "Compute", "the", "Jacobian", "of", "the", "transformation", "from", "latitudinal", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2737-L2758
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
drdpgr
def drdpgr(body, lon, lat, alt, re, f): """ This routine computes the Jacobian matrix of the transformation from planetographic to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdpgr_c.html :param body: Body with which coordinate system is associated. :type body: str :param lon: Planetographic longitude of a point (radians). :type lon: float :param lat: Planetographic latitude of a point (radians). :type lat: float :param alt: Altitude of a point above reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ body = stypes.stringToCharP(body) lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) alt = ctypes.c_double(alt) re = ctypes.c_double(re) f = ctypes.c_double(f) jacobi = stypes.emptyDoubleMatrix() libspice.drdpgr_c(body, lon, lat, alt, re, f, jacobi) return stypes.cMatrixToNumpy(jacobi)
python
def drdpgr(body, lon, lat, alt, re, f): """ This routine computes the Jacobian matrix of the transformation from planetographic to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdpgr_c.html :param body: Body with which coordinate system is associated. :type body: str :param lon: Planetographic longitude of a point (radians). :type lon: float :param lat: Planetographic latitude of a point (radians). :type lat: float :param alt: Altitude of a point above reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ body = stypes.stringToCharP(body) lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) alt = ctypes.c_double(alt) re = ctypes.c_double(re) f = ctypes.c_double(f) jacobi = stypes.emptyDoubleMatrix() libspice.drdpgr_c(body, lon, lat, alt, re, f, jacobi) return stypes.cMatrixToNumpy(jacobi)
[ "def", "drdpgr", "(", "body", ",", "lon", ",", "lat", ",", "alt", ",", "re", ",", "f", ")", ":", "body", "=", "stypes", ".", "stringToCharP", "(", "body", ")", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "lat", "=", "ctypes", ".", "c_double", "(", "lat", ")", "alt", "=", "ctypes", ".", "c_double", "(", "alt", ")", "re", "=", "ctypes", ".", "c_double", "(", "re", ")", "f", "=", "ctypes", ".", "c_double", "(", "f", ")", "jacobi", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "drdpgr_c", "(", "body", ",", "lon", ",", "lat", ",", "alt", ",", "re", ",", "f", ",", "jacobi", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "jacobi", ")" ]
This routine computes the Jacobian matrix of the transformation from planetographic to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdpgr_c.html :param body: Body with which coordinate system is associated. :type body: str :param lon: Planetographic longitude of a point (radians). :type lon: float :param lat: Planetographic latitude of a point (radians). :type lat: float :param alt: Altitude of a point above reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats
[ "This", "routine", "computes", "the", "Jacobian", "matrix", "of", "the", "transformation", "from", "planetographic", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2762-L2792
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
drdsph
def drdsph(r, colat, lon): """ This routine computes the Jacobian of the transformation from spherical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdsph_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 xy plane. :type lon: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ r = ctypes.c_double(r) colat = ctypes.c_double(colat) lon = ctypes.c_double(lon) jacobi = stypes.emptyDoubleMatrix() libspice.drdsph_c(r, colat, lon, jacobi) return stypes.cMatrixToNumpy(jacobi)
python
def drdsph(r, colat, lon): """ This routine computes the Jacobian of the transformation from spherical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdsph_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 xy plane. :type lon: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ r = ctypes.c_double(r) colat = ctypes.c_double(colat) lon = ctypes.c_double(lon) jacobi = stypes.emptyDoubleMatrix() libspice.drdsph_c(r, colat, lon, jacobi) return stypes.cMatrixToNumpy(jacobi)
[ "def", "drdsph", "(", "r", ",", "colat", ",", "lon", ")", ":", "r", "=", "ctypes", ".", "c_double", "(", "r", ")", "colat", "=", "ctypes", ".", "c_double", "(", "colat", ")", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "jacobi", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "drdsph_c", "(", "r", ",", "colat", ",", "lon", ",", "jacobi", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "jacobi", ")" ]
This routine computes the Jacobian of the transformation from spherical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/drdsph_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 xy plane. :type lon: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats
[ "This", "routine", "computes", "the", "Jacobian", "of", "the", "transformation", "from", "spherical", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2796-L2817
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskb02
def dskb02(handle, dladsc): """ Return bookkeeping data from a DSK type 2 segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskb02_c.html :param handle: DSK file handle :type handle: int :param dladsc: DLA descriptor :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :return: bookkeeping data from a DSK type 2 segment :rtype: tuple """ handle = ctypes.c_int(handle) nv = ctypes.c_int(0) np = ctypes.c_int(0) nvxtot = ctypes.c_int(0) vtxbds = stypes.emptyDoubleMatrix(3, 2) voxsiz = ctypes.c_double(0.0) voxori = stypes.emptyDoubleVector(3) vgrext = stypes.emptyIntVector(3) cgscal = ctypes.c_int(0) vtxnpl = ctypes.c_int(0) voxnpt = ctypes.c_int(0) voxnpl = ctypes.c_int(0) libspice.dskb02_c(handle, dladsc, ctypes.byref(nv), ctypes.byref(np), ctypes.byref(nvxtot), vtxbds, ctypes.byref(voxsiz), voxori, vgrext, ctypes.byref(cgscal), ctypes.byref(vtxnpl), ctypes.byref(voxnpt), ctypes.byref(voxnpl)) return nv.value, np.value, nvxtot.value, stypes.cMatrixToNumpy(vtxbds), voxsiz.value, stypes.cVectorToPython(voxori), stypes.cVectorToPython(vgrext), cgscal.value, vtxnpl.value, voxnpt.value, voxnpl.value
python
def dskb02(handle, dladsc): """ Return bookkeeping data from a DSK type 2 segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskb02_c.html :param handle: DSK file handle :type handle: int :param dladsc: DLA descriptor :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :return: bookkeeping data from a DSK type 2 segment :rtype: tuple """ handle = ctypes.c_int(handle) nv = ctypes.c_int(0) np = ctypes.c_int(0) nvxtot = ctypes.c_int(0) vtxbds = stypes.emptyDoubleMatrix(3, 2) voxsiz = ctypes.c_double(0.0) voxori = stypes.emptyDoubleVector(3) vgrext = stypes.emptyIntVector(3) cgscal = ctypes.c_int(0) vtxnpl = ctypes.c_int(0) voxnpt = ctypes.c_int(0) voxnpl = ctypes.c_int(0) libspice.dskb02_c(handle, dladsc, ctypes.byref(nv), ctypes.byref(np), ctypes.byref(nvxtot), vtxbds, ctypes.byref(voxsiz), voxori, vgrext, ctypes.byref(cgscal), ctypes.byref(vtxnpl), ctypes.byref(voxnpt), ctypes.byref(voxnpl)) return nv.value, np.value, nvxtot.value, stypes.cMatrixToNumpy(vtxbds), voxsiz.value, stypes.cVectorToPython(voxori), stypes.cVectorToPython(vgrext), cgscal.value, vtxnpl.value, voxnpt.value, voxnpl.value
[ "def", "dskb02", "(", "handle", ",", "dladsc", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "nv", "=", "ctypes", ".", "c_int", "(", "0", ")", "np", "=", "ctypes", ".", "c_int", "(", "0", ")", "nvxtot", "=", "ctypes", ".", "c_int", "(", "0", ")", "vtxbds", "=", "stypes", ".", "emptyDoubleMatrix", "(", "3", ",", "2", ")", "voxsiz", "=", "ctypes", ".", "c_double", "(", "0.0", ")", "voxori", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "vgrext", "=", "stypes", ".", "emptyIntVector", "(", "3", ")", "cgscal", "=", "ctypes", ".", "c_int", "(", "0", ")", "vtxnpl", "=", "ctypes", ".", "c_int", "(", "0", ")", "voxnpt", "=", "ctypes", ".", "c_int", "(", "0", ")", "voxnpl", "=", "ctypes", ".", "c_int", "(", "0", ")", "libspice", ".", "dskb02_c", "(", "handle", ",", "dladsc", ",", "ctypes", ".", "byref", "(", "nv", ")", ",", "ctypes", ".", "byref", "(", "np", ")", ",", "ctypes", ".", "byref", "(", "nvxtot", ")", ",", "vtxbds", ",", "ctypes", ".", "byref", "(", "voxsiz", ")", ",", "voxori", ",", "vgrext", ",", "ctypes", ".", "byref", "(", "cgscal", ")", ",", "ctypes", ".", "byref", "(", "vtxnpl", ")", ",", "ctypes", ".", "byref", "(", "voxnpt", ")", ",", "ctypes", ".", "byref", "(", "voxnpl", ")", ")", "return", "nv", ".", "value", ",", "np", ".", "value", ",", "nvxtot", ".", "value", ",", "stypes", ".", "cMatrixToNumpy", "(", "vtxbds", ")", ",", "voxsiz", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "voxori", ")", ",", "stypes", ".", "cVectorToPython", "(", "vgrext", ")", ",", "cgscal", ".", "value", ",", "vtxnpl", ".", "value", ",", "voxnpt", ".", "value", ",", "voxnpl", ".", "value" ]
Return bookkeeping data from a DSK type 2 segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskb02_c.html :param handle: DSK file handle :type handle: int :param dladsc: DLA descriptor :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :return: bookkeeping data from a DSK type 2 segment :rtype: tuple
[ "Return", "bookkeeping", "data", "from", "a", "DSK", "type", "2", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2821-L2848
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskcls
def dskcls(handle, optmiz=False): """ Close a DSK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskcls_c.html :param handle: Handle assigned to the opened DSK file. :type handle: int :param optmiz: Flag indicating whether to segregate the DSK. :type optmiz: bool :return: """ handle = ctypes.c_int(handle) optmiz = ctypes.c_int(optmiz) libspice.dskcls_c(handle, optmiz)
python
def dskcls(handle, optmiz=False): """ Close a DSK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskcls_c.html :param handle: Handle assigned to the opened DSK file. :type handle: int :param optmiz: Flag indicating whether to segregate the DSK. :type optmiz: bool :return: """ handle = ctypes.c_int(handle) optmiz = ctypes.c_int(optmiz) libspice.dskcls_c(handle, optmiz)
[ "def", "dskcls", "(", "handle", ",", "optmiz", "=", "False", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "optmiz", "=", "ctypes", ".", "c_int", "(", "optmiz", ")", "libspice", ".", "dskcls_c", "(", "handle", ",", "optmiz", ")" ]
Close a DSK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskcls_c.html :param handle: Handle assigned to the opened DSK file. :type handle: int :param optmiz: Flag indicating whether to segregate the DSK. :type optmiz: bool :return:
[ "Close", "a", "DSK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2851-L2865
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskd02
def dskd02(handle,dladsc,item,start,room): """ Fetch double precision data from a type 2 DSK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskd02_c.html :param handle: DSK file handle :type handle: int :param dladsc: DLA descriptor :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param item: Keyword identifying item to fetch :type item: int :param start: Start index :type start: int :param room: Amount of room in output array :type room: int :return: Array containing requested item :rtype: numpy.ndarray """ handle = ctypes.c_int(handle) item = ctypes.c_int(item) start = ctypes.c_int(start) room = ctypes.c_int(room) n = ctypes.c_int(0) values = stypes.emptyDoubleVector(room) libspice.dskd02_c(handle, dladsc, item, start, room, ctypes.byref(n), values) return stypes.cVectorToPython(values)
python
def dskd02(handle,dladsc,item,start,room): """ Fetch double precision data from a type 2 DSK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskd02_c.html :param handle: DSK file handle :type handle: int :param dladsc: DLA descriptor :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param item: Keyword identifying item to fetch :type item: int :param start: Start index :type start: int :param room: Amount of room in output array :type room: int :return: Array containing requested item :rtype: numpy.ndarray """ handle = ctypes.c_int(handle) item = ctypes.c_int(item) start = ctypes.c_int(start) room = ctypes.c_int(room) n = ctypes.c_int(0) values = stypes.emptyDoubleVector(room) libspice.dskd02_c(handle, dladsc, item, start, room, ctypes.byref(n), values) return stypes.cVectorToPython(values)
[ "def", "dskd02", "(", "handle", ",", "dladsc", ",", "item", ",", "start", ",", "room", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "item", "=", "ctypes", ".", "c_int", "(", "item", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "room", "=", "ctypes", ".", "c_int", "(", "room", ")", "n", "=", "ctypes", ".", "c_int", "(", "0", ")", "values", "=", "stypes", ".", "emptyDoubleVector", "(", "room", ")", "libspice", ".", "dskd02_c", "(", "handle", ",", "dladsc", ",", "item", ",", "start", ",", "room", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "values", ")", "return", "stypes", ".", "cVectorToPython", "(", "values", ")" ]
Fetch double precision data from a type 2 DSK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskd02_c.html :param handle: DSK file handle :type handle: int :param dladsc: DLA descriptor :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param item: Keyword identifying item to fetch :type item: int :param start: Start index :type start: int :param room: Amount of room in output array :type room: int :return: Array containing requested item :rtype: numpy.ndarray
[ "Fetch", "double", "precision", "data", "from", "a", "type", "2", "DSK", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2869-L2896
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskgd
def dskgd(handle, dladsc): """ Return the DSK descriptor from a DSK segment identified by a DAS handle and DLA descriptor. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskgd_c.html :param handle: Handle assigned to the opened DSK file. :type handle: int :param dladsc: DLA segment descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :return: DSK segment descriptor. :rtype: stypes.SpiceDSKDescr """ handle = ctypes.c_int(handle) dskdsc = stypes.SpiceDSKDescr() libspice.dskgd_c(handle, ctypes.byref(dladsc), ctypes.byref(dskdsc)) return dskdsc
python
def dskgd(handle, dladsc): """ Return the DSK descriptor from a DSK segment identified by a DAS handle and DLA descriptor. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskgd_c.html :param handle: Handle assigned to the opened DSK file. :type handle: int :param dladsc: DLA segment descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :return: DSK segment descriptor. :rtype: stypes.SpiceDSKDescr """ handle = ctypes.c_int(handle) dskdsc = stypes.SpiceDSKDescr() libspice.dskgd_c(handle, ctypes.byref(dladsc), ctypes.byref(dskdsc)) return dskdsc
[ "def", "dskgd", "(", "handle", ",", "dladsc", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "dskdsc", "=", "stypes", ".", "SpiceDSKDescr", "(", ")", "libspice", ".", "dskgd_c", "(", "handle", ",", "ctypes", ".", "byref", "(", "dladsc", ")", ",", "ctypes", ".", "byref", "(", "dskdsc", ")", ")", "return", "dskdsc" ]
Return the DSK descriptor from a DSK segment identified by a DAS handle and DLA descriptor. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskgd_c.html :param handle: Handle assigned to the opened DSK file. :type handle: int :param dladsc: DLA segment descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :return: DSK segment descriptor. :rtype: stypes.SpiceDSKDescr
[ "Return", "the", "DSK", "descriptor", "from", "a", "DSK", "segment", "identified", "by", "a", "DAS", "handle", "and", "DLA", "descriptor", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2900-L2917
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dski02
def dski02(handle, dladsc, item, start, room): """ Fetch integer data from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dski02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param item: Keyword identifying item to fetch. :type item: int :param start: Start index. :type start: int :param room: Amount of room in output array. :type room: int :return: Array containing requested item. :rtype: array """ handle = ctypes.c_int(handle) item = ctypes.c_int(item) start = ctypes.c_int(start) room = ctypes.c_int(room) n = ctypes.c_int() values = stypes.emptyIntVector(room) libspice.dski02_c(handle, dladsc, item, start, room, ctypes.byref(n), values) return stypes.cMatrixToNumpy(values)
python
def dski02(handle, dladsc, item, start, room): """ Fetch integer data from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dski02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param item: Keyword identifying item to fetch. :type item: int :param start: Start index. :type start: int :param room: Amount of room in output array. :type room: int :return: Array containing requested item. :rtype: array """ handle = ctypes.c_int(handle) item = ctypes.c_int(item) start = ctypes.c_int(start) room = ctypes.c_int(room) n = ctypes.c_int() values = stypes.emptyIntVector(room) libspice.dski02_c(handle, dladsc, item, start, room, ctypes.byref(n), values) return stypes.cMatrixToNumpy(values)
[ "def", "dski02", "(", "handle", ",", "dladsc", ",", "item", ",", "start", ",", "room", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "item", "=", "ctypes", ".", "c_int", "(", "item", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "room", "=", "ctypes", ".", "c_int", "(", "room", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "values", "=", "stypes", ".", "emptyIntVector", "(", "room", ")", "libspice", ".", "dski02_c", "(", "handle", ",", "dladsc", ",", "item", ",", "start", ",", "room", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "values", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "values", ")" ]
Fetch integer data from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dski02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param item: Keyword identifying item to fetch. :type item: int :param start: Start index. :type start: int :param room: Amount of room in output array. :type room: int :return: Array containing requested item. :rtype: array
[ "Fetch", "integer", "data", "from", "a", "type", "2", "DSK", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2939-L2965
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskmi2
def dskmi2(vrtces, plates, finscl, corscl, worksz, voxpsz, voxlsz, makvtl, spxisz): """ Make spatial index for a DSK type 2 segment. The index is returned as a pair of arrays, one of type int and one of type float. These arrays are suitable for use with the DSK type 2 writer dskw02. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskmi2_c.html :param vrtces: Vertices :type vrtces: NxM-Element Array of floats :param plates: Plates :type plates: NxM-Element Array of ints :param finscl: Fine voxel scale :type finscl: float :param corscl: Coarse voxel scale :type corscl: int :param worksz: Workspace size :type worksz: int :param voxpsz: Voxel plate pointer array size :type voxpsz: int :param voxlsz: Voxel plate list array size :type voxlsz: int :param makvtl: Vertex plate list flag :type makvtl: bool :param spxisz: Spatial index integer component size :type spxisz: int :return: double precision and integer components of the spatial index of the segment. :rtype: tuple """ nv = ctypes.c_int(len(vrtces)) vrtces = stypes.toDoubleMatrix(vrtces) np = ctypes.c_int(len(plates)) plates = stypes.toIntMatrix(plates) finscl = ctypes.c_double(finscl) corscl = ctypes.c_int(corscl) worksz = ctypes.c_int(worksz) voxpsz = ctypes.c_int(voxpsz) voxlsz = ctypes.c_int(voxlsz) makvtl = ctypes.c_int(makvtl) spxisz = ctypes.c_int(spxisz) work = stypes.emptyIntMatrix(2, worksz) spaixd = stypes.emptyDoubleVector(10) # SPICE_DSK02_SPADSZ spaixi = stypes.emptyIntVector(spxisz) libspice.dskmi2_c(nv, vrtces, np, plates, finscl, corscl, worksz, voxpsz, voxlsz, makvtl, spxisz, work, spaixd, spaixi) return stypes.cVectorToPython(spaixd), stypes.cVectorToPython(spaixi)
python
def dskmi2(vrtces, plates, finscl, corscl, worksz, voxpsz, voxlsz, makvtl, spxisz): """ Make spatial index for a DSK type 2 segment. The index is returned as a pair of arrays, one of type int and one of type float. These arrays are suitable for use with the DSK type 2 writer dskw02. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskmi2_c.html :param vrtces: Vertices :type vrtces: NxM-Element Array of floats :param plates: Plates :type plates: NxM-Element Array of ints :param finscl: Fine voxel scale :type finscl: float :param corscl: Coarse voxel scale :type corscl: int :param worksz: Workspace size :type worksz: int :param voxpsz: Voxel plate pointer array size :type voxpsz: int :param voxlsz: Voxel plate list array size :type voxlsz: int :param makvtl: Vertex plate list flag :type makvtl: bool :param spxisz: Spatial index integer component size :type spxisz: int :return: double precision and integer components of the spatial index of the segment. :rtype: tuple """ nv = ctypes.c_int(len(vrtces)) vrtces = stypes.toDoubleMatrix(vrtces) np = ctypes.c_int(len(plates)) plates = stypes.toIntMatrix(plates) finscl = ctypes.c_double(finscl) corscl = ctypes.c_int(corscl) worksz = ctypes.c_int(worksz) voxpsz = ctypes.c_int(voxpsz) voxlsz = ctypes.c_int(voxlsz) makvtl = ctypes.c_int(makvtl) spxisz = ctypes.c_int(spxisz) work = stypes.emptyIntMatrix(2, worksz) spaixd = stypes.emptyDoubleVector(10) # SPICE_DSK02_SPADSZ spaixi = stypes.emptyIntVector(spxisz) libspice.dskmi2_c(nv, vrtces, np, plates, finscl, corscl, worksz, voxpsz, voxlsz, makvtl, spxisz, work, spaixd, spaixi) return stypes.cVectorToPython(spaixd), stypes.cVectorToPython(spaixi)
[ "def", "dskmi2", "(", "vrtces", ",", "plates", ",", "finscl", ",", "corscl", ",", "worksz", ",", "voxpsz", ",", "voxlsz", ",", "makvtl", ",", "spxisz", ")", ":", "nv", "=", "ctypes", ".", "c_int", "(", "len", "(", "vrtces", ")", ")", "vrtces", "=", "stypes", ".", "toDoubleMatrix", "(", "vrtces", ")", "np", "=", "ctypes", ".", "c_int", "(", "len", "(", "plates", ")", ")", "plates", "=", "stypes", ".", "toIntMatrix", "(", "plates", ")", "finscl", "=", "ctypes", ".", "c_double", "(", "finscl", ")", "corscl", "=", "ctypes", ".", "c_int", "(", "corscl", ")", "worksz", "=", "ctypes", ".", "c_int", "(", "worksz", ")", "voxpsz", "=", "ctypes", ".", "c_int", "(", "voxpsz", ")", "voxlsz", "=", "ctypes", ".", "c_int", "(", "voxlsz", ")", "makvtl", "=", "ctypes", ".", "c_int", "(", "makvtl", ")", "spxisz", "=", "ctypes", ".", "c_int", "(", "spxisz", ")", "work", "=", "stypes", ".", "emptyIntMatrix", "(", "2", ",", "worksz", ")", "spaixd", "=", "stypes", ".", "emptyDoubleVector", "(", "10", ")", "# SPICE_DSK02_SPADSZ", "spaixi", "=", "stypes", ".", "emptyIntVector", "(", "spxisz", ")", "libspice", ".", "dskmi2_c", "(", "nv", ",", "vrtces", ",", "np", ",", "plates", ",", "finscl", ",", "corscl", ",", "worksz", ",", "voxpsz", ",", "voxlsz", ",", "makvtl", ",", "spxisz", ",", "work", ",", "spaixd", ",", "spaixi", ")", "return", "stypes", ".", "cVectorToPython", "(", "spaixd", ")", ",", "stypes", ".", "cVectorToPython", "(", "spaixi", ")" ]
Make spatial index for a DSK type 2 segment. The index is returned as a pair of arrays, one of type int and one of type float. These arrays are suitable for use with the DSK type 2 writer dskw02. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskmi2_c.html :param vrtces: Vertices :type vrtces: NxM-Element Array of floats :param plates: Plates :type plates: NxM-Element Array of ints :param finscl: Fine voxel scale :type finscl: float :param corscl: Coarse voxel scale :type corscl: int :param worksz: Workspace size :type worksz: int :param voxpsz: Voxel plate pointer array size :type voxpsz: int :param voxlsz: Voxel plate list array size :type voxlsz: int :param makvtl: Vertex plate list flag :type makvtl: bool :param spxisz: Spatial index integer component size :type spxisz: int :return: double precision and integer components of the spatial index of the segment. :rtype: tuple
[ "Make", "spatial", "index", "for", "a", "DSK", "type", "2", "segment", ".", "The", "index", "is", "returned", "as", "a", "pair", "of", "arrays", "one", "of", "type", "int", "and", "one", "of", "type", "float", ".", "These", "arrays", "are", "suitable", "for", "use", "with", "the", "DSK", "type", "2", "writer", "dskw02", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L2969-L3014
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskn02
def dskn02(handle, dladsc, plid): """ Compute the unit normal vector for a specified plate from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskn02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param plid: Plate ID. :type plid: int :return: late's unit normal vector. :rtype: 3-Element Array of floats. """ handle = ctypes.c_int(handle) plid = ctypes.c_int(plid) normal = stypes.emptyDoubleVector(3) libspice.dskn02_c(handle, dladsc, plid, normal) return stypes.cVectorToPython(normal)
python
def dskn02(handle, dladsc, plid): """ Compute the unit normal vector for a specified plate from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskn02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param plid: Plate ID. :type plid: int :return: late's unit normal vector. :rtype: 3-Element Array of floats. """ handle = ctypes.c_int(handle) plid = ctypes.c_int(plid) normal = stypes.emptyDoubleVector(3) libspice.dskn02_c(handle, dladsc, plid, normal) return stypes.cVectorToPython(normal)
[ "def", "dskn02", "(", "handle", ",", "dladsc", ",", "plid", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "plid", "=", "ctypes", ".", "c_int", "(", "plid", ")", "normal", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "dskn02_c", "(", "handle", ",", "dladsc", ",", "plid", ",", "normal", ")", "return", "stypes", ".", "cVectorToPython", "(", "normal", ")" ]
Compute the unit normal vector for a specified plate from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskn02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param plid: Plate ID. :type plid: int :return: late's unit normal vector. :rtype: 3-Element Array of floats.
[ "Compute", "the", "unit", "normal", "vector", "for", "a", "specified", "plate", "from", "a", "type", "2", "DSK", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3018-L3038
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskp02
def dskp02(handle, dladsc, start, room): """ Fetch triangular plates from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskp02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param start: Start index. :type start: int :param room: Amount of room in output array. :type room: int :return: Array containing plates. """ handle = ctypes.c_int(handle) start = ctypes.c_int(start) room = ctypes.c_int(room) n = ctypes.c_int(0) plates = stypes.emptyIntMatrix(3, room) libspice.dskp02_c(handle, dladsc, start, room, ctypes.byref(n), plates) return stypes.cMatrixToNumpy(plates)
python
def dskp02(handle, dladsc, start, room): """ Fetch triangular plates from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskp02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param start: Start index. :type start: int :param room: Amount of room in output array. :type room: int :return: Array containing plates. """ handle = ctypes.c_int(handle) start = ctypes.c_int(start) room = ctypes.c_int(room) n = ctypes.c_int(0) plates = stypes.emptyIntMatrix(3, room) libspice.dskp02_c(handle, dladsc, start, room, ctypes.byref(n), plates) return stypes.cMatrixToNumpy(plates)
[ "def", "dskp02", "(", "handle", ",", "dladsc", ",", "start", ",", "room", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "room", "=", "ctypes", ".", "c_int", "(", "room", ")", "n", "=", "ctypes", ".", "c_int", "(", "0", ")", "plates", "=", "stypes", ".", "emptyIntMatrix", "(", "3", ",", "room", ")", "libspice", ".", "dskp02_c", "(", "handle", ",", "dladsc", ",", "start", ",", "room", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "plates", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "plates", ")" ]
Fetch triangular plates from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskp02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param start: Start index. :type start: int :param room: Amount of room in output array. :type room: int :return: Array containing plates.
[ "Fetch", "triangular", "plates", "from", "a", "type", "2", "DSK", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3085-L3108
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskrb2
def dskrb2(vrtces, plates, corsys, corpar): """ Determine range bounds for a set of triangular plates to be stored in a type 2 DSK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskrb2_c.html :param vrtces: Vertices :type vrtces: NxM-Element Array of floats :param plates: Plates :type plates: NxM-Element Array of ints :param corsys: DSK coordinate system code :type corsys: int :param corpar: DSK coordinate system parameters :type corpar: N-Element Array of floats :return: Lower and Upper bound on range of third coordinate :rtype: tuple """ nv = ctypes.c_int(len(vrtces)) vrtces = stypes.toDoubleMatrix(vrtces) np = ctypes.c_int(len(plates)) plates = stypes.toIntMatrix(plates) corsys = ctypes.c_int(corsys) corpar = stypes.toDoubleVector(corpar) mncor3 = ctypes.c_double(0.0) mxcor3 = ctypes.c_double(0.0) libspice.dskrb2_c(nv, vrtces, np, plates, corsys, corpar, ctypes.byref(mncor3), ctypes.byref(mxcor3)) return mncor3.value, mxcor3.value
python
def dskrb2(vrtces, plates, corsys, corpar): """ Determine range bounds for a set of triangular plates to be stored in a type 2 DSK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskrb2_c.html :param vrtces: Vertices :type vrtces: NxM-Element Array of floats :param plates: Plates :type plates: NxM-Element Array of ints :param corsys: DSK coordinate system code :type corsys: int :param corpar: DSK coordinate system parameters :type corpar: N-Element Array of floats :return: Lower and Upper bound on range of third coordinate :rtype: tuple """ nv = ctypes.c_int(len(vrtces)) vrtces = stypes.toDoubleMatrix(vrtces) np = ctypes.c_int(len(plates)) plates = stypes.toIntMatrix(plates) corsys = ctypes.c_int(corsys) corpar = stypes.toDoubleVector(corpar) mncor3 = ctypes.c_double(0.0) mxcor3 = ctypes.c_double(0.0) libspice.dskrb2_c(nv, vrtces, np, plates, corsys, corpar, ctypes.byref(mncor3), ctypes.byref(mxcor3)) return mncor3.value, mxcor3.value
[ "def", "dskrb2", "(", "vrtces", ",", "plates", ",", "corsys", ",", "corpar", ")", ":", "nv", "=", "ctypes", ".", "c_int", "(", "len", "(", "vrtces", ")", ")", "vrtces", "=", "stypes", ".", "toDoubleMatrix", "(", "vrtces", ")", "np", "=", "ctypes", ".", "c_int", "(", "len", "(", "plates", ")", ")", "plates", "=", "stypes", ".", "toIntMatrix", "(", "plates", ")", "corsys", "=", "ctypes", ".", "c_int", "(", "corsys", ")", "corpar", "=", "stypes", ".", "toDoubleVector", "(", "corpar", ")", "mncor3", "=", "ctypes", ".", "c_double", "(", "0.0", ")", "mxcor3", "=", "ctypes", ".", "c_double", "(", "0.0", ")", "libspice", ".", "dskrb2_c", "(", "nv", ",", "vrtces", ",", "np", ",", "plates", ",", "corsys", ",", "corpar", ",", "ctypes", ".", "byref", "(", "mncor3", ")", ",", "ctypes", ".", "byref", "(", "mxcor3", ")", ")", "return", "mncor3", ".", "value", ",", "mxcor3", ".", "value" ]
Determine range bounds for a set of triangular plates to be stored in a type 2 DSK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskrb2_c.html :param vrtces: Vertices :type vrtces: NxM-Element Array of floats :param plates: Plates :type plates: NxM-Element Array of ints :param corsys: DSK coordinate system code :type corsys: int :param corpar: DSK coordinate system parameters :type corpar: N-Element Array of floats :return: Lower and Upper bound on range of third coordinate :rtype: tuple
[ "Determine", "range", "bounds", "for", "a", "set", "of", "triangular", "plates", "to", "be", "stored", "in", "a", "type", "2", "DSK", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3112-L3140
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskv02
def dskv02(handle, dladsc, start, room): """ Fetch vertices from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskv02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param start: Start index. :type start: int :param room: Amount of room in output array. :type room: int :return: Array containing vertices. :rtype: Room x 3-Element Array of floats """ handle = ctypes.c_int(handle) start = ctypes.c_int(start) room = ctypes.c_int(room) n = ctypes.c_int() vrtces = stypes.emptyDoubleMatrix(3, room) libspice.dskv02_c(handle, dladsc, start, room, ctypes.byref(n), vrtces) return stypes.cMatrixToNumpy(vrtces)
python
def dskv02(handle, dladsc, start, room): """ Fetch vertices from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskv02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param start: Start index. :type start: int :param room: Amount of room in output array. :type room: int :return: Array containing vertices. :rtype: Room x 3-Element Array of floats """ handle = ctypes.c_int(handle) start = ctypes.c_int(start) room = ctypes.c_int(room) n = ctypes.c_int() vrtces = stypes.emptyDoubleMatrix(3, room) libspice.dskv02_c(handle, dladsc, start, room, ctypes.byref(n), vrtces) return stypes.cMatrixToNumpy(vrtces)
[ "def", "dskv02", "(", "handle", ",", "dladsc", ",", "start", ",", "room", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "room", "=", "ctypes", ".", "c_int", "(", "room", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "vrtces", "=", "stypes", ".", "emptyDoubleMatrix", "(", "3", ",", "room", ")", "libspice", ".", "dskv02_c", "(", "handle", ",", "dladsc", ",", "start", ",", "room", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "vrtces", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "vrtces", ")" ]
Fetch vertices from a type 2 DSK segment. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskv02_c.html :param handle: DSK file handle. :type handle: int :param dladsc: DLA descriptor. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param start: Start index. :type start: int :param room: Amount of room in output array. :type room: int :return: Array containing vertices. :rtype: Room x 3-Element Array of floats
[ "Fetch", "vertices", "from", "a", "type", "2", "DSK", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3182-L3205
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskw02
def dskw02(handle, center, surfid, dclass, fname, corsys, corpar, mncor1, mxcor1, mncor2, mxcor2, mncor3, mxcor3, first, last, vrtces, plates, spaixd, spaixi): """ Write a type 2 segment to a DSK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskw02_c.html :param handle: Handle assigned to the opened DSK file :type handle: int :param center: Central body ID code :type center: int :param surfid: Surface ID code :type surfid: int :param dclass: Data class :type dclass: int :param fname: Reference frame :type fname: str :param corsys: Coordinate system code :type corsys: int :param corpar: Coordinate system parameters :type corpar: N-Element Array of floats :param mncor1: Minimum value of first coordinate :type mncor1: float :param mxcor1: Maximum value of first coordinate :type mxcor1: float :param mncor2: Minimum value of second coordinate :type mncor2: float :param mxcor2: Maximum value of second coordinate :type mxcor2: float :param mncor3: Minimum value of third coordinate :type mncor3: float :param mxcor3: Maximum value of third coordinate :type mxcor3: float :param first: Coverage start time :type first: float :param last: Coverage stop time :type last: float :param vrtces: Vertices :type vrtces: NxM-Element Array of floats :param plates: Plates :type plates: NxM-Element Array of ints :param spaixd: Double precision component of spatial index :type spaixd: N-Element Array of floats :param spaixi: Integer component of spatial index :type spaixi: N-Element Array of ints """ handle = ctypes.c_int(handle) center = ctypes.c_int(center) surfid = ctypes.c_int(surfid) dclass = ctypes.c_int(dclass) fname = stypes.stringToCharP(fname) corsys = ctypes.c_int(corsys) corpar = stypes.toDoubleVector(corpar) mncor1 = ctypes.c_double(mncor1) mxcor1 = ctypes.c_double(mxcor1) mncor2 = ctypes.c_double(mncor2) mxcor2 = ctypes.c_double(mxcor2) mncor3 = ctypes.c_double(mncor3) mxcor3 = ctypes.c_double(mxcor3) first = ctypes.c_double(first) last = ctypes.c_double(last) nv = ctypes.c_int(len(vrtces)) vrtces = stypes.toDoubleMatrix(vrtces) np = ctypes.c_int(len(plates)) plates = stypes.toIntMatrix(plates) spaixd = stypes.toDoubleVector(spaixd) spaixi = stypes.toIntVector(spaixi) libspice.dskw02_c(handle, center, surfid, dclass, fname, corsys, corpar, mncor1, mxcor1, mncor2, mxcor2, mncor3, mxcor3, first, last, nv, vrtces, np, plates, spaixd, spaixi)
python
def dskw02(handle, center, surfid, dclass, fname, corsys, corpar, mncor1, mxcor1, mncor2, mxcor2, mncor3, mxcor3, first, last, vrtces, plates, spaixd, spaixi): """ Write a type 2 segment to a DSK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskw02_c.html :param handle: Handle assigned to the opened DSK file :type handle: int :param center: Central body ID code :type center: int :param surfid: Surface ID code :type surfid: int :param dclass: Data class :type dclass: int :param fname: Reference frame :type fname: str :param corsys: Coordinate system code :type corsys: int :param corpar: Coordinate system parameters :type corpar: N-Element Array of floats :param mncor1: Minimum value of first coordinate :type mncor1: float :param mxcor1: Maximum value of first coordinate :type mxcor1: float :param mncor2: Minimum value of second coordinate :type mncor2: float :param mxcor2: Maximum value of second coordinate :type mxcor2: float :param mncor3: Minimum value of third coordinate :type mncor3: float :param mxcor3: Maximum value of third coordinate :type mxcor3: float :param first: Coverage start time :type first: float :param last: Coverage stop time :type last: float :param vrtces: Vertices :type vrtces: NxM-Element Array of floats :param plates: Plates :type plates: NxM-Element Array of ints :param spaixd: Double precision component of spatial index :type spaixd: N-Element Array of floats :param spaixi: Integer component of spatial index :type spaixi: N-Element Array of ints """ handle = ctypes.c_int(handle) center = ctypes.c_int(center) surfid = ctypes.c_int(surfid) dclass = ctypes.c_int(dclass) fname = stypes.stringToCharP(fname) corsys = ctypes.c_int(corsys) corpar = stypes.toDoubleVector(corpar) mncor1 = ctypes.c_double(mncor1) mxcor1 = ctypes.c_double(mxcor1) mncor2 = ctypes.c_double(mncor2) mxcor2 = ctypes.c_double(mxcor2) mncor3 = ctypes.c_double(mncor3) mxcor3 = ctypes.c_double(mxcor3) first = ctypes.c_double(first) last = ctypes.c_double(last) nv = ctypes.c_int(len(vrtces)) vrtces = stypes.toDoubleMatrix(vrtces) np = ctypes.c_int(len(plates)) plates = stypes.toIntMatrix(plates) spaixd = stypes.toDoubleVector(spaixd) spaixi = stypes.toIntVector(spaixi) libspice.dskw02_c(handle, center, surfid, dclass, fname, corsys, corpar, mncor1, mxcor1, mncor2, mxcor2, mncor3, mxcor3, first, last, nv, vrtces, np, plates, spaixd, spaixi)
[ "def", "dskw02", "(", "handle", ",", "center", ",", "surfid", ",", "dclass", ",", "fname", ",", "corsys", ",", "corpar", ",", "mncor1", ",", "mxcor1", ",", "mncor2", ",", "mxcor2", ",", "mncor3", ",", "mxcor3", ",", "first", ",", "last", ",", "vrtces", ",", "plates", ",", "spaixd", ",", "spaixi", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "center", "=", "ctypes", ".", "c_int", "(", "center", ")", "surfid", "=", "ctypes", ".", "c_int", "(", "surfid", ")", "dclass", "=", "ctypes", ".", "c_int", "(", "dclass", ")", "fname", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "corsys", "=", "ctypes", ".", "c_int", "(", "corsys", ")", "corpar", "=", "stypes", ".", "toDoubleVector", "(", "corpar", ")", "mncor1", "=", "ctypes", ".", "c_double", "(", "mncor1", ")", "mxcor1", "=", "ctypes", ".", "c_double", "(", "mxcor1", ")", "mncor2", "=", "ctypes", ".", "c_double", "(", "mncor2", ")", "mxcor2", "=", "ctypes", ".", "c_double", "(", "mxcor2", ")", "mncor3", "=", "ctypes", ".", "c_double", "(", "mncor3", ")", "mxcor3", "=", "ctypes", ".", "c_double", "(", "mxcor3", ")", "first", "=", "ctypes", ".", "c_double", "(", "first", ")", "last", "=", "ctypes", ".", "c_double", "(", "last", ")", "nv", "=", "ctypes", ".", "c_int", "(", "len", "(", "vrtces", ")", ")", "vrtces", "=", "stypes", ".", "toDoubleMatrix", "(", "vrtces", ")", "np", "=", "ctypes", ".", "c_int", "(", "len", "(", "plates", ")", ")", "plates", "=", "stypes", ".", "toIntMatrix", "(", "plates", ")", "spaixd", "=", "stypes", ".", "toDoubleVector", "(", "spaixd", ")", "spaixi", "=", "stypes", ".", "toIntVector", "(", "spaixi", ")", "libspice", ".", "dskw02_c", "(", "handle", ",", "center", ",", "surfid", ",", "dclass", ",", "fname", ",", "corsys", ",", "corpar", ",", "mncor1", ",", "mxcor1", ",", "mncor2", ",", "mxcor2", ",", "mncor3", ",", "mxcor3", ",", "first", ",", "last", ",", "nv", ",", "vrtces", ",", "np", ",", "plates", ",", "spaixd", ",", "spaixi", ")" ]
Write a type 2 segment to a DSK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskw02_c.html :param handle: Handle assigned to the opened DSK file :type handle: int :param center: Central body ID code :type center: int :param surfid: Surface ID code :type surfid: int :param dclass: Data class :type dclass: int :param fname: Reference frame :type fname: str :param corsys: Coordinate system code :type corsys: int :param corpar: Coordinate system parameters :type corpar: N-Element Array of floats :param mncor1: Minimum value of first coordinate :type mncor1: float :param mxcor1: Maximum value of first coordinate :type mxcor1: float :param mncor2: Minimum value of second coordinate :type mncor2: float :param mxcor2: Maximum value of second coordinate :type mxcor2: float :param mncor3: Minimum value of third coordinate :type mncor3: float :param mxcor3: Maximum value of third coordinate :type mxcor3: float :param first: Coverage start time :type first: float :param last: Coverage stop time :type last: float :param vrtces: Vertices :type vrtces: NxM-Element Array of floats :param plates: Plates :type plates: NxM-Element Array of ints :param spaixd: Double precision component of spatial index :type spaixd: N-Element Array of floats :param spaixi: Integer component of spatial index :type spaixi: N-Element Array of ints
[ "Write", "a", "type", "2", "segment", "to", "a", "DSK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3209-L3279
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskx02
def dskx02(handle, dladsc, vertex, raydir): """ Determine the plate ID and body-fixed coordinates of the intersection of a specified ray with the surface defined by a type 2 DSK plate model. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskx02_c.html :param handle: Handle of DSK kernel containing plate model. :type handle: int :param dladsc: DLA descriptor of plate model segment. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param vertex: Ray's vertex in the body fixed frame. :type vertex: 3-Element Array of floats :param raydir: Ray direction in the body fixed frame. :type raydir: 3-Element Array of floats :return: ID code of the plate intersected by the ray, Intercept, and Flag indicating whether intercept exists. :rtype: tuple """ handle = ctypes.c_int(handle) vertex = stypes.toDoubleVector(vertex) raydir = stypes.toDoubleVector(raydir) plid = ctypes.c_int() xpt = stypes.emptyDoubleVector(3) found = ctypes.c_int() libspice.dskx02_c(handle, ctypes.byref(dladsc), vertex, raydir, ctypes.byref(plid), xpt, ctypes.byref(found)) return plid.value, stypes.cVectorToPython(xpt), bool(found.value)
python
def dskx02(handle, dladsc, vertex, raydir): """ Determine the plate ID and body-fixed coordinates of the intersection of a specified ray with the surface defined by a type 2 DSK plate model. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskx02_c.html :param handle: Handle of DSK kernel containing plate model. :type handle: int :param dladsc: DLA descriptor of plate model segment. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param vertex: Ray's vertex in the body fixed frame. :type vertex: 3-Element Array of floats :param raydir: Ray direction in the body fixed frame. :type raydir: 3-Element Array of floats :return: ID code of the plate intersected by the ray, Intercept, and Flag indicating whether intercept exists. :rtype: tuple """ handle = ctypes.c_int(handle) vertex = stypes.toDoubleVector(vertex) raydir = stypes.toDoubleVector(raydir) plid = ctypes.c_int() xpt = stypes.emptyDoubleVector(3) found = ctypes.c_int() libspice.dskx02_c(handle, ctypes.byref(dladsc), vertex, raydir, ctypes.byref(plid), xpt, ctypes.byref(found)) return plid.value, stypes.cVectorToPython(xpt), bool(found.value)
[ "def", "dskx02", "(", "handle", ",", "dladsc", ",", "vertex", ",", "raydir", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "vertex", "=", "stypes", ".", "toDoubleVector", "(", "vertex", ")", "raydir", "=", "stypes", ".", "toDoubleVector", "(", "raydir", ")", "plid", "=", "ctypes", ".", "c_int", "(", ")", "xpt", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "dskx02_c", "(", "handle", ",", "ctypes", ".", "byref", "(", "dladsc", ")", ",", "vertex", ",", "raydir", ",", "ctypes", ".", "byref", "(", "plid", ")", ",", "xpt", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "plid", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "xpt", ")", ",", "bool", "(", "found", ".", "value", ")" ]
Determine the plate ID and body-fixed coordinates of the intersection of a specified ray with the surface defined by a type 2 DSK plate model. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskx02_c.html :param handle: Handle of DSK kernel containing plate model. :type handle: int :param dladsc: DLA descriptor of plate model segment. :type dladsc: spiceypy.utils.support_types.SpiceDLADescr :param vertex: Ray's vertex in the body fixed frame. :type vertex: 3-Element Array of floats :param raydir: Ray direction in the body fixed frame. :type raydir: 3-Element Array of floats :return: ID code of the plate intersected by the ray, Intercept, and Flag indicating whether intercept exists. :rtype: tuple
[ "Determine", "the", "plate", "ID", "and", "body", "-", "fixed", "coordinates", "of", "the", "intersection", "of", "a", "specified", "ray", "with", "the", "surface", "defined", "by", "a", "type", "2", "DSK", "plate", "model", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3283-L3309
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dskxv
def dskxv(pri, target, srflst, et, fixref, vtxarr, dirarr): """ Compute ray-surface intercepts for a set of rays, using data provided by multiple loaded DSK segments. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskxv_c.html :param pri: Data prioritization flag. :type pri: bool :param target: Target body name. :type target: str :param srflst: Surface ID list. :type srflst: list of int :param et: Epoch, expressed as seconds past J2000 TDB. :type et: float :param fixref: Name of target body-fixed reference frame. :type fixref: str :param vtxarr: Array of vertices of rays. :type vtxarr: Nx3-Element Array of floats :param dirarr: Array of direction vectors of rays. :type dirarr: Nx3-Element Array of floats :return: Intercept point array and Found flag array. :rtype: tuple """ pri = ctypes.c_int(pri) target = stypes.stringToCharP(target) nsurf = ctypes.c_int(len(srflst)) srflst = stypes.toIntVector(srflst) et = ctypes.c_double(et) fixref = stypes.stringToCharP(fixref) nray = ctypes.c_int(len(vtxarr)) vtxarr = stypes.toDoubleMatrix(vtxarr) dirarr = stypes.toDoubleMatrix(dirarr) xptarr = stypes.emptyDoubleMatrix(y=nray) fndarr = stypes.emptyIntVector(nray) libspice.dskxv_c(pri, target, nsurf, srflst, et, fixref, nray, vtxarr, dirarr, xptarr, fndarr) return stypes.cMatrixToNumpy(xptarr), stypes.cVectorToPython(fndarr)
python
def dskxv(pri, target, srflst, et, fixref, vtxarr, dirarr): """ Compute ray-surface intercepts for a set of rays, using data provided by multiple loaded DSK segments. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskxv_c.html :param pri: Data prioritization flag. :type pri: bool :param target: Target body name. :type target: str :param srflst: Surface ID list. :type srflst: list of int :param et: Epoch, expressed as seconds past J2000 TDB. :type et: float :param fixref: Name of target body-fixed reference frame. :type fixref: str :param vtxarr: Array of vertices of rays. :type vtxarr: Nx3-Element Array of floats :param dirarr: Array of direction vectors of rays. :type dirarr: Nx3-Element Array of floats :return: Intercept point array and Found flag array. :rtype: tuple """ pri = ctypes.c_int(pri) target = stypes.stringToCharP(target) nsurf = ctypes.c_int(len(srflst)) srflst = stypes.toIntVector(srflst) et = ctypes.c_double(et) fixref = stypes.stringToCharP(fixref) nray = ctypes.c_int(len(vtxarr)) vtxarr = stypes.toDoubleMatrix(vtxarr) dirarr = stypes.toDoubleMatrix(dirarr) xptarr = stypes.emptyDoubleMatrix(y=nray) fndarr = stypes.emptyIntVector(nray) libspice.dskxv_c(pri, target, nsurf, srflst, et, fixref, nray, vtxarr, dirarr, xptarr, fndarr) return stypes.cMatrixToNumpy(xptarr), stypes.cVectorToPython(fndarr)
[ "def", "dskxv", "(", "pri", ",", "target", ",", "srflst", ",", "et", ",", "fixref", ",", "vtxarr", ",", "dirarr", ")", ":", "pri", "=", "ctypes", ".", "c_int", "(", "pri", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "nsurf", "=", "ctypes", ".", "c_int", "(", "len", "(", "srflst", ")", ")", "srflst", "=", "stypes", ".", "toIntVector", "(", "srflst", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "fixref", "=", "stypes", ".", "stringToCharP", "(", "fixref", ")", "nray", "=", "ctypes", ".", "c_int", "(", "len", "(", "vtxarr", ")", ")", "vtxarr", "=", "stypes", ".", "toDoubleMatrix", "(", "vtxarr", ")", "dirarr", "=", "stypes", ".", "toDoubleMatrix", "(", "dirarr", ")", "xptarr", "=", "stypes", ".", "emptyDoubleMatrix", "(", "y", "=", "nray", ")", "fndarr", "=", "stypes", ".", "emptyIntVector", "(", "nray", ")", "libspice", ".", "dskxv_c", "(", "pri", ",", "target", ",", "nsurf", ",", "srflst", ",", "et", ",", "fixref", ",", "nray", ",", "vtxarr", ",", "dirarr", ",", "xptarr", ",", "fndarr", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "xptarr", ")", ",", "stypes", ".", "cVectorToPython", "(", "fndarr", ")" ]
Compute ray-surface intercepts for a set of rays, using data provided by multiple loaded DSK segments. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dskxv_c.html :param pri: Data prioritization flag. :type pri: bool :param target: Target body name. :type target: str :param srflst: Surface ID list. :type srflst: list of int :param et: Epoch, expressed as seconds past J2000 TDB. :type et: float :param fixref: Name of target body-fixed reference frame. :type fixref: str :param vtxarr: Array of vertices of rays. :type vtxarr: Nx3-Element Array of floats :param dirarr: Array of direction vectors of rays. :type dirarr: Nx3-Element Array of floats :return: Intercept point array and Found flag array. :rtype: tuple
[ "Compute", "ray", "-", "surface", "intercepts", "for", "a", "set", "of", "rays", "using", "data", "provided", "by", "multiple", "loaded", "DSK", "segments", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3362-L3398
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dsphdr
def dsphdr(x, y, z): """ This routine computes the Jacobian of the transformation from rectangular to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dsphdr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coordinate of point. :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ x = ctypes.c_double(x) y = ctypes.c_double(y) z = ctypes.c_double(z) jacobi = stypes.emptyDoubleMatrix() libspice.dsphdr_c(x, y, z, jacobi) return stypes.cMatrixToNumpy(jacobi)
python
def dsphdr(x, y, z): """ This routine computes the Jacobian of the transformation from rectangular to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dsphdr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coordinate of point. :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats """ x = ctypes.c_double(x) y = ctypes.c_double(y) z = ctypes.c_double(z) jacobi = stypes.emptyDoubleMatrix() libspice.dsphdr_c(x, y, z, jacobi) return stypes.cMatrixToNumpy(jacobi)
[ "def", "dsphdr", "(", "x", ",", "y", ",", "z", ")", ":", "x", "=", "ctypes", ".", "c_double", "(", "x", ")", "y", "=", "ctypes", ".", "c_double", "(", "y", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "jacobi", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "dsphdr_c", "(", "x", ",", "y", ",", "z", ",", "jacobi", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "jacobi", ")" ]
This routine computes the Jacobian of the transformation from rectangular to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dsphdr_c.html :param x: X-coordinate of point. :type x: float :param y: Y-coordinate of point. :type y: float :param z: Z-coordinate of point. :type z: float :return: Matrix of partial derivatives. :rtype: 3x3-Element Array of floats
[ "This", "routine", "computes", "the", "Jacobian", "of", "the", "transformation", "from", "rectangular", "to", "spherical", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3424-L3446
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dtpool
def dtpool(name): """ Return the data about a kernel pool variable. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dtpool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :return: Number of values returned for name, Type of the variable "C", "N", or "X". :rtype: tuple """ name = stypes.stringToCharP(name) found = ctypes.c_int() n = ctypes.c_int() typeout = ctypes.c_char() libspice.dtpool_c(name, ctypes.byref(found), ctypes.byref(n), ctypes.byref(typeout)) return n.value, stypes.toPythonString(typeout.value), bool(found.value)
python
def dtpool(name): """ Return the data about a kernel pool variable. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dtpool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :return: Number of values returned for name, Type of the variable "C", "N", or "X". :rtype: tuple """ name = stypes.stringToCharP(name) found = ctypes.c_int() n = ctypes.c_int() typeout = ctypes.c_char() libspice.dtpool_c(name, ctypes.byref(found), ctypes.byref(n), ctypes.byref(typeout)) return n.value, stypes.toPythonString(typeout.value), bool(found.value)
[ "def", "dtpool", "(", "name", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "typeout", "=", "ctypes", ".", "c_char", "(", ")", "libspice", ".", "dtpool_c", "(", "name", ",", "ctypes", ".", "byref", "(", "found", ")", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "ctypes", ".", "byref", "(", "typeout", ")", ")", "return", "n", ".", "value", ",", "stypes", ".", "toPythonString", "(", "typeout", ".", "value", ")", ",", "bool", "(", "found", ".", "value", ")" ]
Return the data about a kernel pool variable. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dtpool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :return: Number of values returned for name, Type of the variable "C", "N", or "X". :rtype: tuple
[ "Return", "the", "data", "about", "a", "kernel", "pool", "variable", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3451-L3470
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ducrss
def ducrss(s1, s2): """ Compute the unit vector parallel to the cross product of two 3-dimensional vectors and the derivative of this unit vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ducrss_c.html :param s1: Left hand state for cross product and derivative. :type s1: 6-Element Array of floats :param s2: Right hand state for cross product and derivative. :type s2: 6-Element Array of floats :return: Unit vector and derivative of the cross product. :rtype: 6-Element Array of floats """ assert len(s1) is 6 and len(s2) is 6 s1 = stypes.toDoubleVector(s1) s2 = stypes.toDoubleVector(s2) sout = stypes.emptyDoubleVector(6) libspice.ducrss_c(s1, s2, sout) return stypes.cVectorToPython(sout)
python
def ducrss(s1, s2): """ Compute the unit vector parallel to the cross product of two 3-dimensional vectors and the derivative of this unit vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ducrss_c.html :param s1: Left hand state for cross product and derivative. :type s1: 6-Element Array of floats :param s2: Right hand state for cross product and derivative. :type s2: 6-Element Array of floats :return: Unit vector and derivative of the cross product. :rtype: 6-Element Array of floats """ assert len(s1) is 6 and len(s2) is 6 s1 = stypes.toDoubleVector(s1) s2 = stypes.toDoubleVector(s2) sout = stypes.emptyDoubleVector(6) libspice.ducrss_c(s1, s2, sout) return stypes.cVectorToPython(sout)
[ "def", "ducrss", "(", "s1", ",", "s2", ")", ":", "assert", "len", "(", "s1", ")", "is", "6", "and", "len", "(", "s2", ")", "is", "6", "s1", "=", "stypes", ".", "toDoubleVector", "(", "s1", ")", "s2", "=", "stypes", ".", "toDoubleVector", "(", "s2", ")", "sout", "=", "stypes", ".", "emptyDoubleVector", "(", "6", ")", "libspice", ".", "ducrss_c", "(", "s1", ",", "s2", ",", "sout", ")", "return", "stypes", ".", "cVectorToPython", "(", "sout", ")" ]
Compute the unit vector parallel to the cross product of two 3-dimensional vectors and the derivative of this unit vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ducrss_c.html :param s1: Left hand state for cross product and derivative. :type s1: 6-Element Array of floats :param s2: Right hand state for cross product and derivative. :type s2: 6-Element Array of floats :return: Unit vector and derivative of the cross product. :rtype: 6-Element Array of floats
[ "Compute", "the", "unit", "vector", "parallel", "to", "the", "cross", "product", "of", "two", "3", "-", "dimensional", "vectors", "and", "the", "derivative", "of", "this", "unit", "vector", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3474-L3493
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dvcrss
def dvcrss(s1, s2): """ Compute the cross product of two 3-dimensional vectors and the derivative of this cross product. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvcrss_c.html :param s1: Left hand state for cross product and derivative. :type s1: 6-Element Array of floats :param s2: Right hand state for cross product and derivative. :type s2: 6-Element Array of floats :return: State associated with cross product of positions. :rtype: 6-Element Array of floats """ assert len(s1) is 6 and len(s2) is 6 s1 = stypes.toDoubleVector(s1) s2 = stypes.toDoubleVector(s2) sout = stypes.emptyDoubleVector(6) libspice.dvcrss_c(s1, s2, sout) return stypes.cVectorToPython(sout)
python
def dvcrss(s1, s2): """ Compute the cross product of two 3-dimensional vectors and the derivative of this cross product. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvcrss_c.html :param s1: Left hand state for cross product and derivative. :type s1: 6-Element Array of floats :param s2: Right hand state for cross product and derivative. :type s2: 6-Element Array of floats :return: State associated with cross product of positions. :rtype: 6-Element Array of floats """ assert len(s1) is 6 and len(s2) is 6 s1 = stypes.toDoubleVector(s1) s2 = stypes.toDoubleVector(s2) sout = stypes.emptyDoubleVector(6) libspice.dvcrss_c(s1, s2, sout) return stypes.cVectorToPython(sout)
[ "def", "dvcrss", "(", "s1", ",", "s2", ")", ":", "assert", "len", "(", "s1", ")", "is", "6", "and", "len", "(", "s2", ")", "is", "6", "s1", "=", "stypes", ".", "toDoubleVector", "(", "s1", ")", "s2", "=", "stypes", ".", "toDoubleVector", "(", "s2", ")", "sout", "=", "stypes", ".", "emptyDoubleVector", "(", "6", ")", "libspice", ".", "dvcrss_c", "(", "s1", ",", "s2", ",", "sout", ")", "return", "stypes", ".", "cVectorToPython", "(", "sout", ")" ]
Compute the cross product of two 3-dimensional vectors and the derivative of this cross product. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvcrss_c.html :param s1: Left hand state for cross product and derivative. :type s1: 6-Element Array of floats :param s2: Right hand state for cross product and derivative. :type s2: 6-Element Array of floats :return: State associated with cross product of positions. :rtype: 6-Element Array of floats
[ "Compute", "the", "cross", "product", "of", "two", "3", "-", "dimensional", "vectors", "and", "the", "derivative", "of", "this", "cross", "product", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3497-L3516
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dvdot
def dvdot(s1, s2): """ Compute the derivative of the dot product of two double precision position vectors. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvdot_c.html :param s1: First state vector in the dot product. :type s1: 6-Element Array of floats :param s2: Second state vector in the dot product. :type s2: 6-Element Array of floats :return: The derivative of the dot product. :rtype: float """ assert len(s1) is 6 and len(s2) is 6 s1 = stypes.toDoubleVector(s1) s2 = stypes.toDoubleVector(s2) return libspice.dvdot_c(s1, s2)
python
def dvdot(s1, s2): """ Compute the derivative of the dot product of two double precision position vectors. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvdot_c.html :param s1: First state vector in the dot product. :type s1: 6-Element Array of floats :param s2: Second state vector in the dot product. :type s2: 6-Element Array of floats :return: The derivative of the dot product. :rtype: float """ assert len(s1) is 6 and len(s2) is 6 s1 = stypes.toDoubleVector(s1) s2 = stypes.toDoubleVector(s2) return libspice.dvdot_c(s1, s2)
[ "def", "dvdot", "(", "s1", ",", "s2", ")", ":", "assert", "len", "(", "s1", ")", "is", "6", "and", "len", "(", "s2", ")", "is", "6", "s1", "=", "stypes", ".", "toDoubleVector", "(", "s1", ")", "s2", "=", "stypes", ".", "toDoubleVector", "(", "s2", ")", "return", "libspice", ".", "dvdot_c", "(", "s1", ",", "s2", ")" ]
Compute the derivative of the dot product of two double precision position vectors. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvdot_c.html :param s1: First state vector in the dot product. :type s1: 6-Element Array of floats :param s2: Second state vector in the dot product. :type s2: 6-Element Array of floats :return: The derivative of the dot product. :rtype: float
[ "Compute", "the", "derivative", "of", "the", "dot", "product", "of", "two", "double", "precision", "position", "vectors", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3520-L3537
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dvhat
def dvhat(s1): """ Find the unit vector corresponding to a state vector and the derivative of the unit vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvhat_c.html :param s1: State to be normalized. :type s1: 6-Element Array of floats :return: Unit vector s1 / abs(s1), and its time derivative. :rtype: 6-Element Array of floats """ assert len(s1) is 6 s1 = stypes.toDoubleVector(s1) sout = stypes.emptyDoubleVector(6) libspice.dvhat_c(s1, sout) return stypes.cVectorToPython(sout)
python
def dvhat(s1): """ Find the unit vector corresponding to a state vector and the derivative of the unit vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvhat_c.html :param s1: State to be normalized. :type s1: 6-Element Array of floats :return: Unit vector s1 / abs(s1), and its time derivative. :rtype: 6-Element Array of floats """ assert len(s1) is 6 s1 = stypes.toDoubleVector(s1) sout = stypes.emptyDoubleVector(6) libspice.dvhat_c(s1, sout) return stypes.cVectorToPython(sout)
[ "def", "dvhat", "(", "s1", ")", ":", "assert", "len", "(", "s1", ")", "is", "6", "s1", "=", "stypes", ".", "toDoubleVector", "(", "s1", ")", "sout", "=", "stypes", ".", "emptyDoubleVector", "(", "6", ")", "libspice", ".", "dvhat_c", "(", "s1", ",", "sout", ")", "return", "stypes", ".", "cVectorToPython", "(", "sout", ")" ]
Find the unit vector corresponding to a state vector and the derivative of the unit vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvhat_c.html :param s1: State to be normalized. :type s1: 6-Element Array of floats :return: Unit vector s1 / abs(s1), and its time derivative. :rtype: 6-Element Array of floats
[ "Find", "the", "unit", "vector", "corresponding", "to", "a", "state", "vector", "and", "the", "derivative", "of", "the", "unit", "vector", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3541-L3557
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dvnorm
def dvnorm(state): """ Function to calculate the derivative of the norm of a 3-vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvnorm_c.html :param state: A 6-vector composed of three coordinates and their derivatives. :type state: 6-Element Array of floats :return: The derivative of the norm of a 3-vector. :rtype: float """ assert len(state) is 6 state = stypes.toDoubleVector(state) return libspice.dvnorm_c(state)
python
def dvnorm(state): """ Function to calculate the derivative of the norm of a 3-vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvnorm_c.html :param state: A 6-vector composed of three coordinates and their derivatives. :type state: 6-Element Array of floats :return: The derivative of the norm of a 3-vector. :rtype: float """ assert len(state) is 6 state = stypes.toDoubleVector(state) return libspice.dvnorm_c(state)
[ "def", "dvnorm", "(", "state", ")", ":", "assert", "len", "(", "state", ")", "is", "6", "state", "=", "stypes", ".", "toDoubleVector", "(", "state", ")", "return", "libspice", ".", "dvnorm_c", "(", "state", ")" ]
Function to calculate the derivative of the norm of a 3-vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvnorm_c.html :param state: A 6-vector composed of three coordinates and their derivatives. :type state: 6-Element Array of floats :return: The derivative of the norm of a 3-vector. :rtype: float
[ "Function", "to", "calculate", "the", "derivative", "of", "the", "norm", "of", "a", "3", "-", "vector", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3561-L3575
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dvsep
def dvsep(s1, s2): """ Calculate the time derivative of the separation angle between two input states, S1 and S2. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvsep_c.html :param s1: State vector of the first body. :type s1: 6-Element Array of floats :param s2: State vector of the second body. :type s2: 6-Element Array of floats :return: The time derivative of the angular separation between S1 and S2. :rtype: float """ assert len(s1) is 6 and len(s2) is 6 s1 = stypes.toDoubleVector(s1) s2 = stypes.toDoubleVector(s2) return libspice.dvsep_c(s1, s2)
python
def dvsep(s1, s2): """ Calculate the time derivative of the separation angle between two input states, S1 and S2. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvsep_c.html :param s1: State vector of the first body. :type s1: 6-Element Array of floats :param s2: State vector of the second body. :type s2: 6-Element Array of floats :return: The time derivative of the angular separation between S1 and S2. :rtype: float """ assert len(s1) is 6 and len(s2) is 6 s1 = stypes.toDoubleVector(s1) s2 = stypes.toDoubleVector(s2) return libspice.dvsep_c(s1, s2)
[ "def", "dvsep", "(", "s1", ",", "s2", ")", ":", "assert", "len", "(", "s1", ")", "is", "6", "and", "len", "(", "s2", ")", "is", "6", "s1", "=", "stypes", ".", "toDoubleVector", "(", "s1", ")", "s2", "=", "stypes", ".", "toDoubleVector", "(", "s2", ")", "return", "libspice", ".", "dvsep_c", "(", "s1", ",", "s2", ")" ]
Calculate the time derivative of the separation angle between two input states, S1 and S2. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dvsep_c.html :param s1: State vector of the first body. :type s1: 6-Element Array of floats :param s2: State vector of the second body. :type s2: 6-Element Array of floats :return: The time derivative of the angular separation between S1 and S2. :rtype: float
[ "Calculate", "the", "time", "derivative", "of", "the", "separation", "angle", "between", "two", "input", "states", "S1", "and", "S2", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3593-L3610
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
edlimb
def edlimb(a, b, c, viewpt): """ Find the limb of a triaxial ellipsoid, viewed from a specified point. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/edlimb_c.html :param a: Length of ellipsoid semi-axis lying on the x-axis. :type a: float :param b: Length of ellipsoid semi-axis lying on the y-axis. :type b: float :param c: Length of ellipsoid semi-axis lying on the z-axis. :type c: float :param viewpt: Location of viewing point. :type viewpt: 3-Element Array of floats :return: Limb of ellipsoid as seen from viewing point. :rtype: spiceypy.utils.support_types.Ellipse """ limb = stypes.Ellipse() a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) viewpt = stypes.toDoubleVector(viewpt) libspice.edlimb_c(a, b, c, viewpt, ctypes.byref(limb)) return limb
python
def edlimb(a, b, c, viewpt): """ Find the limb of a triaxial ellipsoid, viewed from a specified point. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/edlimb_c.html :param a: Length of ellipsoid semi-axis lying on the x-axis. :type a: float :param b: Length of ellipsoid semi-axis lying on the y-axis. :type b: float :param c: Length of ellipsoid semi-axis lying on the z-axis. :type c: float :param viewpt: Location of viewing point. :type viewpt: 3-Element Array of floats :return: Limb of ellipsoid as seen from viewing point. :rtype: spiceypy.utils.support_types.Ellipse """ limb = stypes.Ellipse() a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) viewpt = stypes.toDoubleVector(viewpt) libspice.edlimb_c(a, b, c, viewpt, ctypes.byref(limb)) return limb
[ "def", "edlimb", "(", "a", ",", "b", ",", "c", ",", "viewpt", ")", ":", "limb", "=", "stypes", ".", "Ellipse", "(", ")", "a", "=", "ctypes", ".", "c_double", "(", "a", ")", "b", "=", "ctypes", ".", "c_double", "(", "b", ")", "c", "=", "ctypes", ".", "c_double", "(", "c", ")", "viewpt", "=", "stypes", ".", "toDoubleVector", "(", "viewpt", ")", "libspice", ".", "edlimb_c", "(", "a", ",", "b", ",", "c", ",", "viewpt", ",", "ctypes", ".", "byref", "(", "limb", ")", ")", "return", "limb" ]
Find the limb of a triaxial ellipsoid, viewed from a specified point. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/edlimb_c.html :param a: Length of ellipsoid semi-axis lying on the x-axis. :type a: float :param b: Length of ellipsoid semi-axis lying on the y-axis. :type b: float :param c: Length of ellipsoid semi-axis lying on the z-axis. :type c: float :param viewpt: Location of viewing point. :type viewpt: 3-Element Array of floats :return: Limb of ellipsoid as seen from viewing point. :rtype: spiceypy.utils.support_types.Ellipse
[ "Find", "the", "limb", "of", "a", "triaxial", "ellipsoid", "viewed", "from", "a", "specified", "point", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3618-L3641
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
edterm
def edterm(trmtyp, source, target, et, fixref, abcorr, obsrvr, npts): """ Compute a set of points on the umbral or penumbral terminator of a specified target body, where the target shape is modeled as an ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/edterm_c.html :param trmtyp: Terminator type. :type trmtyp: str :param source: Light source. :type source: str :param target: Target body. :type target: str :param et: Observation epoch. :type et: str :param fixref: Body-fixed frame associated with target. :type fixref: str :param abcorr: Aberration correction. :type abcorr: str :param obsrvr: Observer. :type obsrvr: str :param npts: Number of points in terminator set. :type npts: int :return: Epoch associated with target center, Position of observer in body-fixed frame, Terminator point set. :rtype: tuple """ trmtyp = stypes.stringToCharP(trmtyp) source = stypes.stringToCharP(source) target = stypes.stringToCharP(target) et = ctypes.c_double(et) fixref = stypes.stringToCharP(fixref) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) trgepc = ctypes.c_double() obspos = stypes.emptyDoubleVector(3) trmpts = stypes.emptyDoubleMatrix(x=3, y=npts) npts = ctypes.c_int(npts) libspice.edterm_c(trmtyp, source, target, et, fixref, abcorr, obsrvr, npts, ctypes.byref(trgepc), obspos, trmpts) return trgepc.value, stypes.cVectorToPython(obspos), stypes.cMatrixToNumpy( trmpts)
python
def edterm(trmtyp, source, target, et, fixref, abcorr, obsrvr, npts): """ Compute a set of points on the umbral or penumbral terminator of a specified target body, where the target shape is modeled as an ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/edterm_c.html :param trmtyp: Terminator type. :type trmtyp: str :param source: Light source. :type source: str :param target: Target body. :type target: str :param et: Observation epoch. :type et: str :param fixref: Body-fixed frame associated with target. :type fixref: str :param abcorr: Aberration correction. :type abcorr: str :param obsrvr: Observer. :type obsrvr: str :param npts: Number of points in terminator set. :type npts: int :return: Epoch associated with target center, Position of observer in body-fixed frame, Terminator point set. :rtype: tuple """ trmtyp = stypes.stringToCharP(trmtyp) source = stypes.stringToCharP(source) target = stypes.stringToCharP(target) et = ctypes.c_double(et) fixref = stypes.stringToCharP(fixref) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) trgepc = ctypes.c_double() obspos = stypes.emptyDoubleVector(3) trmpts = stypes.emptyDoubleMatrix(x=3, y=npts) npts = ctypes.c_int(npts) libspice.edterm_c(trmtyp, source, target, et, fixref, abcorr, obsrvr, npts, ctypes.byref(trgepc), obspos, trmpts) return trgepc.value, stypes.cVectorToPython(obspos), stypes.cMatrixToNumpy( trmpts)
[ "def", "edterm", "(", "trmtyp", ",", "source", ",", "target", ",", "et", ",", "fixref", ",", "abcorr", ",", "obsrvr", ",", "npts", ")", ":", "trmtyp", "=", "stypes", ".", "stringToCharP", "(", "trmtyp", ")", "source", "=", "stypes", ".", "stringToCharP", "(", "source", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "fixref", "=", "stypes", ".", "stringToCharP", "(", "fixref", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "trgepc", "=", "ctypes", ".", "c_double", "(", ")", "obspos", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "trmpts", "=", "stypes", ".", "emptyDoubleMatrix", "(", "x", "=", "3", ",", "y", "=", "npts", ")", "npts", "=", "ctypes", ".", "c_int", "(", "npts", ")", "libspice", ".", "edterm_c", "(", "trmtyp", ",", "source", ",", "target", ",", "et", ",", "fixref", ",", "abcorr", ",", "obsrvr", ",", "npts", ",", "ctypes", ".", "byref", "(", "trgepc", ")", ",", "obspos", ",", "trmpts", ")", "return", "trgepc", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "obspos", ")", ",", "stypes", ".", "cMatrixToNumpy", "(", "trmpts", ")" ]
Compute a set of points on the umbral or penumbral terminator of a specified target body, where the target shape is modeled as an ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/edterm_c.html :param trmtyp: Terminator type. :type trmtyp: str :param source: Light source. :type source: str :param target: Target body. :type target: str :param et: Observation epoch. :type et: str :param fixref: Body-fixed frame associated with target. :type fixref: str :param abcorr: Aberration correction. :type abcorr: str :param obsrvr: Observer. :type obsrvr: str :param npts: Number of points in terminator set. :type npts: int :return: Epoch associated with target center, Position of observer in body-fixed frame, Terminator point set. :rtype: tuple
[ "Compute", "a", "set", "of", "points", "on", "the", "umbral", "or", "penumbral", "terminator", "of", "a", "specified", "target", "body", "where", "the", "target", "shape", "is", "modeled", "as", "an", "ellipsoid", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3645-L3689
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekacec
def ekacec(handle, segno, recno, column, nvals, cvals, isnull): """ Add data to a character column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacec_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be added. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values to add to column. :type nvals: int :param cvals: Character values to add to column. :type cvals: list of str. :param isnull: Flag indicating whether column entry is null. :type isnull: bool """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(nvals) vallen = ctypes.c_int(len(max(cvals, key=len)) + 1) cvals = stypes.listToCharArrayPtr(cvals) isnull = ctypes.c_int(isnull) libspice.ekacec_c(handle, segno, recno, column, nvals, vallen, cvals, isnull)
python
def ekacec(handle, segno, recno, column, nvals, cvals, isnull): """ Add data to a character column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacec_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be added. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values to add to column. :type nvals: int :param cvals: Character values to add to column. :type cvals: list of str. :param isnull: Flag indicating whether column entry is null. :type isnull: bool """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(nvals) vallen = ctypes.c_int(len(max(cvals, key=len)) + 1) cvals = stypes.listToCharArrayPtr(cvals) isnull = ctypes.c_int(isnull) libspice.ekacec_c(handle, segno, recno, column, nvals, vallen, cvals, isnull)
[ "def", "ekacec", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nvals", ",", "cvals", ",", "isnull", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", "recno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "nvals", "=", "ctypes", ".", "c_int", "(", "nvals", ")", "vallen", "=", "ctypes", ".", "c_int", "(", "len", "(", "max", "(", "cvals", ",", "key", "=", "len", ")", ")", "+", "1", ")", "cvals", "=", "stypes", ".", "listToCharArrayPtr", "(", "cvals", ")", "isnull", "=", "ctypes", ".", "c_int", "(", "isnull", ")", "libspice", ".", "ekacec_c", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nvals", ",", "vallen", ",", "cvals", ",", "isnull", ")" ]
Add data to a character column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacec_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be added. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values to add to column. :type nvals: int :param cvals: Character values to add to column. :type cvals: list of str. :param isnull: Flag indicating whether column entry is null. :type isnull: bool
[ "Add", "data", "to", "a", "character", "column", "in", "a", "specified", "EK", "record", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3693-L3722
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekacei
def ekacei(handle, segno, recno, column, nvals, ivals, isnull): """ Add data to an integer column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacei_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be added. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values to add to column. :type nvals: int :param ivals: Integer values to add to column. :type ivals: Array of ints :param isnull: Flag indicating whether column entry is null. :type isnull: bool """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(nvals) ivals = stypes.toIntVector(ivals) isnull = ctypes.c_int(isnull) libspice.ekacei_c(handle, segno, recno, column, nvals, ivals, isnull)
python
def ekacei(handle, segno, recno, column, nvals, ivals, isnull): """ Add data to an integer column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacei_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be added. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values to add to column. :type nvals: int :param ivals: Integer values to add to column. :type ivals: Array of ints :param isnull: Flag indicating whether column entry is null. :type isnull: bool """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(nvals) ivals = stypes.toIntVector(ivals) isnull = ctypes.c_int(isnull) libspice.ekacei_c(handle, segno, recno, column, nvals, ivals, isnull)
[ "def", "ekacei", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nvals", ",", "ivals", ",", "isnull", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", "recno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "nvals", "=", "ctypes", ".", "c_int", "(", "nvals", ")", "ivals", "=", "stypes", ".", "toIntVector", "(", "ivals", ")", "isnull", "=", "ctypes", ".", "c_int", "(", "isnull", ")", "libspice", ".", "ekacei_c", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nvals", ",", "ivals", ",", "isnull", ")" ]
Add data to an integer column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacei_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be added. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values to add to column. :type nvals: int :param ivals: Integer values to add to column. :type ivals: Array of ints :param isnull: Flag indicating whether column entry is null. :type isnull: bool
[ "Add", "data", "to", "an", "integer", "column", "in", "a", "specified", "EK", "record", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3758-L3786
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekaclc
def ekaclc(handle, segno, column, vallen, cvals, entszs, nlflgs, rcptrs, wkindx): """ Add an entire character column to an EK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekaclc_c.html :param handle: EK file handle. :type handle: int :param segno: Number of segment to add column to. :type segno: int :param column: Column name. :type column: str :param vallen: Length of character values. :type vallen: int :param cvals: Character values to add to column. :type cvals: list of str. :param entszs: Array of sizes of column entries. :type entszs: Array of ints :param nlflgs: Array of null flags for column entries. :type nlflgs: Array of bools :param rcptrs: Record pointers for segment. :type rcptrs: Array of ints :param wkindx: Work space for column index. :type wkindx: Array of ints :return: Work space for column index. :rtype: Array of ints """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) column = stypes.stringToCharP(column) vallen = ctypes.c_int(vallen) cvals = stypes.listToCharArrayPtr(cvals) entszs = stypes.toIntVector(entszs) nlflgs = stypes.toIntVector(nlflgs) rcptrs = stypes.toIntVector(rcptrs) wkindx = stypes.toIntVector(wkindx) libspice.ekaclc_c(handle, segno, column, vallen, cvals, entszs, nlflgs, rcptrs, wkindx) return stypes.cVectorToPython(wkindx)
python
def ekaclc(handle, segno, column, vallen, cvals, entszs, nlflgs, rcptrs, wkindx): """ Add an entire character column to an EK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekaclc_c.html :param handle: EK file handle. :type handle: int :param segno: Number of segment to add column to. :type segno: int :param column: Column name. :type column: str :param vallen: Length of character values. :type vallen: int :param cvals: Character values to add to column. :type cvals: list of str. :param entszs: Array of sizes of column entries. :type entszs: Array of ints :param nlflgs: Array of null flags for column entries. :type nlflgs: Array of bools :param rcptrs: Record pointers for segment. :type rcptrs: Array of ints :param wkindx: Work space for column index. :type wkindx: Array of ints :return: Work space for column index. :rtype: Array of ints """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) column = stypes.stringToCharP(column) vallen = ctypes.c_int(vallen) cvals = stypes.listToCharArrayPtr(cvals) entszs = stypes.toIntVector(entszs) nlflgs = stypes.toIntVector(nlflgs) rcptrs = stypes.toIntVector(rcptrs) wkindx = stypes.toIntVector(wkindx) libspice.ekaclc_c(handle, segno, column, vallen, cvals, entszs, nlflgs, rcptrs, wkindx) return stypes.cVectorToPython(wkindx)
[ "def", "ekaclc", "(", "handle", ",", "segno", ",", "column", ",", "vallen", ",", "cvals", ",", "entszs", ",", "nlflgs", ",", "rcptrs", ",", "wkindx", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "vallen", "=", "ctypes", ".", "c_int", "(", "vallen", ")", "cvals", "=", "stypes", ".", "listToCharArrayPtr", "(", "cvals", ")", "entszs", "=", "stypes", ".", "toIntVector", "(", "entszs", ")", "nlflgs", "=", "stypes", ".", "toIntVector", "(", "nlflgs", ")", "rcptrs", "=", "stypes", ".", "toIntVector", "(", "rcptrs", ")", "wkindx", "=", "stypes", ".", "toIntVector", "(", "wkindx", ")", "libspice", ".", "ekaclc_c", "(", "handle", ",", "segno", ",", "column", ",", "vallen", ",", "cvals", ",", "entszs", ",", "nlflgs", ",", "rcptrs", ",", "wkindx", ")", "return", "stypes", ".", "cVectorToPython", "(", "wkindx", ")" ]
Add an entire character column to an EK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekaclc_c.html :param handle: EK file handle. :type handle: int :param segno: Number of segment to add column to. :type segno: int :param column: Column name. :type column: str :param vallen: Length of character values. :type vallen: int :param cvals: Character values to add to column. :type cvals: list of str. :param entszs: Array of sizes of column entries. :type entszs: Array of ints :param nlflgs: Array of null flags for column entries. :type nlflgs: Array of bools :param rcptrs: Record pointers for segment. :type rcptrs: Array of ints :param wkindx: Work space for column index. :type wkindx: Array of ints :return: Work space for column index. :rtype: Array of ints
[ "Add", "an", "entire", "character", "column", "to", "an", "EK", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3790-L3829
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekacld
def ekacld(handle, segno, column, dvals, entszs, nlflgs, rcptrs, wkindx): """ Add an entire double precision column to an EK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacld_c.html :param handle: EK file handle. :type handle: int :param segno: Number of segment to add column to. :type segno: int :param column: Column name. :type column: str :param dvals: Double precision values to add to column. :type dvals: Array of floats :param entszs: Array of sizes of column entries. :type entszs: Array of ints :param nlflgs: Array of null flags for column entries. :type nlflgs: Array of bools :param rcptrs: Record pointers for segment. :type rcptrs: Array of ints :param wkindx: Work space for column index. :type wkindx: Array of ints :return: Work space for column index. :rtype: Array of ints """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) column = stypes.stringToCharP(column) dvals = stypes.toDoubleVector(dvals) entszs = stypes.toIntVector(entszs) nlflgs = stypes.toIntVector(nlflgs) rcptrs = stypes.toIntVector(rcptrs) wkindx = stypes.toIntVector(wkindx) libspice.ekacld_c(handle, segno, column, dvals, entszs, nlflgs, rcptrs, wkindx) return stypes.cVectorToPython(wkindx)
python
def ekacld(handle, segno, column, dvals, entszs, nlflgs, rcptrs, wkindx): """ Add an entire double precision column to an EK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacld_c.html :param handle: EK file handle. :type handle: int :param segno: Number of segment to add column to. :type segno: int :param column: Column name. :type column: str :param dvals: Double precision values to add to column. :type dvals: Array of floats :param entszs: Array of sizes of column entries. :type entszs: Array of ints :param nlflgs: Array of null flags for column entries. :type nlflgs: Array of bools :param rcptrs: Record pointers for segment. :type rcptrs: Array of ints :param wkindx: Work space for column index. :type wkindx: Array of ints :return: Work space for column index. :rtype: Array of ints """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) column = stypes.stringToCharP(column) dvals = stypes.toDoubleVector(dvals) entszs = stypes.toIntVector(entszs) nlflgs = stypes.toIntVector(nlflgs) rcptrs = stypes.toIntVector(rcptrs) wkindx = stypes.toIntVector(wkindx) libspice.ekacld_c(handle, segno, column, dvals, entszs, nlflgs, rcptrs, wkindx) return stypes.cVectorToPython(wkindx)
[ "def", "ekacld", "(", "handle", ",", "segno", ",", "column", ",", "dvals", ",", "entszs", ",", "nlflgs", ",", "rcptrs", ",", "wkindx", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "dvals", "=", "stypes", ".", "toDoubleVector", "(", "dvals", ")", "entszs", "=", "stypes", ".", "toIntVector", "(", "entszs", ")", "nlflgs", "=", "stypes", ".", "toIntVector", "(", "nlflgs", ")", "rcptrs", "=", "stypes", ".", "toIntVector", "(", "rcptrs", ")", "wkindx", "=", "stypes", ".", "toIntVector", "(", "wkindx", ")", "libspice", ".", "ekacld_c", "(", "handle", ",", "segno", ",", "column", ",", "dvals", ",", "entszs", ",", "nlflgs", ",", "rcptrs", ",", "wkindx", ")", "return", "stypes", ".", "cVectorToPython", "(", "wkindx", ")" ]
Add an entire double precision column to an EK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacld_c.html :param handle: EK file handle. :type handle: int :param segno: Number of segment to add column to. :type segno: int :param column: Column name. :type column: str :param dvals: Double precision values to add to column. :type dvals: Array of floats :param entszs: Array of sizes of column entries. :type entszs: Array of ints :param nlflgs: Array of null flags for column entries. :type nlflgs: Array of bools :param rcptrs: Record pointers for segment. :type rcptrs: Array of ints :param wkindx: Work space for column index. :type wkindx: Array of ints :return: Work space for column index. :rtype: Array of ints
[ "Add", "an", "entire", "double", "precision", "column", "to", "an", "EK", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3833-L3868
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekacli
def ekacli(handle, segno, column, ivals, entszs, nlflgs, rcptrs, wkindx): """ Add an entire integer column to an EK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacli_c.html :param handle: EK file handle. :type handle: int :param segno: Number of segment to add column to. :type segno: int :param column: Column name. :type column: str :param ivals: Integer values to add to column. :type ivals: Array of ints :type entszs: Array of ints :param nlflgs: Array of null flags for column entries. :type nlflgs: Array of bools :param rcptrs: Record pointers for segment. :type rcptrs: Array of ints :param wkindx: Work space for column index. :type wkindx: Array of ints :return: Work space for column index. :rtype: Array of ints """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) column = stypes.stringToCharP(column) ivals = stypes.toIntVector(ivals) entszs = stypes.toIntVector(entszs) nlflgs = stypes.toIntVector(nlflgs) rcptrs = stypes.toIntVector(rcptrs) wkindx = stypes.toIntVector(wkindx) libspice.ekacli_c(handle, segno, column, ivals, entszs, nlflgs, rcptrs, wkindx) return stypes.cVectorToPython(wkindx)
python
def ekacli(handle, segno, column, ivals, entszs, nlflgs, rcptrs, wkindx): """ Add an entire integer column to an EK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacli_c.html :param handle: EK file handle. :type handle: int :param segno: Number of segment to add column to. :type segno: int :param column: Column name. :type column: str :param ivals: Integer values to add to column. :type ivals: Array of ints :type entszs: Array of ints :param nlflgs: Array of null flags for column entries. :type nlflgs: Array of bools :param rcptrs: Record pointers for segment. :type rcptrs: Array of ints :param wkindx: Work space for column index. :type wkindx: Array of ints :return: Work space for column index. :rtype: Array of ints """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) column = stypes.stringToCharP(column) ivals = stypes.toIntVector(ivals) entszs = stypes.toIntVector(entszs) nlflgs = stypes.toIntVector(nlflgs) rcptrs = stypes.toIntVector(rcptrs) wkindx = stypes.toIntVector(wkindx) libspice.ekacli_c(handle, segno, column, ivals, entszs, nlflgs, rcptrs, wkindx) return stypes.cVectorToPython(wkindx)
[ "def", "ekacli", "(", "handle", ",", "segno", ",", "column", ",", "ivals", ",", "entszs", ",", "nlflgs", ",", "rcptrs", ",", "wkindx", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "ivals", "=", "stypes", ".", "toIntVector", "(", "ivals", ")", "entszs", "=", "stypes", ".", "toIntVector", "(", "entszs", ")", "nlflgs", "=", "stypes", ".", "toIntVector", "(", "nlflgs", ")", "rcptrs", "=", "stypes", ".", "toIntVector", "(", "rcptrs", ")", "wkindx", "=", "stypes", ".", "toIntVector", "(", "wkindx", ")", "libspice", ".", "ekacli_c", "(", "handle", ",", "segno", ",", "column", ",", "ivals", ",", "entszs", ",", "nlflgs", ",", "rcptrs", ",", "wkindx", ")", "return", "stypes", ".", "cVectorToPython", "(", "wkindx", ")" ]
Add an entire integer column to an EK segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacli_c.html :param handle: EK file handle. :type handle: int :param segno: Number of segment to add column to. :type segno: int :param column: Column name. :type column: str :param ivals: Integer values to add to column. :type ivals: Array of ints :type entszs: Array of ints :param nlflgs: Array of null flags for column entries. :type nlflgs: Array of bools :param rcptrs: Record pointers for segment. :type rcptrs: Array of ints :param wkindx: Work space for column index. :type wkindx: Array of ints :return: Work space for column index. :rtype: Array of ints
[ "Add", "an", "entire", "integer", "column", "to", "an", "EK", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3872-L3906
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekappr
def ekappr(handle, segno): """ Append a new, empty record at the end of a specified E-kernel segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekappr_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :return: Number of appended record. :rtype: int """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int() libspice.ekappr_c(handle, segno, ctypes.byref(recno)) return recno.value
python
def ekappr(handle, segno): """ Append a new, empty record at the end of a specified E-kernel segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekappr_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :return: Number of appended record. :rtype: int """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int() libspice.ekappr_c(handle, segno, ctypes.byref(recno)) return recno.value
[ "def", "ekappr", "(", "handle", ",", "segno", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekappr_c", "(", "handle", ",", "segno", ",", "ctypes", ".", "byref", "(", "recno", ")", ")", "return", "recno", ".", "value" ]
Append a new, empty record at the end of a specified E-kernel segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekappr_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :return: Number of appended record. :rtype: int
[ "Append", "a", "new", "empty", "record", "at", "the", "end", "of", "a", "specified", "E", "-", "kernel", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3910-L3927
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekbseg
def ekbseg(handle, tabnam, cnames, decls): """ Start a new segment in an E-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekbseg_c.html :param handle: File handle. :type handle: int :param tabnam: Table name. :type tabnam: str :param cnames: Names of columns. :type cnames: list of str. :param decls: Declarations of columns. :type decls: list of str. :return: Segment number. :rtype: int """ handle = ctypes.c_int(handle) tabnam = stypes.stringToCharP(tabnam) ncols = ctypes.c_int(len(cnames)) cnmlen = ctypes.c_int(len(max(cnames, key=len)) + 1) # needs to be len(name)+1 ie 'c1' to 3 for ekbseg do not fail cnames = stypes.listToCharArrayPtr(cnames) declen = ctypes.c_int(len(max(decls, key=len)) + 1) decls = stypes.listToCharArrayPtr(decls) segno = ctypes.c_int() libspice.ekbseg_c(handle, tabnam, ncols, cnmlen, cnames, declen, decls, ctypes.byref(segno)) return segno.value
python
def ekbseg(handle, tabnam, cnames, decls): """ Start a new segment in an E-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekbseg_c.html :param handle: File handle. :type handle: int :param tabnam: Table name. :type tabnam: str :param cnames: Names of columns. :type cnames: list of str. :param decls: Declarations of columns. :type decls: list of str. :return: Segment number. :rtype: int """ handle = ctypes.c_int(handle) tabnam = stypes.stringToCharP(tabnam) ncols = ctypes.c_int(len(cnames)) cnmlen = ctypes.c_int(len(max(cnames, key=len)) + 1) # needs to be len(name)+1 ie 'c1' to 3 for ekbseg do not fail cnames = stypes.listToCharArrayPtr(cnames) declen = ctypes.c_int(len(max(decls, key=len)) + 1) decls = stypes.listToCharArrayPtr(decls) segno = ctypes.c_int() libspice.ekbseg_c(handle, tabnam, ncols, cnmlen, cnames, declen, decls, ctypes.byref(segno)) return segno.value
[ "def", "ekbseg", "(", "handle", ",", "tabnam", ",", "cnames", ",", "decls", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "tabnam", "=", "stypes", ".", "stringToCharP", "(", "tabnam", ")", "ncols", "=", "ctypes", ".", "c_int", "(", "len", "(", "cnames", ")", ")", "cnmlen", "=", "ctypes", ".", "c_int", "(", "len", "(", "max", "(", "cnames", ",", "key", "=", "len", ")", ")", "+", "1", ")", "# needs to be len(name)+1 ie 'c1' to 3 for ekbseg do not fail", "cnames", "=", "stypes", ".", "listToCharArrayPtr", "(", "cnames", ")", "declen", "=", "ctypes", ".", "c_int", "(", "len", "(", "max", "(", "decls", ",", "key", "=", "len", ")", ")", "+", "1", ")", "decls", "=", "stypes", ".", "listToCharArrayPtr", "(", "decls", ")", "segno", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekbseg_c", "(", "handle", ",", "tabnam", ",", "ncols", ",", "cnmlen", ",", "cnames", ",", "declen", ",", "decls", ",", "ctypes", ".", "byref", "(", "segno", ")", ")", "return", "segno", ".", "value" ]
Start a new segment in an E-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekbseg_c.html :param handle: File handle. :type handle: int :param tabnam: Table name. :type tabnam: str :param cnames: Names of columns. :type cnames: list of str. :param decls: Declarations of columns. :type decls: list of str. :return: Segment number. :rtype: int
[ "Start", "a", "new", "segment", "in", "an", "E", "-", "kernel", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3931-L3957
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekccnt
def ekccnt(table): """ Return the number of distinct columns in a specified, currently loaded table. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekccnt_c.html :param table: Name of table. :type table: str :return: Count of distinct, currently loaded columns. :rtype: int """ table = stypes.stringToCharP(table) ccount = ctypes.c_int() libspice.ekccnt_c(table, ctypes.byref(ccount)) return ccount.value
python
def ekccnt(table): """ Return the number of distinct columns in a specified, currently loaded table. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekccnt_c.html :param table: Name of table. :type table: str :return: Count of distinct, currently loaded columns. :rtype: int """ table = stypes.stringToCharP(table) ccount = ctypes.c_int() libspice.ekccnt_c(table, ctypes.byref(ccount)) return ccount.value
[ "def", "ekccnt", "(", "table", ")", ":", "table", "=", "stypes", ".", "stringToCharP", "(", "table", ")", "ccount", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekccnt_c", "(", "table", ",", "ctypes", ".", "byref", "(", "ccount", ")", ")", "return", "ccount", ".", "value" ]
Return the number of distinct columns in a specified, currently loaded table. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekccnt_c.html :param table: Name of table. :type table: str :return: Count of distinct, currently loaded columns. :rtype: int
[ "Return", "the", "number", "of", "distinct", "columns", "in", "a", "specified", "currently", "loaded", "table", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3961-L3976
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekcii
def ekcii(table, cindex, lenout=_default_len_out): """ Return attribute information about a column belonging to a loaded EK table, specifying the column by table and index. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekcii_c.html :param table: Name of table containing column. :type table: str :param cindex: Index of column whose attributes are to be found. :type cindex: int :param lenout: Maximum allowed length of column name. :return: Name of column, Column attribute descriptor. :rtype: tuple """ table = stypes.stringToCharP(table) cindex = ctypes.c_int(cindex) lenout = ctypes.c_int(lenout) column = stypes.stringToCharP(lenout) attdsc = stypes.SpiceEKAttDsc() libspice.ekcii_c(table, cindex, lenout, column, ctypes.byref(attdsc)) return stypes.toPythonString(column), attdsc
python
def ekcii(table, cindex, lenout=_default_len_out): """ Return attribute information about a column belonging to a loaded EK table, specifying the column by table and index. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekcii_c.html :param table: Name of table containing column. :type table: str :param cindex: Index of column whose attributes are to be found. :type cindex: int :param lenout: Maximum allowed length of column name. :return: Name of column, Column attribute descriptor. :rtype: tuple """ table = stypes.stringToCharP(table) cindex = ctypes.c_int(cindex) lenout = ctypes.c_int(lenout) column = stypes.stringToCharP(lenout) attdsc = stypes.SpiceEKAttDsc() libspice.ekcii_c(table, cindex, lenout, column, ctypes.byref(attdsc)) return stypes.toPythonString(column), attdsc
[ "def", "ekcii", "(", "table", ",", "cindex", ",", "lenout", "=", "_default_len_out", ")", ":", "table", "=", "stypes", ".", "stringToCharP", "(", "table", ")", "cindex", "=", "ctypes", ".", "c_int", "(", "cindex", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "attdsc", "=", "stypes", ".", "SpiceEKAttDsc", "(", ")", "libspice", ".", "ekcii_c", "(", "table", ",", "cindex", ",", "lenout", ",", "column", ",", "ctypes", ".", "byref", "(", "attdsc", ")", ")", "return", "stypes", ".", "toPythonString", "(", "column", ")", ",", "attdsc" ]
Return attribute information about a column belonging to a loaded EK table, specifying the column by table and index. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekcii_c.html :param table: Name of table containing column. :type table: str :param cindex: Index of column whose attributes are to be found. :type cindex: int :param lenout: Maximum allowed length of column name. :return: Name of column, Column attribute descriptor. :rtype: tuple
[ "Return", "attribute", "information", "about", "a", "column", "belonging", "to", "a", "loaded", "EK", "table", "specifying", "the", "column", "by", "table", "and", "index", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L3980-L4001
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekdelr
def ekdelr(handle, segno, recno): """ Delete a specified record from a specified E-kernel segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekdelr_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :param recno: Record number. :type recno: int """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) libspice.ekdelr_c(handle, segno, recno)
python
def ekdelr(handle, segno, recno): """ Delete a specified record from a specified E-kernel segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekdelr_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :param recno: Record number. :type recno: int """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) libspice.ekdelr_c(handle, segno, recno)
[ "def", "ekdelr", "(", "handle", ",", "segno", ",", "recno", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", "recno", ")", "libspice", ".", "ekdelr_c", "(", "handle", ",", "segno", ",", "recno", ")" ]
Delete a specified record from a specified E-kernel segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekdelr_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :param recno: Record number. :type recno: int
[ "Delete", "a", "specified", "record", "from", "a", "specified", "E", "-", "kernel", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4019-L4035
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekffld
def ekffld(handle, segno, rcptrs): """ Complete a fast write operation on a new E-kernel segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekffld_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :param rcptrs: Record pointers. :type rcptrs: Array of ints """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) rcptrs = stypes.toIntVector(rcptrs) libspice.ekffld_c(handle, segno, ctypes.cast(rcptrs, ctypes.POINTER(ctypes.c_int)))
python
def ekffld(handle, segno, rcptrs): """ Complete a fast write operation on a new E-kernel segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekffld_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :param rcptrs: Record pointers. :type rcptrs: Array of ints """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) rcptrs = stypes.toIntVector(rcptrs) libspice.ekffld_c(handle, segno, ctypes.cast(rcptrs, ctypes.POINTER(ctypes.c_int)))
[ "def", "ekffld", "(", "handle", ",", "segno", ",", "rcptrs", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "rcptrs", "=", "stypes", ".", "toIntVector", "(", "rcptrs", ")", "libspice", ".", "ekffld_c", "(", "handle", ",", "segno", ",", "ctypes", ".", "cast", "(", "rcptrs", ",", "ctypes", ".", "POINTER", "(", "ctypes", ".", "c_int", ")", ")", ")" ]
Complete a fast write operation on a new E-kernel segment. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekffld_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :param rcptrs: Record pointers. :type rcptrs: Array of ints
[ "Complete", "a", "fast", "write", "operation", "on", "a", "new", "E", "-", "kernel", "segment", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4039-L4056
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekfind
def ekfind(query, lenout=_default_len_out): """ Find E-kernel data that satisfy a set of constraints. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekfind_c.html :param query: Query specifying data to be found. :type query: str :param lenout: Declared length of output error message string. :type lenout: int :return: Number of matching rows, Flag indicating whether query parsed correctly, Parse error description. :rtype: tuple """ query = stypes.stringToCharP(query) lenout = ctypes.c_int(lenout) nmrows = ctypes.c_int() error = ctypes.c_int() errmsg = stypes.stringToCharP(lenout) libspice.ekfind_c(query, lenout, ctypes.byref(nmrows), ctypes.byref(error), errmsg) return nmrows.value, error.value, stypes.toPythonString(errmsg)
python
def ekfind(query, lenout=_default_len_out): """ Find E-kernel data that satisfy a set of constraints. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekfind_c.html :param query: Query specifying data to be found. :type query: str :param lenout: Declared length of output error message string. :type lenout: int :return: Number of matching rows, Flag indicating whether query parsed correctly, Parse error description. :rtype: tuple """ query = stypes.stringToCharP(query) lenout = ctypes.c_int(lenout) nmrows = ctypes.c_int() error = ctypes.c_int() errmsg = stypes.stringToCharP(lenout) libspice.ekfind_c(query, lenout, ctypes.byref(nmrows), ctypes.byref(error), errmsg) return nmrows.value, error.value, stypes.toPythonString(errmsg)
[ "def", "ekfind", "(", "query", ",", "lenout", "=", "_default_len_out", ")", ":", "query", "=", "stypes", ".", "stringToCharP", "(", "query", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "nmrows", "=", "ctypes", ".", "c_int", "(", ")", "error", "=", "ctypes", ".", "c_int", "(", ")", "errmsg", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "libspice", ".", "ekfind_c", "(", "query", ",", "lenout", ",", "ctypes", ".", "byref", "(", "nmrows", ")", ",", "ctypes", ".", "byref", "(", "error", ")", ",", "errmsg", ")", "return", "nmrows", ".", "value", ",", "error", ".", "value", ",", "stypes", ".", "toPythonString", "(", "errmsg", ")" ]
Find E-kernel data that satisfy a set of constraints. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekfind_c.html :param query: Query specifying data to be found. :type query: str :param lenout: Declared length of output error message string. :type lenout: int :return: Number of matching rows, Flag indicating whether query parsed correctly, Parse error description. :rtype: tuple
[ "Find", "E", "-", "kernel", "data", "that", "satisfy", "a", "set", "of", "constraints", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4060-L4083
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekgc
def ekgc(selidx, row, element, lenout=_default_len_out): """ Return an element of an entry in a column of character type in a specified row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekgc_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row to fetch from. :type row: int :param element: Index of element, within column entry, to fetch. :type element: int :param lenout: Maximum length of column element. :type lenout: int :return: Character string element of column entry, Flag indicating whether column entry was null. :rtype: tuple """ selidx = ctypes.c_int(selidx) row = ctypes.c_int(row) element = ctypes.c_int(element) lenout = ctypes.c_int(lenout) null = ctypes.c_int() found = ctypes.c_int() cdata = stypes.stringToCharP(lenout) libspice.ekgc_c(selidx, row, element, lenout, cdata, ctypes.byref(null), ctypes.byref(found)) return stypes.toPythonString(cdata), null.value, bool(found.value)
python
def ekgc(selidx, row, element, lenout=_default_len_out): """ Return an element of an entry in a column of character type in a specified row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekgc_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row to fetch from. :type row: int :param element: Index of element, within column entry, to fetch. :type element: int :param lenout: Maximum length of column element. :type lenout: int :return: Character string element of column entry, Flag indicating whether column entry was null. :rtype: tuple """ selidx = ctypes.c_int(selidx) row = ctypes.c_int(row) element = ctypes.c_int(element) lenout = ctypes.c_int(lenout) null = ctypes.c_int() found = ctypes.c_int() cdata = stypes.stringToCharP(lenout) libspice.ekgc_c(selidx, row, element, lenout, cdata, ctypes.byref(null), ctypes.byref(found)) return stypes.toPythonString(cdata), null.value, bool(found.value)
[ "def", "ekgc", "(", "selidx", ",", "row", ",", "element", ",", "lenout", "=", "_default_len_out", ")", ":", "selidx", "=", "ctypes", ".", "c_int", "(", "selidx", ")", "row", "=", "ctypes", ".", "c_int", "(", "row", ")", "element", "=", "ctypes", ".", "c_int", "(", "element", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "null", "=", "ctypes", ".", "c_int", "(", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "cdata", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "libspice", ".", "ekgc_c", "(", "selidx", ",", "row", ",", "element", ",", "lenout", ",", "cdata", ",", "ctypes", ".", "byref", "(", "null", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "stypes", ".", "toPythonString", "(", "cdata", ")", ",", "null", ".", "value", ",", "bool", "(", "found", ".", "value", ")" ]
Return an element of an entry in a column of character type in a specified row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekgc_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row to fetch from. :type row: int :param element: Index of element, within column entry, to fetch. :type element: int :param lenout: Maximum length of column element. :type lenout: int :return: Character string element of column entry, Flag indicating whether column entry was null. :rtype: tuple
[ "Return", "an", "element", "of", "an", "entry", "in", "a", "column", "of", "character", "type", "in", "a", "specified", "row", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4088-L4116
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekgd
def ekgd(selidx, row, element): """ Return an element of an entry in a column of double precision type in a specified row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekgd_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row to fetch from. :type row: int :param element: Index of element, within column entry, to fetch. :type element: int :return: Double precision element of column entry, Flag indicating whether column entry was null. :rtype: tuple """ selidx = ctypes.c_int(selidx) row = ctypes.c_int(row) element = ctypes.c_int(element) ddata = ctypes.c_double() null = ctypes.c_int() found = ctypes.c_int() libspice.ekgd_c(selidx, row, element, ctypes.byref(ddata), ctypes.byref(null), ctypes.byref(found)) return ddata.value, null.value, bool(found.value)
python
def ekgd(selidx, row, element): """ Return an element of an entry in a column of double precision type in a specified row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekgd_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row to fetch from. :type row: int :param element: Index of element, within column entry, to fetch. :type element: int :return: Double precision element of column entry, Flag indicating whether column entry was null. :rtype: tuple """ selidx = ctypes.c_int(selidx) row = ctypes.c_int(row) element = ctypes.c_int(element) ddata = ctypes.c_double() null = ctypes.c_int() found = ctypes.c_int() libspice.ekgd_c(selidx, row, element, ctypes.byref(ddata), ctypes.byref(null), ctypes.byref(found)) return ddata.value, null.value, bool(found.value)
[ "def", "ekgd", "(", "selidx", ",", "row", ",", "element", ")", ":", "selidx", "=", "ctypes", ".", "c_int", "(", "selidx", ")", "row", "=", "ctypes", ".", "c_int", "(", "row", ")", "element", "=", "ctypes", ".", "c_int", "(", "element", ")", "ddata", "=", "ctypes", ".", "c_double", "(", ")", "null", "=", "ctypes", ".", "c_int", "(", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekgd_c", "(", "selidx", ",", "row", ",", "element", ",", "ctypes", ".", "byref", "(", "ddata", ")", ",", "ctypes", ".", "byref", "(", "null", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "ddata", ".", "value", ",", "null", ".", "value", ",", "bool", "(", "found", ".", "value", ")" ]
Return an element of an entry in a column of double precision type in a specified row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekgd_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row to fetch from. :type row: int :param element: Index of element, within column entry, to fetch. :type element: int :return: Double precision element of column entry, Flag indicating whether column entry was null. :rtype: tuple
[ "Return", "an", "element", "of", "an", "entry", "in", "a", "column", "of", "double", "precision", "type", "in", "a", "specified", "row", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4121-L4147
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekgi
def ekgi(selidx, row, element): """ Return an element of an entry in a column of integer type in a specified row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekgi_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row to fetch from. :type row: int :param element: Index of element, within column entry, to fetch. :type element: int :return: Integer element of column entry, Flag indicating whether column entry was null. :rtype: tuple """ selidx = ctypes.c_int(selidx) row = ctypes.c_int(row) element = ctypes.c_int(element) idata = ctypes.c_int() null = ctypes.c_int() found = ctypes.c_int() libspice.ekgi_c(selidx, row, element, ctypes.byref(idata), ctypes.byref(null), ctypes.byref(found)) return idata.value, null.value, bool(found.value)
python
def ekgi(selidx, row, element): """ Return an element of an entry in a column of integer type in a specified row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekgi_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row to fetch from. :type row: int :param element: Index of element, within column entry, to fetch. :type element: int :return: Integer element of column entry, Flag indicating whether column entry was null. :rtype: tuple """ selidx = ctypes.c_int(selidx) row = ctypes.c_int(row) element = ctypes.c_int(element) idata = ctypes.c_int() null = ctypes.c_int() found = ctypes.c_int() libspice.ekgi_c(selidx, row, element, ctypes.byref(idata), ctypes.byref(null), ctypes.byref(found)) return idata.value, null.value, bool(found.value)
[ "def", "ekgi", "(", "selidx", ",", "row", ",", "element", ")", ":", "selidx", "=", "ctypes", ".", "c_int", "(", "selidx", ")", "row", "=", "ctypes", ".", "c_int", "(", "row", ")", "element", "=", "ctypes", ".", "c_int", "(", "element", ")", "idata", "=", "ctypes", ".", "c_int", "(", ")", "null", "=", "ctypes", ".", "c_int", "(", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekgi_c", "(", "selidx", ",", "row", ",", "element", ",", "ctypes", ".", "byref", "(", "idata", ")", ",", "ctypes", ".", "byref", "(", "null", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "idata", ".", "value", ",", "null", ".", "value", ",", "bool", "(", "found", ".", "value", ")" ]
Return an element of an entry in a column of integer type in a specified row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekgi_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row to fetch from. :type row: int :param element: Index of element, within column entry, to fetch. :type element: int :return: Integer element of column entry, Flag indicating whether column entry was null. :rtype: tuple
[ "Return", "an", "element", "of", "an", "entry", "in", "a", "column", "of", "integer", "type", "in", "a", "specified", "row", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4152-L4178
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekifld
def ekifld(handle, tabnam, ncols, nrows, cnmlen, cnames, declen, decls): """ Initialize a new E-kernel segment to allow fast writing. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekifld_c.html :param handle: File handle. :type handle: int :param tabnam: Table name. :type tabnam: str :param ncols: Number of columns in the segment. :type ncols: int :param nrows: Number of rows in the segment. :type nrows: int :param cnmlen: Length of names in in column name array. :type cnmlen: int :param cnames: Names of columns. :type cnames: list of str. :param declen: Length of declaration strings in declaration array. :type declen: int :param decls: Declarations of columns. :type decls: list of str. :return: Segment number, Array of record pointers. :rtype: tuple """ handle = ctypes.c_int(handle) tabnam = stypes.stringToCharP(tabnam) ncols = ctypes.c_int(ncols) nrows = ctypes.c_int(nrows) cnmlen = ctypes.c_int(cnmlen) cnames = stypes.listToCharArray(cnames) declen = ctypes.c_int(declen) recptrs = stypes.emptyIntVector(nrows) decls = stypes.listToCharArray(decls) segno = ctypes.c_int() libspice.ekifld_c(handle, tabnam, ncols, nrows, cnmlen, cnames, declen, decls, ctypes.byref(segno), recptrs) return segno.value, stypes.cVectorToPython(recptrs)
python
def ekifld(handle, tabnam, ncols, nrows, cnmlen, cnames, declen, decls): """ Initialize a new E-kernel segment to allow fast writing. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekifld_c.html :param handle: File handle. :type handle: int :param tabnam: Table name. :type tabnam: str :param ncols: Number of columns in the segment. :type ncols: int :param nrows: Number of rows in the segment. :type nrows: int :param cnmlen: Length of names in in column name array. :type cnmlen: int :param cnames: Names of columns. :type cnames: list of str. :param declen: Length of declaration strings in declaration array. :type declen: int :param decls: Declarations of columns. :type decls: list of str. :return: Segment number, Array of record pointers. :rtype: tuple """ handle = ctypes.c_int(handle) tabnam = stypes.stringToCharP(tabnam) ncols = ctypes.c_int(ncols) nrows = ctypes.c_int(nrows) cnmlen = ctypes.c_int(cnmlen) cnames = stypes.listToCharArray(cnames) declen = ctypes.c_int(declen) recptrs = stypes.emptyIntVector(nrows) decls = stypes.listToCharArray(decls) segno = ctypes.c_int() libspice.ekifld_c(handle, tabnam, ncols, nrows, cnmlen, cnames, declen, decls, ctypes.byref(segno), recptrs) return segno.value, stypes.cVectorToPython(recptrs)
[ "def", "ekifld", "(", "handle", ",", "tabnam", ",", "ncols", ",", "nrows", ",", "cnmlen", ",", "cnames", ",", "declen", ",", "decls", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "tabnam", "=", "stypes", ".", "stringToCharP", "(", "tabnam", ")", "ncols", "=", "ctypes", ".", "c_int", "(", "ncols", ")", "nrows", "=", "ctypes", ".", "c_int", "(", "nrows", ")", "cnmlen", "=", "ctypes", ".", "c_int", "(", "cnmlen", ")", "cnames", "=", "stypes", ".", "listToCharArray", "(", "cnames", ")", "declen", "=", "ctypes", ".", "c_int", "(", "declen", ")", "recptrs", "=", "stypes", ".", "emptyIntVector", "(", "nrows", ")", "decls", "=", "stypes", ".", "listToCharArray", "(", "decls", ")", "segno", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekifld_c", "(", "handle", ",", "tabnam", ",", "ncols", ",", "nrows", ",", "cnmlen", ",", "cnames", ",", "declen", ",", "decls", ",", "ctypes", ".", "byref", "(", "segno", ")", ",", "recptrs", ")", "return", "segno", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "recptrs", ")" ]
Initialize a new E-kernel segment to allow fast writing. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekifld_c.html :param handle: File handle. :type handle: int :param tabnam: Table name. :type tabnam: str :param ncols: Number of columns in the segment. :type ncols: int :param nrows: Number of rows in the segment. :type nrows: int :param cnmlen: Length of names in in column name array. :type cnmlen: int :param cnames: Names of columns. :type cnames: list of str. :param declen: Length of declaration strings in declaration array. :type declen: int :param decls: Declarations of columns. :type decls: list of str. :return: Segment number, Array of record pointers. :rtype: tuple
[ "Initialize", "a", "new", "E", "-", "kernel", "segment", "to", "allow", "fast", "writing", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4182-L4219
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekinsr
def ekinsr(handle, segno, recno): """ Add a new, empty record to a specified E-kernel segment at a specified index. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekinsr_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :param recno: Record number. :type recno: int """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) libspice.ekinsr_c(handle, segno, recno)
python
def ekinsr(handle, segno, recno): """ Add a new, empty record to a specified E-kernel segment at a specified index. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekinsr_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :param recno: Record number. :type recno: int """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) libspice.ekinsr_c(handle, segno, recno)
[ "def", "ekinsr", "(", "handle", ",", "segno", ",", "recno", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", "recno", ")", "libspice", ".", "ekinsr_c", "(", "handle", ",", "segno", ",", "recno", ")" ]
Add a new, empty record to a specified E-kernel segment at a specified index. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekinsr_c.html :param handle: File handle. :type handle: int :param segno: Segment number. :type segno: int :param recno: Record number. :type recno: int
[ "Add", "a", "new", "empty", "record", "to", "a", "specified", "E", "-", "kernel", "segment", "at", "a", "specified", "index", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4223-L4240
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
eklef
def eklef(fname): """ Load an EK file, making it accessible to the EK readers. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eklef_c.html :param fname: Name of EK file to load. :type fname: str :return: File handle of loaded EK file. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.eklef_c(fname, ctypes.byref(handle)) return handle.value
python
def eklef(fname): """ Load an EK file, making it accessible to the EK readers. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eklef_c.html :param fname: Name of EK file to load. :type fname: str :return: File handle of loaded EK file. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.eklef_c(fname, ctypes.byref(handle)) return handle.value
[ "def", "eklef", "(", "fname", ")", ":", "fname", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "eklef_c", "(", "fname", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Load an EK file, making it accessible to the EK readers. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eklef_c.html :param fname: Name of EK file to load. :type fname: str :return: File handle of loaded EK file. :rtype: int
[ "Load", "an", "EK", "file", "making", "it", "accessible", "to", "the", "EK", "readers", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4244-L4258
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
eknelt
def eknelt(selidx, row): """ Return the number of elements in a specified column entry in the current row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eknelt_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row containing element. :type row: int :return: The number of elements in entry in current row. :rtype: int """ selidx = ctypes.c_int(selidx) row = ctypes.c_int(row) return libspice.eknelt_c(selidx, row)
python
def eknelt(selidx, row): """ Return the number of elements in a specified column entry in the current row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eknelt_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row containing element. :type row: int :return: The number of elements in entry in current row. :rtype: int """ selidx = ctypes.c_int(selidx) row = ctypes.c_int(row) return libspice.eknelt_c(selidx, row)
[ "def", "eknelt", "(", "selidx", ",", "row", ")", ":", "selidx", "=", "ctypes", ".", "c_int", "(", "selidx", ")", "row", "=", "ctypes", ".", "c_int", "(", "row", ")", "return", "libspice", ".", "eknelt_c", "(", "selidx", ",", "row", ")" ]
Return the number of elements in a specified column entry in the current row. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eknelt_c.html :param selidx: Index of parent column in SELECT clause. :type selidx: int :param row: Row containing element. :type row: int :return: The number of elements in entry in current row. :rtype: int
[ "Return", "the", "number", "of", "elements", "in", "a", "specified", "column", "entry", "in", "the", "current", "row", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4262-L4278
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekntab
def ekntab(): """ Return the number of loaded EK tables. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekntab_c.html :return: The number of loaded EK tables. :rtype: int """ n = ctypes.c_int(0) libspice.ekntab_c(ctypes.byref(n)) return n.value
python
def ekntab(): """ Return the number of loaded EK tables. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekntab_c.html :return: The number of loaded EK tables. :rtype: int """ n = ctypes.c_int(0) libspice.ekntab_c(ctypes.byref(n)) return n.value
[ "def", "ekntab", "(", ")", ":", "n", "=", "ctypes", ".", "c_int", "(", "0", ")", "libspice", ".", "ekntab_c", "(", "ctypes", ".", "byref", "(", "n", ")", ")", "return", "n", ".", "value" ]
Return the number of loaded EK tables. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekntab_c.html :return: The number of loaded EK tables. :rtype: int
[ "Return", "the", "number", "of", "loaded", "EK", "tables", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4298-L4309
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekopn
def ekopn(fname, ifname, ncomch): """ Open a new E-kernel file and prepare the file for writing. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopn_c.html :param fname: Name of EK file. :type fname: str :param ifname: Internal file name. :type ifname: str :param ncomch: The number of characters to reserve for comments. :type ncomch: int :return: Handle attached to new EK file. :rtype: int """ fname = stypes.stringToCharP(fname) ifname = stypes.stringToCharP(ifname) ncomch = ctypes.c_int(ncomch) handle = ctypes.c_int() libspice.ekopn_c(fname, ifname, ncomch, ctypes.byref(handle)) return handle.value
python
def ekopn(fname, ifname, ncomch): """ Open a new E-kernel file and prepare the file for writing. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopn_c.html :param fname: Name of EK file. :type fname: str :param ifname: Internal file name. :type ifname: str :param ncomch: The number of characters to reserve for comments. :type ncomch: int :return: Handle attached to new EK file. :rtype: int """ fname = stypes.stringToCharP(fname) ifname = stypes.stringToCharP(ifname) ncomch = ctypes.c_int(ncomch) handle = ctypes.c_int() libspice.ekopn_c(fname, ifname, ncomch, ctypes.byref(handle)) return handle.value
[ "def", "ekopn", "(", "fname", ",", "ifname", ",", "ncomch", ")", ":", "fname", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "ifname", "=", "stypes", ".", "stringToCharP", "(", "ifname", ")", "ncomch", "=", "ctypes", ".", "c_int", "(", "ncomch", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekopn_c", "(", "fname", ",", "ifname", ",", "ncomch", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Open a new E-kernel file and prepare the file for writing. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopn_c.html :param fname: Name of EK file. :type fname: str :param ifname: Internal file name. :type ifname: str :param ncomch: The number of characters to reserve for comments. :type ncomch: int :return: Handle attached to new EK file. :rtype: int
[ "Open", "a", "new", "E", "-", "kernel", "file", "and", "prepare", "the", "file", "for", "writing", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4313-L4333
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekopr
def ekopr(fname): """ Open an existing E-kernel file for reading. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopr_c.html :param fname: Name of EK file. :type fname: str :return: Handle attached to EK file. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.ekopr_c(fname, ctypes.byref(handle)) return handle.value
python
def ekopr(fname): """ Open an existing E-kernel file for reading. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopr_c.html :param fname: Name of EK file. :type fname: str :return: Handle attached to EK file. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.ekopr_c(fname, ctypes.byref(handle)) return handle.value
[ "def", "ekopr", "(", "fname", ")", ":", "fname", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekopr_c", "(", "fname", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Open an existing E-kernel file for reading. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopr_c.html :param fname: Name of EK file. :type fname: str :return: Handle attached to EK file. :rtype: int
[ "Open", "an", "existing", "E", "-", "kernel", "file", "for", "reading", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4337-L4351
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekopw
def ekopw(fname): """ Open an existing E-kernel file for writing. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopw_c.html :param fname: Name of EK file. :type fname: str :return: Handle attached to EK file. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.ekopw_c(fname, ctypes.byref(handle)) return handle.value
python
def ekopw(fname): """ Open an existing E-kernel file for writing. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopw_c.html :param fname: Name of EK file. :type fname: str :return: Handle attached to EK file. :rtype: int """ fname = stypes.stringToCharP(fname) handle = ctypes.c_int() libspice.ekopw_c(fname, ctypes.byref(handle)) return handle.value
[ "def", "ekopw", "(", "fname", ")", ":", "fname", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekopw_c", "(", "fname", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Open an existing E-kernel file for writing. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopw_c.html :param fname: Name of EK file. :type fname: str :return: Handle attached to EK file. :rtype: int
[ "Open", "an", "existing", "E", "-", "kernel", "file", "for", "writing", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4371-L4385
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekpsel
def ekpsel(query, msglen, tablen, collen): """ Parse the SELECT clause of an EK query, returning full particulars concerning each selected item. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekpsel_c.html note: oddly docs at url are incomplete/incorrect. :param query: EK query. :type query: str :param msglen: Available space in the output error message string. :type msglen: int :param tablen: UNKNOWN? Length of Table? :type tablen: int :param collen: UNKOWN? Length of Column? :return: Number of items in SELECT clause of query, Begin positions of expressions in SELECT clause, End positions of expressions in SELECT clause, Data types of expressions, Classes of expressions, Names of tables qualifying SELECT columns, Names of columns in SELECT clause of query, Error flag, Parse error message. :rtype: tuple """ query = stypes.stringToCharP(query) msglen = ctypes.c_int(msglen) tablen = ctypes.c_int(tablen) collen = ctypes.c_int(collen) n = ctypes.c_int() xbegs = stypes.emptyIntVector(_SPICE_EK_MAXQSEL) xends = stypes.emptyIntVector(_SPICE_EK_MAXQSEL) xtypes = stypes.emptyIntVector(_SPICE_EK_MAXQSEL) xclass = stypes.emptyIntVector(_SPICE_EK_MAXQSEL) tabs = stypes.emptyCharArray(yLen=_SPICE_EK_MAXQSEL, xLen=tablen) cols = stypes.emptyCharArray(yLen=_SPICE_EK_MAXQSEL, xLen=collen) error = ctypes.c_int() errmsg = stypes.stringToCharP(msglen) libspice.ekpsel_c(query, msglen, tablen, collen, ctypes.byref(n), xbegs, xends, xtypes, xclass, ctypes.byref(tabs), ctypes.byref(cols), ctypes.byref(error), errmsg) return (n.value, stypes.cVectorToPython(xbegs)[:n.value], stypes.cVectorToPython(xends)[:n.value], stypes.cVectorToPython(xtypes)[:n.value], stypes.cVectorToPython(xclass)[:n.value], stypes.cVectorToPython(tabs)[:n.value], stypes.cVectorToPython(cols)[:n.value], error.value, stypes.toPythonString(errmsg))
python
def ekpsel(query, msglen, tablen, collen): """ Parse the SELECT clause of an EK query, returning full particulars concerning each selected item. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekpsel_c.html note: oddly docs at url are incomplete/incorrect. :param query: EK query. :type query: str :param msglen: Available space in the output error message string. :type msglen: int :param tablen: UNKNOWN? Length of Table? :type tablen: int :param collen: UNKOWN? Length of Column? :return: Number of items in SELECT clause of query, Begin positions of expressions in SELECT clause, End positions of expressions in SELECT clause, Data types of expressions, Classes of expressions, Names of tables qualifying SELECT columns, Names of columns in SELECT clause of query, Error flag, Parse error message. :rtype: tuple """ query = stypes.stringToCharP(query) msglen = ctypes.c_int(msglen) tablen = ctypes.c_int(tablen) collen = ctypes.c_int(collen) n = ctypes.c_int() xbegs = stypes.emptyIntVector(_SPICE_EK_MAXQSEL) xends = stypes.emptyIntVector(_SPICE_EK_MAXQSEL) xtypes = stypes.emptyIntVector(_SPICE_EK_MAXQSEL) xclass = stypes.emptyIntVector(_SPICE_EK_MAXQSEL) tabs = stypes.emptyCharArray(yLen=_SPICE_EK_MAXQSEL, xLen=tablen) cols = stypes.emptyCharArray(yLen=_SPICE_EK_MAXQSEL, xLen=collen) error = ctypes.c_int() errmsg = stypes.stringToCharP(msglen) libspice.ekpsel_c(query, msglen, tablen, collen, ctypes.byref(n), xbegs, xends, xtypes, xclass, ctypes.byref(tabs), ctypes.byref(cols), ctypes.byref(error), errmsg) return (n.value, stypes.cVectorToPython(xbegs)[:n.value], stypes.cVectorToPython(xends)[:n.value], stypes.cVectorToPython(xtypes)[:n.value], stypes.cVectorToPython(xclass)[:n.value], stypes.cVectorToPython(tabs)[:n.value], stypes.cVectorToPython(cols)[:n.value], error.value, stypes.toPythonString(errmsg))
[ "def", "ekpsel", "(", "query", ",", "msglen", ",", "tablen", ",", "collen", ")", ":", "query", "=", "stypes", ".", "stringToCharP", "(", "query", ")", "msglen", "=", "ctypes", ".", "c_int", "(", "msglen", ")", "tablen", "=", "ctypes", ".", "c_int", "(", "tablen", ")", "collen", "=", "ctypes", ".", "c_int", "(", "collen", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "xbegs", "=", "stypes", ".", "emptyIntVector", "(", "_SPICE_EK_MAXQSEL", ")", "xends", "=", "stypes", ".", "emptyIntVector", "(", "_SPICE_EK_MAXQSEL", ")", "xtypes", "=", "stypes", ".", "emptyIntVector", "(", "_SPICE_EK_MAXQSEL", ")", "xclass", "=", "stypes", ".", "emptyIntVector", "(", "_SPICE_EK_MAXQSEL", ")", "tabs", "=", "stypes", ".", "emptyCharArray", "(", "yLen", "=", "_SPICE_EK_MAXQSEL", ",", "xLen", "=", "tablen", ")", "cols", "=", "stypes", ".", "emptyCharArray", "(", "yLen", "=", "_SPICE_EK_MAXQSEL", ",", "xLen", "=", "collen", ")", "error", "=", "ctypes", ".", "c_int", "(", ")", "errmsg", "=", "stypes", ".", "stringToCharP", "(", "msglen", ")", "libspice", ".", "ekpsel_c", "(", "query", ",", "msglen", ",", "tablen", ",", "collen", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "xbegs", ",", "xends", ",", "xtypes", ",", "xclass", ",", "ctypes", ".", "byref", "(", "tabs", ")", ",", "ctypes", ".", "byref", "(", "cols", ")", ",", "ctypes", ".", "byref", "(", "error", ")", ",", "errmsg", ")", "return", "(", "n", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "xbegs", ")", "[", ":", "n", ".", "value", "]", ",", "stypes", ".", "cVectorToPython", "(", "xends", ")", "[", ":", "n", ".", "value", "]", ",", "stypes", ".", "cVectorToPython", "(", "xtypes", ")", "[", ":", "n", ".", "value", "]", ",", "stypes", ".", "cVectorToPython", "(", "xclass", ")", "[", ":", "n", ".", "value", "]", ",", "stypes", ".", "cVectorToPython", "(", "tabs", ")", "[", ":", "n", ".", "value", "]", ",", "stypes", ".", "cVectorToPython", "(", "cols", ")", "[", ":", "n", ".", "value", "]", ",", "error", ".", "value", ",", "stypes", ".", "toPythonString", "(", "errmsg", ")", ")" ]
Parse the SELECT clause of an EK query, returning full particulars concerning each selected item. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekpsel_c.html note: oddly docs at url are incomplete/incorrect. :param query: EK query. :type query: str :param msglen: Available space in the output error message string. :type msglen: int :param tablen: UNKNOWN? Length of Table? :type tablen: int :param collen: UNKOWN? Length of Column? :return: Number of items in SELECT clause of query, Begin positions of expressions in SELECT clause, End positions of expressions in SELECT clause, Data types of expressions, Classes of expressions, Names of tables qualifying SELECT columns, Names of columns in SELECT clause of query, Error flag, Parse error message. :rtype: tuple
[ "Parse", "the", "SELECT", "clause", "of", "an", "EK", "query", "returning", "full", "particulars", "concerning", "each", "selected", "item", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4389-L4440
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekrcec
def ekrcec(handle, segno, recno, column, lenout, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT): """ Read data from a character column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcec_c.html :param handle: Handle attached to EK file. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record from which data is to be read. :type recno: int :param column: Column name. :type column: str :param lenout: Maximum length of output strings. :type lenout: int :param nelts: Number of elements to allow for (default=100) :type nelts: int :return: Number of values in column entry, Character values in column entry, Flag indicating whether column entry is null. :rtype: tuple """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) lenout = ctypes.c_int(lenout) nvals = ctypes.c_int() cvals = stypes.emptyCharArray(yLen=nelts, xLen=lenout) isnull = ctypes.c_int() libspice.ekrcec_c(handle, segno, recno, column, lenout, ctypes.byref(nvals), ctypes.byref(cvals), ctypes.byref(isnull)) assert failed() or (nvals.value <= nelts) return nvals.value, stypes.cVectorToPython(cvals)[:nvals.value], bool(isnull.value)
python
def ekrcec(handle, segno, recno, column, lenout, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT): """ Read data from a character column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcec_c.html :param handle: Handle attached to EK file. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record from which data is to be read. :type recno: int :param column: Column name. :type column: str :param lenout: Maximum length of output strings. :type lenout: int :param nelts: Number of elements to allow for (default=100) :type nelts: int :return: Number of values in column entry, Character values in column entry, Flag indicating whether column entry is null. :rtype: tuple """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) lenout = ctypes.c_int(lenout) nvals = ctypes.c_int() cvals = stypes.emptyCharArray(yLen=nelts, xLen=lenout) isnull = ctypes.c_int() libspice.ekrcec_c(handle, segno, recno, column, lenout, ctypes.byref(nvals), ctypes.byref(cvals), ctypes.byref(isnull)) assert failed() or (nvals.value <= nelts) return nvals.value, stypes.cVectorToPython(cvals)[:nvals.value], bool(isnull.value)
[ "def", "ekrcec", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "lenout", ",", "nelts", "=", "_SPICE_EK_EKRCEX_ROOM_DEFAULT", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", "recno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "nvals", "=", "ctypes", ".", "c_int", "(", ")", "cvals", "=", "stypes", ".", "emptyCharArray", "(", "yLen", "=", "nelts", ",", "xLen", "=", "lenout", ")", "isnull", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekrcec_c", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "lenout", ",", "ctypes", ".", "byref", "(", "nvals", ")", ",", "ctypes", ".", "byref", "(", "cvals", ")", ",", "ctypes", ".", "byref", "(", "isnull", ")", ")", "assert", "failed", "(", ")", "or", "(", "nvals", ".", "value", "<=", "nelts", ")", "return", "nvals", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "cvals", ")", "[", ":", "nvals", ".", "value", "]", ",", "bool", "(", "isnull", ".", "value", ")" ]
Read data from a character column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcec_c.html :param handle: Handle attached to EK file. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record from which data is to be read. :type recno: int :param column: Column name. :type column: str :param lenout: Maximum length of output strings. :type lenout: int :param nelts: Number of elements to allow for (default=100) :type nelts: int :return: Number of values in column entry, Character values in column entry, Flag indicating whether column entry is null. :rtype: tuple
[ "Read", "data", "from", "a", "character", "column", "in", "a", "specified", "EK", "record", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4444-L4478
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekrced
def ekrced(handle, segno, recno, column, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT): """ Read data from a double precision column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrced_c.html :param handle: Handle attached to EK file. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record from which data is to be read. :type recno: int :param column: Column name. :type column: str :return: Number of values in column entry, Float values in column entry, Flag indicating whether column entry is null. :rtype: tuple """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(0) dvals = stypes.emptyDoubleVector(nelts) isnull = ctypes.c_int() libspice.ekrced_c(handle, segno, recno, column, ctypes.byref(nvals), dvals, ctypes.byref(isnull)) assert failed() or (nvals.value <= nelts) return nvals.value, stypes.cVectorToPython(dvals)[:nvals.value], bool(isnull.value)
python
def ekrced(handle, segno, recno, column, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT): """ Read data from a double precision column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrced_c.html :param handle: Handle attached to EK file. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record from which data is to be read. :type recno: int :param column: Column name. :type column: str :return: Number of values in column entry, Float values in column entry, Flag indicating whether column entry is null. :rtype: tuple """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(0) dvals = stypes.emptyDoubleVector(nelts) isnull = ctypes.c_int() libspice.ekrced_c(handle, segno, recno, column, ctypes.byref(nvals), dvals, ctypes.byref(isnull)) assert failed() or (nvals.value <= nelts) return nvals.value, stypes.cVectorToPython(dvals)[:nvals.value], bool(isnull.value)
[ "def", "ekrced", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nelts", "=", "_SPICE_EK_EKRCEX_ROOM_DEFAULT", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", "recno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "nvals", "=", "ctypes", ".", "c_int", "(", "0", ")", "dvals", "=", "stypes", ".", "emptyDoubleVector", "(", "nelts", ")", "isnull", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekrced_c", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "ctypes", ".", "byref", "(", "nvals", ")", ",", "dvals", ",", "ctypes", ".", "byref", "(", "isnull", ")", ")", "assert", "failed", "(", ")", "or", "(", "nvals", ".", "value", "<=", "nelts", ")", "return", "nvals", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "dvals", ")", "[", ":", "nvals", ".", "value", "]", ",", "bool", "(", "isnull", ".", "value", ")" ]
Read data from a double precision column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrced_c.html :param handle: Handle attached to EK file. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record from which data is to be read. :type recno: int :param column: Column name. :type column: str :return: Number of values in column entry, Float values in column entry, Flag indicating whether column entry is null. :rtype: tuple
[ "Read", "data", "from", "a", "double", "precision", "column", "in", "a", "specified", "EK", "record", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4482-L4512
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekrcei
def ekrcei(handle, segno, recno, column, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT): """ Read data from an integer column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcei_c.html :param handle: Handle attached to EK file. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record from which data is to be read. :type recno: int :param column: Column name. :type column: str :return: Number of values in column entry, Integer values in column entry, Flag indicating whether column entry is null. :rtype: tuple """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int() ivals = stypes.emptyIntVector(nelts) isnull = ctypes.c_int() libspice.ekrcei_c(handle, segno, recno, column, ctypes.byref(nvals), ivals, ctypes.byref(isnull)) assert failed() or (nvals.value <= nelts) return nvals.value, stypes.cVectorToPython(ivals)[:nvals.value], bool(isnull.value)
python
def ekrcei(handle, segno, recno, column, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT): """ Read data from an integer column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcei_c.html :param handle: Handle attached to EK file. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record from which data is to be read. :type recno: int :param column: Column name. :type column: str :return: Number of values in column entry, Integer values in column entry, Flag indicating whether column entry is null. :rtype: tuple """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int() ivals = stypes.emptyIntVector(nelts) isnull = ctypes.c_int() libspice.ekrcei_c(handle, segno, recno, column, ctypes.byref(nvals), ivals, ctypes.byref(isnull)) assert failed() or (nvals.value <= nelts) return nvals.value, stypes.cVectorToPython(ivals)[:nvals.value], bool(isnull.value)
[ "def", "ekrcei", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nelts", "=", "_SPICE_EK_EKRCEX_ROOM_DEFAULT", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", "recno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "nvals", "=", "ctypes", ".", "c_int", "(", ")", "ivals", "=", "stypes", ".", "emptyIntVector", "(", "nelts", ")", "isnull", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ekrcei_c", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "ctypes", ".", "byref", "(", "nvals", ")", ",", "ivals", ",", "ctypes", ".", "byref", "(", "isnull", ")", ")", "assert", "failed", "(", ")", "or", "(", "nvals", ".", "value", "<=", "nelts", ")", "return", "nvals", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "ivals", ")", "[", ":", "nvals", ".", "value", "]", ",", "bool", "(", "isnull", ".", "value", ")" ]
Read data from an integer column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcei_c.html :param handle: Handle attached to EK file. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record from which data is to be read. :type recno: int :param column: Column name. :type column: str :return: Number of values in column entry, Integer values in column entry, Flag indicating whether column entry is null. :rtype: tuple
[ "Read", "data", "from", "an", "integer", "column", "in", "a", "specified", "EK", "record", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4516-L4546
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekssum
def ekssum(handle, segno): """ Return summary information for a specified segment in a specified EK. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekssum_c.html :param handle: Handle of EK. :type handle: int :param segno: Number of segment to be summarized. :type segno: int :return: EK segment summary. :rtype: spicepy.utils.support_types.SpiceEKSegSum """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) segsum = stypes.SpiceEKSegSum() libspice.ekssum_c(handle, segno, ctypes.byref(segsum)) return segsum
python
def ekssum(handle, segno): """ Return summary information for a specified segment in a specified EK. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekssum_c.html :param handle: Handle of EK. :type handle: int :param segno: Number of segment to be summarized. :type segno: int :return: EK segment summary. :rtype: spicepy.utils.support_types.SpiceEKSegSum """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) segsum = stypes.SpiceEKSegSum() libspice.ekssum_c(handle, segno, ctypes.byref(segsum)) return segsum
[ "def", "ekssum", "(", "handle", ",", "segno", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "segsum", "=", "stypes", ".", "SpiceEKSegSum", "(", ")", "libspice", ".", "ekssum_c", "(", "handle", ",", "segno", ",", "ctypes", ".", "byref", "(", "segsum", ")", ")", "return", "segsum" ]
Return summary information for a specified segment in a specified EK. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekssum_c.html :param handle: Handle of EK. :type handle: int :param segno: Number of segment to be summarized. :type segno: int :return: EK segment summary. :rtype: spicepy.utils.support_types.SpiceEKSegSum
[ "Return", "summary", "information", "for", "a", "specified", "segment", "in", "a", "specified", "EK", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4550-L4567
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ektnam
def ektnam(n, lenout=_default_len_out): """ Return the name of a specified, loaded table. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ektnam_c.html :param n: Index of table. :type n: int :param lenout: Maximum table name length. :type lenout: int :return: Name of table. :rtype: str """ n = ctypes.c_int(n) lenout = ctypes.c_int(lenout) table = stypes.stringToCharP(lenout) libspice.ektnam_c(n, lenout, table) return stypes.toPythonString(table)
python
def ektnam(n, lenout=_default_len_out): """ Return the name of a specified, loaded table. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ektnam_c.html :param n: Index of table. :type n: int :param lenout: Maximum table name length. :type lenout: int :return: Name of table. :rtype: str """ n = ctypes.c_int(n) lenout = ctypes.c_int(lenout) table = stypes.stringToCharP(lenout) libspice.ektnam_c(n, lenout, table) return stypes.toPythonString(table)
[ "def", "ektnam", "(", "n", ",", "lenout", "=", "_default_len_out", ")", ":", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "table", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "libspice", ".", "ektnam_c", "(", "n", ",", "lenout", ",", "table", ")", "return", "stypes", ".", "toPythonString", "(", "table", ")" ]
Return the name of a specified, loaded table. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ektnam_c.html :param n: Index of table. :type n: int :param lenout: Maximum table name length. :type lenout: int :return: Name of table. :rtype: str
[ "Return", "the", "name", "of", "a", "specified", "loaded", "table", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4571-L4588
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekucec
def ekucec(handle, segno, recno, column, nvals, cvals, isnull): """ Update a character column entry in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucec_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be updated. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values in new column entry. :type nvals: int :param cvals: Character values comprising new column entry. :type cvals: list of str. :param isnull: Flag indicating whether column entry is null. :type isnull: bool """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(nvals) vallen = ctypes.c_int(len(max(cvals, key=len)) + 1) cvals = stypes.listToCharArrayPtr(cvals, xLen=vallen) isnull = ctypes.c_int(isnull) libspice.ekucec_c(handle, segno, recno, column, nvals, vallen, cvals, isnull)
python
def ekucec(handle, segno, recno, column, nvals, cvals, isnull): """ Update a character column entry in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucec_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be updated. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values in new column entry. :type nvals: int :param cvals: Character values comprising new column entry. :type cvals: list of str. :param isnull: Flag indicating whether column entry is null. :type isnull: bool """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(nvals) vallen = ctypes.c_int(len(max(cvals, key=len)) + 1) cvals = stypes.listToCharArrayPtr(cvals, xLen=vallen) isnull = ctypes.c_int(isnull) libspice.ekucec_c(handle, segno, recno, column, nvals, vallen, cvals, isnull)
[ "def", "ekucec", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nvals", ",", "cvals", ",", "isnull", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", "recno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "nvals", "=", "ctypes", ".", "c_int", "(", "nvals", ")", "vallen", "=", "ctypes", ".", "c_int", "(", "len", "(", "max", "(", "cvals", ",", "key", "=", "len", ")", ")", "+", "1", ")", "cvals", "=", "stypes", ".", "listToCharArrayPtr", "(", "cvals", ",", "xLen", "=", "vallen", ")", "isnull", "=", "ctypes", ".", "c_int", "(", "isnull", ")", "libspice", ".", "ekucec_c", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nvals", ",", "vallen", ",", "cvals", ",", "isnull", ")" ]
Update a character column entry in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucec_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be updated. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values in new column entry. :type nvals: int :param cvals: Character values comprising new column entry. :type cvals: list of str. :param isnull: Flag indicating whether column entry is null. :type isnull: bool
[ "Update", "a", "character", "column", "entry", "in", "a", "specified", "EK", "record", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4592-L4621
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekuced
def ekuced(handle, segno, recno, column, nvals, dvals, isnull): """ Update a double precision column entry in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekuced_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be updated. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values in new column entry. :type nvals: int :param dvals: Double precision values comprising new column entry. :type dvals: Array of floats :param isnull: Flag indicating whether column entry is null. :type isnull: bool """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(nvals) dvals = stypes.toDoubleVector(dvals) isnull = ctypes.c_int(isnull) libspice.ekaced_c(handle, segno, recno, column, nvals, dvals, isnull)
python
def ekuced(handle, segno, recno, column, nvals, dvals, isnull): """ Update a double precision column entry in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekuced_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be updated. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values in new column entry. :type nvals: int :param dvals: Double precision values comprising new column entry. :type dvals: Array of floats :param isnull: Flag indicating whether column entry is null. :type isnull: bool """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(nvals) dvals = stypes.toDoubleVector(dvals) isnull = ctypes.c_int(isnull) libspice.ekaced_c(handle, segno, recno, column, nvals, dvals, isnull)
[ "def", "ekuced", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nvals", ",", "dvals", ",", "isnull", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", "recno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "nvals", "=", "ctypes", ".", "c_int", "(", "nvals", ")", "dvals", "=", "stypes", ".", "toDoubleVector", "(", "dvals", ")", "isnull", "=", "ctypes", ".", "c_int", "(", "isnull", ")", "libspice", ".", "ekaced_c", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nvals", ",", "dvals", ",", "isnull", ")" ]
Update a double precision column entry in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekuced_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be updated. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values in new column entry. :type nvals: int :param dvals: Double precision values comprising new column entry. :type dvals: Array of floats :param isnull: Flag indicating whether column entry is null. :type isnull: bool
[ "Update", "a", "double", "precision", "column", "entry", "in", "a", "specified", "EK", "record", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4625-L4653
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ekucei
def ekucei(handle, segno, recno, column, nvals, ivals, isnull): """ Update an integer column entry in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucei_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be updated. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values in new column entry. :type nvals: int :param ivals: Integer values comprising new column entry. :type ivals: Array of ints :param isnull: Flag indicating whether column entry is null. :type isnull: bool """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(nvals) ivals = stypes.toIntVector(ivals) isnull = ctypes.c_int(isnull) libspice.ekucei_c(handle, segno, recno, column, nvals, ivals, isnull)
python
def ekucei(handle, segno, recno, column, nvals, ivals, isnull): """ Update an integer column entry in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucei_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be updated. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values in new column entry. :type nvals: int :param ivals: Integer values comprising new column entry. :type ivals: Array of ints :param isnull: Flag indicating whether column entry is null. :type isnull: bool """ handle = ctypes.c_int(handle) segno = ctypes.c_int(segno) recno = ctypes.c_int(recno) column = stypes.stringToCharP(column) nvals = ctypes.c_int(nvals) ivals = stypes.toIntVector(ivals) isnull = ctypes.c_int(isnull) libspice.ekucei_c(handle, segno, recno, column, nvals, ivals, isnull)
[ "def", "ekucei", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nvals", ",", "ivals", ",", "isnull", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "segno", "=", "ctypes", ".", "c_int", "(", "segno", ")", "recno", "=", "ctypes", ".", "c_int", "(", "recno", ")", "column", "=", "stypes", ".", "stringToCharP", "(", "column", ")", "nvals", "=", "ctypes", ".", "c_int", "(", "nvals", ")", "ivals", "=", "stypes", ".", "toIntVector", "(", "ivals", ")", "isnull", "=", "ctypes", ".", "c_int", "(", "isnull", ")", "libspice", ".", "ekucei_c", "(", "handle", ",", "segno", ",", "recno", ",", "column", ",", "nvals", ",", "ivals", ",", "isnull", ")" ]
Update an integer column entry in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucei_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be updated. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values in new column entry. :type nvals: int :param ivals: Integer values comprising new column entry. :type ivals: Array of ints :param isnull: Flag indicating whether column entry is null. :type isnull: bool
[ "Update", "an", "integer", "column", "entry", "in", "a", "specified", "EK", "record", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4657-L4685
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
el2cgv
def el2cgv(ellipse): """ Convert an ellipse to a center vector and two generating vectors. The selected generating vectors are semi-axes of the ellipse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/el2cgv_c.html :param ellipse: An Ellipse :type ellipse: spiceypy.utils.support_types.Ellipse :return: Center and semi-axes of ellipse. :rtype: tuple """ assert (isinstance(ellipse, stypes.Ellipse)) center = stypes.emptyDoubleVector(3) smajor = stypes.emptyDoubleVector(3) sminor = stypes.emptyDoubleVector(3) libspice.el2cgv_c(ctypes.byref(ellipse), center, smajor, sminor) return stypes.cVectorToPython(center), stypes.cVectorToPython( smajor), stypes.cVectorToPython(sminor)
python
def el2cgv(ellipse): """ Convert an ellipse to a center vector and two generating vectors. The selected generating vectors are semi-axes of the ellipse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/el2cgv_c.html :param ellipse: An Ellipse :type ellipse: spiceypy.utils.support_types.Ellipse :return: Center and semi-axes of ellipse. :rtype: tuple """ assert (isinstance(ellipse, stypes.Ellipse)) center = stypes.emptyDoubleVector(3) smajor = stypes.emptyDoubleVector(3) sminor = stypes.emptyDoubleVector(3) libspice.el2cgv_c(ctypes.byref(ellipse), center, smajor, sminor) return stypes.cVectorToPython(center), stypes.cVectorToPython( smajor), stypes.cVectorToPython(sminor)
[ "def", "el2cgv", "(", "ellipse", ")", ":", "assert", "(", "isinstance", "(", "ellipse", ",", "stypes", ".", "Ellipse", ")", ")", "center", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "smajor", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "sminor", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "el2cgv_c", "(", "ctypes", ".", "byref", "(", "ellipse", ")", ",", "center", ",", "smajor", ",", "sminor", ")", "return", "stypes", ".", "cVectorToPython", "(", "center", ")", ",", "stypes", ".", "cVectorToPython", "(", "smajor", ")", ",", "stypes", ".", "cVectorToPython", "(", "sminor", ")" ]
Convert an ellipse to a center vector and two generating vectors. The selected generating vectors are semi-axes of the ellipse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/el2cgv_c.html :param ellipse: An Ellipse :type ellipse: spiceypy.utils.support_types.Ellipse :return: Center and semi-axes of ellipse. :rtype: tuple
[ "Convert", "an", "ellipse", "to", "a", "center", "vector", "and", "two", "generating", "vectors", ".", "The", "selected", "generating", "vectors", "are", "semi", "-", "axes", "of", "the", "ellipse", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4705-L4724
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
elemc
def elemc(item, inset): """ Determine whether an item is an element of a character set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemc_c.html :param item: Item to be tested. :type item: str :param inset: Set to be tested. :type inset: spiceypy.utils.support_types.SpiceCell :return: True if item is an element of set. :rtype: bool """ assert isinstance(inset, stypes.SpiceCell) item = stypes.stringToCharP(item) return bool(libspice.elemc_c(item, ctypes.byref(inset)))
python
def elemc(item, inset): """ Determine whether an item is an element of a character set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemc_c.html :param item: Item to be tested. :type item: str :param inset: Set to be tested. :type inset: spiceypy.utils.support_types.SpiceCell :return: True if item is an element of set. :rtype: bool """ assert isinstance(inset, stypes.SpiceCell) item = stypes.stringToCharP(item) return bool(libspice.elemc_c(item, ctypes.byref(inset)))
[ "def", "elemc", "(", "item", ",", "inset", ")", ":", "assert", "isinstance", "(", "inset", ",", "stypes", ".", "SpiceCell", ")", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "return", "bool", "(", "libspice", ".", "elemc_c", "(", "item", ",", "ctypes", ".", "byref", "(", "inset", ")", ")", ")" ]
Determine whether an item is an element of a character set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemc_c.html :param item: Item to be tested. :type item: str :param inset: Set to be tested. :type inset: spiceypy.utils.support_types.SpiceCell :return: True if item is an element of set. :rtype: bool
[ "Determine", "whether", "an", "item", "is", "an", "element", "of", "a", "character", "set", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4728-L4743
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
elemd
def elemd(item, inset): """ Determine whether an item is an element of a double precision set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemd_c.html :param item: Item to be tested. :type item: float :param inset: Set to be tested. :type inset: spiceypy.utils.support_types.SpiceCell :return: True if item is an element of set. :rtype: bool """ assert isinstance(inset, stypes.SpiceCell) assert inset.dtype == 1 item = ctypes.c_double(item) return bool(libspice.elemd_c(item, ctypes.byref(inset)))
python
def elemd(item, inset): """ Determine whether an item is an element of a double precision set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemd_c.html :param item: Item to be tested. :type item: float :param inset: Set to be tested. :type inset: spiceypy.utils.support_types.SpiceCell :return: True if item is an element of set. :rtype: bool """ assert isinstance(inset, stypes.SpiceCell) assert inset.dtype == 1 item = ctypes.c_double(item) return bool(libspice.elemd_c(item, ctypes.byref(inset)))
[ "def", "elemd", "(", "item", ",", "inset", ")", ":", "assert", "isinstance", "(", "inset", ",", "stypes", ".", "SpiceCell", ")", "assert", "inset", ".", "dtype", "==", "1", "item", "=", "ctypes", ".", "c_double", "(", "item", ")", "return", "bool", "(", "libspice", ".", "elemd_c", "(", "item", ",", "ctypes", ".", "byref", "(", "inset", ")", ")", ")" ]
Determine whether an item is an element of a double precision set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemd_c.html :param item: Item to be tested. :type item: float :param inset: Set to be tested. :type inset: spiceypy.utils.support_types.SpiceCell :return: True if item is an element of set. :rtype: bool
[ "Determine", "whether", "an", "item", "is", "an", "element", "of", "a", "double", "precision", "set", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4747-L4763
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
elemi
def elemi(item, inset): """ Determine whether an item is an element of an integer set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemi_c.html :param item: Item to be tested. :type item: int :param inset: Set to be tested. :type inset: spiceypy.utils.support_types.SpiceCell :return: True if item is an element of set. :rtype: bool """ assert isinstance(inset, stypes.SpiceCell) assert inset.dtype == 2 item = ctypes.c_int(item) return bool(libspice.elemi_c(item, ctypes.byref(inset)))
python
def elemi(item, inset): """ Determine whether an item is an element of an integer set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemi_c.html :param item: Item to be tested. :type item: int :param inset: Set to be tested. :type inset: spiceypy.utils.support_types.SpiceCell :return: True if item is an element of set. :rtype: bool """ assert isinstance(inset, stypes.SpiceCell) assert inset.dtype == 2 item = ctypes.c_int(item) return bool(libspice.elemi_c(item, ctypes.byref(inset)))
[ "def", "elemi", "(", "item", ",", "inset", ")", ":", "assert", "isinstance", "(", "inset", ",", "stypes", ".", "SpiceCell", ")", "assert", "inset", ".", "dtype", "==", "2", "item", "=", "ctypes", ".", "c_int", "(", "item", ")", "return", "bool", "(", "libspice", ".", "elemi_c", "(", "item", ",", "ctypes", ".", "byref", "(", "inset", ")", ")", ")" ]
Determine whether an item is an element of an integer set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemi_c.html :param item: Item to be tested. :type item: int :param inset: Set to be tested. :type inset: spiceypy.utils.support_types.SpiceCell :return: True if item is an element of set. :rtype: bool
[ "Determine", "whether", "an", "item", "is", "an", "element", "of", "an", "integer", "set", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4767-L4783
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
eqstr
def eqstr(a, b): """ Determine whether two strings are equivalent. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eqstr_c.html :param a: Arbitrary character string. :type a: str :param b: Arbitrary character string. :type b: str :return: True if A and B are equivalent. :rtype: bool """ return bool(libspice.eqstr_c(stypes.stringToCharP(a), stypes.stringToCharP(b)))
python
def eqstr(a, b): """ Determine whether two strings are equivalent. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eqstr_c.html :param a: Arbitrary character string. :type a: str :param b: Arbitrary character string. :type b: str :return: True if A and B are equivalent. :rtype: bool """ return bool(libspice.eqstr_c(stypes.stringToCharP(a), stypes.stringToCharP(b)))
[ "def", "eqstr", "(", "a", ",", "b", ")", ":", "return", "bool", "(", "libspice", ".", "eqstr_c", "(", "stypes", ".", "stringToCharP", "(", "a", ")", ",", "stypes", ".", "stringToCharP", "(", "b", ")", ")", ")" ]
Determine whether two strings are equivalent. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eqstr_c.html :param a: Arbitrary character string. :type a: str :param b: Arbitrary character string. :type b: str :return: True if A and B are equivalent. :rtype: bool
[ "Determine", "whether", "two", "strings", "are", "equivalent", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4819-L4832
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
erract
def erract(op, lenout, action=None): """ Retrieve or set the default error action. spiceypy sets the default error action to "report" on init. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/erract_c.html :param op: peration, "GET" or "SET". :type op: str :param lenout: Length of list for output. :type lenout: int :param action: Error response action. :type action: str :return: Error response action. :rtype: str """ if action is None: action = "" lenout = ctypes.c_int(lenout) op = stypes.stringToCharP(op) action = ctypes.create_string_buffer(str.encode(action), lenout.value) actionptr = ctypes.c_char_p(ctypes.addressof(action)) libspice.erract_c(op, lenout, actionptr) return stypes.toPythonString(actionptr)
python
def erract(op, lenout, action=None): """ Retrieve or set the default error action. spiceypy sets the default error action to "report" on init. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/erract_c.html :param op: peration, "GET" or "SET". :type op: str :param lenout: Length of list for output. :type lenout: int :param action: Error response action. :type action: str :return: Error response action. :rtype: str """ if action is None: action = "" lenout = ctypes.c_int(lenout) op = stypes.stringToCharP(op) action = ctypes.create_string_buffer(str.encode(action), lenout.value) actionptr = ctypes.c_char_p(ctypes.addressof(action)) libspice.erract_c(op, lenout, actionptr) return stypes.toPythonString(actionptr)
[ "def", "erract", "(", "op", ",", "lenout", ",", "action", "=", "None", ")", ":", "if", "action", "is", "None", ":", "action", "=", "\"\"", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "op", "=", "stypes", ".", "stringToCharP", "(", "op", ")", "action", "=", "ctypes", ".", "create_string_buffer", "(", "str", ".", "encode", "(", "action", ")", ",", "lenout", ".", "value", ")", "actionptr", "=", "ctypes", ".", "c_char_p", "(", "ctypes", ".", "addressof", "(", "action", ")", ")", "libspice", ".", "erract_c", "(", "op", ",", "lenout", ",", "actionptr", ")", "return", "stypes", ".", "toPythonString", "(", "actionptr", ")" ]
Retrieve or set the default error action. spiceypy sets the default error action to "report" on init. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/erract_c.html :param op: peration, "GET" or "SET". :type op: str :param lenout: Length of list for output. :type lenout: int :param action: Error response action. :type action: str :return: Error response action. :rtype: str
[ "Retrieve", "or", "set", "the", "default", "error", "action", ".", "spiceypy", "sets", "the", "default", "error", "action", "to", "report", "on", "init", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4835-L4858
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
errch
def errch(marker, string): """ Substitute a character string for the first occurrence of a marker in the current long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errch_c.html :param marker: A substring of the error message to be replaced. :type marker: str :param string: The character string to substitute for marker. :type string: str """ marker = stypes.stringToCharP(marker) string = stypes.stringToCharP(string) libspice.errch_c(marker, string)
python
def errch(marker, string): """ Substitute a character string for the first occurrence of a marker in the current long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errch_c.html :param marker: A substring of the error message to be replaced. :type marker: str :param string: The character string to substitute for marker. :type string: str """ marker = stypes.stringToCharP(marker) string = stypes.stringToCharP(string) libspice.errch_c(marker, string)
[ "def", "errch", "(", "marker", ",", "string", ")", ":", "marker", "=", "stypes", ".", "stringToCharP", "(", "marker", ")", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "libspice", ".", "errch_c", "(", "marker", ",", "string", ")" ]
Substitute a character string for the first occurrence of a marker in the current long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errch_c.html :param marker: A substring of the error message to be replaced. :type marker: str :param string: The character string to substitute for marker. :type string: str
[ "Substitute", "a", "character", "string", "for", "the", "first", "occurrence", "of", "a", "marker", "in", "the", "current", "long", "error", "message", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4861-L4875
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
errdev
def errdev(op, lenout, device): """ Retrieve or set the name of the current output device for error messages. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdev_c.html :param op: The operation, "GET" or "SET". :type op: str :param lenout: Length of device for output. :type lenout: int :param device: The device name. :type device: str :return: The device name. :rtype: str """ lenout = ctypes.c_int(lenout) op = stypes.stringToCharP(op) device = ctypes.create_string_buffer(str.encode(device), lenout.value) deviceptr = ctypes.c_char_p(ctypes.addressof(device)) libspice.errdev_c(op, lenout, deviceptr) return stypes.toPythonString(deviceptr)
python
def errdev(op, lenout, device): """ Retrieve or set the name of the current output device for error messages. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdev_c.html :param op: The operation, "GET" or "SET". :type op: str :param lenout: Length of device for output. :type lenout: int :param device: The device name. :type device: str :return: The device name. :rtype: str """ lenout = ctypes.c_int(lenout) op = stypes.stringToCharP(op) device = ctypes.create_string_buffer(str.encode(device), lenout.value) deviceptr = ctypes.c_char_p(ctypes.addressof(device)) libspice.errdev_c(op, lenout, deviceptr) return stypes.toPythonString(deviceptr)
[ "def", "errdev", "(", "op", ",", "lenout", ",", "device", ")", ":", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "op", "=", "stypes", ".", "stringToCharP", "(", "op", ")", "device", "=", "ctypes", ".", "create_string_buffer", "(", "str", ".", "encode", "(", "device", ")", ",", "lenout", ".", "value", ")", "deviceptr", "=", "ctypes", ".", "c_char_p", "(", "ctypes", ".", "addressof", "(", "device", ")", ")", "libspice", ".", "errdev_c", "(", "op", ",", "lenout", ",", "deviceptr", ")", "return", "stypes", ".", "toPythonString", "(", "deviceptr", ")" ]
Retrieve or set the name of the current output device for error messages. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdev_c.html :param op: The operation, "GET" or "SET". :type op: str :param lenout: Length of device for output. :type lenout: int :param device: The device name. :type device: str :return: The device name. :rtype: str
[ "Retrieve", "or", "set", "the", "name", "of", "the", "current", "output", "device", "for", "error", "messages", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4878-L4898
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
errdp
def errdp(marker, number): """ Substitute a double precision number for the first occurrence of a marker found in the current long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdp_c.html :param marker: A substring of the error message to be replaced. :type marker: str :param number: The d.p. number to substitute for marker. :type number: float """ marker = stypes.stringToCharP(marker) number = ctypes.c_double(number) libspice.errdp_c(marker, number)
python
def errdp(marker, number): """ Substitute a double precision number for the first occurrence of a marker found in the current long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdp_c.html :param marker: A substring of the error message to be replaced. :type marker: str :param number: The d.p. number to substitute for marker. :type number: float """ marker = stypes.stringToCharP(marker) number = ctypes.c_double(number) libspice.errdp_c(marker, number)
[ "def", "errdp", "(", "marker", ",", "number", ")", ":", "marker", "=", "stypes", ".", "stringToCharP", "(", "marker", ")", "number", "=", "ctypes", ".", "c_double", "(", "number", ")", "libspice", ".", "errdp_c", "(", "marker", ",", "number", ")" ]
Substitute a double precision number for the first occurrence of a marker found in the current long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdp_c.html :param marker: A substring of the error message to be replaced. :type marker: str :param number: The d.p. number to substitute for marker. :type number: float
[ "Substitute", "a", "double", "precision", "number", "for", "the", "first", "occurrence", "of", "a", "marker", "found", "in", "the", "current", "long", "error", "message", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4901-L4915
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
errint
def errint(marker, number): """ Substitute an integer for the first occurrence of a marker found in the current long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errint_c.html :param marker: A substring of the error message to be replaced. :type marker: str :param number: The integer to substitute for marker. :type number: int """ marker = stypes.stringToCharP(marker) number = ctypes.c_int(number) libspice.errint_c(marker, number)
python
def errint(marker, number): """ Substitute an integer for the first occurrence of a marker found in the current long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errint_c.html :param marker: A substring of the error message to be replaced. :type marker: str :param number: The integer to substitute for marker. :type number: int """ marker = stypes.stringToCharP(marker) number = ctypes.c_int(number) libspice.errint_c(marker, number)
[ "def", "errint", "(", "marker", ",", "number", ")", ":", "marker", "=", "stypes", ".", "stringToCharP", "(", "marker", ")", "number", "=", "ctypes", ".", "c_int", "(", "number", ")", "libspice", ".", "errint_c", "(", "marker", ",", "number", ")" ]
Substitute an integer for the first occurrence of a marker found in the current long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errint_c.html :param marker: A substring of the error message to be replaced. :type marker: str :param number: The integer to substitute for marker. :type number: int
[ "Substitute", "an", "integer", "for", "the", "first", "occurrence", "of", "a", "marker", "found", "in", "the", "current", "long", "error", "message", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4918-L4932
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
errprt
def errprt(op, lenout, inlist): """ Retrieve or set the list of error message items to be output when an error is detected. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errprt_c.html :param op: The operation, "GET" or "SET". :type op: str :param lenout: Length of list for output. :type lenout: int :param inlist: Specification of error messages to be output. :type inlist: list of str. :return: A list of error message items. :rtype: list of str. """ lenout = ctypes.c_int(lenout) op = stypes.stringToCharP(op) inlist = ctypes.create_string_buffer(str.encode(inlist), lenout.value) inlistptr = ctypes.c_char_p(ctypes.addressof(inlist)) libspice.errdev_c(op, lenout, inlistptr) return stypes.toPythonString(inlistptr)
python
def errprt(op, lenout, inlist): """ Retrieve or set the list of error message items to be output when an error is detected. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errprt_c.html :param op: The operation, "GET" or "SET". :type op: str :param lenout: Length of list for output. :type lenout: int :param inlist: Specification of error messages to be output. :type inlist: list of str. :return: A list of error message items. :rtype: list of str. """ lenout = ctypes.c_int(lenout) op = stypes.stringToCharP(op) inlist = ctypes.create_string_buffer(str.encode(inlist), lenout.value) inlistptr = ctypes.c_char_p(ctypes.addressof(inlist)) libspice.errdev_c(op, lenout, inlistptr) return stypes.toPythonString(inlistptr)
[ "def", "errprt", "(", "op", ",", "lenout", ",", "inlist", ")", ":", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "op", "=", "stypes", ".", "stringToCharP", "(", "op", ")", "inlist", "=", "ctypes", ".", "create_string_buffer", "(", "str", ".", "encode", "(", "inlist", ")", ",", "lenout", ".", "value", ")", "inlistptr", "=", "ctypes", ".", "c_char_p", "(", "ctypes", ".", "addressof", "(", "inlist", ")", ")", "libspice", ".", "errdev_c", "(", "op", ",", "lenout", ",", "inlistptr", ")", "return", "stypes", ".", "toPythonString", "(", "inlistptr", ")" ]
Retrieve or set the list of error message items to be output when an error is detected. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errprt_c.html :param op: The operation, "GET" or "SET". :type op: str :param lenout: Length of list for output. :type lenout: int :param inlist: Specification of error messages to be output. :type inlist: list of str. :return: A list of error message items. :rtype: list of str.
[ "Retrieve", "or", "set", "the", "list", "of", "error", "message", "items", "to", "be", "output", "when", "an", "error", "is", "detected", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4935-L4956
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
esrchc
def esrchc(value, array): """ Search for a given value within a character string array. Return the index of the first equivalent array entry, or -1 if no equivalent element is found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/esrchc_c.html :param value: Key value to be found in array. :type value: str :param array: Character string array to search. :type array: list of str. :return: The index of the first array entry equivalent to value, or -1 if none is found. :rtype: int """ value = stypes.stringToCharP(value) ndim = ctypes.c_int(len(array)) lenvals = ctypes.c_int(len(max(array, key=len)) + 1) array = stypes.listToCharArray(array, xLen=lenvals, yLen=ndim) return libspice.esrchc_c(value, ndim, lenvals, array)
python
def esrchc(value, array): """ Search for a given value within a character string array. Return the index of the first equivalent array entry, or -1 if no equivalent element is found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/esrchc_c.html :param value: Key value to be found in array. :type value: str :param array: Character string array to search. :type array: list of str. :return: The index of the first array entry equivalent to value, or -1 if none is found. :rtype: int """ value = stypes.stringToCharP(value) ndim = ctypes.c_int(len(array)) lenvals = ctypes.c_int(len(max(array, key=len)) + 1) array = stypes.listToCharArray(array, xLen=lenvals, yLen=ndim) return libspice.esrchc_c(value, ndim, lenvals, array)
[ "def", "esrchc", "(", "value", ",", "array", ")", ":", "value", "=", "stypes", ".", "stringToCharP", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "len", "(", "array", ")", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "len", "(", "max", "(", "array", ",", "key", "=", "len", ")", ")", "+", "1", ")", "array", "=", "stypes", ".", "listToCharArray", "(", "array", ",", "xLen", "=", "lenvals", ",", "yLen", "=", "ndim", ")", "return", "libspice", ".", "esrchc_c", "(", "value", ",", "ndim", ",", "lenvals", ",", "array", ")" ]
Search for a given value within a character string array. Return the index of the first equivalent array entry, or -1 if no equivalent element is found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/esrchc_c.html :param value: Key value to be found in array. :type value: str :param array: Character string array to search. :type array: list of str. :return: The index of the first array entry equivalent to value, or -1 if none is found. :rtype: int
[ "Search", "for", "a", "given", "value", "within", "a", "character", "string", "array", ".", "Return", "the", "index", "of", "the", "first", "equivalent", "array", "entry", "or", "-", "1", "if", "no", "equivalent", "element", "is", "found", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4959-L4980
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
et2lst
def et2lst(et, body, lon, typein, timlen=_default_len_out, ampmlen=_default_len_out): """ Given an ephemeris epoch, compute the local solar time for an object on the surface of a body at a specified longitude. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2lst_c.html :param et: Epoch in seconds past J2000 epoch. :type et: float :param body: ID-code of the body of interest. :type body: int :param lon: Longitude of surface point (RADIANS). :type lon: float :param typein: Type of longitude "PLANETOCENTRIC", etc. :type typein: str :param timlen: Available room in output time string. :type timlen: int :param ampmlen: Available room in output ampm string. :type ampmlen: int :return: Local hour on a "24 hour" clock, Minutes past the hour, Seconds past the minute, String giving local time on 24 hour clock, String giving time on A.M. / P.M. scale. :rtype: tuple """ et = ctypes.c_double(et) body = ctypes.c_int(body) lon = ctypes.c_double(lon) typein = stypes.stringToCharP(typein) timlen = ctypes.c_int(timlen) ampmlen = ctypes.c_int(ampmlen) hr = ctypes.c_int() mn = ctypes.c_int() sc = ctypes.c_int() time = stypes.stringToCharP(timlen) ampm = stypes.stringToCharP(ampmlen) libspice.et2lst_c(et, body, lon, typein, timlen, ampmlen, ctypes.byref(hr), ctypes.byref(mn), ctypes.byref(sc), time, ampm) return hr.value, mn.value, sc.value, stypes.toPythonString( time), stypes.toPythonString(ampm)
python
def et2lst(et, body, lon, typein, timlen=_default_len_out, ampmlen=_default_len_out): """ Given an ephemeris epoch, compute the local solar time for an object on the surface of a body at a specified longitude. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2lst_c.html :param et: Epoch in seconds past J2000 epoch. :type et: float :param body: ID-code of the body of interest. :type body: int :param lon: Longitude of surface point (RADIANS). :type lon: float :param typein: Type of longitude "PLANETOCENTRIC", etc. :type typein: str :param timlen: Available room in output time string. :type timlen: int :param ampmlen: Available room in output ampm string. :type ampmlen: int :return: Local hour on a "24 hour" clock, Minutes past the hour, Seconds past the minute, String giving local time on 24 hour clock, String giving time on A.M. / P.M. scale. :rtype: tuple """ et = ctypes.c_double(et) body = ctypes.c_int(body) lon = ctypes.c_double(lon) typein = stypes.stringToCharP(typein) timlen = ctypes.c_int(timlen) ampmlen = ctypes.c_int(ampmlen) hr = ctypes.c_int() mn = ctypes.c_int() sc = ctypes.c_int() time = stypes.stringToCharP(timlen) ampm = stypes.stringToCharP(ampmlen) libspice.et2lst_c(et, body, lon, typein, timlen, ampmlen, ctypes.byref(hr), ctypes.byref(mn), ctypes.byref(sc), time, ampm) return hr.value, mn.value, sc.value, stypes.toPythonString( time), stypes.toPythonString(ampm)
[ "def", "et2lst", "(", "et", ",", "body", ",", "lon", ",", "typein", ",", "timlen", "=", "_default_len_out", ",", "ampmlen", "=", "_default_len_out", ")", ":", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "typein", "=", "stypes", ".", "stringToCharP", "(", "typein", ")", "timlen", "=", "ctypes", ".", "c_int", "(", "timlen", ")", "ampmlen", "=", "ctypes", ".", "c_int", "(", "ampmlen", ")", "hr", "=", "ctypes", ".", "c_int", "(", ")", "mn", "=", "ctypes", ".", "c_int", "(", ")", "sc", "=", "ctypes", ".", "c_int", "(", ")", "time", "=", "stypes", ".", "stringToCharP", "(", "timlen", ")", "ampm", "=", "stypes", ".", "stringToCharP", "(", "ampmlen", ")", "libspice", ".", "et2lst_c", "(", "et", ",", "body", ",", "lon", ",", "typein", ",", "timlen", ",", "ampmlen", ",", "ctypes", ".", "byref", "(", "hr", ")", ",", "ctypes", ".", "byref", "(", "mn", ")", ",", "ctypes", ".", "byref", "(", "sc", ")", ",", "time", ",", "ampm", ")", "return", "hr", ".", "value", ",", "mn", ".", "value", ",", "sc", ".", "value", ",", "stypes", ".", "toPythonString", "(", "time", ")", ",", "stypes", ".", "toPythonString", "(", "ampm", ")" ]
Given an ephemeris epoch, compute the local solar time for an object on the surface of a body at a specified longitude. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2lst_c.html :param et: Epoch in seconds past J2000 epoch. :type et: float :param body: ID-code of the body of interest. :type body: int :param lon: Longitude of surface point (RADIANS). :type lon: float :param typein: Type of longitude "PLANETOCENTRIC", etc. :type typein: str :param timlen: Available room in output time string. :type timlen: int :param ampmlen: Available room in output ampm string. :type ampmlen: int :return: Local hour on a "24 hour" clock, Minutes past the hour, Seconds past the minute, String giving local time on 24 hour clock, String giving time on A.M. / P.M. scale. :rtype: tuple
[ "Given", "an", "ephemeris", "epoch", "compute", "the", "local", "solar", "time", "for", "an", "object", "on", "the", "surface", "of", "a", "body", "at", "a", "specified", "longitude", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4984-L5026
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
et2utc
def et2utc(et, formatStr, prec, lenout=_default_len_out): """ Convert an input time from ephemeris seconds past J2000 to Calendar, Day-of-Year, or Julian Date format, UTC. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2utc_c.html :param et: Input epoch, given in ephemeris seconds past J2000. :type et: float :param formatStr: Format of output epoch. :type formatStr: str :param prec: Digits of precision in fractional seconds or days. :type prec: int :param lenout: The length of the output string plus 1. :type lenout: int :return: Output time string in UTC :rtype: str """ et = ctypes.c_double(et) prec = ctypes.c_int(prec) lenout = ctypes.c_int(lenout) formatStr = stypes.stringToCharP(formatStr) utcstr = stypes.stringToCharP(lenout) libspice.et2utc_c(et, formatStr, prec, lenout, utcstr) return stypes.toPythonString(utcstr)
python
def et2utc(et, formatStr, prec, lenout=_default_len_out): """ Convert an input time from ephemeris seconds past J2000 to Calendar, Day-of-Year, or Julian Date format, UTC. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2utc_c.html :param et: Input epoch, given in ephemeris seconds past J2000. :type et: float :param formatStr: Format of output epoch. :type formatStr: str :param prec: Digits of precision in fractional seconds or days. :type prec: int :param lenout: The length of the output string plus 1. :type lenout: int :return: Output time string in UTC :rtype: str """ et = ctypes.c_double(et) prec = ctypes.c_int(prec) lenout = ctypes.c_int(lenout) formatStr = stypes.stringToCharP(formatStr) utcstr = stypes.stringToCharP(lenout) libspice.et2utc_c(et, formatStr, prec, lenout, utcstr) return stypes.toPythonString(utcstr)
[ "def", "et2utc", "(", "et", ",", "formatStr", ",", "prec", ",", "lenout", "=", "_default_len_out", ")", ":", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "prec", "=", "ctypes", ".", "c_int", "(", "prec", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "formatStr", "=", "stypes", ".", "stringToCharP", "(", "formatStr", ")", "utcstr", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "libspice", ".", "et2utc_c", "(", "et", ",", "formatStr", ",", "prec", ",", "lenout", ",", "utcstr", ")", "return", "stypes", ".", "toPythonString", "(", "utcstr", ")" ]
Convert an input time from ephemeris seconds past J2000 to Calendar, Day-of-Year, or Julian Date format, UTC. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2utc_c.html :param et: Input epoch, given in ephemeris seconds past J2000. :type et: float :param formatStr: Format of output epoch. :type formatStr: str :param prec: Digits of precision in fractional seconds or days. :type prec: int :param lenout: The length of the output string plus 1. :type lenout: int :return: Output time string in UTC :rtype: str
[ "Convert", "an", "input", "time", "from", "ephemeris", "seconds", "past", "J2000", "to", "Calendar", "Day", "-", "of", "-", "Year", "or", "Julian", "Date", "format", "UTC", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5030-L5054
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
etcal
def etcal(et, lenout=_default_len_out): """ Convert from an ephemeris epoch measured in seconds past the epoch of J2000 to a calendar string format using a formal calendar free of leapseconds. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/etcal_c.html :param et: Ephemeris time measured in seconds past J2000. :type et: Union[float,Iterable[float]] :param lenout: Length of output string. :type lenout: int :return: A standard calendar representation of et. :rtype: str """ lenout = ctypes.c_int(lenout) string = stypes.stringToCharP(lenout) if hasattr(et, "__iter__"): strings = [] for t in et: libspice.etcal_c(t, lenout, string) checkForSpiceError(None) strings.append(stypes.toPythonString(string)) return strings else: et = ctypes.c_double(et) libspice.etcal_c(et, lenout, string) return stypes.toPythonString(string)
python
def etcal(et, lenout=_default_len_out): """ Convert from an ephemeris epoch measured in seconds past the epoch of J2000 to a calendar string format using a formal calendar free of leapseconds. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/etcal_c.html :param et: Ephemeris time measured in seconds past J2000. :type et: Union[float,Iterable[float]] :param lenout: Length of output string. :type lenout: int :return: A standard calendar representation of et. :rtype: str """ lenout = ctypes.c_int(lenout) string = stypes.stringToCharP(lenout) if hasattr(et, "__iter__"): strings = [] for t in et: libspice.etcal_c(t, lenout, string) checkForSpiceError(None) strings.append(stypes.toPythonString(string)) return strings else: et = ctypes.c_double(et) libspice.etcal_c(et, lenout, string) return stypes.toPythonString(string)
[ "def", "etcal", "(", "et", ",", "lenout", "=", "_default_len_out", ")", ":", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "string", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "if", "hasattr", "(", "et", ",", "\"__iter__\"", ")", ":", "strings", "=", "[", "]", "for", "t", "in", "et", ":", "libspice", ".", "etcal_c", "(", "t", ",", "lenout", ",", "string", ")", "checkForSpiceError", "(", "None", ")", "strings", ".", "append", "(", "stypes", ".", "toPythonString", "(", "string", ")", ")", "return", "strings", "else", ":", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "libspice", ".", "etcal_c", "(", "et", ",", "lenout", ",", "string", ")", "return", "stypes", ".", "toPythonString", "(", "string", ")" ]
Convert from an ephemeris epoch measured in seconds past the epoch of J2000 to a calendar string format using a formal calendar free of leapseconds. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/etcal_c.html :param et: Ephemeris time measured in seconds past J2000. :type et: Union[float,Iterable[float]] :param lenout: Length of output string. :type lenout: int :return: A standard calendar representation of et. :rtype: str
[ "Convert", "from", "an", "ephemeris", "epoch", "measured", "in", "seconds", "past", "the", "epoch", "of", "J2000", "to", "a", "calendar", "string", "format", "using", "a", "formal", "calendar", "free", "of", "leapseconds", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5058-L5085
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
eul2m
def eul2m(angle3, angle2, angle1, axis3, axis2, axis1): """ Construct a rotation matrix from a set of Euler angles. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2m_c.html :param angle3: Rotation angle about third rotation axis (radians). :type angle3: float :param angle2: Rotation angle about second rotation axis (radians). :type angle2: float :param angle1: Rotation angle about first rotation axis (radians). :type angle1: float :param axis3: Axis number of third rotation axis. :type axis3: int :param axis2: Axis number of second rotation axis. :type axis2: int :param axis1: Axis number of first rotation axis.] :type axis1: int :return: Product of the 3 rotations. :rtype: 3x3-Element Array of floats """ angle3 = ctypes.c_double(angle3) angle2 = ctypes.c_double(angle2) angle1 = ctypes.c_double(angle1) axis3 = ctypes.c_int(axis3) axis2 = ctypes.c_int(axis2) axis1 = ctypes.c_int(axis1) r = stypes.emptyDoubleMatrix() libspice.eul2m_c(angle3, angle2, angle1, axis3, axis2, axis1, r) return stypes.cMatrixToNumpy(r)
python
def eul2m(angle3, angle2, angle1, axis3, axis2, axis1): """ Construct a rotation matrix from a set of Euler angles. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2m_c.html :param angle3: Rotation angle about third rotation axis (radians). :type angle3: float :param angle2: Rotation angle about second rotation axis (radians). :type angle2: float :param angle1: Rotation angle about first rotation axis (radians). :type angle1: float :param axis3: Axis number of third rotation axis. :type axis3: int :param axis2: Axis number of second rotation axis. :type axis2: int :param axis1: Axis number of first rotation axis.] :type axis1: int :return: Product of the 3 rotations. :rtype: 3x3-Element Array of floats """ angle3 = ctypes.c_double(angle3) angle2 = ctypes.c_double(angle2) angle1 = ctypes.c_double(angle1) axis3 = ctypes.c_int(axis3) axis2 = ctypes.c_int(axis2) axis1 = ctypes.c_int(axis1) r = stypes.emptyDoubleMatrix() libspice.eul2m_c(angle3, angle2, angle1, axis3, axis2, axis1, r) return stypes.cMatrixToNumpy(r)
[ "def", "eul2m", "(", "angle3", ",", "angle2", ",", "angle1", ",", "axis3", ",", "axis2", ",", "axis1", ")", ":", "angle3", "=", "ctypes", ".", "c_double", "(", "angle3", ")", "angle2", "=", "ctypes", ".", "c_double", "(", "angle2", ")", "angle1", "=", "ctypes", ".", "c_double", "(", "angle1", ")", "axis3", "=", "ctypes", ".", "c_int", "(", "axis3", ")", "axis2", "=", "ctypes", ".", "c_int", "(", "axis2", ")", "axis1", "=", "ctypes", ".", "c_int", "(", "axis1", ")", "r", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "eul2m_c", "(", "angle3", ",", "angle2", ",", "angle1", ",", "axis3", ",", "axis2", ",", "axis1", ",", "r", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "r", ")" ]
Construct a rotation matrix from a set of Euler angles. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2m_c.html :param angle3: Rotation angle about third rotation axis (radians). :type angle3: float :param angle2: Rotation angle about second rotation axis (radians). :type angle2: float :param angle1: Rotation angle about first rotation axis (radians). :type angle1: float :param axis3: Axis number of third rotation axis. :type axis3: int :param axis2: Axis number of second rotation axis. :type axis2: int :param axis1: Axis number of first rotation axis.] :type axis1: int :return: Product of the 3 rotations. :rtype: 3x3-Element Array of floats
[ "Construct", "a", "rotation", "matrix", "from", "a", "set", "of", "Euler", "angles", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5089-L5118
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
eul2xf
def eul2xf(eulang, axisa, axisb, axisc): """ This routine computes a state transformation from an Euler angle factorization of a rotation and the derivatives of those Euler angles. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2xf_c.html :param eulang: An array of Euler angles and their derivatives. :type eulang: 6-Element Array of floats :param axisa: Axis A of the Euler angle factorization. :type axisa: int :param axisb: Axis B of the Euler angle factorization. :type axisb: int :param axisc: Axis C of the Euler angle factorization. :type axisc: int :return: A state transformation matrix. :rtype: 6x6-Element Array of floats """ assert len(eulang) is 6 eulang = stypes.toDoubleVector(eulang) axisa = ctypes.c_int(axisa) axisb = ctypes.c_int(axisb) axisc = ctypes.c_int(axisc) xform = stypes.emptyDoubleMatrix(x=6, y=6) libspice.eul2xf_c(eulang, axisa, axisb, axisc, xform) return stypes.cMatrixToNumpy(xform)
python
def eul2xf(eulang, axisa, axisb, axisc): """ This routine computes a state transformation from an Euler angle factorization of a rotation and the derivatives of those Euler angles. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2xf_c.html :param eulang: An array of Euler angles and their derivatives. :type eulang: 6-Element Array of floats :param axisa: Axis A of the Euler angle factorization. :type axisa: int :param axisb: Axis B of the Euler angle factorization. :type axisb: int :param axisc: Axis C of the Euler angle factorization. :type axisc: int :return: A state transformation matrix. :rtype: 6x6-Element Array of floats """ assert len(eulang) is 6 eulang = stypes.toDoubleVector(eulang) axisa = ctypes.c_int(axisa) axisb = ctypes.c_int(axisb) axisc = ctypes.c_int(axisc) xform = stypes.emptyDoubleMatrix(x=6, y=6) libspice.eul2xf_c(eulang, axisa, axisb, axisc, xform) return stypes.cMatrixToNumpy(xform)
[ "def", "eul2xf", "(", "eulang", ",", "axisa", ",", "axisb", ",", "axisc", ")", ":", "assert", "len", "(", "eulang", ")", "is", "6", "eulang", "=", "stypes", ".", "toDoubleVector", "(", "eulang", ")", "axisa", "=", "ctypes", ".", "c_int", "(", "axisa", ")", "axisb", "=", "ctypes", ".", "c_int", "(", "axisb", ")", "axisc", "=", "ctypes", ".", "c_int", "(", "axisc", ")", "xform", "=", "stypes", ".", "emptyDoubleMatrix", "(", "x", "=", "6", ",", "y", "=", "6", ")", "libspice", ".", "eul2xf_c", "(", "eulang", ",", "axisa", ",", "axisb", ",", "axisc", ",", "xform", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "xform", ")" ]
This routine computes a state transformation from an Euler angle factorization of a rotation and the derivatives of those Euler angles. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2xf_c.html :param eulang: An array of Euler angles and their derivatives. :type eulang: 6-Element Array of floats :param axisa: Axis A of the Euler angle factorization. :type axisa: int :param axisb: Axis B of the Euler angle factorization. :type axisb: int :param axisc: Axis C of the Euler angle factorization. :type axisc: int :return: A state transformation matrix. :rtype: 6x6-Element Array of floats
[ "This", "routine", "computes", "a", "state", "transformation", "from", "an", "Euler", "angle", "factorization", "of", "a", "rotation", "and", "the", "derivatives", "of", "those", "Euler", "angles", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5122-L5148
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
exists
def exists(fname): """ Determine whether a file exists. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/exists_c.html :param fname: Name of the file in question. :return: True if the file exists, False otherwise. :rtype: bool """ fname = stypes.stringToCharP(fname) return bool(libspice.exists_c(fname))
python
def exists(fname): """ Determine whether a file exists. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/exists_c.html :param fname: Name of the file in question. :return: True if the file exists, False otherwise. :rtype: bool """ fname = stypes.stringToCharP(fname) return bool(libspice.exists_c(fname))
[ "def", "exists", "(", "fname", ")", ":", "fname", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "return", "bool", "(", "libspice", ".", "exists_c", "(", "fname", ")", ")" ]
Determine whether a file exists. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/exists_c.html :param fname: Name of the file in question. :return: True if the file exists, False otherwise. :rtype: bool
[ "Determine", "whether", "a", "file", "exists", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5152-L5163
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
expool
def expool(name): """ Confirm the existence of a kernel variable in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/expool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :return: True when the variable is in the pool. :rtype: bool """ name = stypes.stringToCharP(name) found = ctypes.c_int() libspice.expool_c(name, ctypes.byref(found)) return bool(found.value)
python
def expool(name): """ Confirm the existence of a kernel variable in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/expool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :return: True when the variable is in the pool. :rtype: bool """ name = stypes.stringToCharP(name) found = ctypes.c_int() libspice.expool_c(name, ctypes.byref(found)) return bool(found.value)
[ "def", "expool", "(", "name", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "expool_c", "(", "name", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "bool", "(", "found", ".", "value", ")" ]
Confirm the existence of a kernel variable in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/expool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :return: True when the variable is in the pool. :rtype: bool
[ "Confirm", "the", "existence", "of", "a", "kernel", "variable", "in", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5167-L5181
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
frmnam
def frmnam(frcode, lenout=_default_len_out): """ Retrieve the name of a reference frame associated with a SPICE ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/frmnam_c.html :param frcode: an integer code for a reference frame :type frcode: int :param lenout: Maximum length of output string. :type lenout: int :return: the name associated with the reference frame. :rtype: str """ frcode = ctypes.c_int(frcode) lenout = ctypes.c_int(lenout) frname = stypes.stringToCharP(lenout) libspice.frmnam_c(frcode, lenout, frname) return stypes.toPythonString(frname)
python
def frmnam(frcode, lenout=_default_len_out): """ Retrieve the name of a reference frame associated with a SPICE ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/frmnam_c.html :param frcode: an integer code for a reference frame :type frcode: int :param lenout: Maximum length of output string. :type lenout: int :return: the name associated with the reference frame. :rtype: str """ frcode = ctypes.c_int(frcode) lenout = ctypes.c_int(lenout) frname = stypes.stringToCharP(lenout) libspice.frmnam_c(frcode, lenout, frname) return stypes.toPythonString(frname)
[ "def", "frmnam", "(", "frcode", ",", "lenout", "=", "_default_len_out", ")", ":", "frcode", "=", "ctypes", ".", "c_int", "(", "frcode", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "frname", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "libspice", ".", "frmnam_c", "(", "frcode", ",", "lenout", ",", "frname", ")", "return", "stypes", ".", "toPythonString", "(", "frname", ")" ]
Retrieve the name of a reference frame associated with a SPICE ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/frmnam_c.html :param frcode: an integer code for a reference frame :type frcode: int :param lenout: Maximum length of output string. :type lenout: int :return: the name associated with the reference frame. :rtype: str
[ "Retrieve", "the", "name", "of", "a", "reference", "frame", "associated", "with", "a", "SPICE", "ID", "code", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5333-L5350
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
furnsh
def furnsh(path): """ Load one or more SPICE kernels into a program. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/furnsh_c.html :param path: one or more paths to kernels :type path: str or list of str """ if isinstance(path, list): for p in path: libspice.furnsh_c(stypes.stringToCharP(p)) else: path = stypes.stringToCharP(path) libspice.furnsh_c(path)
python
def furnsh(path): """ Load one or more SPICE kernels into a program. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/furnsh_c.html :param path: one or more paths to kernels :type path: str or list of str """ if isinstance(path, list): for p in path: libspice.furnsh_c(stypes.stringToCharP(p)) else: path = stypes.stringToCharP(path) libspice.furnsh_c(path)
[ "def", "furnsh", "(", "path", ")", ":", "if", "isinstance", "(", "path", ",", "list", ")", ":", "for", "p", "in", "path", ":", "libspice", ".", "furnsh_c", "(", "stypes", ".", "stringToCharP", "(", "p", ")", ")", "else", ":", "path", "=", "stypes", ".", "stringToCharP", "(", "path", ")", "libspice", ".", "furnsh_c", "(", "path", ")" ]
Load one or more SPICE kernels into a program. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/furnsh_c.html :param path: one or more paths to kernels :type path: str or list of str
[ "Load", "one", "or", "more", "SPICE", "kernels", "into", "a", "program", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5368-L5382
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gcpool
def gcpool(name, start, room, lenout=_default_len_out): """ Return the character value of a kernel variable from the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gcpool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :param start: Which component to start retrieving for name. :type start: int :param room: The largest number of values to return. :type room: int :param lenout: The length of the output string. :type lenout: int :return: Values associated with name. :rtype: list of str """ name = stypes.stringToCharP(name) start = ctypes.c_int(start) room = ctypes.c_int(room) lenout = ctypes.c_int(lenout) n = ctypes.c_int() cvals = stypes.emptyCharArray(lenout, room) found = ctypes.c_int() libspice.gcpool_c(name, start, room, lenout, ctypes.byref(n), ctypes.byref(cvals), ctypes.byref(found)) return [stypes.toPythonString(x.value) for x in cvals[0:n.value]], bool(found.value)
python
def gcpool(name, start, room, lenout=_default_len_out): """ Return the character value of a kernel variable from the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gcpool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :param start: Which component to start retrieving for name. :type start: int :param room: The largest number of values to return. :type room: int :param lenout: The length of the output string. :type lenout: int :return: Values associated with name. :rtype: list of str """ name = stypes.stringToCharP(name) start = ctypes.c_int(start) room = ctypes.c_int(room) lenout = ctypes.c_int(lenout) n = ctypes.c_int() cvals = stypes.emptyCharArray(lenout, room) found = ctypes.c_int() libspice.gcpool_c(name, start, room, lenout, ctypes.byref(n), ctypes.byref(cvals), ctypes.byref(found)) return [stypes.toPythonString(x.value) for x in cvals[0:n.value]], bool(found.value)
[ "def", "gcpool", "(", "name", ",", "start", ",", "room", ",", "lenout", "=", "_default_len_out", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "room", "=", "ctypes", ".", "c_int", "(", "room", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "cvals", "=", "stypes", ".", "emptyCharArray", "(", "lenout", ",", "room", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "gcpool_c", "(", "name", ",", "start", ",", "room", ",", "lenout", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "ctypes", ".", "byref", "(", "cvals", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "[", "stypes", ".", "toPythonString", "(", "x", ".", "value", ")", "for", "x", "in", "cvals", "[", "0", ":", "n", ".", "value", "]", "]", ",", "bool", "(", "found", ".", "value", ")" ]
Return the character value of a kernel variable from the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gcpool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :param start: Which component to start retrieving for name. :type start: int :param room: The largest number of values to return. :type room: int :param lenout: The length of the output string. :type lenout: int :return: Values associated with name. :rtype: list of str
[ "Return", "the", "character", "value", "of", "a", "kernel", "variable", "from", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5391-L5418
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gdpool
def gdpool(name, start, room): """ Return the d.p. value of a kernel variable from the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gdpool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :param start: Which component to start retrieving for name. :type start: int :param room: The largest number of values to return. :type room: int :return: Values associated with name. :rtype: list of float """ name = stypes.stringToCharP(name) start = ctypes.c_int(start) values = stypes.emptyDoubleVector(room) room = ctypes.c_int(room) n = ctypes.c_int() found = ctypes.c_int() libspice.gdpool_c(name, start, room, ctypes.byref(n), ctypes.cast(values, ctypes.POINTER(ctypes.c_double)), ctypes.byref(found)) return stypes.cVectorToPython(values)[0:n.value], bool(found.value)
python
def gdpool(name, start, room): """ Return the d.p. value of a kernel variable from the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gdpool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :param start: Which component to start retrieving for name. :type start: int :param room: The largest number of values to return. :type room: int :return: Values associated with name. :rtype: list of float """ name = stypes.stringToCharP(name) start = ctypes.c_int(start) values = stypes.emptyDoubleVector(room) room = ctypes.c_int(room) n = ctypes.c_int() found = ctypes.c_int() libspice.gdpool_c(name, start, room, ctypes.byref(n), ctypes.cast(values, ctypes.POINTER(ctypes.c_double)), ctypes.byref(found)) return stypes.cVectorToPython(values)[0:n.value], bool(found.value)
[ "def", "gdpool", "(", "name", ",", "start", ",", "room", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "values", "=", "stypes", ".", "emptyDoubleVector", "(", "room", ")", "room", "=", "ctypes", ".", "c_int", "(", "room", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "gdpool_c", "(", "name", ",", "start", ",", "room", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "ctypes", ".", "cast", "(", "values", ",", "ctypes", ".", "POINTER", "(", "ctypes", ".", "c_double", ")", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "values", ")", "[", "0", ":", "n", ".", "value", "]", ",", "bool", "(", "found", ".", "value", ")" ]
Return the d.p. value of a kernel variable from the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gdpool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :param start: Which component to start retrieving for name. :type start: int :param room: The largest number of values to return. :type room: int :return: Values associated with name. :rtype: list of float
[ "Return", "the", "d", ".", "p", ".", "value", "of", "a", "kernel", "variable", "from", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5423-L5447
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
georec
def georec(lon, lat, alt, re, f): """ Convert geodetic coordinates to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/georec_c.html :param lon: Geodetic longitude of point (radians). :type lon: float :param lat: Geodetic latitude of point (radians). :type lat: float :param alt: Altitude of point above the reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Rectangular coordinates of point. :rtype: 3-Element Array of floats """ lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) alt = ctypes.c_double(alt) re = ctypes.c_double(re) f = ctypes.c_double(f) rectan = stypes.emptyDoubleVector(3) libspice.georec_c(lon, lat, alt, re, f, rectan) return stypes.cVectorToPython(rectan)
python
def georec(lon, lat, alt, re, f): """ Convert geodetic coordinates to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/georec_c.html :param lon: Geodetic longitude of point (radians). :type lon: float :param lat: Geodetic latitude of point (radians). :type lat: float :param alt: Altitude of point above the reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Rectangular coordinates of point. :rtype: 3-Element Array of floats """ lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) alt = ctypes.c_double(alt) re = ctypes.c_double(re) f = ctypes.c_double(f) rectan = stypes.emptyDoubleVector(3) libspice.georec_c(lon, lat, alt, re, f, rectan) return stypes.cVectorToPython(rectan)
[ "def", "georec", "(", "lon", ",", "lat", ",", "alt", ",", "re", ",", "f", ")", ":", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "lat", "=", "ctypes", ".", "c_double", "(", "lat", ")", "alt", "=", "ctypes", ".", "c_double", "(", "alt", ")", "re", "=", "ctypes", ".", "c_double", "(", "re", ")", "f", "=", "ctypes", ".", "c_double", "(", "f", ")", "rectan", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "georec_c", "(", "lon", ",", "lat", ",", "alt", ",", "re", ",", "f", ",", "rectan", ")", "return", "stypes", ".", "cVectorToPython", "(", "rectan", ")" ]
Convert geodetic coordinates to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/georec_c.html :param lon: Geodetic longitude of point (radians). :type lon: float :param lat: Geodetic latitude of point (radians). :type lat: float :param alt: Altitude of point above the reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Rectangular coordinates of point. :rtype: 3-Element Array of floats
[ "Convert", "geodetic", "coordinates", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5451-L5477
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
getelm
def getelm(frstyr, lineln, lines): """ Given a the "lines" of a two-line element set, parse the lines and return the elements in units suitable for use in SPICE software. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getelm_c.html :param frstyr: Year of earliest representable two-line elements. :type frstyr: int :param lineln: Length of strings in lines array. :type lineln: int :param lines: A pair of "lines" containing two-line elements. :type lines: list of str :return: The epoch of the elements in seconds past J2000, The elements converted to SPICE units. :rtype: tuple """ frstyr = ctypes.c_int(frstyr) lineln = ctypes.c_int(lineln) lines = stypes.listToCharArrayPtr(lines, xLen=lineln, yLen=2) epoch = ctypes.c_double() elems = stypes.emptyDoubleVector(10) # guess for length libspice.getelm_c(frstyr, lineln, lines, ctypes.byref(epoch), elems) return epoch.value, stypes.cVectorToPython(elems)
python
def getelm(frstyr, lineln, lines): """ Given a the "lines" of a two-line element set, parse the lines and return the elements in units suitable for use in SPICE software. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getelm_c.html :param frstyr: Year of earliest representable two-line elements. :type frstyr: int :param lineln: Length of strings in lines array. :type lineln: int :param lines: A pair of "lines" containing two-line elements. :type lines: list of str :return: The epoch of the elements in seconds past J2000, The elements converted to SPICE units. :rtype: tuple """ frstyr = ctypes.c_int(frstyr) lineln = ctypes.c_int(lineln) lines = stypes.listToCharArrayPtr(lines, xLen=lineln, yLen=2) epoch = ctypes.c_double() elems = stypes.emptyDoubleVector(10) # guess for length libspice.getelm_c(frstyr, lineln, lines, ctypes.byref(epoch), elems) return epoch.value, stypes.cVectorToPython(elems)
[ "def", "getelm", "(", "frstyr", ",", "lineln", ",", "lines", ")", ":", "frstyr", "=", "ctypes", ".", "c_int", "(", "frstyr", ")", "lineln", "=", "ctypes", ".", "c_int", "(", "lineln", ")", "lines", "=", "stypes", ".", "listToCharArrayPtr", "(", "lines", ",", "xLen", "=", "lineln", ",", "yLen", "=", "2", ")", "epoch", "=", "ctypes", ".", "c_double", "(", ")", "elems", "=", "stypes", ".", "emptyDoubleVector", "(", "10", ")", "# guess for length", "libspice", ".", "getelm_c", "(", "frstyr", ",", "lineln", ",", "lines", ",", "ctypes", ".", "byref", "(", "epoch", ")", ",", "elems", ")", "return", "epoch", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "elems", ")" ]
Given a the "lines" of a two-line element set, parse the lines and return the elements in units suitable for use in SPICE software. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getelm_c.html :param frstyr: Year of earliest representable two-line elements. :type frstyr: int :param lineln: Length of strings in lines array. :type lineln: int :param lines: A pair of "lines" containing two-line elements. :type lines: list of str :return: The epoch of the elements in seconds past J2000, The elements converted to SPICE units. :rtype: tuple
[ "Given", "a", "the", "lines", "of", "a", "two", "-", "line", "element", "set", "parse", "the", "lines", "and", "return", "the", "elements", "in", "units", "suitable", "for", "use", "in", "SPICE", "software", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5484-L5509
train