id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
14,600
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
spiceFoundExceptionThrower
def spiceFoundExceptionThrower(f): """ Decorator for wrapping functions that use status codes """ @functools.wraps(f) def wrapper(*args, **kwargs): res = f(*args, **kwargs) if config.catch_false_founds: found = res[-1] if isinstance(found, bool) and not found: raise stypes.SpiceyError("Spice returns not found for function: {}".format(f.__name__), found=found) elif hasattr(found, '__iter__') and not all(found): raise stypes.SpiceyError("Spice returns not found in a series of calls for function: {}".format(f.__name__), found=found) else: actualres = res[0:-1] if len(actualres) == 1: return actualres[0] else: return actualres else: return res return wrapper
python
def spiceFoundExceptionThrower(f): """ Decorator for wrapping functions that use status codes """ @functools.wraps(f) def wrapper(*args, **kwargs): res = f(*args, **kwargs) if config.catch_false_founds: found = res[-1] if isinstance(found, bool) and not found: raise stypes.SpiceyError("Spice returns not found for function: {}".format(f.__name__), found=found) elif hasattr(found, '__iter__') and not all(found): raise stypes.SpiceyError("Spice returns not found in a series of calls for function: {}".format(f.__name__), found=found) else: actualres = res[0:-1] if len(actualres) == 1: return actualres[0] else: return actualres else: return res return wrapper
[ "def", "spiceFoundExceptionThrower", "(", "f", ")", ":", "@", "functools", ".", "wraps", "(", "f", ")", "def", "wrapper", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "res", "=", "f", "(", "*", "args", ",", "*", "*", "kwargs", ")", "if", "config", ".", "catch_false_founds", ":", "found", "=", "res", "[", "-", "1", "]", "if", "isinstance", "(", "found", ",", "bool", ")", "and", "not", "found", ":", "raise", "stypes", ".", "SpiceyError", "(", "\"Spice returns not found for function: {}\"", ".", "format", "(", "f", ".", "__name__", ")", ",", "found", "=", "found", ")", "elif", "hasattr", "(", "found", ",", "'__iter__'", ")", "and", "not", "all", "(", "found", ")", ":", "raise", "stypes", ".", "SpiceyError", "(", "\"Spice returns not found in a series of calls for function: {}\"", ".", "format", "(", "f", ".", "__name__", ")", ",", "found", "=", "found", ")", "else", ":", "actualres", "=", "res", "[", "0", ":", "-", "1", "]", "if", "len", "(", "actualres", ")", "==", "1", ":", "return", "actualres", "[", "0", "]", "else", ":", "return", "actualres", "else", ":", "return", "res", "return", "wrapper" ]
Decorator for wrapping functions that use status codes
[ "Decorator", "for", "wrapping", "functions", "that", "use", "status", "codes" ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L86-L108
14,601
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
appndc
def appndc(item, cell): """ Append an item to a character cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndc_c.html :param item: The item to append. :type item: str or list :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cell, stypes.SpiceCell) if isinstance(item, list): for c in item: libspice.appndc_c(stypes.stringToCharP(c), cell) else: item = stypes.stringToCharP(item) libspice.appndc_c(item, cell)
python
def appndc(item, cell): """ Append an item to a character cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndc_c.html :param item: The item to append. :type item: str or list :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cell, stypes.SpiceCell) if isinstance(item, list): for c in item: libspice.appndc_c(stypes.stringToCharP(c), cell) else: item = stypes.stringToCharP(item) libspice.appndc_c(item, cell)
[ "def", "appndc", "(", "item", ",", "cell", ")", ":", "assert", "isinstance", "(", "cell", ",", "stypes", ".", "SpiceCell", ")", "if", "isinstance", "(", "item", ",", "list", ")", ":", "for", "c", "in", "item", ":", "libspice", ".", "appndc_c", "(", "stypes", ".", "stringToCharP", "(", "c", ")", ",", "cell", ")", "else", ":", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "libspice", ".", "appndc_c", "(", "item", ",", "cell", ")" ]
Append an item to a character cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndc_c.html :param item: The item to append. :type item: str or list :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell
[ "Append", "an", "item", "to", "a", "character", "cell", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L217-L234
14,602
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
appndd
def appndd(item, cell): """ Append an item to a double precision cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndd_c.html :param item: The item to append. :type item: Union[float,Iterable[float]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cell, stypes.SpiceCell) if hasattr(item, "__iter__"): for d in item: libspice.appndd_c(ctypes.c_double(d), cell) else: item = ctypes.c_double(item) libspice.appndd_c(item, cell)
python
def appndd(item, cell): """ Append an item to a double precision cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndd_c.html :param item: The item to append. :type item: Union[float,Iterable[float]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cell, stypes.SpiceCell) if hasattr(item, "__iter__"): for d in item: libspice.appndd_c(ctypes.c_double(d), cell) else: item = ctypes.c_double(item) libspice.appndd_c(item, cell)
[ "def", "appndd", "(", "item", ",", "cell", ")", ":", "assert", "isinstance", "(", "cell", ",", "stypes", ".", "SpiceCell", ")", "if", "hasattr", "(", "item", ",", "\"__iter__\"", ")", ":", "for", "d", "in", "item", ":", "libspice", ".", "appndd_c", "(", "ctypes", ".", "c_double", "(", "d", ")", ",", "cell", ")", "else", ":", "item", "=", "ctypes", ".", "c_double", "(", "item", ")", "libspice", ".", "appndd_c", "(", "item", ",", "cell", ")" ]
Append an item to a double precision cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndd_c.html :param item: The item to append. :type item: Union[float,Iterable[float]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell
[ "Append", "an", "item", "to", "a", "double", "precision", "cell", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L238-L255
14,603
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
appndi
def appndi(item, cell): """ Append an item to an integer cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndi_c.html :param item: The item to append. :type item: Union[float,Iterable[int]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cell, stypes.SpiceCell) if hasattr(item, "__iter__"): for i in item: libspice.appndi_c(ctypes.c_int(i), cell) else: item = ctypes.c_int(item) libspice.appndi_c(item, cell)
python
def appndi(item, cell): """ Append an item to an integer cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndi_c.html :param item: The item to append. :type item: Union[float,Iterable[int]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cell, stypes.SpiceCell) if hasattr(item, "__iter__"): for i in item: libspice.appndi_c(ctypes.c_int(i), cell) else: item = ctypes.c_int(item) libspice.appndi_c(item, cell)
[ "def", "appndi", "(", "item", ",", "cell", ")", ":", "assert", "isinstance", "(", "cell", ",", "stypes", ".", "SpiceCell", ")", "if", "hasattr", "(", "item", ",", "\"__iter__\"", ")", ":", "for", "i", "in", "item", ":", "libspice", ".", "appndi_c", "(", "ctypes", ".", "c_int", "(", "i", ")", ",", "cell", ")", "else", ":", "item", "=", "ctypes", ".", "c_int", "(", "item", ")", "libspice", ".", "appndi_c", "(", "item", ",", "cell", ")" ]
Append an item to an integer cell. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/appndi_c.html :param item: The item to append. :type item: Union[float,Iterable[int]] :param cell: The cell to append to. :type cell: spiceypy.utils.support_types.SpiceCell
[ "Append", "an", "item", "to", "an", "integer", "cell", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L259-L276
14,604
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
axisar
def axisar(axis, angle): """ Construct a rotation matrix that rotates vectors by a specified angle about a specified axis. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/axisar_c.html :param axis: Rotation axis. :type axis: 3 Element vector (list, tuple, numpy array) :param angle: Rotation angle, in radians. :type angle: float :return: Rotation matrix corresponding to axis and angle. :rtype: numpy array ((3, 3)) """ axis = stypes.toDoubleVector(axis) angle = ctypes.c_double(angle) r = stypes.emptyDoubleMatrix() libspice.axisar_c(axis, angle, r) return stypes.cMatrixToNumpy(r)
python
def axisar(axis, angle): """ Construct a rotation matrix that rotates vectors by a specified angle about a specified axis. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/axisar_c.html :param axis: Rotation axis. :type axis: 3 Element vector (list, tuple, numpy array) :param angle: Rotation angle, in radians. :type angle: float :return: Rotation matrix corresponding to axis and angle. :rtype: numpy array ((3, 3)) """ axis = stypes.toDoubleVector(axis) angle = ctypes.c_double(angle) r = stypes.emptyDoubleMatrix() libspice.axisar_c(axis, angle, r) return stypes.cMatrixToNumpy(r)
[ "def", "axisar", "(", "axis", ",", "angle", ")", ":", "axis", "=", "stypes", ".", "toDoubleVector", "(", "axis", ")", "angle", "=", "ctypes", ".", "c_double", "(", "angle", ")", "r", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "axisar_c", "(", "axis", ",", "angle", ",", "r", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "r", ")" ]
Construct a rotation matrix that rotates vectors by a specified angle about a specified axis. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/axisar_c.html :param axis: Rotation axis. :type axis: 3 Element vector (list, tuple, numpy array) :param angle: Rotation angle, in radians. :type angle: float :return: Rotation matrix corresponding to axis and angle. :rtype: numpy array ((3, 3))
[ "Construct", "a", "rotation", "matrix", "that", "rotates", "vectors", "by", "a", "specified", "angle", "about", "a", "specified", "axis", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L280-L298
14,605
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
badkpv
def badkpv(caller, name, comp, insize, divby, intype): """ Determine if a kernel pool variable is present and if so that it has the correct size and type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/badkpv_c.html :param caller: Name of the routine calling this routine. :type caller: str :param name: Name of a kernel pool variable. :type name: str :param comp: Comparison operator. :type comp: str :param insize: Expected size of the kernel pool variable. :type insize: int :param divby: A divisor of the size of the kernel pool variable. :type divby: int :param intype: Expected type of the kernel pool variable :type intype: str :return: returns false if the kernel pool variable is OK. :rtype: bool """ caller = stypes.stringToCharP(caller) name = stypes.stringToCharP(name) comp = stypes.stringToCharP(comp) insize = ctypes.c_int(insize) divby = ctypes.c_int(divby) intype = ctypes.c_char(intype.encode(encoding='UTF-8')) return bool(libspice.badkpv_c(caller, name, comp, insize, divby, intype))
python
def badkpv(caller, name, comp, insize, divby, intype): """ Determine if a kernel pool variable is present and if so that it has the correct size and type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/badkpv_c.html :param caller: Name of the routine calling this routine. :type caller: str :param name: Name of a kernel pool variable. :type name: str :param comp: Comparison operator. :type comp: str :param insize: Expected size of the kernel pool variable. :type insize: int :param divby: A divisor of the size of the kernel pool variable. :type divby: int :param intype: Expected type of the kernel pool variable :type intype: str :return: returns false if the kernel pool variable is OK. :rtype: bool """ caller = stypes.stringToCharP(caller) name = stypes.stringToCharP(name) comp = stypes.stringToCharP(comp) insize = ctypes.c_int(insize) divby = ctypes.c_int(divby) intype = ctypes.c_char(intype.encode(encoding='UTF-8')) return bool(libspice.badkpv_c(caller, name, comp, insize, divby, intype))
[ "def", "badkpv", "(", "caller", ",", "name", ",", "comp", ",", "insize", ",", "divby", ",", "intype", ")", ":", "caller", "=", "stypes", ".", "stringToCharP", "(", "caller", ")", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "comp", "=", "stypes", ".", "stringToCharP", "(", "comp", ")", "insize", "=", "ctypes", ".", "c_int", "(", "insize", ")", "divby", "=", "ctypes", ".", "c_int", "(", "divby", ")", "intype", "=", "ctypes", ".", "c_char", "(", "intype", ".", "encode", "(", "encoding", "=", "'UTF-8'", ")", ")", "return", "bool", "(", "libspice", ".", "badkpv_c", "(", "caller", ",", "name", ",", "comp", ",", "insize", ",", "divby", ",", "intype", ")", ")" ]
Determine if a kernel pool variable is present and if so that it has the correct size and type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/badkpv_c.html :param caller: Name of the routine calling this routine. :type caller: str :param name: Name of a kernel pool variable. :type name: str :param comp: Comparison operator. :type comp: str :param insize: Expected size of the kernel pool variable. :type insize: int :param divby: A divisor of the size of the kernel pool variable. :type divby: int :param intype: Expected type of the kernel pool variable :type intype: str :return: returns false if the kernel pool variable is OK. :rtype: bool
[ "Determine", "if", "a", "kernel", "pool", "variable", "is", "present", "and", "if", "so", "that", "it", "has", "the", "correct", "size", "and", "type", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L331-L359
14,606
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bltfrm
def bltfrm(frmcls, outCell=None): """ Return a SPICE set containing the frame IDs of all built-in frames of a specified class. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bltfrm_c.html :param frmcls: Frame class. :type frmcls: int :param outCell: Optional SpiceInt Cell that is returned :type outCell: spiceypy.utils.support_types.SpiceCell :return: Set of ID codes of frames of the specified class. :rtype: spiceypy.utils.support_types.SpiceCell """ frmcls = ctypes.c_int(frmcls) if not outCell: outCell = stypes.SPICEINT_CELL(1000) libspice.bltfrm_c(frmcls, outCell) return outCell
python
def bltfrm(frmcls, outCell=None): """ Return a SPICE set containing the frame IDs of all built-in frames of a specified class. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bltfrm_c.html :param frmcls: Frame class. :type frmcls: int :param outCell: Optional SpiceInt Cell that is returned :type outCell: spiceypy.utils.support_types.SpiceCell :return: Set of ID codes of frames of the specified class. :rtype: spiceypy.utils.support_types.SpiceCell """ frmcls = ctypes.c_int(frmcls) if not outCell: outCell = stypes.SPICEINT_CELL(1000) libspice.bltfrm_c(frmcls, outCell) return outCell
[ "def", "bltfrm", "(", "frmcls", ",", "outCell", "=", "None", ")", ":", "frmcls", "=", "ctypes", ".", "c_int", "(", "frmcls", ")", "if", "not", "outCell", ":", "outCell", "=", "stypes", ".", "SPICEINT_CELL", "(", "1000", ")", "libspice", ".", "bltfrm_c", "(", "frmcls", ",", "outCell", ")", "return", "outCell" ]
Return a SPICE set containing the frame IDs of all built-in frames of a specified class. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bltfrm_c.html :param frmcls: Frame class. :type frmcls: int :param outCell: Optional SpiceInt Cell that is returned :type outCell: spiceypy.utils.support_types.SpiceCell :return: Set of ID codes of frames of the specified class. :rtype: spiceypy.utils.support_types.SpiceCell
[ "Return", "a", "SPICE", "set", "containing", "the", "frame", "IDs", "of", "all", "built", "-", "in", "frames", "of", "a", "specified", "class", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L363-L381
14,607
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodc2n
def bodc2n(code, lenout=_default_len_out): """ Translate the SPICE integer code of a body into a common name for that body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2n_c.html :param code: Integer ID code to be translated into a name. :type code: int :param lenout: Maximum length of output name. :type lenout: int :return: A common name for the body identified by code. :rtype: str """ code = ctypes.c_int(code) name = stypes.stringToCharP(" " * lenout) lenout = ctypes.c_int(lenout) found = ctypes.c_int() libspice.bodc2n_c(code, lenout, name, ctypes.byref(found)) return stypes.toPythonString(name), bool(found.value)
python
def bodc2n(code, lenout=_default_len_out): """ Translate the SPICE integer code of a body into a common name for that body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2n_c.html :param code: Integer ID code to be translated into a name. :type code: int :param lenout: Maximum length of output name. :type lenout: int :return: A common name for the body identified by code. :rtype: str """ code = ctypes.c_int(code) name = stypes.stringToCharP(" " * lenout) lenout = ctypes.c_int(lenout) found = ctypes.c_int() libspice.bodc2n_c(code, lenout, name, ctypes.byref(found)) return stypes.toPythonString(name), bool(found.value)
[ "def", "bodc2n", "(", "code", ",", "lenout", "=", "_default_len_out", ")", ":", "code", "=", "ctypes", ".", "c_int", "(", "code", ")", "name", "=", "stypes", ".", "stringToCharP", "(", "\" \"", "*", "lenout", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "bodc2n_c", "(", "code", ",", "lenout", ",", "name", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "stypes", ".", "toPythonString", "(", "name", ")", ",", "bool", "(", "found", ".", "value", ")" ]
Translate the SPICE integer code of a body into a common name for that body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2n_c.html :param code: Integer ID code to be translated into a name. :type code: int :param lenout: Maximum length of output name. :type lenout: int :return: A common name for the body identified by code. :rtype: str
[ "Translate", "the", "SPICE", "integer", "code", "of", "a", "body", "into", "a", "common", "name", "for", "that", "body", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L386-L405
14,608
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodc2s
def bodc2s(code, lenout=_default_len_out): """ Translate a body ID code to either the corresponding name or if no name to ID code mapping exists, the string representation of the body ID value. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2s_c.html :param code: Integer ID code to translate to a string. :type code: int :param lenout: Maximum length of output name. :type lenout: int :return: String corresponding to 'code'. :rtype: str """ code = ctypes.c_int(code) name = stypes.stringToCharP(" " * lenout) lenout = ctypes.c_int(lenout) libspice.bodc2s_c(code, lenout, name) return stypes.toPythonString(name)
python
def bodc2s(code, lenout=_default_len_out): """ Translate a body ID code to either the corresponding name or if no name to ID code mapping exists, the string representation of the body ID value. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2s_c.html :param code: Integer ID code to translate to a string. :type code: int :param lenout: Maximum length of output name. :type lenout: int :return: String corresponding to 'code'. :rtype: str """ code = ctypes.c_int(code) name = stypes.stringToCharP(" " * lenout) lenout = ctypes.c_int(lenout) libspice.bodc2s_c(code, lenout, name) return stypes.toPythonString(name)
[ "def", "bodc2s", "(", "code", ",", "lenout", "=", "_default_len_out", ")", ":", "code", "=", "ctypes", ".", "c_int", "(", "code", ")", "name", "=", "stypes", ".", "stringToCharP", "(", "\" \"", "*", "lenout", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "libspice", ".", "bodc2s_c", "(", "code", ",", "lenout", ",", "name", ")", "return", "stypes", ".", "toPythonString", "(", "name", ")" ]
Translate a body ID code to either the corresponding name or if no name to ID code mapping exists, the string representation of the body ID value. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodc2s_c.html :param code: Integer ID code to translate to a string. :type code: int :param lenout: Maximum length of output name. :type lenout: int :return: String corresponding to 'code'. :rtype: str
[ "Translate", "a", "body", "ID", "code", "to", "either", "the", "corresponding", "name", "or", "if", "no", "name", "to", "ID", "code", "mapping", "exists", "the", "string", "representation", "of", "the", "body", "ID", "value", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L409-L428
14,609
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodfnd
def bodfnd(body, item): """ Determine whether values exist for some item for any body in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodfnd_c.html :param body: ID code of body. :type body: int :param item: Item to find ("RADII", "NUT_AMP_RA", etc.). :type item: str :return: True if the item is in the kernel pool, and is False if it is not. :rtype: bool """ body = ctypes.c_int(body) item = stypes.stringToCharP(item) return bool(libspice.bodfnd_c(body, item))
python
def bodfnd(body, item): """ Determine whether values exist for some item for any body in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodfnd_c.html :param body: ID code of body. :type body: int :param item: Item to find ("RADII", "NUT_AMP_RA", etc.). :type item: str :return: True if the item is in the kernel pool, and is False if it is not. :rtype: bool """ body = ctypes.c_int(body) item = stypes.stringToCharP(item) return bool(libspice.bodfnd_c(body, item))
[ "def", "bodfnd", "(", "body", ",", "item", ")", ":", "body", "=", "ctypes", ".", "c_int", "(", "body", ")", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "return", "bool", "(", "libspice", ".", "bodfnd_c", "(", "body", ",", "item", ")", ")" ]
Determine whether values exist for some item for any body in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodfnd_c.html :param body: ID code of body. :type body: int :param item: Item to find ("RADII", "NUT_AMP_RA", etc.). :type item: str :return: True if the item is in the kernel pool, and is False if it is not. :rtype: bool
[ "Determine", "whether", "values", "exist", "for", "some", "item", "for", "any", "body", "in", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L450-L466
14,610
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodn2c
def bodn2c(name): """ Translate the name of a body or object to the corresponding SPICE integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodn2c_c.html :param name: Body name to be translated into a SPICE ID code. :type name: str :return: SPICE integer ID code for the named body. :rtype: int """ name = stypes.stringToCharP(name) code = ctypes.c_int(0) found = ctypes.c_int(0) libspice.bodn2c_c(name, ctypes.byref(code), ctypes.byref(found)) return code.value, bool(found.value)
python
def bodn2c(name): """ Translate the name of a body or object to the corresponding SPICE integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodn2c_c.html :param name: Body name to be translated into a SPICE ID code. :type name: str :return: SPICE integer ID code for the named body. :rtype: int """ name = stypes.stringToCharP(name) code = ctypes.c_int(0) found = ctypes.c_int(0) libspice.bodn2c_c(name, ctypes.byref(code), ctypes.byref(found)) return code.value, bool(found.value)
[ "def", "bodn2c", "(", "name", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "code", "=", "ctypes", ".", "c_int", "(", "0", ")", "found", "=", "ctypes", ".", "c_int", "(", "0", ")", "libspice", ".", "bodn2c_c", "(", "name", ",", "ctypes", ".", "byref", "(", "code", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "code", ".", "value", ",", "bool", "(", "found", ".", "value", ")" ]
Translate the name of a body or object to the corresponding SPICE integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodn2c_c.html :param name: Body name to be translated into a SPICE ID code. :type name: str :return: SPICE integer ID code for the named body. :rtype: int
[ "Translate", "the", "name", "of", "a", "body", "or", "object", "to", "the", "corresponding", "SPICE", "integer", "ID", "code", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L471-L487
14,611
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bods2c
def bods2c(name): """ Translate a string containing a body name or ID code to an integer code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bods2c_c.html :param name: String to be translated to an ID code. :type name: str :return: Integer ID code corresponding to name. :rtype: int """ name = stypes.stringToCharP(name) code = ctypes.c_int(0) found = ctypes.c_int(0) libspice.bods2c_c(name, ctypes.byref(code), ctypes.byref(found)) return code.value, bool(found.value)
python
def bods2c(name): """ Translate a string containing a body name or ID code to an integer code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bods2c_c.html :param name: String to be translated to an ID code. :type name: str :return: Integer ID code corresponding to name. :rtype: int """ name = stypes.stringToCharP(name) code = ctypes.c_int(0) found = ctypes.c_int(0) libspice.bods2c_c(name, ctypes.byref(code), ctypes.byref(found)) return code.value, bool(found.value)
[ "def", "bods2c", "(", "name", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "code", "=", "ctypes", ".", "c_int", "(", "0", ")", "found", "=", "ctypes", ".", "c_int", "(", "0", ")", "libspice", ".", "bods2c_c", "(", "name", ",", "ctypes", ".", "byref", "(", "code", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "code", ".", "value", ",", "bool", "(", "found", ".", "value", ")" ]
Translate a string containing a body name or ID code to an integer code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bods2c_c.html :param name: String to be translated to an ID code. :type name: str :return: Integer ID code corresponding to name. :rtype: int
[ "Translate", "a", "string", "containing", "a", "body", "name", "or", "ID", "code", "to", "an", "integer", "code", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L492-L507
14,612
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodvcd
def bodvcd(bodyid, item, maxn): """ Fetch from the kernel pool the double precision values of an item associated with a body, where the body is specified by an integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvcd_c.html :param bodyid: Body ID code. :type bodyid: int :param item: Item for which values are desired, ("RADII", "NUT_PREC_ANGLES", etc.) :type item: str :param maxn: Maximum number of values that may be returned. :type maxn: int :return: dim, values :rtype: tuple """ bodyid = ctypes.c_int(bodyid) item = stypes.stringToCharP(item) dim = ctypes.c_int() values = stypes.emptyDoubleVector(maxn) maxn = ctypes.c_int(maxn) libspice.bodvcd_c(bodyid, item, maxn, ctypes.byref(dim), values) return dim.value, stypes.cVectorToPython(values)
python
def bodvcd(bodyid, item, maxn): """ Fetch from the kernel pool the double precision values of an item associated with a body, where the body is specified by an integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvcd_c.html :param bodyid: Body ID code. :type bodyid: int :param item: Item for which values are desired, ("RADII", "NUT_PREC_ANGLES", etc.) :type item: str :param maxn: Maximum number of values that may be returned. :type maxn: int :return: dim, values :rtype: tuple """ bodyid = ctypes.c_int(bodyid) item = stypes.stringToCharP(item) dim = ctypes.c_int() values = stypes.emptyDoubleVector(maxn) maxn = ctypes.c_int(maxn) libspice.bodvcd_c(bodyid, item, maxn, ctypes.byref(dim), values) return dim.value, stypes.cVectorToPython(values)
[ "def", "bodvcd", "(", "bodyid", ",", "item", ",", "maxn", ")", ":", "bodyid", "=", "ctypes", ".", "c_int", "(", "bodyid", ")", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "dim", "=", "ctypes", ".", "c_int", "(", ")", "values", "=", "stypes", ".", "emptyDoubleVector", "(", "maxn", ")", "maxn", "=", "ctypes", ".", "c_int", "(", "maxn", ")", "libspice", ".", "bodvcd_c", "(", "bodyid", ",", "item", ",", "maxn", ",", "ctypes", ".", "byref", "(", "dim", ")", ",", "values", ")", "return", "dim", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "values", ")" ]
Fetch from the kernel pool the double precision values of an item associated with a body, where the body is specified by an integer ID code. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvcd_c.html :param bodyid: Body ID code. :type bodyid: int :param item: Item for which values are desired, ("RADII", "NUT_PREC_ANGLES", etc.) :type item: str :param maxn: Maximum number of values that may be returned. :type maxn: int :return: dim, values :rtype: tuple
[ "Fetch", "from", "the", "kernel", "pool", "the", "double", "precision", "values", "of", "an", "item", "associated", "with", "a", "body", "where", "the", "body", "is", "specified", "by", "an", "integer", "ID", "code", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L541-L566
14,613
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bodvrd
def bodvrd(bodynm, item, maxn): """ Fetch from the kernel pool the double precision values of an item associated with a body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvrd_c.html :param bodynm: Body name. :type bodynm: str :param item: Item for which values are desired, ("RADII", "NUT_PREC_ANGLES", etc.) :type item: str :param maxn: Maximum number of values that may be returned. :type maxn: int :return: tuple of (dim, values) :rtype: tuple """ bodynm = stypes.stringToCharP(bodynm) item = stypes.stringToCharP(item) dim = ctypes.c_int() values = stypes.emptyDoubleVector(maxn) maxn = ctypes.c_int(maxn) libspice.bodvrd_c(bodynm, item, maxn, ctypes.byref(dim), values) return dim.value, stypes.cVectorToPython(values)
python
def bodvrd(bodynm, item, maxn): """ Fetch from the kernel pool the double precision values of an item associated with a body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvrd_c.html :param bodynm: Body name. :type bodynm: str :param item: Item for which values are desired, ("RADII", "NUT_PREC_ANGLES", etc.) :type item: str :param maxn: Maximum number of values that may be returned. :type maxn: int :return: tuple of (dim, values) :rtype: tuple """ bodynm = stypes.stringToCharP(bodynm) item = stypes.stringToCharP(item) dim = ctypes.c_int() values = stypes.emptyDoubleVector(maxn) maxn = ctypes.c_int(maxn) libspice.bodvrd_c(bodynm, item, maxn, ctypes.byref(dim), values) return dim.value, stypes.cVectorToPython(values)
[ "def", "bodvrd", "(", "bodynm", ",", "item", ",", "maxn", ")", ":", "bodynm", "=", "stypes", ".", "stringToCharP", "(", "bodynm", ")", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "dim", "=", "ctypes", ".", "c_int", "(", ")", "values", "=", "stypes", ".", "emptyDoubleVector", "(", "maxn", ")", "maxn", "=", "ctypes", ".", "c_int", "(", "maxn", ")", "libspice", ".", "bodvrd_c", "(", "bodynm", ",", "item", ",", "maxn", ",", "ctypes", ".", "byref", "(", "dim", ")", ",", "values", ")", "return", "dim", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "values", ")" ]
Fetch from the kernel pool the double precision values of an item associated with a body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bodvrd_c.html :param bodynm: Body name. :type bodynm: str :param item: Item for which values are desired, ("RADII", "NUT_PREC_ANGLES", etc.) :type item: str :param maxn: Maximum number of values that may be returned. :type maxn: int :return: tuple of (dim, values) :rtype: tuple
[ "Fetch", "from", "the", "kernel", "pool", "the", "double", "precision", "values", "of", "an", "item", "associated", "with", "a", "body", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L570-L594
14,614
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bschoc
def bschoc(value, ndim, lenvals, array, order): """ Do a binary search for a given value within a character string array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoc_c.html :param value: Key value to be found in array. :type value: str :param ndim: Dimension of array. :type ndim: int :param lenvals: String length. :type lenvals: int :param array: Character string array to search. :type array: list of strings :param order: Order vector. :type order: Array of ints :return: index :rtype: int """ value = stypes.stringToCharP(value) ndim = ctypes.c_int(ndim) lenvals = ctypes.c_int(lenvals) array = stypes.listToCharArrayPtr(array, xLen=lenvals, yLen=ndim) order = stypes.toIntVector(order) return libspice.bschoc_c(value, ndim, lenvals, array, order)
python
def bschoc(value, ndim, lenvals, array, order): """ Do a binary search for a given value within a character string array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoc_c.html :param value: Key value to be found in array. :type value: str :param ndim: Dimension of array. :type ndim: int :param lenvals: String length. :type lenvals: int :param array: Character string array to search. :type array: list of strings :param order: Order vector. :type order: Array of ints :return: index :rtype: int """ value = stypes.stringToCharP(value) ndim = ctypes.c_int(ndim) lenvals = ctypes.c_int(lenvals) array = stypes.listToCharArrayPtr(array, xLen=lenvals, yLen=ndim) order = stypes.toIntVector(order) return libspice.bschoc_c(value, ndim, lenvals, array, order)
[ "def", "bschoc", "(", "value", ",", "ndim", ",", "lenvals", ",", "array", ",", "order", ")", ":", "value", "=", "stypes", ".", "stringToCharP", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "lenvals", ")", "array", "=", "stypes", ".", "listToCharArrayPtr", "(", "array", ",", "xLen", "=", "lenvals", ",", "yLen", "=", "ndim", ")", "order", "=", "stypes", ".", "toIntVector", "(", "order", ")", "return", "libspice", ".", "bschoc_c", "(", "value", ",", "ndim", ",", "lenvals", ",", "array", ",", "order", ")" ]
Do a binary search for a given value within a character string array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoc_c.html :param value: Key value to be found in array. :type value: str :param ndim: Dimension of array. :type ndim: int :param lenvals: String length. :type lenvals: int :param array: Character string array to search. :type array: list of strings :param order: Order vector. :type order: Array of ints :return: index :rtype: int
[ "Do", "a", "binary", "search", "for", "a", "given", "value", "within", "a", "character", "string", "array", "accompanied", "by", "an", "order", "vector", ".", "Return", "the", "index", "of", "the", "matching", "array", "entry", "or", "-", "1", "if", "the", "key", "value", "is", "not", "found", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L648-L674
14,615
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bschoi
def bschoi(value, ndim, array, order): """ Do a binary search for a given value within an integer array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoi_c.html :param value: Key value to be found in array. :type value: int :param ndim: Dimension of array. :type ndim: int :param array: Integer array to search. :type array: Array of ints :param order: Order vector. :type order: Array of ints :return: index :rtype: int """ value = ctypes.c_int(value) ndim = ctypes.c_int(ndim) array = stypes.toIntVector(array) order = stypes.toIntVector(order) return libspice.bschoi_c(value, ndim, array, order)
python
def bschoi(value, ndim, array, order): """ Do a binary search for a given value within an integer array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoi_c.html :param value: Key value to be found in array. :type value: int :param ndim: Dimension of array. :type ndim: int :param array: Integer array to search. :type array: Array of ints :param order: Order vector. :type order: Array of ints :return: index :rtype: int """ value = ctypes.c_int(value) ndim = ctypes.c_int(ndim) array = stypes.toIntVector(array) order = stypes.toIntVector(order) return libspice.bschoi_c(value, ndim, array, order)
[ "def", "bschoi", "(", "value", ",", "ndim", ",", "array", ",", "order", ")", ":", "value", "=", "ctypes", ".", "c_int", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "array", "=", "stypes", ".", "toIntVector", "(", "array", ")", "order", "=", "stypes", ".", "toIntVector", "(", "order", ")", "return", "libspice", ".", "bschoi_c", "(", "value", ",", "ndim", ",", "array", ",", "order", ")" ]
Do a binary search for a given value within an integer array, accompanied by an order vector. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bschoi_c.html :param value: Key value to be found in array. :type value: int :param ndim: Dimension of array. :type ndim: int :param array: Integer array to search. :type array: Array of ints :param order: Order vector. :type order: Array of ints :return: index :rtype: int
[ "Do", "a", "binary", "search", "for", "a", "given", "value", "within", "an", "integer", "array", "accompanied", "by", "an", "order", "vector", ".", "Return", "the", "index", "of", "the", "matching", "array", "entry", "or", "-", "1", "if", "the", "key", "value", "is", "not", "found", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L678-L701
14,616
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bsrchc
def bsrchc(value, ndim, lenvals, array): """ Do a binary earch for a given value within a character string array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchc_c.html :param value: Key value to be found in array. :type value: str :param ndim: Dimension of array. :type ndim: int :param lenvals: String length. :type lenvals: int :param array: Character string array to search. :type array: list of strings :return: index :rtype: int """ value = stypes.stringToCharP(value) ndim = ctypes.c_int(ndim) lenvals = ctypes.c_int(lenvals) array = stypes.listToCharArrayPtr(array, xLen=lenvals, yLen=ndim) return libspice.bsrchc_c(value, ndim, lenvals, array)
python
def bsrchc(value, ndim, lenvals, array): """ Do a binary earch for a given value within a character string array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchc_c.html :param value: Key value to be found in array. :type value: str :param ndim: Dimension of array. :type ndim: int :param lenvals: String length. :type lenvals: int :param array: Character string array to search. :type array: list of strings :return: index :rtype: int """ value = stypes.stringToCharP(value) ndim = ctypes.c_int(ndim) lenvals = ctypes.c_int(lenvals) array = stypes.listToCharArrayPtr(array, xLen=lenvals, yLen=ndim) return libspice.bsrchc_c(value, ndim, lenvals, array)
[ "def", "bsrchc", "(", "value", ",", "ndim", ",", "lenvals", ",", "array", ")", ":", "value", "=", "stypes", ".", "stringToCharP", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "lenvals", ")", "array", "=", "stypes", ".", "listToCharArrayPtr", "(", "array", ",", "xLen", "=", "lenvals", ",", "yLen", "=", "ndim", ")", "return", "libspice", ".", "bsrchc_c", "(", "value", ",", "ndim", ",", "lenvals", ",", "array", ")" ]
Do a binary earch for a given value within a character string array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchc_c.html :param value: Key value to be found in array. :type value: str :param ndim: Dimension of array. :type ndim: int :param lenvals: String length. :type lenvals: int :param array: Character string array to search. :type array: list of strings :return: index :rtype: int
[ "Do", "a", "binary", "earch", "for", "a", "given", "value", "within", "a", "character", "string", "array", ".", "Return", "the", "index", "of", "the", "first", "matching", "array", "entry", "or", "-", "1", "if", "the", "key", "value", "was", "not", "found", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L705-L728
14,617
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bsrchd
def bsrchd(value, ndim, array): """ Do a binary search for a key value within a double precision array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchd_c.html :param value: Value to find in array. :type value: float :param ndim: Dimension of array. :type ndim: int :param array: Array to be searched. :type array: Array of floats :return: index :rtype: int """ value = ctypes.c_double(value) ndim = ctypes.c_int(ndim) array = stypes.toDoubleVector(array) return libspice.bsrchd_c(value, ndim, array)
python
def bsrchd(value, ndim, array): """ Do a binary search for a key value within a double precision array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchd_c.html :param value: Value to find in array. :type value: float :param ndim: Dimension of array. :type ndim: int :param array: Array to be searched. :type array: Array of floats :return: index :rtype: int """ value = ctypes.c_double(value) ndim = ctypes.c_int(ndim) array = stypes.toDoubleVector(array) return libspice.bsrchd_c(value, ndim, array)
[ "def", "bsrchd", "(", "value", ",", "ndim", ",", "array", ")", ":", "value", "=", "ctypes", ".", "c_double", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "array", "=", "stypes", ".", "toDoubleVector", "(", "array", ")", "return", "libspice", ".", "bsrchd_c", "(", "value", ",", "ndim", ",", "array", ")" ]
Do a binary search for a key value within a double precision array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchd_c.html :param value: Value to find in array. :type value: float :param ndim: Dimension of array. :type ndim: int :param array: Array to be searched. :type array: Array of floats :return: index :rtype: int
[ "Do", "a", "binary", "search", "for", "a", "key", "value", "within", "a", "double", "precision", "array", "assumed", "to", "be", "in", "increasing", "order", ".", "Return", "the", "index", "of", "the", "matching", "array", "entry", "or", "-", "1", "if", "the", "key", "value", "is", "not", "found", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L732-L752
14,618
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
bsrchi
def bsrchi(value, ndim, array): """ Do a binary search for a key value within an integer array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchi_c.html :param value: Value to find in array. :type value: int :param ndim: Dimension of array. :type ndim: int :param array: Array to be searched. :type array: Array of ints :return: index :rtype: int """ value = ctypes.c_int(value) ndim = ctypes.c_int(ndim) array = stypes.toIntVector(array) return libspice.bsrchi_c(value, ndim, array)
python
def bsrchi(value, ndim, array): """ Do a binary search for a key value within an integer array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchi_c.html :param value: Value to find in array. :type value: int :param ndim: Dimension of array. :type ndim: int :param array: Array to be searched. :type array: Array of ints :return: index :rtype: int """ value = ctypes.c_int(value) ndim = ctypes.c_int(ndim) array = stypes.toIntVector(array) return libspice.bsrchi_c(value, ndim, array)
[ "def", "bsrchi", "(", "value", ",", "ndim", ",", "array", ")", ":", "value", "=", "ctypes", ".", "c_int", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "array", "=", "stypes", ".", "toIntVector", "(", "array", ")", "return", "libspice", ".", "bsrchi_c", "(", "value", ",", "ndim", ",", "array", ")" ]
Do a binary search for a key value within an integer array, assumed to be in increasing order. Return the index of the matching array entry, or -1 if the key value is not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/bsrchi_c.html :param value: Value to find in array. :type value: int :param ndim: Dimension of array. :type ndim: int :param array: Array to be searched. :type array: Array of ints :return: index :rtype: int
[ "Do", "a", "binary", "search", "for", "a", "key", "value", "within", "an", "integer", "array", "assumed", "to", "be", "in", "increasing", "order", ".", "Return", "the", "index", "of", "the", "matching", "array", "entry", "or", "-", "1", "if", "the", "key", "value", "is", "not", "found", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L756-L776
14,619
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ccifrm
def ccifrm(frclss, clssid, lenout=_default_len_out): """ Return the frame name, frame ID, and center associated with a given frame class and class ID. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ccifrm_c.html :param frclss: Class of frame. :type frclss: int :param clssid: Class ID of frame. :type clssid: int :param lenout: Maximum length of output string. :type lenout: int :return: the frame name, frame ID, center. :rtype: tuple """ frclss = ctypes.c_int(frclss) clssid = ctypes.c_int(clssid) lenout = ctypes.c_int(lenout) frcode = ctypes.c_int() frname = stypes.stringToCharP(lenout) center = ctypes.c_int() found = ctypes.c_int() libspice.ccifrm_c(frclss, clssid, lenout, ctypes.byref(frcode), frname, ctypes.byref(center), ctypes.byref(found)) return frcode.value, stypes.toPythonString( frname), center.value, bool(found.value)
python
def ccifrm(frclss, clssid, lenout=_default_len_out): """ Return the frame name, frame ID, and center associated with a given frame class and class ID. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ccifrm_c.html :param frclss: Class of frame. :type frclss: int :param clssid: Class ID of frame. :type clssid: int :param lenout: Maximum length of output string. :type lenout: int :return: the frame name, frame ID, center. :rtype: tuple """ frclss = ctypes.c_int(frclss) clssid = ctypes.c_int(clssid) lenout = ctypes.c_int(lenout) frcode = ctypes.c_int() frname = stypes.stringToCharP(lenout) center = ctypes.c_int() found = ctypes.c_int() libspice.ccifrm_c(frclss, clssid, lenout, ctypes.byref(frcode), frname, ctypes.byref(center), ctypes.byref(found)) return frcode.value, stypes.toPythonString( frname), center.value, bool(found.value)
[ "def", "ccifrm", "(", "frclss", ",", "clssid", ",", "lenout", "=", "_default_len_out", ")", ":", "frclss", "=", "ctypes", ".", "c_int", "(", "frclss", ")", "clssid", "=", "ctypes", ".", "c_int", "(", "clssid", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "frcode", "=", "ctypes", ".", "c_int", "(", ")", "frname", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "center", "=", "ctypes", ".", "c_int", "(", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ccifrm_c", "(", "frclss", ",", "clssid", ",", "lenout", ",", "ctypes", ".", "byref", "(", "frcode", ")", ",", "frname", ",", "ctypes", ".", "byref", "(", "center", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "frcode", ".", "value", ",", "stypes", ".", "toPythonString", "(", "frname", ")", ",", "center", ".", "value", ",", "bool", "(", "found", ".", "value", ")" ]
Return the frame name, frame ID, and center associated with a given frame class and class ID. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ccifrm_c.html :param frclss: Class of frame. :type frclss: int :param clssid: Class ID of frame. :type clssid: int :param lenout: Maximum length of output string. :type lenout: int :return: the frame name, frame ID, center. :rtype: tuple
[ "Return", "the", "frame", "name", "frame", "ID", "and", "center", "associated", "with", "a", "given", "frame", "class", "and", "class", "ID", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L800-L829
14,620
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cgv2el
def cgv2el(center, vec1, vec2): """ Form a SPICE ellipse from a center vector and two generating vectors. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cgv2el_c.html :param center: Center Vector :type center: 3-Element Array of floats :param vec1: Vector 1 :type vec1: 3-Element Array of floats :param vec2: Vector 2 :type vec2: 3-Element Array of floats :return: Ellipse :rtype: spiceypy.utils.support_types.Ellipse """ center = stypes.toDoubleVector(center) vec1 = stypes.toDoubleVector(vec1) vec2 = stypes.toDoubleVector(vec2) ellipse = stypes.Ellipse() libspice.cgv2el_c(center, vec1, vec2, ctypes.byref(ellipse)) return ellipse
python
def cgv2el(center, vec1, vec2): """ Form a SPICE ellipse from a center vector and two generating vectors. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cgv2el_c.html :param center: Center Vector :type center: 3-Element Array of floats :param vec1: Vector 1 :type vec1: 3-Element Array of floats :param vec2: Vector 2 :type vec2: 3-Element Array of floats :return: Ellipse :rtype: spiceypy.utils.support_types.Ellipse """ center = stypes.toDoubleVector(center) vec1 = stypes.toDoubleVector(vec1) vec2 = stypes.toDoubleVector(vec2) ellipse = stypes.Ellipse() libspice.cgv2el_c(center, vec1, vec2, ctypes.byref(ellipse)) return ellipse
[ "def", "cgv2el", "(", "center", ",", "vec1", ",", "vec2", ")", ":", "center", "=", "stypes", ".", "toDoubleVector", "(", "center", ")", "vec1", "=", "stypes", ".", "toDoubleVector", "(", "vec1", ")", "vec2", "=", "stypes", ".", "toDoubleVector", "(", "vec2", ")", "ellipse", "=", "stypes", ".", "Ellipse", "(", ")", "libspice", ".", "cgv2el_c", "(", "center", ",", "vec1", ",", "vec2", ",", "ctypes", ".", "byref", "(", "ellipse", ")", ")", "return", "ellipse" ]
Form a SPICE ellipse from a center vector and two generating vectors. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cgv2el_c.html :param center: Center Vector :type center: 3-Element Array of floats :param vec1: Vector 1 :type vec1: 3-Element Array of floats :param vec2: Vector 2 :type vec2: 3-Element Array of floats :return: Ellipse :rtype: spiceypy.utils.support_types.Ellipse
[ "Form", "a", "SPICE", "ellipse", "from", "a", "center", "vector", "and", "two", "generating", "vectors", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L833-L853
14,621
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cidfrm
def cidfrm(cent, lenout=_default_len_out): """ Retrieve frame ID code and name to associate with a frame center. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cidfrm_c.html :param cent: An object to associate a frame with. :type cent: int :param lenout: Available space in output string frname. :type lenout: int :return: frame ID code, name to associate with a frame center. :rtype: tuple """ cent = ctypes.c_int(cent) lenout = ctypes.c_int(lenout) frcode = ctypes.c_int() frname = stypes.stringToCharP(lenout) found = ctypes.c_int() libspice.cidfrm_c(cent, lenout, ctypes.byref(frcode), frname, ctypes.byref(found)) return frcode.value, stypes.toPythonString(frname), bool(found.value)
python
def cidfrm(cent, lenout=_default_len_out): """ Retrieve frame ID code and name to associate with a frame center. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cidfrm_c.html :param cent: An object to associate a frame with. :type cent: int :param lenout: Available space in output string frname. :type lenout: int :return: frame ID code, name to associate with a frame center. :rtype: tuple """ cent = ctypes.c_int(cent) lenout = ctypes.c_int(lenout) frcode = ctypes.c_int() frname = stypes.stringToCharP(lenout) found = ctypes.c_int() libspice.cidfrm_c(cent, lenout, ctypes.byref(frcode), frname, ctypes.byref(found)) return frcode.value, stypes.toPythonString(frname), bool(found.value)
[ "def", "cidfrm", "(", "cent", ",", "lenout", "=", "_default_len_out", ")", ":", "cent", "=", "ctypes", ".", "c_int", "(", "cent", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "frcode", "=", "ctypes", ".", "c_int", "(", ")", "frname", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "cidfrm_c", "(", "cent", ",", "lenout", ",", "ctypes", ".", "byref", "(", "frcode", ")", ",", "frname", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "frcode", ".", "value", ",", "stypes", ".", "toPythonString", "(", "frname", ")", ",", "bool", "(", "found", ".", "value", ")" ]
Retrieve frame ID code and name to associate with a frame center. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cidfrm_c.html :param cent: An object to associate a frame with. :type cent: int :param lenout: Available space in output string frname. :type lenout: int :return: frame ID code, name to associate with a frame center. :rtype: tuple
[ "Retrieve", "frame", "ID", "code", "and", "name", "to", "associate", "with", "a", "frame", "center", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L918-L940
14,622
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckcov
def ckcov(ck, idcode, needav, level, tol, timsys, cover=None): """ Find the coverage window for a specified object in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckcov_c.html :param ck: Name of CK file. :type ck: str :param idcode: ID code of object. :type idcode: int :param needav: Flag indicating whether angular velocity is needed. :type needav: bool :param level: Coverage level: (SEGMENT OR INTERVAL) :type level: str :param tol: Tolerance in ticks. :type tol: float :param timsys: Time system used to represent coverage. :type timsys: str :param cover: Window giving coverage for idcode. :type cover: Optional SpiceCell :return: coverage window for a specified object in a specified CK file :rtype: spiceypy.utils.support_types.SpiceCell """ ck = stypes.stringToCharP(ck) idcode = ctypes.c_int(idcode) needav = ctypes.c_int(needav) level = stypes.stringToCharP(level) tol = ctypes.c_double(tol) timsys = stypes.stringToCharP(timsys) if not cover: cover = stypes.SPICEDOUBLE_CELL(20000) assert isinstance(cover, stypes.SpiceCell) assert cover.dtype == 1 libspice.ckcov_c(ck, idcode, needav, level, tol, timsys, ctypes.byref(cover)) return cover
python
def ckcov(ck, idcode, needav, level, tol, timsys, cover=None): """ Find the coverage window for a specified object in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckcov_c.html :param ck: Name of CK file. :type ck: str :param idcode: ID code of object. :type idcode: int :param needav: Flag indicating whether angular velocity is needed. :type needav: bool :param level: Coverage level: (SEGMENT OR INTERVAL) :type level: str :param tol: Tolerance in ticks. :type tol: float :param timsys: Time system used to represent coverage. :type timsys: str :param cover: Window giving coverage for idcode. :type cover: Optional SpiceCell :return: coverage window for a specified object in a specified CK file :rtype: spiceypy.utils.support_types.SpiceCell """ ck = stypes.stringToCharP(ck) idcode = ctypes.c_int(idcode) needav = ctypes.c_int(needav) level = stypes.stringToCharP(level) tol = ctypes.c_double(tol) timsys = stypes.stringToCharP(timsys) if not cover: cover = stypes.SPICEDOUBLE_CELL(20000) assert isinstance(cover, stypes.SpiceCell) assert cover.dtype == 1 libspice.ckcov_c(ck, idcode, needav, level, tol, timsys, ctypes.byref(cover)) return cover
[ "def", "ckcov", "(", "ck", ",", "idcode", ",", "needav", ",", "level", ",", "tol", ",", "timsys", ",", "cover", "=", "None", ")", ":", "ck", "=", "stypes", ".", "stringToCharP", "(", "ck", ")", "idcode", "=", "ctypes", ".", "c_int", "(", "idcode", ")", "needav", "=", "ctypes", ".", "c_int", "(", "needav", ")", "level", "=", "stypes", ".", "stringToCharP", "(", "level", ")", "tol", "=", "ctypes", ".", "c_double", "(", "tol", ")", "timsys", "=", "stypes", ".", "stringToCharP", "(", "timsys", ")", "if", "not", "cover", ":", "cover", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "20000", ")", "assert", "isinstance", "(", "cover", ",", "stypes", ".", "SpiceCell", ")", "assert", "cover", ".", "dtype", "==", "1", "libspice", ".", "ckcov_c", "(", "ck", ",", "idcode", ",", "needav", ",", "level", ",", "tol", ",", "timsys", ",", "ctypes", ".", "byref", "(", "cover", ")", ")", "return", "cover" ]
Find the coverage window for a specified object in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckcov_c.html :param ck: Name of CK file. :type ck: str :param idcode: ID code of object. :type idcode: int :param needav: Flag indicating whether angular velocity is needed. :type needav: bool :param level: Coverage level: (SEGMENT OR INTERVAL) :type level: str :param tol: Tolerance in ticks. :type tol: float :param timsys: Time system used to represent coverage. :type timsys: str :param cover: Window giving coverage for idcode. :type cover: Optional SpiceCell :return: coverage window for a specified object in a specified CK file :rtype: spiceypy.utils.support_types.SpiceCell
[ "Find", "the", "coverage", "window", "for", "a", "specified", "object", "in", "a", "specified", "CK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L958-L993
14,623
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cklpf
def cklpf(filename): """ Load a CK pointing file for use by the CK readers. Return that file's handle, to be used by other CK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cklpf_c.html :param filename: Name of the CK file to be loaded. :type filename: str :return: Loaded file's handle. :rtype: int """ filename = stypes.stringToCharP(filename) handle = ctypes.c_int() libspice.cklpf_c(filename, ctypes.byref(handle)) return handle.value
python
def cklpf(filename): """ Load a CK pointing file for use by the CK readers. Return that file's handle, to be used by other CK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cklpf_c.html :param filename: Name of the CK file to be loaded. :type filename: str :return: Loaded file's handle. :rtype: int """ filename = stypes.stringToCharP(filename) handle = ctypes.c_int() libspice.cklpf_c(filename, ctypes.byref(handle)) return handle.value
[ "def", "cklpf", "(", "filename", ")", ":", "filename", "=", "stypes", ".", "stringToCharP", "(", "filename", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "cklpf_c", "(", "filename", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Load a CK pointing file for use by the CK readers. Return that file's handle, to be used by other CK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cklpf_c.html :param filename: Name of the CK file to be loaded. :type filename: str :return: Loaded file's handle. :rtype: int
[ "Load", "a", "CK", "pointing", "file", "for", "use", "by", "the", "CK", "readers", ".", "Return", "that", "file", "s", "handle", "to", "be", "used", "by", "other", "CK", "routines", "to", "refer", "to", "the", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1067-L1083
14,624
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckobj
def ckobj(ck, outCell=None): """ Find the set of ID codes of all objects in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckobj_c.html :param ck: Name of CK file. :type ck: str :param outCell: Optional user provided Spice Int cell. :type outCell: Optional spiceypy.utils.support_types.SpiceCell :return: Set of ID codes of objects in CK file. :rtype: spiceypy.utils.support_types.SpiceCell """ assert isinstance(ck, str) ck = stypes.stringToCharP(ck) if not outCell: outCell = stypes.SPICEINT_CELL(1000) assert isinstance(outCell, stypes.SpiceCell) assert outCell.dtype == 2 libspice.ckobj_c(ck, ctypes.byref(outCell)) return outCell
python
def ckobj(ck, outCell=None): """ Find the set of ID codes of all objects in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckobj_c.html :param ck: Name of CK file. :type ck: str :param outCell: Optional user provided Spice Int cell. :type outCell: Optional spiceypy.utils.support_types.SpiceCell :return: Set of ID codes of objects in CK file. :rtype: spiceypy.utils.support_types.SpiceCell """ assert isinstance(ck, str) ck = stypes.stringToCharP(ck) if not outCell: outCell = stypes.SPICEINT_CELL(1000) assert isinstance(outCell, stypes.SpiceCell) assert outCell.dtype == 2 libspice.ckobj_c(ck, ctypes.byref(outCell)) return outCell
[ "def", "ckobj", "(", "ck", ",", "outCell", "=", "None", ")", ":", "assert", "isinstance", "(", "ck", ",", "str", ")", "ck", "=", "stypes", ".", "stringToCharP", "(", "ck", ")", "if", "not", "outCell", ":", "outCell", "=", "stypes", ".", "SPICEINT_CELL", "(", "1000", ")", "assert", "isinstance", "(", "outCell", ",", "stypes", ".", "SpiceCell", ")", "assert", "outCell", ".", "dtype", "==", "2", "libspice", ".", "ckobj_c", "(", "ck", ",", "ctypes", ".", "byref", "(", "outCell", ")", ")", "return", "outCell" ]
Find the set of ID codes of all objects in a specified CK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckobj_c.html :param ck: Name of CK file. :type ck: str :param outCell: Optional user provided Spice Int cell. :type outCell: Optional spiceypy.utils.support_types.SpiceCell :return: Set of ID codes of objects in CK file. :rtype: spiceypy.utils.support_types.SpiceCell
[ "Find", "the", "set", "of", "ID", "codes", "of", "all", "objects", "in", "a", "specified", "CK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1087-L1107
14,625
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckopn
def ckopn(filename, ifname, ncomch): """ Open a new CK file, returning the handle of the opened file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckopn_c.html :param filename: The name of the CK file to be opened. :type filename: str :param ifname: The internal filename for the CK. :type ifname: str :param ncomch: The number of characters to reserve for comments. :type ncomch: int :return: The handle of the opened CK file. :rtype: int """ filename = stypes.stringToCharP(filename) ifname = stypes.stringToCharP(ifname) ncomch = ctypes.c_int(ncomch) handle = ctypes.c_int() libspice.ckopn_c(filename, ifname, ncomch, ctypes.byref(handle)) return handle.value
python
def ckopn(filename, ifname, ncomch): """ Open a new CK file, returning the handle of the opened file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckopn_c.html :param filename: The name of the CK file to be opened. :type filename: str :param ifname: The internal filename for the CK. :type ifname: str :param ncomch: The number of characters to reserve for comments. :type ncomch: int :return: The handle of the opened CK file. :rtype: int """ filename = stypes.stringToCharP(filename) ifname = stypes.stringToCharP(ifname) ncomch = ctypes.c_int(ncomch) handle = ctypes.c_int() libspice.ckopn_c(filename, ifname, ncomch, ctypes.byref(handle)) return handle.value
[ "def", "ckopn", "(", "filename", ",", "ifname", ",", "ncomch", ")", ":", "filename", "=", "stypes", ".", "stringToCharP", "(", "filename", ")", "ifname", "=", "stypes", ".", "stringToCharP", "(", "ifname", ")", "ncomch", "=", "ctypes", ".", "c_int", "(", "ncomch", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ckopn_c", "(", "filename", ",", "ifname", ",", "ncomch", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Open a new CK file, returning the handle of the opened file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckopn_c.html :param filename: The name of the CK file to be opened. :type filename: str :param ifname: The internal filename for the CK. :type ifname: str :param ncomch: The number of characters to reserve for comments. :type ncomch: int :return: The handle of the opened CK file. :rtype: int
[ "Open", "a", "new", "CK", "file", "returning", "the", "handle", "of", "the", "opened", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1111-L1131
14,626
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckw01
def ckw01(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs): """ Add a type 1 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw01_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param avflag: True if the segment will contain angular velocity. :type avflag: bool :param segid: Segment identifier. :type segid: str :param nrec: Number of pointing records. :type nrec: int :param sclkdp: Encoded SCLK times. :type sclkdp: Array of floats :param quats: Quaternions representing instrument pointing. :type quats: Nx4-Element Array of floats :param avvs: Angular velocity vectors. :type avvs: Nx3-Element Array of floats """ handle = ctypes.c_int(handle) begtim = ctypes.c_double(begtim) endtim = ctypes.c_double(endtim) inst = ctypes.c_int(inst) ref = stypes.stringToCharP(ref) avflag = ctypes.c_int(avflag) segid = stypes.stringToCharP(segid) sclkdp = stypes.toDoubleVector(sclkdp) quats = stypes.toDoubleMatrix(quats) avvs = stypes.toDoubleMatrix(avvs) nrec = ctypes.c_int(nrec) libspice.ckw01_c(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs)
python
def ckw01(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs): """ Add a type 1 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw01_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param avflag: True if the segment will contain angular velocity. :type avflag: bool :param segid: Segment identifier. :type segid: str :param nrec: Number of pointing records. :type nrec: int :param sclkdp: Encoded SCLK times. :type sclkdp: Array of floats :param quats: Quaternions representing instrument pointing. :type quats: Nx4-Element Array of floats :param avvs: Angular velocity vectors. :type avvs: Nx3-Element Array of floats """ handle = ctypes.c_int(handle) begtim = ctypes.c_double(begtim) endtim = ctypes.c_double(endtim) inst = ctypes.c_int(inst) ref = stypes.stringToCharP(ref) avflag = ctypes.c_int(avflag) segid = stypes.stringToCharP(segid) sclkdp = stypes.toDoubleVector(sclkdp) quats = stypes.toDoubleMatrix(quats) avvs = stypes.toDoubleMatrix(avvs) nrec = ctypes.c_int(nrec) libspice.ckw01_c(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs)
[ "def", "ckw01", "(", "handle", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "avflag", ",", "segid", ",", "nrec", ",", "sclkdp", ",", "quats", ",", "avvs", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "begtim", "=", "ctypes", ".", "c_double", "(", "begtim", ")", "endtim", "=", "ctypes", ".", "c_double", "(", "endtim", ")", "inst", "=", "ctypes", ".", "c_int", "(", "inst", ")", "ref", "=", "stypes", ".", "stringToCharP", "(", "ref", ")", "avflag", "=", "ctypes", ".", "c_int", "(", "avflag", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "sclkdp", "=", "stypes", ".", "toDoubleVector", "(", "sclkdp", ")", "quats", "=", "stypes", ".", "toDoubleMatrix", "(", "quats", ")", "avvs", "=", "stypes", ".", "toDoubleMatrix", "(", "avvs", ")", "nrec", "=", "ctypes", ".", "c_int", "(", "nrec", ")", "libspice", ".", "ckw01_c", "(", "handle", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "avflag", ",", "segid", ",", "nrec", ",", "sclkdp", ",", "quats", ",", "avvs", ")" ]
Add a type 1 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw01_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param avflag: True if the segment will contain angular velocity. :type avflag: bool :param segid: Segment identifier. :type segid: str :param nrec: Number of pointing records. :type nrec: int :param sclkdp: Encoded SCLK times. :type sclkdp: Array of floats :param quats: Quaternions representing instrument pointing. :type quats: Nx4-Element Array of floats :param avvs: Angular velocity vectors. :type avvs: Nx3-Element Array of floats
[ "Add", "a", "type", "1", "segment", "to", "a", "C", "-", "kernel", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1150-L1192
14,627
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckw02
def ckw02(handle, begtim, endtim, inst, ref, segid, nrec, start, stop, quats, avvs, rates): """ Write a type 2 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw02_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param segid: Segment identifier. :type segid: str :param nrec: Number of pointing records. :type nrec: int :param start: Encoded SCLK interval start times. :type start: Array of floats :param stop: Encoded SCLK interval stop times. :type stop: Array of floats :param quats: Quaternions representing instrument pointing. :type quats: Nx4-Element Array of floats :param avvs: Angular velocity vectors. :type avvs: Nx3-Element Array of floats :param rates: Number of seconds per tick for each interval. :type rates: Array of floats """ handle = ctypes.c_int(handle) begtim = ctypes.c_double(begtim) endtim = ctypes.c_double(endtim) inst = ctypes.c_int(inst) ref = stypes.stringToCharP(ref) segid = stypes.stringToCharP(segid) start = stypes.toDoubleVector(start) stop = stypes.toDoubleVector(stop) rates = stypes.toDoubleVector(rates) quats = stypes.toDoubleMatrix(quats) avvs = stypes.toDoubleMatrix(avvs) nrec = ctypes.c_int(nrec) libspice.ckw02_c(handle, begtim, endtim, inst, ref, segid, nrec, start, stop, quats, avvs, rates)
python
def ckw02(handle, begtim, endtim, inst, ref, segid, nrec, start, stop, quats, avvs, rates): """ Write a type 2 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw02_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param segid: Segment identifier. :type segid: str :param nrec: Number of pointing records. :type nrec: int :param start: Encoded SCLK interval start times. :type start: Array of floats :param stop: Encoded SCLK interval stop times. :type stop: Array of floats :param quats: Quaternions representing instrument pointing. :type quats: Nx4-Element Array of floats :param avvs: Angular velocity vectors. :type avvs: Nx3-Element Array of floats :param rates: Number of seconds per tick for each interval. :type rates: Array of floats """ handle = ctypes.c_int(handle) begtim = ctypes.c_double(begtim) endtim = ctypes.c_double(endtim) inst = ctypes.c_int(inst) ref = stypes.stringToCharP(ref) segid = stypes.stringToCharP(segid) start = stypes.toDoubleVector(start) stop = stypes.toDoubleVector(stop) rates = stypes.toDoubleVector(rates) quats = stypes.toDoubleMatrix(quats) avvs = stypes.toDoubleMatrix(avvs) nrec = ctypes.c_int(nrec) libspice.ckw02_c(handle, begtim, endtim, inst, ref, segid, nrec, start, stop, quats, avvs, rates)
[ "def", "ckw02", "(", "handle", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "segid", ",", "nrec", ",", "start", ",", "stop", ",", "quats", ",", "avvs", ",", "rates", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "begtim", "=", "ctypes", ".", "c_double", "(", "begtim", ")", "endtim", "=", "ctypes", ".", "c_double", "(", "endtim", ")", "inst", "=", "ctypes", ".", "c_int", "(", "inst", ")", "ref", "=", "stypes", ".", "stringToCharP", "(", "ref", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "start", "=", "stypes", ".", "toDoubleVector", "(", "start", ")", "stop", "=", "stypes", ".", "toDoubleVector", "(", "stop", ")", "rates", "=", "stypes", ".", "toDoubleVector", "(", "rates", ")", "quats", "=", "stypes", ".", "toDoubleMatrix", "(", "quats", ")", "avvs", "=", "stypes", ".", "toDoubleMatrix", "(", "avvs", ")", "nrec", "=", "ctypes", ".", "c_int", "(", "nrec", ")", "libspice", ".", "ckw02_c", "(", "handle", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "segid", ",", "nrec", ",", "start", ",", "stop", ",", "quats", ",", "avvs", ",", "rates", ")" ]
Write a type 2 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw02_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param segid: Segment identifier. :type segid: str :param nrec: Number of pointing records. :type nrec: int :param start: Encoded SCLK interval start times. :type start: Array of floats :param stop: Encoded SCLK interval stop times. :type stop: Array of floats :param quats: Quaternions representing instrument pointing. :type quats: Nx4-Element Array of floats :param avvs: Angular velocity vectors. :type avvs: Nx3-Element Array of floats :param rates: Number of seconds per tick for each interval. :type rates: Array of floats
[ "Write", "a", "type", "2", "segment", "to", "a", "C", "-", "kernel", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1196-L1241
14,628
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckw03
def ckw03(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs, nints, starts): """ Add a type 3 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw03_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param avflag: True if the segment will contain angular velocity. :type avflag: bool :param segid: Segment identifier. :type segid: str :param nrec: Number of pointing records. :type nrec: int :param sclkdp: Encoded SCLK times. :type sclkdp: Array of floats :param quats: Quaternions representing instrument pointing. :type quats: Nx4-Element Array of floats :param avvs: Angular velocity vectors. :type avvs: Nx3-Element Array of floats :param nints: Number of intervals. :type nints: int :param starts: Encoded SCLK interval start times. :type starts: Array of floats """ handle = ctypes.c_int(handle) begtim = ctypes.c_double(begtim) endtim = ctypes.c_double(endtim) inst = ctypes.c_int(inst) ref = stypes.stringToCharP(ref) avflag = ctypes.c_int(avflag) segid = stypes.stringToCharP(segid) sclkdp = stypes.toDoubleVector(sclkdp) quats = stypes.toDoubleMatrix(quats) avvs = stypes.toDoubleMatrix(avvs) nrec = ctypes.c_int(nrec) starts = stypes.toDoubleVector(starts) nints = ctypes.c_int(nints) libspice.ckw03_c(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs, nints, starts)
python
def ckw03(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs, nints, starts): """ Add a type 3 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw03_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param avflag: True if the segment will contain angular velocity. :type avflag: bool :param segid: Segment identifier. :type segid: str :param nrec: Number of pointing records. :type nrec: int :param sclkdp: Encoded SCLK times. :type sclkdp: Array of floats :param quats: Quaternions representing instrument pointing. :type quats: Nx4-Element Array of floats :param avvs: Angular velocity vectors. :type avvs: Nx3-Element Array of floats :param nints: Number of intervals. :type nints: int :param starts: Encoded SCLK interval start times. :type starts: Array of floats """ handle = ctypes.c_int(handle) begtim = ctypes.c_double(begtim) endtim = ctypes.c_double(endtim) inst = ctypes.c_int(inst) ref = stypes.stringToCharP(ref) avflag = ctypes.c_int(avflag) segid = stypes.stringToCharP(segid) sclkdp = stypes.toDoubleVector(sclkdp) quats = stypes.toDoubleMatrix(quats) avvs = stypes.toDoubleMatrix(avvs) nrec = ctypes.c_int(nrec) starts = stypes.toDoubleVector(starts) nints = ctypes.c_int(nints) libspice.ckw03_c(handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs, nints, starts)
[ "def", "ckw03", "(", "handle", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "avflag", ",", "segid", ",", "nrec", ",", "sclkdp", ",", "quats", ",", "avvs", ",", "nints", ",", "starts", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "begtim", "=", "ctypes", ".", "c_double", "(", "begtim", ")", "endtim", "=", "ctypes", ".", "c_double", "(", "endtim", ")", "inst", "=", "ctypes", ".", "c_int", "(", "inst", ")", "ref", "=", "stypes", ".", "stringToCharP", "(", "ref", ")", "avflag", "=", "ctypes", ".", "c_int", "(", "avflag", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "sclkdp", "=", "stypes", ".", "toDoubleVector", "(", "sclkdp", ")", "quats", "=", "stypes", ".", "toDoubleMatrix", "(", "quats", ")", "avvs", "=", "stypes", ".", "toDoubleMatrix", "(", "avvs", ")", "nrec", "=", "ctypes", ".", "c_int", "(", "nrec", ")", "starts", "=", "stypes", ".", "toDoubleVector", "(", "starts", ")", "nints", "=", "ctypes", ".", "c_int", "(", "nints", ")", "libspice", ".", "ckw03_c", "(", "handle", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "avflag", ",", "segid", ",", "nrec", ",", "sclkdp", ",", "quats", ",", "avvs", ",", "nints", ",", "starts", ")" ]
Add a type 3 segment to a C-kernel. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw03_c.html :param handle: Handle of an open CK file. :type handle: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param avflag: True if the segment will contain angular velocity. :type avflag: bool :param segid: Segment identifier. :type segid: str :param nrec: Number of pointing records. :type nrec: int :param sclkdp: Encoded SCLK times. :type sclkdp: Array of floats :param quats: Quaternions representing instrument pointing. :type quats: Nx4-Element Array of floats :param avvs: Angular velocity vectors. :type avvs: Nx3-Element Array of floats :param nints: Number of intervals. :type nints: int :param starts: Encoded SCLK interval start times. :type starts: Array of floats
[ "Add", "a", "type", "3", "segment", "to", "a", "C", "-", "kernel", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1245-L1293
14,629
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ckw05
def ckw05(handle, subtype, degree, begtim, endtim, inst, ref, avflag, segid, sclkdp, packts, rate, nints, starts): """ Write a type 5 segment to a CK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw05_c.html :param handle: Handle of an open CK file. :type handle: int :param subtype: CK type 5 subtype code. Can be: 0, 1, 2, 3 see naif docs via link above. :type subtype: int :param degree: Degree of interpolating polynomials. :type degree: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param avflag: True if the segment will contain angular velocity. :type avflag: bool :param segid: Segment identifier. :type segid: str :param sclkdp: Encoded SCLK times. :type sclkdp: Array of floats :param packts: Array of packets. :type packts: Some NxM vector of floats :param rate: Nominal SCLK rate in seconds per tick. :type rate: float :param nints: Number of intervals. :type nints: int :param starts: Encoded SCLK interval start times. :type starts: Array of floats """ handle = ctypes.c_int(handle) subtype = ctypes.c_int(subtype) degree = ctypes.c_int(degree) begtim = ctypes.c_double(begtim) endtim = ctypes.c_double(endtim) inst = ctypes.c_int(inst) ref = stypes.stringToCharP(ref) avflag = ctypes.c_int(avflag) segid = stypes.stringToCharP(segid) n = ctypes.c_int(len(packts)) sclkdp = stypes.toDoubleVector(sclkdp) packts = stypes.toDoubleMatrix(packts) rate = ctypes.c_double(rate) nints = ctypes.c_int(nints) starts = stypes.toDoubleVector(starts) libspice.ckw05_c(handle, subtype, degree, begtim, endtim, inst, ref, avflag, segid, n, sclkdp, packts, rate, nints, starts)
python
def ckw05(handle, subtype, degree, begtim, endtim, inst, ref, avflag, segid, sclkdp, packts, rate, nints, starts): """ Write a type 5 segment to a CK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw05_c.html :param handle: Handle of an open CK file. :type handle: int :param subtype: CK type 5 subtype code. Can be: 0, 1, 2, 3 see naif docs via link above. :type subtype: int :param degree: Degree of interpolating polynomials. :type degree: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param avflag: True if the segment will contain angular velocity. :type avflag: bool :param segid: Segment identifier. :type segid: str :param sclkdp: Encoded SCLK times. :type sclkdp: Array of floats :param packts: Array of packets. :type packts: Some NxM vector of floats :param rate: Nominal SCLK rate in seconds per tick. :type rate: float :param nints: Number of intervals. :type nints: int :param starts: Encoded SCLK interval start times. :type starts: Array of floats """ handle = ctypes.c_int(handle) subtype = ctypes.c_int(subtype) degree = ctypes.c_int(degree) begtim = ctypes.c_double(begtim) endtim = ctypes.c_double(endtim) inst = ctypes.c_int(inst) ref = stypes.stringToCharP(ref) avflag = ctypes.c_int(avflag) segid = stypes.stringToCharP(segid) n = ctypes.c_int(len(packts)) sclkdp = stypes.toDoubleVector(sclkdp) packts = stypes.toDoubleMatrix(packts) rate = ctypes.c_double(rate) nints = ctypes.c_int(nints) starts = stypes.toDoubleVector(starts) libspice.ckw05_c(handle, subtype, degree, begtim, endtim, inst, ref, avflag, segid, n, sclkdp, packts, rate, nints, starts)
[ "def", "ckw05", "(", "handle", ",", "subtype", ",", "degree", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "avflag", ",", "segid", ",", "sclkdp", ",", "packts", ",", "rate", ",", "nints", ",", "starts", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "subtype", "=", "ctypes", ".", "c_int", "(", "subtype", ")", "degree", "=", "ctypes", ".", "c_int", "(", "degree", ")", "begtim", "=", "ctypes", ".", "c_double", "(", "begtim", ")", "endtim", "=", "ctypes", ".", "c_double", "(", "endtim", ")", "inst", "=", "ctypes", ".", "c_int", "(", "inst", ")", "ref", "=", "stypes", ".", "stringToCharP", "(", "ref", ")", "avflag", "=", "ctypes", ".", "c_int", "(", "avflag", ")", "segid", "=", "stypes", ".", "stringToCharP", "(", "segid", ")", "n", "=", "ctypes", ".", "c_int", "(", "len", "(", "packts", ")", ")", "sclkdp", "=", "stypes", ".", "toDoubleVector", "(", "sclkdp", ")", "packts", "=", "stypes", ".", "toDoubleMatrix", "(", "packts", ")", "rate", "=", "ctypes", ".", "c_double", "(", "rate", ")", "nints", "=", "ctypes", ".", "c_int", "(", "nints", ")", "starts", "=", "stypes", ".", "toDoubleVector", "(", "starts", ")", "libspice", ".", "ckw05_c", "(", "handle", ",", "subtype", ",", "degree", ",", "begtim", ",", "endtim", ",", "inst", ",", "ref", ",", "avflag", ",", "segid", ",", "n", ",", "sclkdp", ",", "packts", ",", "rate", ",", "nints", ",", "starts", ")" ]
Write a type 5 segment to a CK file. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ckw05_c.html :param handle: Handle of an open CK file. :type handle: int :param subtype: CK type 5 subtype code. Can be: 0, 1, 2, 3 see naif docs via link above. :type subtype: int :param degree: Degree of interpolating polynomials. :type degree: int :param begtim: The beginning encoded SCLK of the segment. :type begtim: float :param endtim: The ending encoded SCLK of the segment. :type endtim: float :param inst: The NAIF instrument ID code. :type inst: int :param ref: The reference frame of the segment. :type ref: str :param avflag: True if the segment will contain angular velocity. :type avflag: bool :param segid: Segment identifier. :type segid: str :param sclkdp: Encoded SCLK times. :type sclkdp: Array of floats :param packts: Array of packets. :type packts: Some NxM vector of floats :param rate: Nominal SCLK rate in seconds per tick. :type rate: float :param nints: Number of intervals. :type nints: int :param starts: Encoded SCLK interval start times. :type starts: Array of floats
[ "Write", "a", "type", "5", "segment", "to", "a", "CK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1297-L1349
14,630
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cltext
def cltext(fname): """ Internal undocumented command for closing a text file opened by RDTEXT. No URL available; relevant lines from SPICE source: FORTRAN SPICE, rdtext.f:: C$Procedure CLTEXT ( Close a text file opened by RDTEXT) ENTRY CLTEXT ( FILE ) CHARACTER*(*) FILE C VARIABLE I/O DESCRIPTION C -------- --- -------------------------------------------------- C FILE I Text file to be closed. CSPICE, rdtext.c:: /* $Procedure CLTEXT ( Close a text file opened by RDTEXT) */ /* Subroutine */ int cltext_(char *file, ftnlen file_len) :param fname: Text file to be closed. :type fname: str """ fnameP = stypes.stringToCharP(fname) fname_len = ctypes.c_int(len(fname)) libspice.cltext_(fnameP, fname_len)
python
def cltext(fname): """ Internal undocumented command for closing a text file opened by RDTEXT. No URL available; relevant lines from SPICE source: FORTRAN SPICE, rdtext.f:: C$Procedure CLTEXT ( Close a text file opened by RDTEXT) ENTRY CLTEXT ( FILE ) CHARACTER*(*) FILE C VARIABLE I/O DESCRIPTION C -------- --- -------------------------------------------------- C FILE I Text file to be closed. CSPICE, rdtext.c:: /* $Procedure CLTEXT ( Close a text file opened by RDTEXT) */ /* Subroutine */ int cltext_(char *file, ftnlen file_len) :param fname: Text file to be closed. :type fname: str """ fnameP = stypes.stringToCharP(fname) fname_len = ctypes.c_int(len(fname)) libspice.cltext_(fnameP, fname_len)
[ "def", "cltext", "(", "fname", ")", ":", "fnameP", "=", "stypes", ".", "stringToCharP", "(", "fname", ")", "fname_len", "=", "ctypes", ".", "c_int", "(", "len", "(", "fname", ")", ")", "libspice", ".", "cltext_", "(", "fnameP", ",", "fname_len", ")" ]
Internal undocumented command for closing a text file opened by RDTEXT. No URL available; relevant lines from SPICE source: FORTRAN SPICE, rdtext.f:: C$Procedure CLTEXT ( Close a text file opened by RDTEXT) ENTRY CLTEXT ( FILE ) CHARACTER*(*) FILE C VARIABLE I/O DESCRIPTION C -------- --- -------------------------------------------------- C FILE I Text file to be closed. CSPICE, rdtext.c:: /* $Procedure CLTEXT ( Close a text file opened by RDTEXT) */ /* Subroutine */ int cltext_(char *file, ftnlen file_len) :param fname: Text file to be closed. :type fname: str
[ "Internal", "undocumented", "command", "for", "closing", "a", "text", "file", "opened", "by", "RDTEXT", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1381-L1407
14,631
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cmprss
def cmprss(delim, n, instr, lenout=_default_len_out): """ Compress a character string by removing occurrences of more than N consecutive occurrences of a specified character. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cmprss_c.html :param delim: Delimiter to be compressed. :type delim: str :param n: Maximum consecutive occurrences of delim. :type n: int :param instr: Input string. :type instr: str :param lenout: Optional available space in output string. :type lenout: Optional int :return: Compressed string. :rtype: str """ delim = ctypes.c_char(delim.encode(encoding='UTF-8')) n = ctypes.c_int(n) instr = stypes.stringToCharP(instr) output = stypes.stringToCharP(lenout) libspice.cmprss_c(delim, n, instr, lenout, output) return stypes.toPythonString(output)
python
def cmprss(delim, n, instr, lenout=_default_len_out): """ Compress a character string by removing occurrences of more than N consecutive occurrences of a specified character. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cmprss_c.html :param delim: Delimiter to be compressed. :type delim: str :param n: Maximum consecutive occurrences of delim. :type n: int :param instr: Input string. :type instr: str :param lenout: Optional available space in output string. :type lenout: Optional int :return: Compressed string. :rtype: str """ delim = ctypes.c_char(delim.encode(encoding='UTF-8')) n = ctypes.c_int(n) instr = stypes.stringToCharP(instr) output = stypes.stringToCharP(lenout) libspice.cmprss_c(delim, n, instr, lenout, output) return stypes.toPythonString(output)
[ "def", "cmprss", "(", "delim", ",", "n", ",", "instr", ",", "lenout", "=", "_default_len_out", ")", ":", "delim", "=", "ctypes", ".", "c_char", "(", "delim", ".", "encode", "(", "encoding", "=", "'UTF-8'", ")", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "instr", "=", "stypes", ".", "stringToCharP", "(", "instr", ")", "output", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "libspice", ".", "cmprss_c", "(", "delim", ",", "n", ",", "instr", ",", "lenout", ",", "output", ")", "return", "stypes", ".", "toPythonString", "(", "output", ")" ]
Compress a character string by removing occurrences of more than N consecutive occurrences of a specified character. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cmprss_c.html :param delim: Delimiter to be compressed. :type delim: str :param n: Maximum consecutive occurrences of delim. :type n: int :param instr: Input string. :type instr: str :param lenout: Optional available space in output string. :type lenout: Optional int :return: Compressed string. :rtype: str
[ "Compress", "a", "character", "string", "by", "removing", "occurrences", "of", "more", "than", "N", "consecutive", "occurrences", "of", "a", "specified", "character", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1411-L1435
14,632
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cnmfrm
def cnmfrm(cname, lenout=_default_len_out): """ Retrieve frame ID code and name to associate with an object. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cnmfrm_c.html :param cname: Name of the object to find a frame for. :type cname: int :param lenout: Maximum length available for frame name. :type lenout: int :return: The ID code of the frame associated with cname, The name of the frame with ID frcode. :rtype: tuple """ lenout = ctypes.c_int(lenout) frname = stypes.stringToCharP(lenout) cname = stypes.stringToCharP(cname) found = ctypes.c_int() frcode = ctypes.c_int() libspice.cnmfrm_c(cname, lenout, ctypes.byref(frcode), frname, ctypes.byref(found)) return frcode.value, stypes.toPythonString(frname), bool(found.value)
python
def cnmfrm(cname, lenout=_default_len_out): """ Retrieve frame ID code and name to associate with an object. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cnmfrm_c.html :param cname: Name of the object to find a frame for. :type cname: int :param lenout: Maximum length available for frame name. :type lenout: int :return: The ID code of the frame associated with cname, The name of the frame with ID frcode. :rtype: tuple """ lenout = ctypes.c_int(lenout) frname = stypes.stringToCharP(lenout) cname = stypes.stringToCharP(cname) found = ctypes.c_int() frcode = ctypes.c_int() libspice.cnmfrm_c(cname, lenout, ctypes.byref(frcode), frname, ctypes.byref(found)) return frcode.value, stypes.toPythonString(frname), bool(found.value)
[ "def", "cnmfrm", "(", "cname", ",", "lenout", "=", "_default_len_out", ")", ":", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "frname", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "cname", "=", "stypes", ".", "stringToCharP", "(", "cname", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "frcode", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "cnmfrm_c", "(", "cname", ",", "lenout", ",", "ctypes", ".", "byref", "(", "frcode", ")", ",", "frname", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "frcode", ".", "value", ",", "stypes", ".", "toPythonString", "(", "frname", ")", ",", "bool", "(", "found", ".", "value", ")" ]
Retrieve frame ID code and name to associate with an object. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cnmfrm_c.html :param cname: Name of the object to find a frame for. :type cname: int :param lenout: Maximum length available for frame name. :type lenout: int :return: The ID code of the frame associated with cname, The name of the frame with ID frcode. :rtype: tuple
[ "Retrieve", "frame", "ID", "code", "and", "name", "to", "associate", "with", "an", "object", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1440-L1462
14,633
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
convrt
def convrt(x, inunit, outunit): """ Take a measurement X, the units associated with X, and units to which X should be converted; return Y the value of the measurement in the output units. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/convrt_c.html :param x: Number representing a measurement in some units. :type x: float :param inunit: The units in which x is measured. :type inunit: str :param outunit: Desired units for the measurement. :type outunit: str :return: The measurment in the desired units. :rtype: float """ inunit = stypes.stringToCharP(inunit) outunit = stypes.stringToCharP(outunit) y = ctypes.c_double() if hasattr(x, "__iter__"): outArray=[] for n in x: libspice.convrt_c(n,inunit,outunit,ctypes.byref(y)) outArray.append(y.value) return outArray x = ctypes.c_double(x) libspice.convrt_c(x, inunit, outunit, ctypes.byref(y)) return y.value
python
def convrt(x, inunit, outunit): """ Take a measurement X, the units associated with X, and units to which X should be converted; return Y the value of the measurement in the output units. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/convrt_c.html :param x: Number representing a measurement in some units. :type x: float :param inunit: The units in which x is measured. :type inunit: str :param outunit: Desired units for the measurement. :type outunit: str :return: The measurment in the desired units. :rtype: float """ inunit = stypes.stringToCharP(inunit) outunit = stypes.stringToCharP(outunit) y = ctypes.c_double() if hasattr(x, "__iter__"): outArray=[] for n in x: libspice.convrt_c(n,inunit,outunit,ctypes.byref(y)) outArray.append(y.value) return outArray x = ctypes.c_double(x) libspice.convrt_c(x, inunit, outunit, ctypes.byref(y)) return y.value
[ "def", "convrt", "(", "x", ",", "inunit", ",", "outunit", ")", ":", "inunit", "=", "stypes", ".", "stringToCharP", "(", "inunit", ")", "outunit", "=", "stypes", ".", "stringToCharP", "(", "outunit", ")", "y", "=", "ctypes", ".", "c_double", "(", ")", "if", "hasattr", "(", "x", ",", "\"__iter__\"", ")", ":", "outArray", "=", "[", "]", "for", "n", "in", "x", ":", "libspice", ".", "convrt_c", "(", "n", ",", "inunit", ",", "outunit", ",", "ctypes", ".", "byref", "(", "y", ")", ")", "outArray", ".", "append", "(", "y", ".", "value", ")", "return", "outArray", "x", "=", "ctypes", ".", "c_double", "(", "x", ")", "libspice", ".", "convrt_c", "(", "x", ",", "inunit", ",", "outunit", ",", "ctypes", ".", "byref", "(", "y", ")", ")", "return", "y", ".", "value" ]
Take a measurement X, the units associated with X, and units to which X should be converted; return Y the value of the measurement in the output units. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/convrt_c.html :param x: Number representing a measurement in some units. :type x: float :param inunit: The units in which x is measured. :type inunit: str :param outunit: Desired units for the measurement. :type outunit: str :return: The measurment in the desired units. :rtype: float
[ "Take", "a", "measurement", "X", "the", "units", "associated", "with", "X", "and", "units", "to", "which", "X", "should", "be", "converted", ";", "return", "Y", "the", "value", "of", "the", "measurement", "in", "the", "output", "units", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1489-L1519
14,634
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
copy
def copy(cell): """ Copy the contents of a SpiceCell of any data type to another cell of the same type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/copy_c.html :param cell: Cell to be copied. :type cell: spiceypy.utils.support_types.SpiceCell :return: New cell :rtype: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cell, stypes.SpiceCell) # Next line was redundant with [raise NotImpImplementedError] below # assert cell.dtype == 0 or cell.dtype == 1 or cell.dtype == 2 if cell.dtype is 0: newcopy = stypes.SPICECHAR_CELL(cell.size, cell.length) elif cell.dtype is 1: newcopy = stypes.SPICEDOUBLE_CELL(cell.size) elif cell.dtype is 2: newcopy = stypes.SPICEINT_CELL(cell.size) else: raise NotImplementedError libspice.copy_c(ctypes.byref(cell), ctypes.byref(newcopy)) return newcopy
python
def copy(cell): """ Copy the contents of a SpiceCell of any data type to another cell of the same type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/copy_c.html :param cell: Cell to be copied. :type cell: spiceypy.utils.support_types.SpiceCell :return: New cell :rtype: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cell, stypes.SpiceCell) # Next line was redundant with [raise NotImpImplementedError] below # assert cell.dtype == 0 or cell.dtype == 1 or cell.dtype == 2 if cell.dtype is 0: newcopy = stypes.SPICECHAR_CELL(cell.size, cell.length) elif cell.dtype is 1: newcopy = stypes.SPICEDOUBLE_CELL(cell.size) elif cell.dtype is 2: newcopy = stypes.SPICEINT_CELL(cell.size) else: raise NotImplementedError libspice.copy_c(ctypes.byref(cell), ctypes.byref(newcopy)) return newcopy
[ "def", "copy", "(", "cell", ")", ":", "assert", "isinstance", "(", "cell", ",", "stypes", ".", "SpiceCell", ")", "# Next line was redundant with [raise NotImpImplementedError] below", "# assert cell.dtype == 0 or cell.dtype == 1 or cell.dtype == 2", "if", "cell", ".", "dtype", "is", "0", ":", "newcopy", "=", "stypes", ".", "SPICECHAR_CELL", "(", "cell", ".", "size", ",", "cell", ".", "length", ")", "elif", "cell", ".", "dtype", "is", "1", ":", "newcopy", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "cell", ".", "size", ")", "elif", "cell", ".", "dtype", "is", "2", ":", "newcopy", "=", "stypes", ".", "SPICEINT_CELL", "(", "cell", ".", "size", ")", "else", ":", "raise", "NotImplementedError", "libspice", ".", "copy_c", "(", "ctypes", ".", "byref", "(", "cell", ")", ",", "ctypes", ".", "byref", "(", "newcopy", ")", ")", "return", "newcopy" ]
Copy the contents of a SpiceCell of any data type to another cell of the same type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/copy_c.html :param cell: Cell to be copied. :type cell: spiceypy.utils.support_types.SpiceCell :return: New cell :rtype: spiceypy.utils.support_types.SpiceCell
[ "Copy", "the", "contents", "of", "a", "SpiceCell", "of", "any", "data", "type", "to", "another", "cell", "of", "the", "same", "type", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1523-L1547
14,635
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cpos
def cpos(string, chars, start): """ Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching forward. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cpos_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one of chars. :type start: int :return: The index of the first character of str at or following index start that is in the collection chars. :rtype: int """ string = stypes.stringToCharP(string) chars = stypes.stringToCharP(chars) start = ctypes.c_int(start) return libspice.cpos_c(string, chars, start)
python
def cpos(string, chars, start): """ Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching forward. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cpos_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one of chars. :type start: int :return: The index of the first character of str at or following index start that is in the collection chars. :rtype: int """ string = stypes.stringToCharP(string) chars = stypes.stringToCharP(chars) start = ctypes.c_int(start) return libspice.cpos_c(string, chars, start)
[ "def", "cpos", "(", "string", ",", "chars", ",", "start", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "chars", "=", "stypes", ".", "stringToCharP", "(", "chars", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "return", "libspice", ".", "cpos_c", "(", "string", ",", "chars", ",", "start", ")" ]
Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching forward. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cpos_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one of chars. :type start: int :return: The index of the first character of str at or following index start that is in the collection chars. :rtype: int
[ "Find", "the", "first", "occurrence", "in", "a", "string", "of", "a", "character", "belonging", "to", "a", "collection", "of", "characters", "starting", "at", "a", "specified", "location", "searching", "forward", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1551-L1573
14,636
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cposr
def cposr(string, chars, start): """ Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching in reverse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cposr_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one of chars. :type start: int :return: The index of the last character of str at or before index start that is in the collection chars. :rtype: int """ string = stypes.stringToCharP(string) chars = stypes.stringToCharP(chars) start = ctypes.c_int(start) return libspice.cposr_c(string, chars, start)
python
def cposr(string, chars, start): """ Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching in reverse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cposr_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one of chars. :type start: int :return: The index of the last character of str at or before index start that is in the collection chars. :rtype: int """ string = stypes.stringToCharP(string) chars = stypes.stringToCharP(chars) start = ctypes.c_int(start) return libspice.cposr_c(string, chars, start)
[ "def", "cposr", "(", "string", ",", "chars", ",", "start", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "chars", "=", "stypes", ".", "stringToCharP", "(", "chars", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "return", "libspice", ".", "cposr_c", "(", "string", ",", "chars", ",", "start", ")" ]
Find the first occurrence in a string of a character belonging to a collection of characters, starting at a specified location, searching in reverse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cposr_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one of chars. :type start: int :return: The index of the last character of str at or before index start that is in the collection chars. :rtype: int
[ "Find", "the", "first", "occurrence", "in", "a", "string", "of", "a", "character", "belonging", "to", "a", "collection", "of", "characters", "starting", "at", "a", "specified", "location", "searching", "in", "reverse", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1577-L1599
14,637
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cvpool
def cvpool(agent): """ Indicate whether or not any watched kernel variables that have a specified agent on their notification list have been updated. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cvpool_c.html :param agent: Name of the agent to check for notices. :type agent: str :return: True if variables for "agent" have been updated. :rtype: bool """ agent = stypes.stringToCharP(agent) update = ctypes.c_int() libspice.cvpool_c(agent, ctypes.byref(update)) return bool(update.value)
python
def cvpool(agent): """ Indicate whether or not any watched kernel variables that have a specified agent on their notification list have been updated. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cvpool_c.html :param agent: Name of the agent to check for notices. :type agent: str :return: True if variables for "agent" have been updated. :rtype: bool """ agent = stypes.stringToCharP(agent) update = ctypes.c_int() libspice.cvpool_c(agent, ctypes.byref(update)) return bool(update.value)
[ "def", "cvpool", "(", "agent", ")", ":", "agent", "=", "stypes", ".", "stringToCharP", "(", "agent", ")", "update", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "cvpool_c", "(", "agent", ",", "ctypes", ".", "byref", "(", "update", ")", ")", "return", "bool", "(", "update", ".", "value", ")" ]
Indicate whether or not any watched kernel variables that have a specified agent on their notification list have been updated. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cvpool_c.html :param agent: Name of the agent to check for notices. :type agent: str :return: True if variables for "agent" have been updated. :rtype: bool
[ "Indicate", "whether", "or", "not", "any", "watched", "kernel", "variables", "that", "have", "a", "specified", "agent", "on", "their", "notification", "list", "have", "been", "updated", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1603-L1618
14,638
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cyllat
def cyllat(r, lonc, z): """ Convert from cylindrical to latitudinal coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cyllat_c.html :param r: Distance of point from z axis. :type r: float :param lonc: Cylindrical angle of point from XZ plane(radians). :type lonc: float :param z: Height of point above XY plane. :type z: float :return: Distance, Longitude (radians), and Latitude of point (radians). :rtype: tuple """ r = ctypes.c_double(r) lonc = ctypes.c_double(lonc) z = ctypes.c_double(z) radius = ctypes.c_double() lon = ctypes.c_double() lat = ctypes.c_double() libspice.cyllat_c(r, lonc, z, ctypes.byref(radius), ctypes.byref(lon), ctypes.byref(lat)) return radius.value, lon.value, lat.value
python
def cyllat(r, lonc, z): """ Convert from cylindrical to latitudinal coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cyllat_c.html :param r: Distance of point from z axis. :type r: float :param lonc: Cylindrical angle of point from XZ plane(radians). :type lonc: float :param z: Height of point above XY plane. :type z: float :return: Distance, Longitude (radians), and Latitude of point (radians). :rtype: tuple """ r = ctypes.c_double(r) lonc = ctypes.c_double(lonc) z = ctypes.c_double(z) radius = ctypes.c_double() lon = ctypes.c_double() lat = ctypes.c_double() libspice.cyllat_c(r, lonc, z, ctypes.byref(radius), ctypes.byref(lon), ctypes.byref(lat)) return radius.value, lon.value, lat.value
[ "def", "cyllat", "(", "r", ",", "lonc", ",", "z", ")", ":", "r", "=", "ctypes", ".", "c_double", "(", "r", ")", "lonc", "=", "ctypes", ".", "c_double", "(", "lonc", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "radius", "=", "ctypes", ".", "c_double", "(", ")", "lon", "=", "ctypes", ".", "c_double", "(", ")", "lat", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "cyllat_c", "(", "r", ",", "lonc", ",", "z", ",", "ctypes", ".", "byref", "(", "radius", ")", ",", "ctypes", ".", "byref", "(", "lon", ")", ",", "ctypes", ".", "byref", "(", "lat", ")", ")", "return", "radius", ".", "value", ",", "lon", ".", "value", ",", "lat", ".", "value" ]
Convert from cylindrical to latitudinal coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cyllat_c.html :param r: Distance of point from z axis. :type r: float :param lonc: Cylindrical angle of point from XZ plane(radians). :type lonc: float :param z: Height of point above XY plane. :type z: float :return: Distance, Longitude (radians), and Latitude of point (radians). :rtype: tuple
[ "Convert", "from", "cylindrical", "to", "latitudinal", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1622-L1645
14,639
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cylrec
def cylrec(r, lon, z): """ Convert from cylindrical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylrec_c.html :param r: Distance of a point from z axis. :type r: float :param lon: Angle (radians) of a point from xZ plane. :type lon: float :param z: Height of a point above xY plane. :type z: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats """ r = ctypes.c_double(r) lon = ctypes.c_double(lon) z = ctypes.c_double(z) rectan = stypes.emptyDoubleVector(3) libspice.cylrec_c(r, lon, z, rectan) return stypes.cVectorToPython(rectan)
python
def cylrec(r, lon, z): """ Convert from cylindrical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylrec_c.html :param r: Distance of a point from z axis. :type r: float :param lon: Angle (radians) of a point from xZ plane. :type lon: float :param z: Height of a point above xY plane. :type z: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats """ r = ctypes.c_double(r) lon = ctypes.c_double(lon) z = ctypes.c_double(z) rectan = stypes.emptyDoubleVector(3) libspice.cylrec_c(r, lon, z, rectan) return stypes.cVectorToPython(rectan)
[ "def", "cylrec", "(", "r", ",", "lon", ",", "z", ")", ":", "r", "=", "ctypes", ".", "c_double", "(", "r", ")", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "rectan", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "cylrec_c", "(", "r", ",", "lon", ",", "z", ",", "rectan", ")", "return", "stypes", ".", "cVectorToPython", "(", "rectan", ")" ]
Convert from cylindrical to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylrec_c.html :param r: Distance of a point from z axis. :type r: float :param lon: Angle (radians) of a point from xZ plane. :type lon: float :param z: Height of a point above xY plane. :type z: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats
[ "Convert", "from", "cylindrical", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1649-L1669
14,640
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
cylsph
def cylsph(r, lonc, z): """ Convert from cylindrical to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylsph_c.html :param r: Rectangular coordinates of the point. :type r: float :param lonc: Angle (radians) of point from XZ plane. :type lonc: float :param z: Height of point above XY plane. :type z: float :return: Distance of point from origin, Polar angle (co-latitude in radians) of point, Azimuthal angle (longitude) of point (radians). :rtype: tuple """ r = ctypes.c_double(r) lonc = ctypes.c_double(lonc) z = ctypes.c_double(z) radius = ctypes.c_double() colat = ctypes.c_double() lon = ctypes.c_double() libspice.cyllat_c(r, lonc, z, ctypes.byref(radius), ctypes.byref(colat), ctypes.byref(lon)) return radius.value, colat.value, lon.value
python
def cylsph(r, lonc, z): """ Convert from cylindrical to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylsph_c.html :param r: Rectangular coordinates of the point. :type r: float :param lonc: Angle (radians) of point from XZ plane. :type lonc: float :param z: Height of point above XY plane. :type z: float :return: Distance of point from origin, Polar angle (co-latitude in radians) of point, Azimuthal angle (longitude) of point (radians). :rtype: tuple """ r = ctypes.c_double(r) lonc = ctypes.c_double(lonc) z = ctypes.c_double(z) radius = ctypes.c_double() colat = ctypes.c_double() lon = ctypes.c_double() libspice.cyllat_c(r, lonc, z, ctypes.byref(radius), ctypes.byref(colat), ctypes.byref(lon)) return radius.value, colat.value, lon.value
[ "def", "cylsph", "(", "r", ",", "lonc", ",", "z", ")", ":", "r", "=", "ctypes", ".", "c_double", "(", "r", ")", "lonc", "=", "ctypes", ".", "c_double", "(", "lonc", ")", "z", "=", "ctypes", ".", "c_double", "(", "z", ")", "radius", "=", "ctypes", ".", "c_double", "(", ")", "colat", "=", "ctypes", ".", "c_double", "(", ")", "lon", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "cyllat_c", "(", "r", ",", "lonc", ",", "z", ",", "ctypes", ".", "byref", "(", "radius", ")", ",", "ctypes", ".", "byref", "(", "colat", ")", ",", "ctypes", ".", "byref", "(", "lon", ")", ")", "return", "radius", ".", "value", ",", "colat", ".", "value", ",", "lon", ".", "value" ]
Convert from cylindrical to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylsph_c.html :param r: Rectangular coordinates of the point. :type r: float :param lonc: Angle (radians) of point from XZ plane. :type lonc: float :param z: Height of point above XY plane. :type z: float :return: Distance of point from origin, Polar angle (co-latitude in radians) of point, Azimuthal angle (longitude) of point (radians). :rtype: tuple
[ "Convert", "from", "cylindrical", "to", "spherical", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L1673-L1699
14,641
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
dafac
def dafac(handle, buffer): """ Add comments from a buffer of character strings to the comment area of a binary DAF 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/dafac_c.html :param handle: handle of a DAF opened with write access. :type handle: int :param buffer: Buffer of comments to put into the comment area. :type buffer: list[str] """ handle = ctypes.c_int(handle) lenvals = ctypes.c_int(len(max(buffer, key=len)) + 1) n = ctypes.c_int(len(buffer)) buffer = stypes.listToCharArrayPtr(buffer) libspice.dafac_c(handle, n, lenvals, buffer)
python
def dafac(handle, buffer): """ Add comments from a buffer of character strings to the comment area of a binary DAF 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/dafac_c.html :param handle: handle of a DAF opened with write access. :type handle: int :param buffer: Buffer of comments to put into the comment area. :type buffer: list[str] """ handle = ctypes.c_int(handle) lenvals = ctypes.c_int(len(max(buffer, key=len)) + 1) n = ctypes.c_int(len(buffer)) buffer = stypes.listToCharArrayPtr(buffer) libspice.dafac_c(handle, n, lenvals, buffer)
[ "def", "dafac", "(", "handle", ",", "buffer", ")", ":", "handle", "=", "ctypes", ".", "c_int", "(", "handle", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "len", "(", "max", "(", "buffer", ",", "key", "=", "len", ")", ")", "+", "1", ")", "n", "=", "ctypes", ".", "c_int", "(", "len", "(", "buffer", ")", ")", "buffer", "=", "stypes", ".", "listToCharArrayPtr", "(", "buffer", ")", "libspice", ".", "dafac_c", "(", "handle", ",", "n", ",", "lenvals", ",", "buffer", ")" ]
Add comments from a buffer of character strings to the comment area of a binary DAF 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/dafac_c.html :param handle: handle of a DAF opened with write access. :type handle: int :param buffer: Buffer of comments to put into the comment area. :type buffer: list[str]
[ "Add", "comments", "from", "a", "buffer", "of", "character", "strings", "to", "the", "comment", "area", "of", "a", "binary", "DAF", "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#L1706-L1723
14,642
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
14,643
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
14,644
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
14,645
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
14,646
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
14,647
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
14,648
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
14,649
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
14,650
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
14,651
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
14,652
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
14,653
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
14,654
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
14,655
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
14,656
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
14,657
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
14,658
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
14,659
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
14,660
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
14,661
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
14,662
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
14,663
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
14,664
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
14,665
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
14,666
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
14,667
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
14,668
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
14,669
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
14,670
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
14,671
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
14,672
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
14,673
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
14,674
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
14,675
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
14,676
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
14,677
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
14,678
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
14,679
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
14,680
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
14,681
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
14,682
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
14,683
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
14,684
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
14,685
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
14,686
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
14,687
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
14,688
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
14,689
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
14,690
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
14,691
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
14,692
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
14,693
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
14,694
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
14,695
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
14,696
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
14,697
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
14,698
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
14,699
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