repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
sequence
docstring
stringlengths
3
17.3k
docstring_tokens
sequence
sha
stringlengths
40
40
url
stringlengths
87
242
partition
stringclasses
1 value
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
getfat
def getfat(file): """ Determine the file architecture and file type of most SPICE kernel files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getfat_c.html :param file: The name of a file to be examined. :type file: str :return: The architecture of the kernel file, The type of the kernel file. :rtype: tuple """ file = stypes.stringToCharP(file) arclen = ctypes.c_int(4) typlen = ctypes.c_int(4) arch = stypes.stringToCharP(arclen) rettype = stypes.stringToCharP(typlen) libspice.getfat_c(file, arclen, typlen, arch, rettype) return stypes.toPythonString(arch), stypes.toPythonString(rettype)
python
def getfat(file): """ Determine the file architecture and file type of most SPICE kernel files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getfat_c.html :param file: The name of a file to be examined. :type file: str :return: The architecture of the kernel file, The type of the kernel file. :rtype: tuple """ file = stypes.stringToCharP(file) arclen = ctypes.c_int(4) typlen = ctypes.c_int(4) arch = stypes.stringToCharP(arclen) rettype = stypes.stringToCharP(typlen) libspice.getfat_c(file, arclen, typlen, arch, rettype) return stypes.toPythonString(arch), stypes.toPythonString(rettype)
[ "def", "getfat", "(", "file", ")", ":", "file", "=", "stypes", ".", "stringToCharP", "(", "file", ")", "arclen", "=", "ctypes", ".", "c_int", "(", "4", ")", "typlen", "=", "ctypes", ".", "c_int", "(", "4", ")", "arch", "=", "stypes", ".", "stringToCharP", "(", "arclen", ")", "rettype", "=", "stypes", ".", "stringToCharP", "(", "typlen", ")", "libspice", ".", "getfat_c", "(", "file", ",", "arclen", ",", "typlen", ",", "arch", ",", "rettype", ")", "return", "stypes", ".", "toPythonString", "(", "arch", ")", ",", "stypes", ".", "toPythonString", "(", "rettype", ")" ]
Determine the file architecture and file type of most SPICE kernel files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getfat_c.html :param file: The name of a file to be examined. :type file: str :return: The architecture of the kernel file, The type of the kernel file. :rtype: tuple
[ "Determine", "the", "file", "architecture", "and", "file", "type", "of", "most", "SPICE", "kernel", "files", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5513-L5530
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
getmsg
def getmsg(option, lenout=_default_len_out): """ Retrieve the current short error message, the explanation of the short error message, or the long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getmsg_c.html :param option: Indicates type of error message. :type option: str :param lenout: Available space in the output string msg. :type lenout: int :return: The error message to be retrieved. :rtype: str """ option = stypes.stringToCharP(option) lenout = ctypes.c_int(lenout) msg = stypes.stringToCharP(lenout) libspice.getmsg_c(option, lenout, msg) return stypes.toPythonString(msg)
python
def getmsg(option, lenout=_default_len_out): """ Retrieve the current short error message, the explanation of the short error message, or the long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getmsg_c.html :param option: Indicates type of error message. :type option: str :param lenout: Available space in the output string msg. :type lenout: int :return: The error message to be retrieved. :rtype: str """ option = stypes.stringToCharP(option) lenout = ctypes.c_int(lenout) msg = stypes.stringToCharP(lenout) libspice.getmsg_c(option, lenout, msg) return stypes.toPythonString(msg)
[ "def", "getmsg", "(", "option", ",", "lenout", "=", "_default_len_out", ")", ":", "option", "=", "stypes", ".", "stringToCharP", "(", "option", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "msg", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "libspice", ".", "getmsg_c", "(", "option", ",", "lenout", ",", "msg", ")", "return", "stypes", ".", "toPythonString", "(", "msg", ")" ]
Retrieve the current short error message, the explanation of the short error message, or the long error message. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getmsg_c.html :param option: Indicates type of error message. :type option: str :param lenout: Available space in the output string msg. :type lenout: int :return: The error message to be retrieved. :rtype: str
[ "Retrieve", "the", "current", "short", "error", "message", "the", "explanation", "of", "the", "short", "error", "message", "or", "the", "long", "error", "message", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5573-L5592
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfdist
def gfdist(target, abcorr, obsrvr, relate, refval, adjust, step, nintvls, cnfine, result=None): """ Return the time window over which a specified constraint on observer-target distance is met. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfdist_c.html :param target: Name of the target body. :type target: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvls: Workspace window interval count. :type nintvls: int :param cnfine: SPICE window to which the search is confined. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() target = stypes.stringToCharP(target) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvls = ctypes.c_int(nintvls) libspice.gfdist_c(target, abcorr, obsrvr, relate, refval, adjust, step, nintvls, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfdist(target, abcorr, obsrvr, relate, refval, adjust, step, nintvls, cnfine, result=None): """ Return the time window over which a specified constraint on observer-target distance is met. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfdist_c.html :param target: Name of the target body. :type target: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvls: Workspace window interval count. :type nintvls: int :param cnfine: SPICE window to which the search is confined. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() target = stypes.stringToCharP(target) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvls = ctypes.c_int(nintvls) libspice.gfdist_c(target, abcorr, obsrvr, relate, refval, adjust, step, nintvls, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfdist", "(", "target", ",", "abcorr", ",", "obsrvr", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvls", ",", "cnfine", ",", "result", "=", "None", ")", ":", "assert", "isinstance", "(", "cnfine", ",", "stypes", ".", "SpiceCell", ")", "assert", "cnfine", ".", "is_double", "(", ")", "if", "result", "is", "None", ":", "result", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "2000", ")", "else", ":", "assert", "isinstance", "(", "result", ",", "stypes", ".", "SpiceCell", ")", "assert", "result", ".", "is_double", "(", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "relate", "=", "stypes", ".", "stringToCharP", "(", "relate", ")", "refval", "=", "ctypes", ".", "c_double", "(", "refval", ")", "adjust", "=", "ctypes", ".", "c_double", "(", "adjust", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "nintvls", "=", "ctypes", ".", "c_int", "(", "nintvls", ")", "libspice", ".", "gfdist_c", "(", "target", ",", "abcorr", ",", "obsrvr", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvls", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Return the time window over which a specified constraint on observer-target distance is met. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfdist_c.html :param target: Name of the target body. :type target: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvls: Workspace window interval count. :type nintvls: int :param cnfine: SPICE window to which the search is confined. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell
[ "Return", "the", "time", "window", "over", "which", "a", "specified", "constraint", "on", "observer", "-", "target", "distance", "is", "met", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5621-L5667
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfevnt
def gfevnt(udstep, udrefn, gquant, qnpars, lenvals, qpnams, qcpars, qdpars, qipars, qlpars, op, refval, tol, adjust, rpt, udrepi, udrepu, udrepf, nintvls, bail, udbail, cnfine, result=None): """ Determine time intervals when a specified geometric quantity satisfies a specified mathematical condition. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfevnt_c.html :param udstep: Name of the routine that computes and returns a :type udstep: spiceypy.utils.callbacks.UDSTEP :param udrefn: Name of the routine that computes a refined time :type udrefn: spiceypy.utils.callbacks.UDREFN :param gquant: Type of geometric quantity :type gquant: str :param qnpars: Number of quantity definition parameters :type qnpars: int :param lenvals: Length of strings in qpnams and qcpars :type lenvals: int :param qpnams: Names of quantity definition parameters :type qpnams: List :param qcpars: Array of character quantity definition parameters :type qcpars: List :param qdpars: Array of double precision quantity definition :type qdpars: N-Element Array of floats :param qipars: Array of integer quantity definition parameters :type qipars: N-Element Array of str :param qlpars: Array of logical quantity definition parameters :type qlpars: N-Element Array of int :param op: Operator that either looks for an extreme value :type op: str :param refval: Reference value :type refval: float :param tol: Convergence tolerance in seconds :type tol: float :param adjust: Absolute extremum adjustment value :type adjust: float :param rpt: Progress reporter on TRUE or off FALSE :type rpt: int :param udrepi: Function that initializes progress reporting :type udrepi: spiceypy.utils.callbacks.UDREPI :param udrepu: Function that updates the progress report :type udrepu: spiceypy.utils.callbacks.UDREPU :param udrepf: Function that finalizes progress reporting :type udrepf: spiceypy.utils.callbacks.UDREPF :param nintvls: Workspace window interval count :type nintvls: int :param bail: Logical indicating program interrupt monitoring :type bail: int :param udbail: Name of a routine that signals a program interrupt :type udbail: spiceypy.utils.callbacks.UDBAIL :param cnfine: SPICE window to which the search is restricted :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() gquant = stypes.stringToCharP(gquant) qnpars = ctypes.c_int(qnpars) lenvals = ctypes.c_int(lenvals) qpnams = stypes.listToCharArrayPtr(qpnams, xLen=lenvals, yLen=qnpars) qcpars = stypes.listToCharArrayPtr(qcpars, xLen=lenvals, yLen=qnpars) qdpars = stypes.toDoubleVector(qdpars) qipars = stypes.toIntVector(qipars) qlpars = stypes.toIntVector(qlpars) op = stypes.stringToCharP(op) refval = ctypes.c_double(refval) tol = ctypes.c_double(tol) adjust = ctypes.c_double(adjust) rpt = ctypes.c_int(rpt) nintvls = ctypes.c_int(nintvls) bail = ctypes.c_int(bail) libspice.gfevnt_c(udstep, udrefn, gquant, qnpars, lenvals, qpnams, qcpars, qdpars, qipars, qlpars, op, refval, tol, adjust, rpt, udrepi, udrepu, udrepf, nintvls, bail, udbail, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfevnt(udstep, udrefn, gquant, qnpars, lenvals, qpnams, qcpars, qdpars, qipars, qlpars, op, refval, tol, adjust, rpt, udrepi, udrepu, udrepf, nintvls, bail, udbail, cnfine, result=None): """ Determine time intervals when a specified geometric quantity satisfies a specified mathematical condition. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfevnt_c.html :param udstep: Name of the routine that computes and returns a :type udstep: spiceypy.utils.callbacks.UDSTEP :param udrefn: Name of the routine that computes a refined time :type udrefn: spiceypy.utils.callbacks.UDREFN :param gquant: Type of geometric quantity :type gquant: str :param qnpars: Number of quantity definition parameters :type qnpars: int :param lenvals: Length of strings in qpnams and qcpars :type lenvals: int :param qpnams: Names of quantity definition parameters :type qpnams: List :param qcpars: Array of character quantity definition parameters :type qcpars: List :param qdpars: Array of double precision quantity definition :type qdpars: N-Element Array of floats :param qipars: Array of integer quantity definition parameters :type qipars: N-Element Array of str :param qlpars: Array of logical quantity definition parameters :type qlpars: N-Element Array of int :param op: Operator that either looks for an extreme value :type op: str :param refval: Reference value :type refval: float :param tol: Convergence tolerance in seconds :type tol: float :param adjust: Absolute extremum adjustment value :type adjust: float :param rpt: Progress reporter on TRUE or off FALSE :type rpt: int :param udrepi: Function that initializes progress reporting :type udrepi: spiceypy.utils.callbacks.UDREPI :param udrepu: Function that updates the progress report :type udrepu: spiceypy.utils.callbacks.UDREPU :param udrepf: Function that finalizes progress reporting :type udrepf: spiceypy.utils.callbacks.UDREPF :param nintvls: Workspace window interval count :type nintvls: int :param bail: Logical indicating program interrupt monitoring :type bail: int :param udbail: Name of a routine that signals a program interrupt :type udbail: spiceypy.utils.callbacks.UDBAIL :param cnfine: SPICE window to which the search is restricted :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() gquant = stypes.stringToCharP(gquant) qnpars = ctypes.c_int(qnpars) lenvals = ctypes.c_int(lenvals) qpnams = stypes.listToCharArrayPtr(qpnams, xLen=lenvals, yLen=qnpars) qcpars = stypes.listToCharArrayPtr(qcpars, xLen=lenvals, yLen=qnpars) qdpars = stypes.toDoubleVector(qdpars) qipars = stypes.toIntVector(qipars) qlpars = stypes.toIntVector(qlpars) op = stypes.stringToCharP(op) refval = ctypes.c_double(refval) tol = ctypes.c_double(tol) adjust = ctypes.c_double(adjust) rpt = ctypes.c_int(rpt) nintvls = ctypes.c_int(nintvls) bail = ctypes.c_int(bail) libspice.gfevnt_c(udstep, udrefn, gquant, qnpars, lenvals, qpnams, qcpars, qdpars, qipars, qlpars, op, refval, tol, adjust, rpt, udrepi, udrepu, udrepf, nintvls, bail, udbail, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfevnt", "(", "udstep", ",", "udrefn", ",", "gquant", ",", "qnpars", ",", "lenvals", ",", "qpnams", ",", "qcpars", ",", "qdpars", ",", "qipars", ",", "qlpars", ",", "op", ",", "refval", ",", "tol", ",", "adjust", ",", "rpt", ",", "udrepi", ",", "udrepu", ",", "udrepf", ",", "nintvls", ",", "bail", ",", "udbail", ",", "cnfine", ",", "result", "=", "None", ")", ":", "assert", "isinstance", "(", "cnfine", ",", "stypes", ".", "SpiceCell", ")", "assert", "cnfine", ".", "is_double", "(", ")", "if", "result", "is", "None", ":", "result", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "2000", ")", "else", ":", "assert", "isinstance", "(", "result", ",", "stypes", ".", "SpiceCell", ")", "assert", "result", ".", "is_double", "(", ")", "gquant", "=", "stypes", ".", "stringToCharP", "(", "gquant", ")", "qnpars", "=", "ctypes", ".", "c_int", "(", "qnpars", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "lenvals", ")", "qpnams", "=", "stypes", ".", "listToCharArrayPtr", "(", "qpnams", ",", "xLen", "=", "lenvals", ",", "yLen", "=", "qnpars", ")", "qcpars", "=", "stypes", ".", "listToCharArrayPtr", "(", "qcpars", ",", "xLen", "=", "lenvals", ",", "yLen", "=", "qnpars", ")", "qdpars", "=", "stypes", ".", "toDoubleVector", "(", "qdpars", ")", "qipars", "=", "stypes", ".", "toIntVector", "(", "qipars", ")", "qlpars", "=", "stypes", ".", "toIntVector", "(", "qlpars", ")", "op", "=", "stypes", ".", "stringToCharP", "(", "op", ")", "refval", "=", "ctypes", ".", "c_double", "(", "refval", ")", "tol", "=", "ctypes", ".", "c_double", "(", "tol", ")", "adjust", "=", "ctypes", ".", "c_double", "(", "adjust", ")", "rpt", "=", "ctypes", ".", "c_int", "(", "rpt", ")", "nintvls", "=", "ctypes", ".", "c_int", "(", "nintvls", ")", "bail", "=", "ctypes", ".", "c_int", "(", "bail", ")", "libspice", ".", "gfevnt_c", "(", "udstep", ",", "udrefn", ",", "gquant", ",", "qnpars", ",", "lenvals", ",", "qpnams", ",", "qcpars", ",", "qdpars", ",", "qipars", ",", "qlpars", ",", "op", ",", "refval", ",", "tol", ",", "adjust", ",", "rpt", ",", "udrepi", ",", "udrepu", ",", "udrepf", ",", "nintvls", ",", "bail", ",", "udbail", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Determine time intervals when a specified geometric quantity satisfies a specified mathematical condition. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfevnt_c.html :param udstep: Name of the routine that computes and returns a :type udstep: spiceypy.utils.callbacks.UDSTEP :param udrefn: Name of the routine that computes a refined time :type udrefn: spiceypy.utils.callbacks.UDREFN :param gquant: Type of geometric quantity :type gquant: str :param qnpars: Number of quantity definition parameters :type qnpars: int :param lenvals: Length of strings in qpnams and qcpars :type lenvals: int :param qpnams: Names of quantity definition parameters :type qpnams: List :param qcpars: Array of character quantity definition parameters :type qcpars: List :param qdpars: Array of double precision quantity definition :type qdpars: N-Element Array of floats :param qipars: Array of integer quantity definition parameters :type qipars: N-Element Array of str :param qlpars: Array of logical quantity definition parameters :type qlpars: N-Element Array of int :param op: Operator that either looks for an extreme value :type op: str :param refval: Reference value :type refval: float :param tol: Convergence tolerance in seconds :type tol: float :param adjust: Absolute extremum adjustment value :type adjust: float :param rpt: Progress reporter on TRUE or off FALSE :type rpt: int :param udrepi: Function that initializes progress reporting :type udrepi: spiceypy.utils.callbacks.UDREPI :param udrepu: Function that updates the progress report :type udrepu: spiceypy.utils.callbacks.UDREPU :param udrepf: Function that finalizes progress reporting :type udrepf: spiceypy.utils.callbacks.UDREPF :param nintvls: Workspace window interval count :type nintvls: int :param bail: Logical indicating program interrupt monitoring :type bail: int :param udbail: Name of a routine that signals a program interrupt :type udbail: spiceypy.utils.callbacks.UDBAIL :param cnfine: SPICE window to which the search is restricted :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results :type result: spiceypy.utils.support_types.SpiceCell
[ "Determine", "time", "intervals", "when", "a", "specified", "geometric", "quantity", "satisfies", "a", "specified", "mathematical", "condition", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5671-L5754
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfilum
def gfilum(method, angtyp, target, illumn, fixref, abcorr, obsrvr, spoint, relate, refval, adjust, step, nintvls, cnfine, result=None): """ Return the time window over which a specified constraint on the observed phase, solar incidence, or emission angle at a specifed target body surface point is met. :param method: Shape model used to represent the surface of the target body. :type method: str :param angtyp: The type of illumination angle for which a search is to be performed. :type angtyp: str :param target: Name of a target body. :type target: str :param illumn: Name of the illumination source. :type illumn: str :param fixref: Name of the body-fixed, body-centered reference frame associated with the target body. :type fixref: str :param abcorr: The aberration corrections to be applied. :type abcorr: str :param obsrvr: Name of an observing body. :type obsrvr: str :param spoint: Body-fixed coordinates of a target surface point. :type spoint: 3-Element Array of floats :param relate: Relational operator used to define a constraint on a specified illumination angle. :type relate: str :param refval: Reference value used with 'relate' to define an equality or inequality to be satisfied by the specified illumination angle. :type refval: float :param adjust: Parameter used to modify searches for absolute extrema. :type adjust: float :param step: Step size to be used in the search. :type step: float :param nintvls: Number of intervals that can be accommodated by each of the dynamically allocated workspace windows used internally by this routine. :type nintvls: int :param cnfine: Window that confines the time period over which the specified search is conducted. This can be updated by gfilum :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE Window of intervals in the confinement window that the illumination angle constraint is satisfied. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() method = stypes.stringToCharP(method) angtyp = stypes.stringToCharP(angtyp) target = stypes.stringToCharP(target) illumn = stypes.stringToCharP(illumn) fixref = stypes.stringToCharP(fixref) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) spoint = stypes.toDoubleVector(spoint) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvls = ctypes.c_int(nintvls) libspice.gfilum_c(method, angtyp, target, illumn, fixref, abcorr, obsrvr, spoint, relate, refval, adjust, step, nintvls, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfilum(method, angtyp, target, illumn, fixref, abcorr, obsrvr, spoint, relate, refval, adjust, step, nintvls, cnfine, result=None): """ Return the time window over which a specified constraint on the observed phase, solar incidence, or emission angle at a specifed target body surface point is met. :param method: Shape model used to represent the surface of the target body. :type method: str :param angtyp: The type of illumination angle for which a search is to be performed. :type angtyp: str :param target: Name of a target body. :type target: str :param illumn: Name of the illumination source. :type illumn: str :param fixref: Name of the body-fixed, body-centered reference frame associated with the target body. :type fixref: str :param abcorr: The aberration corrections to be applied. :type abcorr: str :param obsrvr: Name of an observing body. :type obsrvr: str :param spoint: Body-fixed coordinates of a target surface point. :type spoint: 3-Element Array of floats :param relate: Relational operator used to define a constraint on a specified illumination angle. :type relate: str :param refval: Reference value used with 'relate' to define an equality or inequality to be satisfied by the specified illumination angle. :type refval: float :param adjust: Parameter used to modify searches for absolute extrema. :type adjust: float :param step: Step size to be used in the search. :type step: float :param nintvls: Number of intervals that can be accommodated by each of the dynamically allocated workspace windows used internally by this routine. :type nintvls: int :param cnfine: Window that confines the time period over which the specified search is conducted. This can be updated by gfilum :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE Window of intervals in the confinement window that the illumination angle constraint is satisfied. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() method = stypes.stringToCharP(method) angtyp = stypes.stringToCharP(angtyp) target = stypes.stringToCharP(target) illumn = stypes.stringToCharP(illumn) fixref = stypes.stringToCharP(fixref) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) spoint = stypes.toDoubleVector(spoint) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvls = ctypes.c_int(nintvls) libspice.gfilum_c(method, angtyp, target, illumn, fixref, abcorr, obsrvr, spoint, relate, refval, adjust, step, nintvls, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfilum", "(", "method", ",", "angtyp", ",", "target", ",", "illumn", ",", "fixref", ",", "abcorr", ",", "obsrvr", ",", "spoint", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvls", ",", "cnfine", ",", "result", "=", "None", ")", ":", "assert", "isinstance", "(", "cnfine", ",", "stypes", ".", "SpiceCell", ")", "assert", "cnfine", ".", "is_double", "(", ")", "if", "result", "is", "None", ":", "result", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "2000", ")", "else", ":", "assert", "isinstance", "(", "result", ",", "stypes", ".", "SpiceCell", ")", "assert", "result", ".", "is_double", "(", ")", "method", "=", "stypes", ".", "stringToCharP", "(", "method", ")", "angtyp", "=", "stypes", ".", "stringToCharP", "(", "angtyp", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "illumn", "=", "stypes", ".", "stringToCharP", "(", "illumn", ")", "fixref", "=", "stypes", ".", "stringToCharP", "(", "fixref", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "spoint", "=", "stypes", ".", "toDoubleVector", "(", "spoint", ")", "relate", "=", "stypes", ".", "stringToCharP", "(", "relate", ")", "refval", "=", "ctypes", ".", "c_double", "(", "refval", ")", "adjust", "=", "ctypes", ".", "c_double", "(", "adjust", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "nintvls", "=", "ctypes", ".", "c_int", "(", "nintvls", ")", "libspice", ".", "gfilum_c", "(", "method", ",", "angtyp", ",", "target", ",", "illumn", ",", "fixref", ",", "abcorr", ",", "obsrvr", ",", "spoint", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvls", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Return the time window over which a specified constraint on the observed phase, solar incidence, or emission angle at a specifed target body surface point is met. :param method: Shape model used to represent the surface of the target body. :type method: str :param angtyp: The type of illumination angle for which a search is to be performed. :type angtyp: str :param target: Name of a target body. :type target: str :param illumn: Name of the illumination source. :type illumn: str :param fixref: Name of the body-fixed, body-centered reference frame associated with the target body. :type fixref: str :param abcorr: The aberration corrections to be applied. :type abcorr: str :param obsrvr: Name of an observing body. :type obsrvr: str :param spoint: Body-fixed coordinates of a target surface point. :type spoint: 3-Element Array of floats :param relate: Relational operator used to define a constraint on a specified illumination angle. :type relate: str :param refval: Reference value used with 'relate' to define an equality or inequality to be satisfied by the specified illumination angle. :type refval: float :param adjust: Parameter used to modify searches for absolute extrema. :type adjust: float :param step: Step size to be used in the search. :type step: float :param nintvls: Number of intervals that can be accommodated by each of the dynamically allocated workspace windows used internally by this routine. :type nintvls: int :param cnfine: Window that confines the time period over which the specified search is conducted. This can be updated by gfilum :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE Window of intervals in the confinement window that the illumination angle constraint is satisfied. :type result: spiceypy.utils.support_types.SpiceCell
[ "Return", "the", "time", "window", "over", "which", "a", "specified", "constraint", "on", "the", "observed", "phase", "solar", "incidence", "or", "emission", "angle", "at", "a", "specifed", "target", "body", "surface", "point", "is", "met", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5830-L5893
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfocce
def gfocce(occtyp, front, fshape, fframe, back, bshape, bframe, abcorr, obsrvr, tol, udstep, udrefn, rpt, udrepi, udrepu, udrepf, bail, udbail, cnfine, result=None): """ Determine time intervals when an observer sees one target occulted by another. Report progress and handle interrupts if so commanded. The surfaces of the target bodies may be represented by triaxial ellipsoids or by topographic data provided by DSK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfocce_c.html :param occtyp: Type of occultation :type occtyp: str :param front: Name of body occulting the other :type front: str :param fshape: Type of shape model used for front body :type fshape: str :param fframe: Body fixed body centered frame for front body :type fframe: str :param back: Name of body occulted by the other :type back: str :param bshape: Type of shape model used for back body :type bshape: str :param bframe: Body fixed body centered frame for back body :type bframe: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body :type obsrvr: str :param tol: Convergence tolerance in seconds :type tol: float :param udstep: Name of the routine that returns a time step :type udstep: spiceypy.utils.callbacks.UDSTEP :param udrefn: Name of the routine that computes a refined time :type udrefn: spiceypy.utils.callbacks.UDREFN :param rpt: Progress report flag :type rpt: bool :param udrepi: Function that initializes progress reporting. :type udrepi: spiceypy.utils.callbacks.UDREP :param udrepu: Function that updates the progress report :type udrepu: spiceypy.utils.callbacks.UDREPU :param udrepf: Function that finalizes progress reporting :type udrepf: spiceypy.utils.callbacks.UDREPF :param bail: Logical indicating program interrupt monitoring :type bail: bool :param udbail: Name of a routine that signals a program interrupt :type udbail: spiceypy.utils.callbacks.UDBAIL :param cnfine: SPICE window to which the search is restricted :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() occtyp = stypes.stringToCharP(occtyp) front = stypes.stringToCharP(front) fshape = stypes.stringToCharP(fshape) fframe = stypes.stringToCharP(fframe) back = stypes.stringToCharP(back) bshape = stypes.stringToCharP(bshape) bframe = stypes.stringToCharP(bframe) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) tol = ctypes.c_double(tol) rpt = ctypes.c_int(rpt) bail = ctypes.c_int(bail) libspice.gfocce_c(occtyp, front, fshape, fframe, back, bshape, bframe, abcorr, obsrvr, tol, udstep, udrefn, rpt, udrepi, udrepu, udrepf, bail, udbail, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfocce(occtyp, front, fshape, fframe, back, bshape, bframe, abcorr, obsrvr, tol, udstep, udrefn, rpt, udrepi, udrepu, udrepf, bail, udbail, cnfine, result=None): """ Determine time intervals when an observer sees one target occulted by another. Report progress and handle interrupts if so commanded. The surfaces of the target bodies may be represented by triaxial ellipsoids or by topographic data provided by DSK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfocce_c.html :param occtyp: Type of occultation :type occtyp: str :param front: Name of body occulting the other :type front: str :param fshape: Type of shape model used for front body :type fshape: str :param fframe: Body fixed body centered frame for front body :type fframe: str :param back: Name of body occulted by the other :type back: str :param bshape: Type of shape model used for back body :type bshape: str :param bframe: Body fixed body centered frame for back body :type bframe: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body :type obsrvr: str :param tol: Convergence tolerance in seconds :type tol: float :param udstep: Name of the routine that returns a time step :type udstep: spiceypy.utils.callbacks.UDSTEP :param udrefn: Name of the routine that computes a refined time :type udrefn: spiceypy.utils.callbacks.UDREFN :param rpt: Progress report flag :type rpt: bool :param udrepi: Function that initializes progress reporting. :type udrepi: spiceypy.utils.callbacks.UDREP :param udrepu: Function that updates the progress report :type udrepu: spiceypy.utils.callbacks.UDREPU :param udrepf: Function that finalizes progress reporting :type udrepf: spiceypy.utils.callbacks.UDREPF :param bail: Logical indicating program interrupt monitoring :type bail: bool :param udbail: Name of a routine that signals a program interrupt :type udbail: spiceypy.utils.callbacks.UDBAIL :param cnfine: SPICE window to which the search is restricted :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() occtyp = stypes.stringToCharP(occtyp) front = stypes.stringToCharP(front) fshape = stypes.stringToCharP(fshape) fframe = stypes.stringToCharP(fframe) back = stypes.stringToCharP(back) bshape = stypes.stringToCharP(bshape) bframe = stypes.stringToCharP(bframe) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) tol = ctypes.c_double(tol) rpt = ctypes.c_int(rpt) bail = ctypes.c_int(bail) libspice.gfocce_c(occtyp, front, fshape, fframe, back, bshape, bframe, abcorr, obsrvr, tol, udstep, udrefn, rpt, udrepi, udrepu, udrepf, bail, udbail, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfocce", "(", "occtyp", ",", "front", ",", "fshape", ",", "fframe", ",", "back", ",", "bshape", ",", "bframe", ",", "abcorr", ",", "obsrvr", ",", "tol", ",", "udstep", ",", "udrefn", ",", "rpt", ",", "udrepi", ",", "udrepu", ",", "udrepf", ",", "bail", ",", "udbail", ",", "cnfine", ",", "result", "=", "None", ")", ":", "assert", "isinstance", "(", "cnfine", ",", "stypes", ".", "SpiceCell", ")", "assert", "cnfine", ".", "is_double", "(", ")", "if", "result", "is", "None", ":", "result", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "2000", ")", "else", ":", "assert", "isinstance", "(", "result", ",", "stypes", ".", "SpiceCell", ")", "assert", "result", ".", "is_double", "(", ")", "occtyp", "=", "stypes", ".", "stringToCharP", "(", "occtyp", ")", "front", "=", "stypes", ".", "stringToCharP", "(", "front", ")", "fshape", "=", "stypes", ".", "stringToCharP", "(", "fshape", ")", "fframe", "=", "stypes", ".", "stringToCharP", "(", "fframe", ")", "back", "=", "stypes", ".", "stringToCharP", "(", "back", ")", "bshape", "=", "stypes", ".", "stringToCharP", "(", "bshape", ")", "bframe", "=", "stypes", ".", "stringToCharP", "(", "bframe", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "tol", "=", "ctypes", ".", "c_double", "(", "tol", ")", "rpt", "=", "ctypes", ".", "c_int", "(", "rpt", ")", "bail", "=", "ctypes", ".", "c_int", "(", "bail", ")", "libspice", ".", "gfocce_c", "(", "occtyp", ",", "front", ",", "fshape", ",", "fframe", ",", "back", ",", "bshape", ",", "bframe", ",", "abcorr", ",", "obsrvr", ",", "tol", ",", "udstep", ",", "udrefn", ",", "rpt", ",", "udrepi", ",", "udrepu", ",", "udrepf", ",", "bail", ",", "udbail", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Determine time intervals when an observer sees one target occulted by another. Report progress and handle interrupts if so commanded. The surfaces of the target bodies may be represented by triaxial ellipsoids or by topographic data provided by DSK files. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfocce_c.html :param occtyp: Type of occultation :type occtyp: str :param front: Name of body occulting the other :type front: str :param fshape: Type of shape model used for front body :type fshape: str :param fframe: Body fixed body centered frame for front body :type fframe: str :param back: Name of body occulted by the other :type back: str :param bshape: Type of shape model used for back body :type bshape: str :param bframe: Body fixed body centered frame for back body :type bframe: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body :type obsrvr: str :param tol: Convergence tolerance in seconds :type tol: float :param udstep: Name of the routine that returns a time step :type udstep: spiceypy.utils.callbacks.UDSTEP :param udrefn: Name of the routine that computes a refined time :type udrefn: spiceypy.utils.callbacks.UDREFN :param rpt: Progress report flag :type rpt: bool :param udrepi: Function that initializes progress reporting. :type udrepi: spiceypy.utils.callbacks.UDREP :param udrepu: Function that updates the progress report :type udrepu: spiceypy.utils.callbacks.UDREPU :param udrepf: Function that finalizes progress reporting :type udrepf: spiceypy.utils.callbacks.UDREPF :param bail: Logical indicating program interrupt monitoring :type bail: bool :param udbail: Name of a routine that signals a program interrupt :type udbail: spiceypy.utils.callbacks.UDBAIL :param cnfine: SPICE window to which the search is restricted :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell
[ "Determine", "time", "intervals", "when", "an", "observer", "sees", "one", "target", "occulted", "by", "another", ".", "Report", "progress", "and", "handle", "interrupts", "if", "so", "commanded", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5913-L5991
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfoclt
def gfoclt(occtyp, front, fshape, fframe, back, bshape, bframe, abcorr, obsrvr, step, cnfine, result=None): """ Determine time intervals when an observer sees one target occulted by, or in transit across, another. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfoclt_c.html :param occtyp: Type of occultation. :type occtyp: str :param front: Name of body occulting the other. :type front: str :param fshape: Type of shape model used for front body. :type fshape: str :param fframe: Body-fixed, body-centered frame for front body. :type fframe: str :param back: Name of body occulted by the other. :type back: str :param bshape: Type of shape model used for back body. :type bshape: str :param bframe: Body-fixed, body-centered frame for back body. :type bframe: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param step: Step size in seconds for finding occultation events. :type step: float :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() occtyp = stypes.stringToCharP(occtyp) front = stypes.stringToCharP(front) fshape = stypes.stringToCharP(fshape) fframe = stypes.stringToCharP(fframe) back = stypes.stringToCharP(back) bshape = stypes.stringToCharP(bshape) bframe = stypes.stringToCharP(bframe) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) step = ctypes.c_double(step) libspice.gfoclt_c(occtyp, front, fshape, fframe, back, bshape, bframe, abcorr, obsrvr, step, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfoclt(occtyp, front, fshape, fframe, back, bshape, bframe, abcorr, obsrvr, step, cnfine, result=None): """ Determine time intervals when an observer sees one target occulted by, or in transit across, another. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfoclt_c.html :param occtyp: Type of occultation. :type occtyp: str :param front: Name of body occulting the other. :type front: str :param fshape: Type of shape model used for front body. :type fshape: str :param fframe: Body-fixed, body-centered frame for front body. :type fframe: str :param back: Name of body occulted by the other. :type back: str :param bshape: Type of shape model used for back body. :type bshape: str :param bframe: Body-fixed, body-centered frame for back body. :type bframe: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param step: Step size in seconds for finding occultation events. :type step: float :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() occtyp = stypes.stringToCharP(occtyp) front = stypes.stringToCharP(front) fshape = stypes.stringToCharP(fshape) fframe = stypes.stringToCharP(fframe) back = stypes.stringToCharP(back) bshape = stypes.stringToCharP(bshape) bframe = stypes.stringToCharP(bframe) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) step = ctypes.c_double(step) libspice.gfoclt_c(occtyp, front, fshape, fframe, back, bshape, bframe, abcorr, obsrvr, step, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfoclt", "(", "occtyp", ",", "front", ",", "fshape", ",", "fframe", ",", "back", ",", "bshape", ",", "bframe", ",", "abcorr", ",", "obsrvr", ",", "step", ",", "cnfine", ",", "result", "=", "None", ")", ":", "assert", "isinstance", "(", "cnfine", ",", "stypes", ".", "SpiceCell", ")", "assert", "cnfine", ".", "is_double", "(", ")", "if", "result", "is", "None", ":", "result", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "2000", ")", "else", ":", "assert", "isinstance", "(", "result", ",", "stypes", ".", "SpiceCell", ")", "assert", "result", ".", "is_double", "(", ")", "occtyp", "=", "stypes", ".", "stringToCharP", "(", "occtyp", ")", "front", "=", "stypes", ".", "stringToCharP", "(", "front", ")", "fshape", "=", "stypes", ".", "stringToCharP", "(", "fshape", ")", "fframe", "=", "stypes", ".", "stringToCharP", "(", "fframe", ")", "back", "=", "stypes", ".", "stringToCharP", "(", "back", ")", "bshape", "=", "stypes", ".", "stringToCharP", "(", "bshape", ")", "bframe", "=", "stypes", ".", "stringToCharP", "(", "bframe", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "libspice", ".", "gfoclt_c", "(", "occtyp", ",", "front", ",", "fshape", ",", "fframe", ",", "back", ",", "bshape", ",", "bframe", ",", "abcorr", ",", "obsrvr", ",", "step", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Determine time intervals when an observer sees one target occulted by, or in transit across, another. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfoclt_c.html :param occtyp: Type of occultation. :type occtyp: str :param front: Name of body occulting the other. :type front: str :param fshape: Type of shape model used for front body. :type fshape: str :param fframe: Body-fixed, body-centered frame for front body. :type fframe: str :param back: Name of body occulted by the other. :type back: str :param bshape: Type of shape model used for back body. :type bshape: str :param bframe: Body-fixed, body-centered frame for back body. :type bframe: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param step: Step size in seconds for finding occultation events. :type step: float :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell
[ "Determine", "time", "intervals", "when", "an", "observer", "sees", "one", "target", "occulted", "by", "or", "in", "transit", "across", "another", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5994-L6047
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfpa
def gfpa(target, illmin, abcorr, obsrvr, relate, refval, adjust, step, nintvals, cnfine, result=None): """ Determine time intervals for which a specified constraint on the phase angle between an illumination source, a target, and observer body centers is met. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfpa_c.html :param target: Name of the target body. :type target: str :param illmin: Name of the illuminating body. :type illmin: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() target = stypes.stringToCharP(target) illmin = stypes.stringToCharP(illmin) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvals = ctypes.c_int(nintvals) libspice.gfpa_c(target, illmin, abcorr, obsrvr, relate, refval, adjust, step, nintvals, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfpa(target, illmin, abcorr, obsrvr, relate, refval, adjust, step, nintvals, cnfine, result=None): """ Determine time intervals for which a specified constraint on the phase angle between an illumination source, a target, and observer body centers is met. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfpa_c.html :param target: Name of the target body. :type target: str :param illmin: Name of the illuminating body. :type illmin: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() target = stypes.stringToCharP(target) illmin = stypes.stringToCharP(illmin) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvals = ctypes.c_int(nintvals) libspice.gfpa_c(target, illmin, abcorr, obsrvr, relate, refval, adjust, step, nintvals, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfpa", "(", "target", ",", "illmin", ",", "abcorr", ",", "obsrvr", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvals", ",", "cnfine", ",", "result", "=", "None", ")", ":", "assert", "isinstance", "(", "cnfine", ",", "stypes", ".", "SpiceCell", ")", "assert", "cnfine", ".", "is_double", "(", ")", "if", "result", "is", "None", ":", "result", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "2000", ")", "else", ":", "assert", "isinstance", "(", "result", ",", "stypes", ".", "SpiceCell", ")", "assert", "result", ".", "is_double", "(", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "illmin", "=", "stypes", ".", "stringToCharP", "(", "illmin", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "relate", "=", "stypes", ".", "stringToCharP", "(", "relate", ")", "refval", "=", "ctypes", ".", "c_double", "(", "refval", ")", "adjust", "=", "ctypes", ".", "c_double", "(", "adjust", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "nintvals", "=", "ctypes", ".", "c_int", "(", "nintvals", ")", "libspice", ".", "gfpa_c", "(", "target", ",", "illmin", ",", "abcorr", ",", "obsrvr", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvals", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Determine time intervals for which a specified constraint on the phase angle between an illumination source, a target, and observer body centers is met. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfpa_c.html :param target: Name of the target body. :type target: str :param illmin: Name of the illuminating body. :type illmin: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell
[ "Determine", "time", "intervals", "for", "which", "a", "specified", "constraint", "on", "the", "phase", "angle", "between", "an", "illumination", "source", "a", "target", "and", "observer", "body", "centers", "is", "met", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6051-L6102
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfposc
def gfposc(target, inframe, abcorr, obsrvr, crdsys, coord, relate, refval, adjust, step, nintvals, cnfine, result=None): """ Determine time intervals for which a coordinate of an observer-target position vector satisfies a numerical constraint. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfposc_c.html :param target: Name of the target body. :type target: str :param inframe: Name of the reference frame for coordinate calculations. :type inframe: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param crdsys: Name of the coordinate system containing COORD :type crdsys: str :param coord: Name of the coordinate of interest :type coord: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() target = stypes.stringToCharP(target) inframe = stypes.stringToCharP(inframe) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) crdsys = stypes.stringToCharP(crdsys) coord = stypes.stringToCharP(coord) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvals = ctypes.c_int(nintvals) libspice.gfposc_c(target, inframe, abcorr, obsrvr, crdsys, coord, relate, refval, adjust, step, nintvals, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfposc(target, inframe, abcorr, obsrvr, crdsys, coord, relate, refval, adjust, step, nintvals, cnfine, result=None): """ Determine time intervals for which a coordinate of an observer-target position vector satisfies a numerical constraint. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfposc_c.html :param target: Name of the target body. :type target: str :param inframe: Name of the reference frame for coordinate calculations. :type inframe: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param crdsys: Name of the coordinate system containing COORD :type crdsys: str :param coord: Name of the coordinate of interest :type coord: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() target = stypes.stringToCharP(target) inframe = stypes.stringToCharP(inframe) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) crdsys = stypes.stringToCharP(crdsys) coord = stypes.stringToCharP(coord) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvals = ctypes.c_int(nintvals) libspice.gfposc_c(target, inframe, abcorr, obsrvr, crdsys, coord, relate, refval, adjust, step, nintvals, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfposc", "(", "target", ",", "inframe", ",", "abcorr", ",", "obsrvr", ",", "crdsys", ",", "coord", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvals", ",", "cnfine", ",", "result", "=", "None", ")", ":", "assert", "isinstance", "(", "cnfine", ",", "stypes", ".", "SpiceCell", ")", "assert", "cnfine", ".", "is_double", "(", ")", "if", "result", "is", "None", ":", "result", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "2000", ")", "else", ":", "assert", "isinstance", "(", "result", ",", "stypes", ".", "SpiceCell", ")", "assert", "result", ".", "is_double", "(", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "inframe", "=", "stypes", ".", "stringToCharP", "(", "inframe", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "crdsys", "=", "stypes", ".", "stringToCharP", "(", "crdsys", ")", "coord", "=", "stypes", ".", "stringToCharP", "(", "coord", ")", "relate", "=", "stypes", ".", "stringToCharP", "(", "relate", ")", "refval", "=", "ctypes", ".", "c_double", "(", "refval", ")", "adjust", "=", "ctypes", ".", "c_double", "(", "adjust", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "nintvals", "=", "ctypes", ".", "c_int", "(", "nintvals", ")", "libspice", ".", "gfposc_c", "(", "target", ",", "inframe", ",", "abcorr", ",", "obsrvr", ",", "crdsys", ",", "coord", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvals", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Determine time intervals for which a coordinate of an observer-target position vector satisfies a numerical constraint. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfposc_c.html :param target: Name of the target body. :type target: str :param inframe: Name of the reference frame for coordinate calculations. :type inframe: str :param abcorr: Aberration correction flag. :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param crdsys: Name of the coordinate system containing COORD :type crdsys: str :param coord: Name of the coordinate of interest :type coord: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell
[ "Determine", "time", "intervals", "for", "which", "a", "coordinate", "of", "an", "observer", "-", "target", "position", "vector", "satisfies", "a", "numerical", "constraint", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6106-L6162
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfrefn
def gfrefn(t1, t2, s1, s2): """ For those times when we can't do better, we use a bisection method to find the next time at which to test for state change. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfrefn_c.html :param t1: One of two values bracketing a state change. :type t1: float :param t2: The other value that brackets a state change. :type t2: float :param s1: State at t1. :type s1: bool :param s2: State at t2. :type s2: bool :return: New value at which to check for transition. :rtype: float """ t1 = ctypes.c_double(t1) t2 = ctypes.c_double(t2) s1 = ctypes.c_int(s1) s2 = ctypes.c_int(s2) t = ctypes.c_double() libspice.gfrefn_c(t1, t2, s1, s2, ctypes.byref(t)) return t.value
python
def gfrefn(t1, t2, s1, s2): """ For those times when we can't do better, we use a bisection method to find the next time at which to test for state change. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfrefn_c.html :param t1: One of two values bracketing a state change. :type t1: float :param t2: The other value that brackets a state change. :type t2: float :param s1: State at t1. :type s1: bool :param s2: State at t2. :type s2: bool :return: New value at which to check for transition. :rtype: float """ t1 = ctypes.c_double(t1) t2 = ctypes.c_double(t2) s1 = ctypes.c_int(s1) s2 = ctypes.c_int(s2) t = ctypes.c_double() libspice.gfrefn_c(t1, t2, s1, s2, ctypes.byref(t)) return t.value
[ "def", "gfrefn", "(", "t1", ",", "t2", ",", "s1", ",", "s2", ")", ":", "t1", "=", "ctypes", ".", "c_double", "(", "t1", ")", "t2", "=", "ctypes", ".", "c_double", "(", "t2", ")", "s1", "=", "ctypes", ".", "c_int", "(", "s1", ")", "s2", "=", "ctypes", ".", "c_int", "(", "s2", ")", "t", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "gfrefn_c", "(", "t1", ",", "t2", ",", "s1", ",", "s2", ",", "ctypes", ".", "byref", "(", "t", ")", ")", "return", "t", ".", "value" ]
For those times when we can't do better, we use a bisection method to find the next time at which to test for state change. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfrefn_c.html :param t1: One of two values bracketing a state change. :type t1: float :param t2: The other value that brackets a state change. :type t2: float :param s1: State at t1. :type s1: bool :param s2: State at t2. :type s2: bool :return: New value at which to check for transition. :rtype: float
[ "For", "those", "times", "when", "we", "can", "t", "do", "better", "we", "use", "a", "bisection", "method", "to", "find", "the", "next", "time", "at", "which", "to", "test", "for", "state", "change", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6166-L6190
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfrepi
def gfrepi(window, begmss, endmss): """ This entry point initializes a search progress report. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfrepi_c.html :param window: A window over which a job is to be performed. :type window: spiceypy.utils.support_types.SpiceCell :param begmss: Beginning of the text portion of the output message. :type begmss: str :param endmss: End of the text portion of the output message. :type endmss: str """ begmss = stypes.stringToCharP(begmss) endmss = stypes.stringToCharP(endmss) # don't do anything if we were given a pointer to a SpiceCell, like if we were in a callback if not isinstance(window, ctypes.POINTER(stypes.SpiceCell)): assert isinstance(window, stypes.SpiceCell) assert window.is_double() window = ctypes.byref(window) libspice.gfrepi_c(window, begmss, endmss)
python
def gfrepi(window, begmss, endmss): """ This entry point initializes a search progress report. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfrepi_c.html :param window: A window over which a job is to be performed. :type window: spiceypy.utils.support_types.SpiceCell :param begmss: Beginning of the text portion of the output message. :type begmss: str :param endmss: End of the text portion of the output message. :type endmss: str """ begmss = stypes.stringToCharP(begmss) endmss = stypes.stringToCharP(endmss) # don't do anything if we were given a pointer to a SpiceCell, like if we were in a callback if not isinstance(window, ctypes.POINTER(stypes.SpiceCell)): assert isinstance(window, stypes.SpiceCell) assert window.is_double() window = ctypes.byref(window) libspice.gfrepi_c(window, begmss, endmss)
[ "def", "gfrepi", "(", "window", ",", "begmss", ",", "endmss", ")", ":", "begmss", "=", "stypes", ".", "stringToCharP", "(", "begmss", ")", "endmss", "=", "stypes", ".", "stringToCharP", "(", "endmss", ")", "# don't do anything if we were given a pointer to a SpiceCell, like if we were in a callback", "if", "not", "isinstance", "(", "window", ",", "ctypes", ".", "POINTER", "(", "stypes", ".", "SpiceCell", ")", ")", ":", "assert", "isinstance", "(", "window", ",", "stypes", ".", "SpiceCell", ")", "assert", "window", ".", "is_double", "(", ")", "window", "=", "ctypes", ".", "byref", "(", "window", ")", "libspice", ".", "gfrepi_c", "(", "window", ",", "begmss", ",", "endmss", ")" ]
This entry point initializes a search progress report. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfrepi_c.html :param window: A window over which a job is to be performed. :type window: spiceypy.utils.support_types.SpiceCell :param begmss: Beginning of the text portion of the output message. :type begmss: str :param endmss: End of the text portion of the output message. :type endmss: str
[ "This", "entry", "point", "initializes", "a", "search", "progress", "report", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6205-L6225
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfrepu
def gfrepu(ivbeg, ivend, time): """ This function tells the progress reporting system how far a search has progressed. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfrepu_c.html :param ivbeg: Start time of work interval. :type ivbeg: float :param ivend: End time of work interval. :type ivend: float :param time: Current time being examined in the search process. :type time: float """ ivbeg = ctypes.c_double(ivbeg) ivend = ctypes.c_double(ivend) time = ctypes.c_double(time) libspice.gfrepu_c(ivbeg, ivend, time)
python
def gfrepu(ivbeg, ivend, time): """ This function tells the progress reporting system how far a search has progressed. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfrepu_c.html :param ivbeg: Start time of work interval. :type ivbeg: float :param ivend: End time of work interval. :type ivend: float :param time: Current time being examined in the search process. :type time: float """ ivbeg = ctypes.c_double(ivbeg) ivend = ctypes.c_double(ivend) time = ctypes.c_double(time) libspice.gfrepu_c(ivbeg, ivend, time)
[ "def", "gfrepu", "(", "ivbeg", ",", "ivend", ",", "time", ")", ":", "ivbeg", "=", "ctypes", ".", "c_double", "(", "ivbeg", ")", "ivend", "=", "ctypes", ".", "c_double", "(", "ivend", ")", "time", "=", "ctypes", ".", "c_double", "(", "time", ")", "libspice", ".", "gfrepu_c", "(", "ivbeg", ",", "ivend", ",", "time", ")" ]
This function tells the progress reporting system how far a search has progressed. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfrepu_c.html :param ivbeg: Start time of work interval. :type ivbeg: float :param ivend: End time of work interval. :type ivend: float :param time: Current time being examined in the search process. :type time: float
[ "This", "function", "tells", "the", "progress", "reporting", "system", "how", "far", "a", "search", "has", "progressed", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6229-L6246
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfsep
def gfsep(targ1, shape1, inframe1, targ2, shape2, inframe2, abcorr, obsrvr, relate, refval, adjust, step, nintvals, cnfine, result=None): """ Determine time intervals when the angular separation between the position vectors of two target bodies relative to an observer satisfies a numerical relationship. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfsep_c.html :param targ1: Name of first body. :type targ1: str :param shape1: Name of shape model describing the first body. :type shape1: str :param inframe1: The body-fixed reference frame of the first body. :type inframe1: str :param targ2: Name of second body. :type targ2: str :param shape2: Name of the shape model describing the second body. :type shape2: str :param inframe2: The body-fixed reference frame of the second body :type inframe2: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Absolute extremum adjustment value. :type adjust: float :param step: Step size in seconds for finding angular separation events. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() targ1 = stypes.stringToCharP(targ1) shape1 = stypes.stringToCharP(shape1) inframe1 = stypes.stringToCharP(inframe1) targ2 = stypes.stringToCharP(targ2) shape2 = stypes.stringToCharP(shape2) inframe2 = stypes.stringToCharP(inframe2) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvals = ctypes.c_int(nintvals) libspice.gfsep_c(targ1, shape1, inframe1, targ2, shape2, inframe2, abcorr, obsrvr, relate, refval, adjust, step, nintvals, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfsep(targ1, shape1, inframe1, targ2, shape2, inframe2, abcorr, obsrvr, relate, refval, adjust, step, nintvals, cnfine, result=None): """ Determine time intervals when the angular separation between the position vectors of two target bodies relative to an observer satisfies a numerical relationship. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfsep_c.html :param targ1: Name of first body. :type targ1: str :param shape1: Name of shape model describing the first body. :type shape1: str :param inframe1: The body-fixed reference frame of the first body. :type inframe1: str :param targ2: Name of second body. :type targ2: str :param shape2: Name of the shape model describing the second body. :type shape2: str :param inframe2: The body-fixed reference frame of the second body :type inframe2: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Absolute extremum adjustment value. :type adjust: float :param step: Step size in seconds for finding angular separation events. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() targ1 = stypes.stringToCharP(targ1) shape1 = stypes.stringToCharP(shape1) inframe1 = stypes.stringToCharP(inframe1) targ2 = stypes.stringToCharP(targ2) shape2 = stypes.stringToCharP(shape2) inframe2 = stypes.stringToCharP(inframe2) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvals = ctypes.c_int(nintvals) libspice.gfsep_c(targ1, shape1, inframe1, targ2, shape2, inframe2, abcorr, obsrvr, relate, refval, adjust, step, nintvals, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfsep", "(", "targ1", ",", "shape1", ",", "inframe1", ",", "targ2", ",", "shape2", ",", "inframe2", ",", "abcorr", ",", "obsrvr", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvals", ",", "cnfine", ",", "result", "=", "None", ")", ":", "assert", "isinstance", "(", "cnfine", ",", "stypes", ".", "SpiceCell", ")", "assert", "cnfine", ".", "is_double", "(", ")", "if", "result", "is", "None", ":", "result", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "2000", ")", "else", ":", "assert", "isinstance", "(", "result", ",", "stypes", ".", "SpiceCell", ")", "assert", "result", ".", "is_double", "(", ")", "targ1", "=", "stypes", ".", "stringToCharP", "(", "targ1", ")", "shape1", "=", "stypes", ".", "stringToCharP", "(", "shape1", ")", "inframe1", "=", "stypes", ".", "stringToCharP", "(", "inframe1", ")", "targ2", "=", "stypes", ".", "stringToCharP", "(", "targ2", ")", "shape2", "=", "stypes", ".", "stringToCharP", "(", "shape2", ")", "inframe2", "=", "stypes", ".", "stringToCharP", "(", "inframe2", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "relate", "=", "stypes", ".", "stringToCharP", "(", "relate", ")", "refval", "=", "ctypes", ".", "c_double", "(", "refval", ")", "adjust", "=", "ctypes", ".", "c_double", "(", "adjust", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "nintvals", "=", "ctypes", ".", "c_int", "(", "nintvals", ")", "libspice", ".", "gfsep_c", "(", "targ1", ",", "shape1", ",", "inframe1", ",", "targ2", ",", "shape2", ",", "inframe2", ",", "abcorr", ",", "obsrvr", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvals", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Determine time intervals when the angular separation between the position vectors of two target bodies relative to an observer satisfies a numerical relationship. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfsep_c.html :param targ1: Name of first body. :type targ1: str :param shape1: Name of shape model describing the first body. :type shape1: str :param inframe1: The body-fixed reference frame of the first body. :type inframe1: str :param targ2: Name of second body. :type targ2: str :param shape2: Name of the shape model describing the second body. :type shape2: str :param inframe2: The body-fixed reference frame of the second body :type inframe2: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Absolute extremum adjustment value. :type adjust: float :param step: Step size in seconds for finding angular separation events. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell
[ "Determine", "time", "intervals", "when", "the", "angular", "separation", "between", "the", "position", "vectors", "of", "two", "target", "bodies", "relative", "to", "an", "observer", "satisfies", "a", "numerical", "relationship", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6345-L6408
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfsntc
def gfsntc(target, fixref, method, abcorr, obsrvr, dref, dvec, crdsys, coord, relate, refval, adjust, step, nintvals, cnfine, result=None): """ Determine time intervals for which a coordinate of an surface intercept position vector satisfies a numerical constraint. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfsntc_c.html :param target: Name of the target body. :type target: str :param fixref: Body fixed frame associated with the target. :type fixref: str :param method: Name of method type for surface intercept calculation. :type method: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param dref: Reference frame of direction vector of dvec. :type dref: str :param dvec: Pointing direction vector from the observer. :type dvec: 3-Element Array of floats :param crdsys: Name of the coordinate system containing COORD. :type crdsys: str :param coord: Name of the coordinate of interest :type coord: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Absolute extremum adjustment value. :type adjust: float :param step: Step size in seconds for finding angular separation events. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() target = stypes.stringToCharP(target) fixref = stypes.stringToCharP(fixref) method = stypes.stringToCharP(method) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) dref = stypes.stringToCharP(dref) dvec = stypes.toDoubleVector(dvec) crdsys = stypes.stringToCharP(crdsys) coord = stypes.stringToCharP(coord) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvals = ctypes.c_int(nintvals) libspice.gfsntc_c(target, fixref, method, abcorr, obsrvr, dref, dvec, crdsys, coord, relate, refval, adjust, step, nintvals, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfsntc(target, fixref, method, abcorr, obsrvr, dref, dvec, crdsys, coord, relate, refval, adjust, step, nintvals, cnfine, result=None): """ Determine time intervals for which a coordinate of an surface intercept position vector satisfies a numerical constraint. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfsntc_c.html :param target: Name of the target body. :type target: str :param fixref: Body fixed frame associated with the target. :type fixref: str :param method: Name of method type for surface intercept calculation. :type method: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param dref: Reference frame of direction vector of dvec. :type dref: str :param dvec: Pointing direction vector from the observer. :type dvec: 3-Element Array of floats :param crdsys: Name of the coordinate system containing COORD. :type crdsys: str :param coord: Name of the coordinate of interest :type coord: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Absolute extremum adjustment value. :type adjust: float :param step: Step size in seconds for finding angular separation events. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() target = stypes.stringToCharP(target) fixref = stypes.stringToCharP(fixref) method = stypes.stringToCharP(method) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) dref = stypes.stringToCharP(dref) dvec = stypes.toDoubleVector(dvec) crdsys = stypes.stringToCharP(crdsys) coord = stypes.stringToCharP(coord) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvals = ctypes.c_int(nintvals) libspice.gfsntc_c(target, fixref, method, abcorr, obsrvr, dref, dvec, crdsys, coord, relate, refval, adjust, step, nintvals, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfsntc", "(", "target", ",", "fixref", ",", "method", ",", "abcorr", ",", "obsrvr", ",", "dref", ",", "dvec", ",", "crdsys", ",", "coord", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvals", ",", "cnfine", ",", "result", "=", "None", ")", ":", "assert", "isinstance", "(", "cnfine", ",", "stypes", ".", "SpiceCell", ")", "assert", "cnfine", ".", "is_double", "(", ")", "if", "result", "is", "None", ":", "result", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "2000", ")", "else", ":", "assert", "isinstance", "(", "result", ",", "stypes", ".", "SpiceCell", ")", "assert", "result", ".", "is_double", "(", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "fixref", "=", "stypes", ".", "stringToCharP", "(", "fixref", ")", "method", "=", "stypes", ".", "stringToCharP", "(", "method", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "dref", "=", "stypes", ".", "stringToCharP", "(", "dref", ")", "dvec", "=", "stypes", ".", "toDoubleVector", "(", "dvec", ")", "crdsys", "=", "stypes", ".", "stringToCharP", "(", "crdsys", ")", "coord", "=", "stypes", ".", "stringToCharP", "(", "coord", ")", "relate", "=", "stypes", ".", "stringToCharP", "(", "relate", ")", "refval", "=", "ctypes", ".", "c_double", "(", "refval", ")", "adjust", "=", "ctypes", ".", "c_double", "(", "adjust", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "nintvals", "=", "ctypes", ".", "c_int", "(", "nintvals", ")", "libspice", ".", "gfsntc_c", "(", "target", ",", "fixref", ",", "method", ",", "abcorr", ",", "obsrvr", ",", "dref", ",", "dvec", ",", "crdsys", ",", "coord", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvals", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Determine time intervals for which a coordinate of an surface intercept position vector satisfies a numerical constraint. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfsntc_c.html :param target: Name of the target body. :type target: str :param fixref: Body fixed frame associated with the target. :type fixref: str :param method: Name of method type for surface intercept calculation. :type method: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param dref: Reference frame of direction vector of dvec. :type dref: str :param dvec: Pointing direction vector from the observer. :type dvec: 3-Element Array of floats :param crdsys: Name of the coordinate system containing COORD. :type crdsys: str :param coord: Name of the coordinate of interest :type coord: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Absolute extremum adjustment value. :type adjust: float :param step: Step size in seconds for finding angular separation events. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell
[ "Determine", "time", "intervals", "for", "which", "a", "coordinate", "of", "an", "surface", "intercept", "position", "vector", "satisfies", "a", "numerical", "constraint", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6412-L6479
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfsubc
def gfsubc(target, fixref, method, abcorr, obsrvr, crdsys, coord, relate, refval, adjust, step, nintvals, cnfine, result): """ Determine time intervals for which a coordinate of an subpoint position vector satisfies a numerical constraint. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfsubc_c.html :param target: Name of the target body. :type target: str :param fixref: Body fixed frame associated with the target. :type fixref: str :param method: Name of method type for subpoint calculation. :type method: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param crdsys: Name of the coordinate system containing COORD. :type crdsys: str :param coord: Name of the coordinate of interest :type coord: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() target = stypes.stringToCharP(target) fixref = stypes.stringToCharP(fixref) method = stypes.stringToCharP(method) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) crdsys = stypes.stringToCharP(crdsys) coord = stypes.stringToCharP(coord) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvals = ctypes.c_int(nintvals) libspice.gfsubc_c(target, fixref, method, abcorr, obsrvr, crdsys, coord, relate, refval, adjust, step, nintvals, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfsubc(target, fixref, method, abcorr, obsrvr, crdsys, coord, relate, refval, adjust, step, nintvals, cnfine, result): """ Determine time intervals for which a coordinate of an subpoint position vector satisfies a numerical constraint. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfsubc_c.html :param target: Name of the target body. :type target: str :param fixref: Body fixed frame associated with the target. :type fixref: str :param method: Name of method type for subpoint calculation. :type method: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param crdsys: Name of the coordinate system containing COORD. :type crdsys: str :param coord: Name of the coordinate of interest :type coord: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell """ assert isinstance(cnfine, stypes.SpiceCell) assert cnfine.is_double() if result is None: result = stypes.SPICEDOUBLE_CELL(2000) else: assert isinstance(result, stypes.SpiceCell) assert result.is_double() target = stypes.stringToCharP(target) fixref = stypes.stringToCharP(fixref) method = stypes.stringToCharP(method) abcorr = stypes.stringToCharP(abcorr) obsrvr = stypes.stringToCharP(obsrvr) crdsys = stypes.stringToCharP(crdsys) coord = stypes.stringToCharP(coord) relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvals = ctypes.c_int(nintvals) libspice.gfsubc_c(target, fixref, method, abcorr, obsrvr, crdsys, coord, relate, refval, adjust, step, nintvals, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfsubc", "(", "target", ",", "fixref", ",", "method", ",", "abcorr", ",", "obsrvr", ",", "crdsys", ",", "coord", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvals", ",", "cnfine", ",", "result", ")", ":", "assert", "isinstance", "(", "cnfine", ",", "stypes", ".", "SpiceCell", ")", "assert", "cnfine", ".", "is_double", "(", ")", "if", "result", "is", "None", ":", "result", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "2000", ")", "else", ":", "assert", "isinstance", "(", "result", ",", "stypes", ".", "SpiceCell", ")", "assert", "result", ".", "is_double", "(", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "fixref", "=", "stypes", ".", "stringToCharP", "(", "fixref", ")", "method", "=", "stypes", ".", "stringToCharP", "(", "method", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "crdsys", "=", "stypes", ".", "stringToCharP", "(", "crdsys", ")", "coord", "=", "stypes", ".", "stringToCharP", "(", "coord", ")", "relate", "=", "stypes", ".", "stringToCharP", "(", "relate", ")", "refval", "=", "ctypes", ".", "c_double", "(", "refval", ")", "adjust", "=", "ctypes", ".", "c_double", "(", "adjust", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "nintvals", "=", "ctypes", ".", "c_int", "(", "nintvals", ")", "libspice", ".", "gfsubc_c", "(", "target", ",", "fixref", ",", "method", ",", "abcorr", ",", "obsrvr", ",", "crdsys", ",", "coord", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvals", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Determine time intervals for which a coordinate of an subpoint position vector satisfies a numerical constraint. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfsubc_c.html :param target: Name of the target body. :type target: str :param fixref: Body fixed frame associated with the target. :type fixref: str :param method: Name of method type for subpoint calculation. :type method: str :param abcorr: Aberration correction flag :type abcorr: str :param obsrvr: Name of the observing body. :type obsrvr: str :param crdsys: Name of the coordinate system containing COORD. :type crdsys: str :param coord: Name of the coordinate of interest :type coord: str :param relate: Relational operator. :type relate: str :param refval: Reference value. :type refval: float :param adjust: Adjustment value for absolute extrema searches. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvals: Workspace window interval count. :type nintvals: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: Optional SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell
[ "Determine", "time", "intervals", "for", "which", "a", "coordinate", "of", "an", "subpoint", "position", "vector", "satisfies", "a", "numerical", "constraint", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6532-L6592
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfudb
def gfudb(udfuns, udfunb, step, cnfine, result): """ Perform a GF search on a user defined boolean quantity. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfudb_c.html :param udfuns: Name of the routine that computes a scalar quantity of interest corresponding to an 'et'. :type udfuns: ctypes.CFunctionType :param udfunb: Name of the routine returning the boolean value corresponding to an 'et'. :type udfunb: ctypes.CFunctionType :param step: Step size used for locating extrema and roots. :type step: float :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell :return: result :rtype: spiceypy.utils.support_types.SpiceCell """ step = ctypes.c_double(step) libspice.gfudb_c(udfuns, udfunb, step, ctypes.byref(cnfine), ctypes.byref(result))
python
def gfudb(udfuns, udfunb, step, cnfine, result): """ Perform a GF search on a user defined boolean quantity. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfudb_c.html :param udfuns: Name of the routine that computes a scalar quantity of interest corresponding to an 'et'. :type udfuns: ctypes.CFunctionType :param udfunb: Name of the routine returning the boolean value corresponding to an 'et'. :type udfunb: ctypes.CFunctionType :param step: Step size used for locating extrema and roots. :type step: float :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell :return: result :rtype: spiceypy.utils.support_types.SpiceCell """ step = ctypes.c_double(step) libspice.gfudb_c(udfuns, udfunb, step, ctypes.byref(cnfine), ctypes.byref(result))
[ "def", "gfudb", "(", "udfuns", ",", "udfunb", ",", "step", ",", "cnfine", ",", "result", ")", ":", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "libspice", ".", "gfudb_c", "(", "udfuns", ",", "udfunb", ",", "step", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")" ]
Perform a GF search on a user defined boolean quantity. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfudb_c.html :param udfuns: Name of the routine that computes a scalar quantity of interest corresponding to an 'et'. :type udfuns: ctypes.CFunctionType :param udfunb: Name of the routine returning the boolean value corresponding to an 'et'. :type udfunb: ctypes.CFunctionType :param step: Step size used for locating extrema and roots. :type step: float :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell :return: result :rtype: spiceypy.utils.support_types.SpiceCell
[ "Perform", "a", "GF", "search", "on", "a", "user", "defined", "boolean", "quantity", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6643-L6663
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gfuds
def gfuds(udfuns, udqdec, relate, refval, adjust, step, nintvls, cnfine, result): """ Perform a GF search on a user defined scalar quantity. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfuds_c.html :param udfuns: Name of the routine that computes the scalar quantity of interest at some time. :type udfuns: ctypes.CFunctionType :param udqdec: Name of the routine that computes whether the scalar quantity is decreasing. :type udqdec: ctypes.CFunctionType :param relate: Operator that either looks for an extreme value (max, min, local, absolute) or compares the geometric quantity value and a number. :type relate: str :param refval: Value used as reference for scalar quantity condition. :type refval: float :param adjust: Allowed variation for absolute extremal geometric conditions. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvls: Workspace window interval count. :type nintvls: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell :return: result :rtype: spiceypy.utils.support_types.SpiceCell """ relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvls = ctypes.c_int(nintvls) libspice.gfuds_c(udfuns, udqdec, relate, refval, adjust, step, nintvls, ctypes.byref(cnfine), ctypes.byref(result)) return result
python
def gfuds(udfuns, udqdec, relate, refval, adjust, step, nintvls, cnfine, result): """ Perform a GF search on a user defined scalar quantity. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfuds_c.html :param udfuns: Name of the routine that computes the scalar quantity of interest at some time. :type udfuns: ctypes.CFunctionType :param udqdec: Name of the routine that computes whether the scalar quantity is decreasing. :type udqdec: ctypes.CFunctionType :param relate: Operator that either looks for an extreme value (max, min, local, absolute) or compares the geometric quantity value and a number. :type relate: str :param refval: Value used as reference for scalar quantity condition. :type refval: float :param adjust: Allowed variation for absolute extremal geometric conditions. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvls: Workspace window interval count. :type nintvls: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell :return: result :rtype: spiceypy.utils.support_types.SpiceCell """ relate = stypes.stringToCharP(relate) refval = ctypes.c_double(refval) adjust = ctypes.c_double(adjust) step = ctypes.c_double(step) nintvls = ctypes.c_int(nintvls) libspice.gfuds_c(udfuns, udqdec, relate, refval, adjust, step, nintvls, ctypes.byref(cnfine), ctypes.byref(result)) return result
[ "def", "gfuds", "(", "udfuns", ",", "udqdec", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvls", ",", "cnfine", ",", "result", ")", ":", "relate", "=", "stypes", ".", "stringToCharP", "(", "relate", ")", "refval", "=", "ctypes", ".", "c_double", "(", "refval", ")", "adjust", "=", "ctypes", ".", "c_double", "(", "adjust", ")", "step", "=", "ctypes", ".", "c_double", "(", "step", ")", "nintvls", "=", "ctypes", ".", "c_int", "(", "nintvls", ")", "libspice", ".", "gfuds_c", "(", "udfuns", ",", "udqdec", ",", "relate", ",", "refval", ",", "adjust", ",", "step", ",", "nintvls", ",", "ctypes", ".", "byref", "(", "cnfine", ")", ",", "ctypes", ".", "byref", "(", "result", ")", ")", "return", "result" ]
Perform a GF search on a user defined scalar quantity. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfuds_c.html :param udfuns: Name of the routine that computes the scalar quantity of interest at some time. :type udfuns: ctypes.CFunctionType :param udqdec: Name of the routine that computes whether the scalar quantity is decreasing. :type udqdec: ctypes.CFunctionType :param relate: Operator that either looks for an extreme value (max, min, local, absolute) or compares the geometric quantity value and a number. :type relate: str :param refval: Value used as reference for scalar quantity condition. :type refval: float :param adjust: Allowed variation for absolute extremal geometric conditions. :type adjust: float :param step: Step size used for locating extrema and roots. :type step: float :param nintvls: Workspace window interval count. :type nintvls: int :param cnfine: SPICE window to which the search is restricted. :type cnfine: spiceypy.utils.support_types.SpiceCell :param result: SPICE window containing results. :type result: spiceypy.utils.support_types.SpiceCell :return: result :rtype: spiceypy.utils.support_types.SpiceCell
[ "Perform", "a", "GF", "search", "on", "a", "user", "defined", "scalar", "quantity", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6667-L6700
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gipool
def gipool(name, start, room): """ Return the integer value of a kernel variable from the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gipool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :param start: Which component to start retrieving for name. :type start: int :param room: The largest number of values to return. :type room: int :return: Values associated with name. :rtype: list of int """ name = stypes.stringToCharP(name) start = ctypes.c_int(start) ivals = stypes.emptyIntVector(room) room = ctypes.c_int(room) n = ctypes.c_int() found = ctypes.c_int() libspice.gipool_c(name, start, room, ctypes.byref(n), ivals, ctypes.byref(found)) return stypes.cVectorToPython(ivals)[0:n.value], bool(found.value)
python
def gipool(name, start, room): """ Return the integer value of a kernel variable from the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gipool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :param start: Which component to start retrieving for name. :type start: int :param room: The largest number of values to return. :type room: int :return: Values associated with name. :rtype: list of int """ name = stypes.stringToCharP(name) start = ctypes.c_int(start) ivals = stypes.emptyIntVector(room) room = ctypes.c_int(room) n = ctypes.c_int() found = ctypes.c_int() libspice.gipool_c(name, start, room, ctypes.byref(n), ivals, ctypes.byref(found)) return stypes.cVectorToPython(ivals)[0:n.value], bool(found.value)
[ "def", "gipool", "(", "name", ",", "start", ",", "room", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "ivals", "=", "stypes", ".", "emptyIntVector", "(", "room", ")", "room", "=", "ctypes", ".", "c_int", "(", "room", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "gipool_c", "(", "name", ",", "start", ",", "room", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "ivals", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "ivals", ")", "[", "0", ":", "n", ".", "value", "]", ",", "bool", "(", "found", ".", "value", ")" ]
Return the integer value of a kernel variable from the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gipool_c.html :param name: Name of the variable whose value is to be returned. :type name: str :param start: Which component to start retrieving for name. :type start: int :param room: The largest number of values to return. :type room: int :return: Values associated with name. :rtype: list of int
[ "Return", "the", "integer", "value", "of", "a", "kernel", "variable", "from", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6705-L6728
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
gnpool
def gnpool(name, start, room, lenout=_default_len_out): """ Return names of kernel variables matching a specified template. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gnpool_c.html :param name: Template that names should match. :type name: str :param start: Index of first matching name to retrieve. :type start: int :param room: The largest number of values to return. :type room: int :param lenout: Length of strings in output array kvars. :type lenout: int :return: Kernel pool variables whose names match name. :rtype: list of str """ name = stypes.stringToCharP(name) start = ctypes.c_int(start) kvars = stypes.emptyCharArray(yLen=room, xLen=lenout) room = ctypes.c_int(room) lenout = ctypes.c_int(lenout) n = ctypes.c_int() found = ctypes.c_int() libspice.gnpool_c(name, start, room, lenout, ctypes.byref(n), kvars, ctypes.byref(found)) return stypes.cVectorToPython(kvars)[0:n.value], bool(found.value)
python
def gnpool(name, start, room, lenout=_default_len_out): """ Return names of kernel variables matching a specified template. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gnpool_c.html :param name: Template that names should match. :type name: str :param start: Index of first matching name to retrieve. :type start: int :param room: The largest number of values to return. :type room: int :param lenout: Length of strings in output array kvars. :type lenout: int :return: Kernel pool variables whose names match name. :rtype: list of str """ name = stypes.stringToCharP(name) start = ctypes.c_int(start) kvars = stypes.emptyCharArray(yLen=room, xLen=lenout) room = ctypes.c_int(room) lenout = ctypes.c_int(lenout) n = ctypes.c_int() found = ctypes.c_int() libspice.gnpool_c(name, start, room, lenout, ctypes.byref(n), kvars, ctypes.byref(found)) return stypes.cVectorToPython(kvars)[0:n.value], bool(found.value)
[ "def", "gnpool", "(", "name", ",", "start", ",", "room", ",", "lenout", "=", "_default_len_out", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "kvars", "=", "stypes", ".", "emptyCharArray", "(", "yLen", "=", "room", ",", "xLen", "=", "lenout", ")", "room", "=", "ctypes", ".", "c_int", "(", "room", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "gnpool_c", "(", "name", ",", "start", ",", "room", ",", "lenout", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "kvars", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "kvars", ")", "[", "0", ":", "n", ".", "value", "]", ",", "bool", "(", "found", ".", "value", ")" ]
Return names of kernel variables matching a specified template. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gnpool_c.html :param name: Template that names should match. :type name: str :param start: Index of first matching name to retrieve. :type start: int :param room: The largest number of values to return. :type room: int :param lenout: Length of strings in output array kvars. :type lenout: int :return: Kernel pool variables whose names match name. :rtype: list of str
[ "Return", "names", "of", "kernel", "variables", "matching", "a", "specified", "template", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6733-L6759
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
hx2dp
def hx2dp(string): """ Convert a string representing a double precision number in a base 16 scientific notation into its equivalent double precision number. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/hx2dp_c.html :param string: Hex form string to convert to double precision. :type string: str :return: Double precision value to be returned, Or Error Message. :rtype: float or str """ string = stypes.stringToCharP(string) lenout = ctypes.c_int(80) errmsg = stypes.stringToCharP(lenout) number = ctypes.c_double() error = ctypes.c_int() libspice.hx2dp_c(string, lenout, ctypes.byref(number), ctypes.byref(error), errmsg) if not error.value: return number.value else: return stypes.toPythonString(errmsg)
python
def hx2dp(string): """ Convert a string representing a double precision number in a base 16 scientific notation into its equivalent double precision number. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/hx2dp_c.html :param string: Hex form string to convert to double precision. :type string: str :return: Double precision value to be returned, Or Error Message. :rtype: float or str """ string = stypes.stringToCharP(string) lenout = ctypes.c_int(80) errmsg = stypes.stringToCharP(lenout) number = ctypes.c_double() error = ctypes.c_int() libspice.hx2dp_c(string, lenout, ctypes.byref(number), ctypes.byref(error), errmsg) if not error.value: return number.value else: return stypes.toPythonString(errmsg)
[ "def", "hx2dp", "(", "string", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "80", ")", "errmsg", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "number", "=", "ctypes", ".", "c_double", "(", ")", "error", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "hx2dp_c", "(", "string", ",", "lenout", ",", "ctypes", ".", "byref", "(", "number", ")", ",", "ctypes", ".", "byref", "(", "error", ")", ",", "errmsg", ")", "if", "not", "error", ".", "value", ":", "return", "number", ".", "value", "else", ":", "return", "stypes", ".", "toPythonString", "(", "errmsg", ")" ]
Convert a string representing a double precision number in a base 16 scientific notation into its equivalent double precision number. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/hx2dp_c.html :param string: Hex form string to convert to double precision. :type string: str :return: Double precision value to be returned, Or Error Message. :rtype: float or str
[ "Convert", "a", "string", "representing", "a", "double", "precision", "number", "in", "a", "base", "16", "scientific", "notation", "into", "its", "equivalent", "double", "precision", "number", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6809-L6832
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ident
def ident(): """ This routine returns the 3x3 identity matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ident_c.html :return: The 3x3 identity matrix. :rtype: 3x3-Element Array of floats """ matrix = stypes.emptyDoubleMatrix() libspice.ident_c(matrix) return stypes.cMatrixToNumpy(matrix)
python
def ident(): """ This routine returns the 3x3 identity matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ident_c.html :return: The 3x3 identity matrix. :rtype: 3x3-Element Array of floats """ matrix = stypes.emptyDoubleMatrix() libspice.ident_c(matrix) return stypes.cMatrixToNumpy(matrix)
[ "def", "ident", "(", ")", ":", "matrix", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "ident_c", "(", "matrix", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "matrix", ")" ]
This routine returns the 3x3 identity matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ident_c.html :return: The 3x3 identity matrix. :rtype: 3x3-Element Array of floats
[ "This", "routine", "returns", "the", "3x3", "identity", "matrix", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L6840-L6851
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
inedpl
def inedpl(a, b, c, plane): """ Find the intersection of a triaxial ellipsoid and a plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inedpl_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 plane: Plane that intersects ellipsoid. :type plane: spiceypy.utils.support_types.Plane :return: Intersection ellipse. :rtype: spiceypy.utils.support_types.Ellipse """ assert (isinstance(plane, stypes.Plane)) ellipse = stypes.Ellipse() a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) found = ctypes.c_int() libspice.inedpl_c(a, b, c, ctypes.byref(plane), ctypes.byref(ellipse), ctypes.byref(found)) return ellipse, bool(found.value)
python
def inedpl(a, b, c, plane): """ Find the intersection of a triaxial ellipsoid and a plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inedpl_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 plane: Plane that intersects ellipsoid. :type plane: spiceypy.utils.support_types.Plane :return: Intersection ellipse. :rtype: spiceypy.utils.support_types.Ellipse """ assert (isinstance(plane, stypes.Plane)) ellipse = stypes.Ellipse() a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) found = ctypes.c_int() libspice.inedpl_c(a, b, c, ctypes.byref(plane), ctypes.byref(ellipse), ctypes.byref(found)) return ellipse, bool(found.value)
[ "def", "inedpl", "(", "a", ",", "b", ",", "c", ",", "plane", ")", ":", "assert", "(", "isinstance", "(", "plane", ",", "stypes", ".", "Plane", ")", ")", "ellipse", "=", "stypes", ".", "Ellipse", "(", ")", "a", "=", "ctypes", ".", "c_double", "(", "a", ")", "b", "=", "ctypes", ".", "c_double", "(", "b", ")", "c", "=", "ctypes", ".", "c_double", "(", "c", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "inedpl_c", "(", "a", ",", "b", ",", "c", ",", "ctypes", ".", "byref", "(", "plane", ")", ",", "ctypes", ".", "byref", "(", "ellipse", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "ellipse", ",", "bool", "(", "found", ".", "value", ")" ]
Find the intersection of a triaxial ellipsoid and a plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inedpl_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 plane: Plane that intersects ellipsoid. :type plane: spiceypy.utils.support_types.Plane :return: Intersection ellipse. :rtype: spiceypy.utils.support_types.Ellipse
[ "Find", "the", "intersection", "of", "a", "triaxial", "ellipsoid", "and", "a", "plane", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7061-L7086
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
inelpl
def inelpl(ellips, plane): """ Find the intersection of an ellipse and a plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inelpl_c.html :param ellips: A SPICE ellipse. :type plane: spiceypy.utils.support_types.Ellipse :param plane: A SPICE plane. :type plane: spiceypy.utils.support_types.Plane :return: Number of intersection points of plane and ellipse, Point 1, Point 2. :rtype: tuple """ assert (isinstance(plane, stypes.Plane)) assert (isinstance(ellips, stypes.Ellipse)) nxpts = ctypes.c_int() xpt1 = stypes.emptyDoubleVector(3) xpt2 = stypes.emptyDoubleVector(3) libspice.inelpl_c(ctypes.byref(ellips), ctypes.byref(plane), ctypes.byref(nxpts), xpt1, xpt2) return nxpts.value, stypes.cVectorToPython(xpt1), stypes.cVectorToPython(xpt2)
python
def inelpl(ellips, plane): """ Find the intersection of an ellipse and a plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inelpl_c.html :param ellips: A SPICE ellipse. :type plane: spiceypy.utils.support_types.Ellipse :param plane: A SPICE plane. :type plane: spiceypy.utils.support_types.Plane :return: Number of intersection points of plane and ellipse, Point 1, Point 2. :rtype: tuple """ assert (isinstance(plane, stypes.Plane)) assert (isinstance(ellips, stypes.Ellipse)) nxpts = ctypes.c_int() xpt1 = stypes.emptyDoubleVector(3) xpt2 = stypes.emptyDoubleVector(3) libspice.inelpl_c(ctypes.byref(ellips), ctypes.byref(plane), ctypes.byref(nxpts), xpt1, xpt2) return nxpts.value, stypes.cVectorToPython(xpt1), stypes.cVectorToPython(xpt2)
[ "def", "inelpl", "(", "ellips", ",", "plane", ")", ":", "assert", "(", "isinstance", "(", "plane", ",", "stypes", ".", "Plane", ")", ")", "assert", "(", "isinstance", "(", "ellips", ",", "stypes", ".", "Ellipse", ")", ")", "nxpts", "=", "ctypes", ".", "c_int", "(", ")", "xpt1", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "xpt2", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "inelpl_c", "(", "ctypes", ".", "byref", "(", "ellips", ")", ",", "ctypes", ".", "byref", "(", "plane", ")", ",", "ctypes", ".", "byref", "(", "nxpts", ")", ",", "xpt1", ",", "xpt2", ")", "return", "nxpts", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "xpt1", ")", ",", "stypes", ".", "cVectorToPython", "(", "xpt2", ")" ]
Find the intersection of an ellipse and a plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inelpl_c.html :param ellips: A SPICE ellipse. :type plane: spiceypy.utils.support_types.Ellipse :param plane: A SPICE plane. :type plane: spiceypy.utils.support_types.Plane :return: Number of intersection points of plane and ellipse, Point 1, Point 2. :rtype: tuple
[ "Find", "the", "intersection", "of", "an", "ellipse", "and", "a", "plane", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7090-L7113
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
inrypl
def inrypl(vertex, direct, plane): """ Find the intersection of a ray and a plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inrypl_c.html :param vertex: Vertex vector of ray. :type vertex: 3-Element Array of floats :param direct: Direction vector of ray. :type direct: 3-Element Array of floats :param plane: A SPICE plane. :type plane: spiceypy.utils.support_types.Plane :return: Number of intersection points of ray and plane, Intersection point, if nxpts == 1. :rtype: tuple """ assert (isinstance(plane, stypes.Plane)) vertex = stypes.toDoubleVector(vertex) direct = stypes.toDoubleVector(direct) nxpts = ctypes.c_int() xpt = stypes.emptyDoubleVector(3) libspice.inrypl_c(vertex, direct, ctypes.byref(plane), ctypes.byref(nxpts), xpt) return nxpts.value, stypes.cVectorToPython(xpt)
python
def inrypl(vertex, direct, plane): """ Find the intersection of a ray and a plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inrypl_c.html :param vertex: Vertex vector of ray. :type vertex: 3-Element Array of floats :param direct: Direction vector of ray. :type direct: 3-Element Array of floats :param plane: A SPICE plane. :type plane: spiceypy.utils.support_types.Plane :return: Number of intersection points of ray and plane, Intersection point, if nxpts == 1. :rtype: tuple """ assert (isinstance(plane, stypes.Plane)) vertex = stypes.toDoubleVector(vertex) direct = stypes.toDoubleVector(direct) nxpts = ctypes.c_int() xpt = stypes.emptyDoubleVector(3) libspice.inrypl_c(vertex, direct, ctypes.byref(plane), ctypes.byref(nxpts), xpt) return nxpts.value, stypes.cVectorToPython(xpt)
[ "def", "inrypl", "(", "vertex", ",", "direct", ",", "plane", ")", ":", "assert", "(", "isinstance", "(", "plane", ",", "stypes", ".", "Plane", ")", ")", "vertex", "=", "stypes", ".", "toDoubleVector", "(", "vertex", ")", "direct", "=", "stypes", ".", "toDoubleVector", "(", "direct", ")", "nxpts", "=", "ctypes", ".", "c_int", "(", ")", "xpt", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "inrypl_c", "(", "vertex", ",", "direct", ",", "ctypes", ".", "byref", "(", "plane", ")", ",", "ctypes", ".", "byref", "(", "nxpts", ")", ",", "xpt", ")", "return", "nxpts", ".", "value", ",", "stypes", ".", "cVectorToPython", "(", "xpt", ")" ]
Find the intersection of a ray and a plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inrypl_c.html :param vertex: Vertex vector of ray. :type vertex: 3-Element Array of floats :param direct: Direction vector of ray. :type direct: 3-Element Array of floats :param plane: A SPICE plane. :type plane: spiceypy.utils.support_types.Plane :return: Number of intersection points of ray and plane, Intersection point, if nxpts == 1. :rtype: tuple
[ "Find", "the", "intersection", "of", "a", "ray", "and", "a", "plane", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7117-L7142
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
insrtc
def insrtc(item, inset): """ Insert an item into a character set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/insrtc_c.html :param item: Item to be inserted. :type item: str or list of str :param inset: Insertion set. :type inset: spiceypy.utils.support_types.SpiceCell """ assert isinstance(inset, stypes.SpiceCell) if isinstance(item, list): for c in item: libspice.insrtc_c(stypes.stringToCharP(c), ctypes.byref(inset)) else: item = stypes.stringToCharP(item) libspice.insrtc_c(item, ctypes.byref(inset))
python
def insrtc(item, inset): """ Insert an item into a character set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/insrtc_c.html :param item: Item to be inserted. :type item: str or list of str :param inset: Insertion set. :type inset: spiceypy.utils.support_types.SpiceCell """ assert isinstance(inset, stypes.SpiceCell) if isinstance(item, list): for c in item: libspice.insrtc_c(stypes.stringToCharP(c), ctypes.byref(inset)) else: item = stypes.stringToCharP(item) libspice.insrtc_c(item, ctypes.byref(inset))
[ "def", "insrtc", "(", "item", ",", "inset", ")", ":", "assert", "isinstance", "(", "inset", ",", "stypes", ".", "SpiceCell", ")", "if", "isinstance", "(", "item", ",", "list", ")", ":", "for", "c", "in", "item", ":", "libspice", ".", "insrtc_c", "(", "stypes", ".", "stringToCharP", "(", "c", ")", ",", "ctypes", ".", "byref", "(", "inset", ")", ")", "else", ":", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "libspice", ".", "insrtc_c", "(", "item", ",", "ctypes", ".", "byref", "(", "inset", ")", ")" ]
Insert an item into a character set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/insrtc_c.html :param item: Item to be inserted. :type item: str or list of str :param inset: Insertion set. :type inset: spiceypy.utils.support_types.SpiceCell
[ "Insert", "an", "item", "into", "a", "character", "set", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7146-L7163
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
insrtd
def insrtd(item, inset): """ Insert an item into a double precision set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/insrtd_c.html :param item: Item to be inserted. :type item: Union[float,Iterable[float]] :param inset: Insertion set. :type inset: spiceypy.utils.support_types.SpiceCell """ assert isinstance(inset, stypes.SpiceCell) if hasattr(item, "__iter__"): for d in item: libspice.insrtd_c(ctypes.c_double(d), ctypes.byref(inset)) else: item = ctypes.c_double(item) libspice.insrtd_c(item, ctypes.byref(inset))
python
def insrtd(item, inset): """ Insert an item into a double precision set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/insrtd_c.html :param item: Item to be inserted. :type item: Union[float,Iterable[float]] :param inset: Insertion set. :type inset: spiceypy.utils.support_types.SpiceCell """ assert isinstance(inset, stypes.SpiceCell) if hasattr(item, "__iter__"): for d in item: libspice.insrtd_c(ctypes.c_double(d), ctypes.byref(inset)) else: item = ctypes.c_double(item) libspice.insrtd_c(item, ctypes.byref(inset))
[ "def", "insrtd", "(", "item", ",", "inset", ")", ":", "assert", "isinstance", "(", "inset", ",", "stypes", ".", "SpiceCell", ")", "if", "hasattr", "(", "item", ",", "\"__iter__\"", ")", ":", "for", "d", "in", "item", ":", "libspice", ".", "insrtd_c", "(", "ctypes", ".", "c_double", "(", "d", ")", ",", "ctypes", ".", "byref", "(", "inset", ")", ")", "else", ":", "item", "=", "ctypes", ".", "c_double", "(", "item", ")", "libspice", ".", "insrtd_c", "(", "item", ",", "ctypes", ".", "byref", "(", "inset", ")", ")" ]
Insert an item into a double precision set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/insrtd_c.html :param item: Item to be inserted. :type item: Union[float,Iterable[float]] :param inset: Insertion set. :type inset: spiceypy.utils.support_types.SpiceCell
[ "Insert", "an", "item", "into", "a", "double", "precision", "set", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7167-L7184
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
insrti
def insrti(item, inset): """ Insert an item into an integer set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/insrti_c.html :param item: Item to be inserted. :type item: Union[float,Iterable[int]] :param inset: Insertion set. :type inset: spiceypy.utils.support_types.SpiceCell """ assert isinstance(inset, stypes.SpiceCell) if hasattr(item, "__iter__"): for i in item: libspice.insrti_c(ctypes.c_int(i), ctypes.byref(inset)) else: item = ctypes.c_int(item) libspice.insrti_c(item, ctypes.byref(inset))
python
def insrti(item, inset): """ Insert an item into an integer set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/insrti_c.html :param item: Item to be inserted. :type item: Union[float,Iterable[int]] :param inset: Insertion set. :type inset: spiceypy.utils.support_types.SpiceCell """ assert isinstance(inset, stypes.SpiceCell) if hasattr(item, "__iter__"): for i in item: libspice.insrti_c(ctypes.c_int(i), ctypes.byref(inset)) else: item = ctypes.c_int(item) libspice.insrti_c(item, ctypes.byref(inset))
[ "def", "insrti", "(", "item", ",", "inset", ")", ":", "assert", "isinstance", "(", "inset", ",", "stypes", ".", "SpiceCell", ")", "if", "hasattr", "(", "item", ",", "\"__iter__\"", ")", ":", "for", "i", "in", "item", ":", "libspice", ".", "insrti_c", "(", "ctypes", ".", "c_int", "(", "i", ")", ",", "ctypes", ".", "byref", "(", "inset", ")", ")", "else", ":", "item", "=", "ctypes", ".", "c_int", "(", "item", ")", "libspice", ".", "insrti_c", "(", "item", ",", "ctypes", ".", "byref", "(", "inset", ")", ")" ]
Insert an item into an integer set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/insrti_c.html :param item: Item to be inserted. :type item: Union[float,Iterable[int]] :param inset: Insertion set. :type inset: spiceypy.utils.support_types.SpiceCell
[ "Insert", "an", "item", "into", "an", "integer", "set", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7188-L7205
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
inter
def inter(a, b): """ Intersect two sets of any data type to form a third set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inter_c.html :param a: First input set. :type a: spiceypy.utils.support_types.SpiceCell :param b: Second input set. :type b: spiceypy.utils.support_types.SpiceCell :return: Intersection of a and b. :rtype: spiceypy.utils.support_types.SpiceCell """ assert isinstance(a, stypes.SpiceCell) assert isinstance(b, stypes.SpiceCell) assert a.dtype == b.dtype # Next line was redundant with [raise NotImpImplementedError] below # assert a.dtype == 0 or a.dtype == 1 or a.dtype == 2 if a.dtype is 0: c = stypes.SPICECHAR_CELL(max(a.size, b.size), max(a.length, b.length)) elif a.dtype is 1: c = stypes.SPICEDOUBLE_CELL(max(a.size, b.size)) elif a.dtype is 2: c = stypes.SPICEINT_CELL(max(a.size, b.size)) else: raise NotImplementedError libspice.inter_c(ctypes.byref(a), ctypes.byref(b), ctypes.byref(c)) return c
python
def inter(a, b): """ Intersect two sets of any data type to form a third set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inter_c.html :param a: First input set. :type a: spiceypy.utils.support_types.SpiceCell :param b: Second input set. :type b: spiceypy.utils.support_types.SpiceCell :return: Intersection of a and b. :rtype: spiceypy.utils.support_types.SpiceCell """ assert isinstance(a, stypes.SpiceCell) assert isinstance(b, stypes.SpiceCell) assert a.dtype == b.dtype # Next line was redundant with [raise NotImpImplementedError] below # assert a.dtype == 0 or a.dtype == 1 or a.dtype == 2 if a.dtype is 0: c = stypes.SPICECHAR_CELL(max(a.size, b.size), max(a.length, b.length)) elif a.dtype is 1: c = stypes.SPICEDOUBLE_CELL(max(a.size, b.size)) elif a.dtype is 2: c = stypes.SPICEINT_CELL(max(a.size, b.size)) else: raise NotImplementedError libspice.inter_c(ctypes.byref(a), ctypes.byref(b), ctypes.byref(c)) return c
[ "def", "inter", "(", "a", ",", "b", ")", ":", "assert", "isinstance", "(", "a", ",", "stypes", ".", "SpiceCell", ")", "assert", "isinstance", "(", "b", ",", "stypes", ".", "SpiceCell", ")", "assert", "a", ".", "dtype", "==", "b", ".", "dtype", "# Next line was redundant with [raise NotImpImplementedError] below", "# assert a.dtype == 0 or a.dtype == 1 or a.dtype == 2", "if", "a", ".", "dtype", "is", "0", ":", "c", "=", "stypes", ".", "SPICECHAR_CELL", "(", "max", "(", "a", ".", "size", ",", "b", ".", "size", ")", ",", "max", "(", "a", ".", "length", ",", "b", ".", "length", ")", ")", "elif", "a", ".", "dtype", "is", "1", ":", "c", "=", "stypes", ".", "SPICEDOUBLE_CELL", "(", "max", "(", "a", ".", "size", ",", "b", ".", "size", ")", ")", "elif", "a", ".", "dtype", "is", "2", ":", "c", "=", "stypes", ".", "SPICEINT_CELL", "(", "max", "(", "a", ".", "size", ",", "b", ".", "size", ")", ")", "else", ":", "raise", "NotImplementedError", "libspice", ".", "inter_c", "(", "ctypes", ".", "byref", "(", "a", ")", ",", "ctypes", ".", "byref", "(", "b", ")", ",", "ctypes", ".", "byref", "(", "c", ")", ")", "return", "c" ]
Intersect two sets of any data type to form a third set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/inter_c.html :param a: First input set. :type a: spiceypy.utils.support_types.SpiceCell :param b: Second input set. :type b: spiceypy.utils.support_types.SpiceCell :return: Intersection of a and b. :rtype: spiceypy.utils.support_types.SpiceCell
[ "Intersect", "two", "sets", "of", "any", "data", "type", "to", "form", "a", "third", "set", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7209-L7236
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
invert
def invert(m): """ Generate the inverse of a 3x3 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/invert_c.html :param m: Matrix to be inverted. :type m: 3x3-Element Array of floats :return: Inverted matrix (m1)^-1 :rtype: 3x3-Element Array of floats """ m = stypes.toDoubleMatrix(m) mout = stypes.emptyDoubleMatrix() libspice.invert_c(m, mout) return stypes.cMatrixToNumpy(mout)
python
def invert(m): """ Generate the inverse of a 3x3 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/invert_c.html :param m: Matrix to be inverted. :type m: 3x3-Element Array of floats :return: Inverted matrix (m1)^-1 :rtype: 3x3-Element Array of floats """ m = stypes.toDoubleMatrix(m) mout = stypes.emptyDoubleMatrix() libspice.invert_c(m, mout) return stypes.cMatrixToNumpy(mout)
[ "def", "invert", "(", "m", ")", ":", "m", "=", "stypes", ".", "toDoubleMatrix", "(", "m", ")", "mout", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "invert_c", "(", "m", ",", "mout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "mout", ")" ]
Generate the inverse of a 3x3 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/invert_c.html :param m: Matrix to be inverted. :type m: 3x3-Element Array of floats :return: Inverted matrix (m1)^-1 :rtype: 3x3-Element Array of floats
[ "Generate", "the", "inverse", "of", "a", "3x3", "matrix", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7268-L7282
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
invort
def invort(m): """ Given a matrix, construct the matrix whose rows are the columns of the first divided by the length squared of the the corresponding columns of the input matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/invort_c.html :param m: A 3x3 Matrix. :type m: 3x3-Element Array of floats :return: m after transposition and scaling of rows. :rtype: 3x3-Element Array of floats """ m = stypes.toDoubleMatrix(m) mout = stypes.emptyDoubleMatrix() libspice.invort_c(m, mout) return stypes.cMatrixToNumpy(mout)
python
def invort(m): """ Given a matrix, construct the matrix whose rows are the columns of the first divided by the length squared of the the corresponding columns of the input matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/invort_c.html :param m: A 3x3 Matrix. :type m: 3x3-Element Array of floats :return: m after transposition and scaling of rows. :rtype: 3x3-Element Array of floats """ m = stypes.toDoubleMatrix(m) mout = stypes.emptyDoubleMatrix() libspice.invort_c(m, mout) return stypes.cMatrixToNumpy(mout)
[ "def", "invort", "(", "m", ")", ":", "m", "=", "stypes", ".", "toDoubleMatrix", "(", "m", ")", "mout", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "invort_c", "(", "m", ",", "mout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "mout", ")" ]
Given a matrix, construct the matrix whose rows are the columns of the first divided by the length squared of the the corresponding columns of the input matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/invort_c.html :param m: A 3x3 Matrix. :type m: 3x3-Element Array of floats :return: m after transposition and scaling of rows. :rtype: 3x3-Element Array of floats
[ "Given", "a", "matrix", "construct", "the", "matrix", "whose", "rows", "are", "the", "columns", "of", "the", "first", "divided", "by", "the", "length", "squared", "of", "the", "the", "corresponding", "columns", "of", "the", "input", "matrix", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7286-L7302
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
isordv
def isordv(array, n): """ Determine whether an array of n items contains the integers 0 through n-1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isordv_c.html :param array: Array of integers. :type array: Array of ints :param n: Number of integers in array. :type n: int :return: The function returns True if the array contains the integers 0 through n-1, otherwise it returns False. :rtype: bool """ array = stypes.toIntVector(array) n = ctypes.c_int(n) return bool(libspice.isordv_c(array, n))
python
def isordv(array, n): """ Determine whether an array of n items contains the integers 0 through n-1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isordv_c.html :param array: Array of integers. :type array: Array of ints :param n: Number of integers in array. :type n: int :return: The function returns True if the array contains the integers 0 through n-1, otherwise it returns False. :rtype: bool """ array = stypes.toIntVector(array) n = ctypes.c_int(n) return bool(libspice.isordv_c(array, n))
[ "def", "isordv", "(", "array", ",", "n", ")", ":", "array", "=", "stypes", ".", "toIntVector", "(", "array", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "return", "bool", "(", "libspice", ".", "isordv_c", "(", "array", ",", "n", ")", ")" ]
Determine whether an array of n items contains the integers 0 through n-1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isordv_c.html :param array: Array of integers. :type array: Array of ints :param n: Number of integers in array. :type n: int :return: The function returns True if the array contains the integers 0 through n-1, otherwise it returns False. :rtype: bool
[ "Determine", "whether", "an", "array", "of", "n", "items", "contains", "the", "integers", "0", "through", "n", "-", "1", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7306-L7324
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
isrchc
def isrchc(value, ndim, lenvals, array): """ Search for a given value within a character string array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrchc_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 str :return: The index of the first matching array element or -1 if the value is not found. :rtype: int """ value = stypes.stringToCharP(value) array = stypes.listToCharArrayPtr(array, xLen=lenvals, yLen=ndim) ndim = ctypes.c_int(ndim) lenvals = ctypes.c_int(lenvals) return libspice.isrchc_c(value, ndim, lenvals, array)
python
def isrchc(value, ndim, lenvals, array): """ Search for a given value within a character string array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrchc_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 str :return: The index of the first matching array element or -1 if the value is not found. :rtype: int """ value = stypes.stringToCharP(value) array = stypes.listToCharArrayPtr(array, xLen=lenvals, yLen=ndim) ndim = ctypes.c_int(ndim) lenvals = ctypes.c_int(lenvals) return libspice.isrchc_c(value, ndim, lenvals, array)
[ "def", "isrchc", "(", "value", ",", "ndim", ",", "lenvals", ",", "array", ")", ":", "value", "=", "stypes", ".", "stringToCharP", "(", "value", ")", "array", "=", "stypes", ".", "listToCharArrayPtr", "(", "array", ",", "xLen", "=", "lenvals", ",", "yLen", "=", "ndim", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "lenvals", ")", "return", "libspice", ".", "isrchc_c", "(", "value", ",", "ndim", ",", "lenvals", ",", "array", ")" ]
Search for a given value within a character string array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrchc_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 str :return: The index of the first matching array element or -1 if the value is not found. :rtype: int
[ "Search", "for", "a", "given", "value", "within", "a", "character", "string", "array", ".", "Return", "the", "index", "of", "the", "first", "matching", "array", "entry", "or", "-", "1", "if", "the", "key", "value", "was", "not", "found", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7328-L7353
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
isrchd
def isrchd(value, ndim, array): """ Search for a given value within a double precision array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrchd_c.html :param value: Key value to be found in array. :type value: float :param ndim: Dimension of array. :type ndim: int :param array: Double Precision array to search. :type array: Array of floats :return: The index of the first matching array element or -1 if the value is not found. :rtype: int """ value = ctypes.c_double(value) ndim = ctypes.c_int(ndim) array = stypes.toDoubleVector(array) return libspice.isrchd_c(value, ndim, array)
python
def isrchd(value, ndim, array): """ Search for a given value within a double precision array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrchd_c.html :param value: Key value to be found in array. :type value: float :param ndim: Dimension of array. :type ndim: int :param array: Double Precision array to search. :type array: Array of floats :return: The index of the first matching array element or -1 if the value is not found. :rtype: int """ value = ctypes.c_double(value) ndim = ctypes.c_int(ndim) array = stypes.toDoubleVector(array) return libspice.isrchd_c(value, ndim, array)
[ "def", "isrchd", "(", "value", ",", "ndim", ",", "array", ")", ":", "value", "=", "ctypes", ".", "c_double", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "array", "=", "stypes", ".", "toDoubleVector", "(", "array", ")", "return", "libspice", ".", "isrchd_c", "(", "value", ",", "ndim", ",", "array", ")" ]
Search for a given value within a double precision array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrchd_c.html :param value: Key value to be found in array. :type value: float :param ndim: Dimension of array. :type ndim: int :param array: Double Precision array to search. :type array: Array of floats :return: The index of the first matching array element or -1 if the value is not found. :rtype: int
[ "Search", "for", "a", "given", "value", "within", "a", "double", "precision", "array", ".", "Return", "the", "index", "of", "the", "first", "matching", "array", "entry", "or", "-", "1", "if", "the", "key", "value", "was", "not", "found", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7357-L7379
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
isrchi
def isrchi(value, ndim, array): """ Search for a given value within an integer array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrchi_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 :return: The index of the first matching array element or -1 if the value is not found. :rtype: int """ value = ctypes.c_int(value) ndim = ctypes.c_int(ndim) array = stypes.toIntVector(array) return libspice.isrchi_c(value, ndim, array)
python
def isrchi(value, ndim, array): """ Search for a given value within an integer array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrchi_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 :return: The index of the first matching array element or -1 if the value is not found. :rtype: int """ value = ctypes.c_int(value) ndim = ctypes.c_int(ndim) array = stypes.toIntVector(array) return libspice.isrchi_c(value, ndim, array)
[ "def", "isrchi", "(", "value", ",", "ndim", ",", "array", ")", ":", "value", "=", "ctypes", ".", "c_int", "(", "value", ")", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "array", "=", "stypes", ".", "toIntVector", "(", "array", ")", "return", "libspice", ".", "isrchi_c", "(", "value", ",", "ndim", ",", "array", ")" ]
Search for a given value within an integer array. Return the index of the first matching array entry, or -1 if the key value was not found. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrchi_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 :return: The index of the first matching array element or -1 if the value is not found. :rtype: int
[ "Search", "for", "a", "given", "value", "within", "an", "integer", "array", ".", "Return", "the", "index", "of", "the", "first", "matching", "array", "entry", "or", "-", "1", "if", "the", "key", "value", "was", "not", "found", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7383-L7405
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
isrot
def isrot(m, ntol, dtol): """ Indicate whether a 3x3 matrix is a rotation matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrot_c.html :param m: A matrix to be tested. :type m: 3x3-Element Array of floats :param ntol: Tolerance for the norms of the columns of m. :type ntol: float :param dtol: Tolerance for the determinant of a matrix whose columns are the unitized columns of m. :type dtol: float :return: True if and only if m is a rotation matrix. :rtype: bool """ m = stypes.toDoubleMatrix(m) ntol = ctypes.c_double(ntol) dtol = ctypes.c_double(dtol) return bool(libspice.isrot_c(m, ntol, dtol))
python
def isrot(m, ntol, dtol): """ Indicate whether a 3x3 matrix is a rotation matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrot_c.html :param m: A matrix to be tested. :type m: 3x3-Element Array of floats :param ntol: Tolerance for the norms of the columns of m. :type ntol: float :param dtol: Tolerance for the determinant of a matrix whose columns are the unitized columns of m. :type dtol: float :return: True if and only if m is a rotation matrix. :rtype: bool """ m = stypes.toDoubleMatrix(m) ntol = ctypes.c_double(ntol) dtol = ctypes.c_double(dtol) return bool(libspice.isrot_c(m, ntol, dtol))
[ "def", "isrot", "(", "m", ",", "ntol", ",", "dtol", ")", ":", "m", "=", "stypes", ".", "toDoubleMatrix", "(", "m", ")", "ntol", "=", "ctypes", ".", "c_double", "(", "ntol", ")", "dtol", "=", "ctypes", ".", "c_double", "(", "dtol", ")", "return", "bool", "(", "libspice", ".", "isrot_c", "(", "m", ",", "ntol", ",", "dtol", ")", ")" ]
Indicate whether a 3x3 matrix is a rotation matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/isrot_c.html :param m: A matrix to be tested. :type m: 3x3-Element Array of floats :param ntol: Tolerance for the norms of the columns of m. :type ntol: float :param dtol: Tolerance for the determinant of a matrix whose columns are the unitized columns of m. :type dtol: float :return: True if and only if m is a rotation matrix. :rtype: bool
[ "Indicate", "whether", "a", "3x3", "matrix", "is", "a", "rotation", "matrix", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7409-L7429
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
iswhsp
def iswhsp(string): """ Return a boolean value indicating whether a string contains only white space characters. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/iswhsp_c.html :param string: String to be tested. :type string: str :return: the boolean value True if the string is empty or contains only white space characters; otherwise it returns the value False. :rtype: bool """ string = stypes.stringToCharP(string) return bool(libspice.iswhsp_c(string))
python
def iswhsp(string): """ Return a boolean value indicating whether a string contains only white space characters. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/iswhsp_c.html :param string: String to be tested. :type string: str :return: the boolean value True if the string is empty or contains only white space characters; otherwise it returns the value False. :rtype: bool """ string = stypes.stringToCharP(string) return bool(libspice.iswhsp_c(string))
[ "def", "iswhsp", "(", "string", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "return", "bool", "(", "libspice", ".", "iswhsp_c", "(", "string", ")", ")" ]
Return a boolean value indicating whether a string contains only white space characters. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/iswhsp_c.html :param string: String to be tested. :type string: str :return: the boolean value True if the string is empty or contains only white space characters; otherwise it returns the value False. :rtype: bool
[ "Return", "a", "boolean", "value", "indicating", "whether", "a", "string", "contains", "only", "white", "space", "characters", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7433-L7448
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
kdata
def kdata(which, kind, fillen=_default_len_out, typlen=_default_len_out, srclen=_default_len_out): """ Return data for the nth kernel that is among a list of specified kernel types. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kdata_c.html :param which: Index of kernel to fetch from the list of kernels. :type which: int :param kind: The kind of kernel to which fetches are limited. :type kind: str :param fillen: Available space in output file string. :type fillen: int :param typlen: Available space in output kernel type string. :type typlen: int :param srclen: Available space in output source string. :type srclen: int :return: The name of the kernel file, The type of the kernel, Name of the source file used to load file, The handle attached to file. :rtype: tuple """ which = ctypes.c_int(which) kind = stypes.stringToCharP(kind) fillen = ctypes.c_int(fillen) typlen = ctypes.c_int(typlen) srclen = ctypes.c_int(srclen) file = stypes.stringToCharP(fillen) filtyp = stypes.stringToCharP(typlen) source = stypes.stringToCharP(srclen) handle = ctypes.c_int() found = ctypes.c_int() libspice.kdata_c(which, kind, fillen, typlen, srclen, file, filtyp, source, ctypes.byref(handle), ctypes.byref(found)) return stypes.toPythonString(file), stypes.toPythonString( filtyp), stypes.toPythonString(source), handle.value, bool(found.value)
python
def kdata(which, kind, fillen=_default_len_out, typlen=_default_len_out, srclen=_default_len_out): """ Return data for the nth kernel that is among a list of specified kernel types. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kdata_c.html :param which: Index of kernel to fetch from the list of kernels. :type which: int :param kind: The kind of kernel to which fetches are limited. :type kind: str :param fillen: Available space in output file string. :type fillen: int :param typlen: Available space in output kernel type string. :type typlen: int :param srclen: Available space in output source string. :type srclen: int :return: The name of the kernel file, The type of the kernel, Name of the source file used to load file, The handle attached to file. :rtype: tuple """ which = ctypes.c_int(which) kind = stypes.stringToCharP(kind) fillen = ctypes.c_int(fillen) typlen = ctypes.c_int(typlen) srclen = ctypes.c_int(srclen) file = stypes.stringToCharP(fillen) filtyp = stypes.stringToCharP(typlen) source = stypes.stringToCharP(srclen) handle = ctypes.c_int() found = ctypes.c_int() libspice.kdata_c(which, kind, fillen, typlen, srclen, file, filtyp, source, ctypes.byref(handle), ctypes.byref(found)) return stypes.toPythonString(file), stypes.toPythonString( filtyp), stypes.toPythonString(source), handle.value, bool(found.value)
[ "def", "kdata", "(", "which", ",", "kind", ",", "fillen", "=", "_default_len_out", ",", "typlen", "=", "_default_len_out", ",", "srclen", "=", "_default_len_out", ")", ":", "which", "=", "ctypes", ".", "c_int", "(", "which", ")", "kind", "=", "stypes", ".", "stringToCharP", "(", "kind", ")", "fillen", "=", "ctypes", ".", "c_int", "(", "fillen", ")", "typlen", "=", "ctypes", ".", "c_int", "(", "typlen", ")", "srclen", "=", "ctypes", ".", "c_int", "(", "srclen", ")", "file", "=", "stypes", ".", "stringToCharP", "(", "fillen", ")", "filtyp", "=", "stypes", ".", "stringToCharP", "(", "typlen", ")", "source", "=", "stypes", ".", "stringToCharP", "(", "srclen", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "kdata_c", "(", "which", ",", "kind", ",", "fillen", ",", "typlen", ",", "srclen", ",", "file", ",", "filtyp", ",", "source", ",", "ctypes", ".", "byref", "(", "handle", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "stypes", ".", "toPythonString", "(", "file", ")", ",", "stypes", ".", "toPythonString", "(", "filtyp", ")", ",", "stypes", ".", "toPythonString", "(", "source", ")", ",", "handle", ".", "value", ",", "bool", "(", "found", ".", "value", ")" ]
Return data for the nth kernel that is among a list of specified kernel types. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kdata_c.html :param which: Index of kernel to fetch from the list of kernels. :type which: int :param kind: The kind of kernel to which fetches are limited. :type kind: str :param fillen: Available space in output file string. :type fillen: int :param typlen: Available space in output kernel type string. :type typlen: int :param srclen: Available space in output source string. :type srclen: int :return: The name of the kernel file, The type of the kernel, Name of the source file used to load file, The handle attached to file. :rtype: tuple
[ "Return", "data", "for", "the", "nth", "kernel", "that", "is", "among", "a", "list", "of", "specified", "kernel", "types", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7529-L7565
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
kinfo
def kinfo(file, typlen=_default_len_out, srclen=_default_len_out): """ Return information about a loaded kernel specified by name. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kinfo_c.html :param file: Name of a kernel to fetch information for :type file: str :param typlen: Available space in output kernel type string. :type typlen: int :param srclen: Available space in output source string. :type srclen: int :return: The type of the kernel, Name of the source file used to load file, The handle attached to file. :rtype: tuple """ typlen = ctypes.c_int(typlen) srclen = ctypes.c_int(srclen) file = stypes.stringToCharP(file) filtyp = stypes.stringToCharP(" " * typlen.value) source = stypes.stringToCharP(" " * srclen.value) handle = ctypes.c_int() found = ctypes.c_int() libspice.kinfo_c(file, typlen, srclen, filtyp, source, ctypes.byref(handle), ctypes.byref(found)) return stypes.toPythonString(filtyp), stypes.toPythonString( source), handle.value, bool(found.value)
python
def kinfo(file, typlen=_default_len_out, srclen=_default_len_out): """ Return information about a loaded kernel specified by name. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kinfo_c.html :param file: Name of a kernel to fetch information for :type file: str :param typlen: Available space in output kernel type string. :type typlen: int :param srclen: Available space in output source string. :type srclen: int :return: The type of the kernel, Name of the source file used to load file, The handle attached to file. :rtype: tuple """ typlen = ctypes.c_int(typlen) srclen = ctypes.c_int(srclen) file = stypes.stringToCharP(file) filtyp = stypes.stringToCharP(" " * typlen.value) source = stypes.stringToCharP(" " * srclen.value) handle = ctypes.c_int() found = ctypes.c_int() libspice.kinfo_c(file, typlen, srclen, filtyp, source, ctypes.byref(handle), ctypes.byref(found)) return stypes.toPythonString(filtyp), stypes.toPythonString( source), handle.value, bool(found.value)
[ "def", "kinfo", "(", "file", ",", "typlen", "=", "_default_len_out", ",", "srclen", "=", "_default_len_out", ")", ":", "typlen", "=", "ctypes", ".", "c_int", "(", "typlen", ")", "srclen", "=", "ctypes", ".", "c_int", "(", "srclen", ")", "file", "=", "stypes", ".", "stringToCharP", "(", "file", ")", "filtyp", "=", "stypes", ".", "stringToCharP", "(", "\" \"", "*", "typlen", ".", "value", ")", "source", "=", "stypes", ".", "stringToCharP", "(", "\" \"", "*", "srclen", ".", "value", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "kinfo_c", "(", "file", ",", "typlen", ",", "srclen", ",", "filtyp", ",", "source", ",", "ctypes", ".", "byref", "(", "handle", ")", ",", "ctypes", ".", "byref", "(", "found", ")", ")", "return", "stypes", ".", "toPythonString", "(", "filtyp", ")", ",", "stypes", ".", "toPythonString", "(", "source", ")", ",", "handle", ".", "value", ",", "bool", "(", "found", ".", "value", ")" ]
Return information about a loaded kernel specified by name. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kinfo_c.html :param file: Name of a kernel to fetch information for :type file: str :param typlen: Available space in output kernel type string. :type typlen: int :param srclen: Available space in output source string. :type srclen: int :return: The type of the kernel, Name of the source file used to load file, The handle attached to file. :rtype: tuple
[ "Return", "information", "about", "a", "loaded", "kernel", "specified", "by", "name", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7570-L7598
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
kplfrm
def kplfrm(frmcls, outCell=None): """ Return a SPICE set containing the frame IDs of all reference frames of a given class having specifications in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kplfrm_c.html :param frmcls: Frame class. :type frmcls: int :param outCell: Optional output Spice Int Cell :type outCell: spiceypy.utils.support_types.SpiceCell :return: Set of ID codes of frames of the specified class. :rtype: spiceypy.utils.support_types.SpiceCell """ if not outCell: outCell = stypes.SPICEINT_CELL(1000) frmcls = ctypes.c_int(frmcls) libspice.kplfrm_c(frmcls, ctypes.byref(outCell)) return outCell
python
def kplfrm(frmcls, outCell=None): """ Return a SPICE set containing the frame IDs of all reference frames of a given class having specifications in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kplfrm_c.html :param frmcls: Frame class. :type frmcls: int :param outCell: Optional output Spice Int Cell :type outCell: spiceypy.utils.support_types.SpiceCell :return: Set of ID codes of frames of the specified class. :rtype: spiceypy.utils.support_types.SpiceCell """ if not outCell: outCell = stypes.SPICEINT_CELL(1000) frmcls = ctypes.c_int(frmcls) libspice.kplfrm_c(frmcls, ctypes.byref(outCell)) return outCell
[ "def", "kplfrm", "(", "frmcls", ",", "outCell", "=", "None", ")", ":", "if", "not", "outCell", ":", "outCell", "=", "stypes", ".", "SPICEINT_CELL", "(", "1000", ")", "frmcls", "=", "ctypes", ".", "c_int", "(", "frmcls", ")", "libspice", ".", "kplfrm_c", "(", "frmcls", ",", "ctypes", ".", "byref", "(", "outCell", ")", ")", "return", "outCell" ]
Return a SPICE set containing the frame IDs of all reference frames of a given class having specifications in the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kplfrm_c.html :param frmcls: Frame class. :type frmcls: int :param outCell: Optional output Spice Int Cell :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", "reference", "frames", "of", "a", "given", "class", "having", "specifications", "in", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7602-L7620
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ktotal
def ktotal(kind): """ Return the current number of kernels that have been loaded via the KEEPER interface that are of a specified type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ktotal_c.html :param kind: A list of kinds of kernels to count. :type kind: str :return: The number of kernels of type kind. :rtype: int """ kind = stypes.stringToCharP(kind) count = ctypes.c_int() libspice.ktotal_c(kind, ctypes.byref(count)) return count.value
python
def ktotal(kind): """ Return the current number of kernels that have been loaded via the KEEPER interface that are of a specified type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ktotal_c.html :param kind: A list of kinds of kernels to count. :type kind: str :return: The number of kernels of type kind. :rtype: int """ kind = stypes.stringToCharP(kind) count = ctypes.c_int() libspice.ktotal_c(kind, ctypes.byref(count)) return count.value
[ "def", "ktotal", "(", "kind", ")", ":", "kind", "=", "stypes", ".", "stringToCharP", "(", "kind", ")", "count", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "ktotal_c", "(", "kind", ",", "ctypes", ".", "byref", "(", "count", ")", ")", "return", "count", ".", "value" ]
Return the current number of kernels that have been loaded via the KEEPER interface that are of a specified type. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ktotal_c.html :param kind: A list of kinds of kernels to count. :type kind: str :return: The number of kernels of type kind. :rtype: int
[ "Return", "the", "current", "number", "of", "kernels", "that", "have", "been", "loaded", "via", "the", "KEEPER", "interface", "that", "are", "of", "a", "specified", "type", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7624-L7639
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
kxtrct
def kxtrct(keywd, terms, nterms, instring, termlen=_default_len_out, stringlen=_default_len_out, substrlen=_default_len_out): """ Locate a keyword in a string and extract the substring from the beginning of the first word following the keyword to the beginning of the first subsequent recognized terminator of a list. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kxtrct_c.html :param keywd: Word that marks the beginning of text of interest. :type keywd: str :param terms: Set of words, any of which marks the end of text. :type terms: Array of str :param nterms: Number of terms. :type nterms: int :param instring: String containing a sequence of words. :type instring: str :param termlen: Length of strings in string array term. :type termlen: int :param stringlen: Available space in argument string. :type stringlen: int :param substrlen: Available space in output substring. :type substrlen: int :return: String containing a sequence of words, String from end of keywd to beginning of first terms item found. :rtype: tuple """ assert nterms <= len(terms) # Python strings and string arrays => to C char pointers keywd = stypes.stringToCharP(keywd) terms = stypes.listToCharArrayPtr([s[:termlen-1] for s in terms[:nterms]],xLen=termlen,yLen=nterms) instring = stypes.stringToCharP(instring[:stringlen-1],inlen=stringlen) substr = stypes.stringToCharP(substrlen) # Python ints => to C ints termlen = ctypes.c_int(termlen) nterms = ctypes.c_int(nterms) stringlen = ctypes.c_int(stringlen) substrlen = ctypes.c_int(substrlen) found = ctypes.c_int() libspice.kxtrct_c(keywd, termlen, terms, nterms, stringlen, substrlen, instring, ctypes.byref(found), substr) return stypes.toPythonString(instring), stypes.toPythonString( substr), bool(found.value)
python
def kxtrct(keywd, terms, nterms, instring, termlen=_default_len_out, stringlen=_default_len_out, substrlen=_default_len_out): """ Locate a keyword in a string and extract the substring from the beginning of the first word following the keyword to the beginning of the first subsequent recognized terminator of a list. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kxtrct_c.html :param keywd: Word that marks the beginning of text of interest. :type keywd: str :param terms: Set of words, any of which marks the end of text. :type terms: Array of str :param nterms: Number of terms. :type nterms: int :param instring: String containing a sequence of words. :type instring: str :param termlen: Length of strings in string array term. :type termlen: int :param stringlen: Available space in argument string. :type stringlen: int :param substrlen: Available space in output substring. :type substrlen: int :return: String containing a sequence of words, String from end of keywd to beginning of first terms item found. :rtype: tuple """ assert nterms <= len(terms) # Python strings and string arrays => to C char pointers keywd = stypes.stringToCharP(keywd) terms = stypes.listToCharArrayPtr([s[:termlen-1] for s in terms[:nterms]],xLen=termlen,yLen=nterms) instring = stypes.stringToCharP(instring[:stringlen-1],inlen=stringlen) substr = stypes.stringToCharP(substrlen) # Python ints => to C ints termlen = ctypes.c_int(termlen) nterms = ctypes.c_int(nterms) stringlen = ctypes.c_int(stringlen) substrlen = ctypes.c_int(substrlen) found = ctypes.c_int() libspice.kxtrct_c(keywd, termlen, terms, nterms, stringlen, substrlen, instring, ctypes.byref(found), substr) return stypes.toPythonString(instring), stypes.toPythonString( substr), bool(found.value)
[ "def", "kxtrct", "(", "keywd", ",", "terms", ",", "nterms", ",", "instring", ",", "termlen", "=", "_default_len_out", ",", "stringlen", "=", "_default_len_out", ",", "substrlen", "=", "_default_len_out", ")", ":", "assert", "nterms", "<=", "len", "(", "terms", ")", "# Python strings and string arrays => to C char pointers", "keywd", "=", "stypes", ".", "stringToCharP", "(", "keywd", ")", "terms", "=", "stypes", ".", "listToCharArrayPtr", "(", "[", "s", "[", ":", "termlen", "-", "1", "]", "for", "s", "in", "terms", "[", ":", "nterms", "]", "]", ",", "xLen", "=", "termlen", ",", "yLen", "=", "nterms", ")", "instring", "=", "stypes", ".", "stringToCharP", "(", "instring", "[", ":", "stringlen", "-", "1", "]", ",", "inlen", "=", "stringlen", ")", "substr", "=", "stypes", ".", "stringToCharP", "(", "substrlen", ")", "# Python ints => to C ints", "termlen", "=", "ctypes", ".", "c_int", "(", "termlen", ")", "nterms", "=", "ctypes", ".", "c_int", "(", "nterms", ")", "stringlen", "=", "ctypes", ".", "c_int", "(", "stringlen", ")", "substrlen", "=", "ctypes", ".", "c_int", "(", "substrlen", ")", "found", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "kxtrct_c", "(", "keywd", ",", "termlen", ",", "terms", ",", "nterms", ",", "stringlen", ",", "substrlen", ",", "instring", ",", "ctypes", ".", "byref", "(", "found", ")", ",", "substr", ")", "return", "stypes", ".", "toPythonString", "(", "instring", ")", ",", "stypes", ".", "toPythonString", "(", "substr", ")", ",", "bool", "(", "found", ".", "value", ")" ]
Locate a keyword in a string and extract the substring from the beginning of the first word following the keyword to the beginning of the first subsequent recognized terminator of a list. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/kxtrct_c.html :param keywd: Word that marks the beginning of text of interest. :type keywd: str :param terms: Set of words, any of which marks the end of text. :type terms: Array of str :param nterms: Number of terms. :type nterms: int :param instring: String containing a sequence of words. :type instring: str :param termlen: Length of strings in string array term. :type termlen: int :param stringlen: Available space in argument string. :type stringlen: int :param substrlen: Available space in output substring. :type substrlen: int :return: String containing a sequence of words, String from end of keywd to beginning of first terms item found. :rtype: tuple
[ "Locate", "a", "keyword", "in", "a", "string", "and", "extract", "the", "substring", "from", "the", "beginning", "of", "the", "first", "word", "following", "the", "keyword", "to", "the", "beginning", "of", "the", "first", "subsequent", "recognized", "terminator", "of", "a", "list", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7644-L7687
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
latcyl
def latcyl(radius, lon, lat): """ Convert from latitudinal coordinates to cylindrical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/latcyl_c.html :param radius: Distance of a point from the origin. :type radius: :param lon: Angle of the point from the XZ plane in radians. :param lat: Angle of the point from the XY plane in radians. :return: (r, lonc, z) :rtype: tuple """ radius = ctypes.c_double(radius) lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) r = ctypes.c_double() lonc = ctypes.c_double() z = ctypes.c_double() libspice.latcyl_c(radius, lon, lat, ctypes.byref(r), ctypes.byref(lonc), ctypes.byref(z)) return r.value, lonc.value, z.value
python
def latcyl(radius, lon, lat): """ Convert from latitudinal coordinates to cylindrical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/latcyl_c.html :param radius: Distance of a point from the origin. :type radius: :param lon: Angle of the point from the XZ plane in radians. :param lat: Angle of the point from the XY plane in radians. :return: (r, lonc, z) :rtype: tuple """ radius = ctypes.c_double(radius) lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) r = ctypes.c_double() lonc = ctypes.c_double() z = ctypes.c_double() libspice.latcyl_c(radius, lon, lat, ctypes.byref(r), ctypes.byref(lonc), ctypes.byref(z)) return r.value, lonc.value, z.value
[ "def", "latcyl", "(", "radius", ",", "lon", ",", "lat", ")", ":", "radius", "=", "ctypes", ".", "c_double", "(", "radius", ")", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "lat", "=", "ctypes", ".", "c_double", "(", "lat", ")", "r", "=", "ctypes", ".", "c_double", "(", ")", "lonc", "=", "ctypes", ".", "c_double", "(", ")", "z", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "latcyl_c", "(", "radius", ",", "lon", ",", "lat", ",", "ctypes", ".", "byref", "(", "r", ")", ",", "ctypes", ".", "byref", "(", "lonc", ")", ",", "ctypes", ".", "byref", "(", "z", ")", ")", "return", "r", ".", "value", ",", "lonc", ".", "value", ",", "z", ".", "value" ]
Convert from latitudinal coordinates to cylindrical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/latcyl_c.html :param radius: Distance of a point from the origin. :type radius: :param lon: Angle of the point from the XZ plane in radians. :param lat: Angle of the point from the XY plane in radians. :return: (r, lonc, z) :rtype: tuple
[ "Convert", "from", "latitudinal", "coordinates", "to", "cylindrical", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7711-L7732
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
latrec
def latrec(radius, longitude, latitude): """ Convert from latitudinal coordinates to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/latrec_c.html :param radius: Distance of a point from the origin. :type radius: float :param longitude: Longitude of point in radians. :type longitude: float :param latitude: Latitude of point in radians. :type latitude: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats """ radius = ctypes.c_double(radius) longitude = ctypes.c_double(longitude) latitude = ctypes.c_double(latitude) rectan = stypes.emptyDoubleVector(3) libspice.latrec_c(radius, longitude, latitude, rectan) return stypes.cVectorToPython(rectan)
python
def latrec(radius, longitude, latitude): """ Convert from latitudinal coordinates to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/latrec_c.html :param radius: Distance of a point from the origin. :type radius: float :param longitude: Longitude of point in radians. :type longitude: float :param latitude: Latitude of point in radians. :type latitude: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats """ radius = ctypes.c_double(radius) longitude = ctypes.c_double(longitude) latitude = ctypes.c_double(latitude) rectan = stypes.emptyDoubleVector(3) libspice.latrec_c(radius, longitude, latitude, rectan) return stypes.cVectorToPython(rectan)
[ "def", "latrec", "(", "radius", ",", "longitude", ",", "latitude", ")", ":", "radius", "=", "ctypes", ".", "c_double", "(", "radius", ")", "longitude", "=", "ctypes", ".", "c_double", "(", "longitude", ")", "latitude", "=", "ctypes", ".", "c_double", "(", "latitude", ")", "rectan", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "latrec_c", "(", "radius", ",", "longitude", ",", "latitude", ",", "rectan", ")", "return", "stypes", ".", "cVectorToPython", "(", "rectan", ")" ]
Convert from latitudinal coordinates to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/latrec_c.html :param radius: Distance of a point from the origin. :type radius: float :param longitude: Longitude of point in radians. :type longitude: float :param latitude: Latitude of point in radians. :type latitude: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats
[ "Convert", "from", "latitudinal", "coordinates", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7736-L7756
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
latsph
def latsph(radius, lon, lat): """ Convert from latitudinal coordinates to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/latsph_c.html :param radius: Distance of a point from the origin. :param lon: Angle of the point from the XZ plane in radians. :param lat: Angle of the point from the XY plane in radians. :return: (rho colat, lons) :rtype: tuple """ radius = ctypes.c_double(radius) lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) rho = ctypes.c_double() colat = ctypes.c_double() lons = ctypes.c_double() libspice.latsph_c(radius, lon, lat, ctypes.byref(rho), ctypes.byref(colat), ctypes.byref(lons)) return rho.value, colat.value, lons.value
python
def latsph(radius, lon, lat): """ Convert from latitudinal coordinates to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/latsph_c.html :param radius: Distance of a point from the origin. :param lon: Angle of the point from the XZ plane in radians. :param lat: Angle of the point from the XY plane in radians. :return: (rho colat, lons) :rtype: tuple """ radius = ctypes.c_double(radius) lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) rho = ctypes.c_double() colat = ctypes.c_double() lons = ctypes.c_double() libspice.latsph_c(radius, lon, lat, ctypes.byref(rho), ctypes.byref(colat), ctypes.byref(lons)) return rho.value, colat.value, lons.value
[ "def", "latsph", "(", "radius", ",", "lon", ",", "lat", ")", ":", "radius", "=", "ctypes", ".", "c_double", "(", "radius", ")", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "lat", "=", "ctypes", ".", "c_double", "(", "lat", ")", "rho", "=", "ctypes", ".", "c_double", "(", ")", "colat", "=", "ctypes", ".", "c_double", "(", ")", "lons", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "latsph_c", "(", "radius", ",", "lon", ",", "lat", ",", "ctypes", ".", "byref", "(", "rho", ")", ",", "ctypes", ".", "byref", "(", "colat", ")", ",", "ctypes", ".", "byref", "(", "lons", ")", ")", "return", "rho", ".", "value", ",", "colat", ".", "value", ",", "lons", ".", "value" ]
Convert from latitudinal coordinates to spherical coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/latsph_c.html :param radius: Distance of a point from the origin. :param lon: Angle of the point from the XZ plane in radians. :param lat: Angle of the point from the XY plane in radians. :return: (rho colat, lons) :rtype: tuple
[ "Convert", "from", "latitudinal", "coordinates", "to", "spherical", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7760-L7780
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lcase
def lcase(instr, lenout=_default_len_out): """ Convert the characters in a string to lowercase. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lcase_c.html :param instr: Input string. :type instr: str :param lenout: Maximum length of output string. :type lenout: int :return: Output string, all lowercase. :rtype: str """ instr = stypes.stringToCharP(instr) lenout = ctypes.c_int(lenout) outstr = stypes.stringToCharP(lenout) libspice.lcase_c(instr, lenout, outstr) return stypes.toPythonString(outstr)
python
def lcase(instr, lenout=_default_len_out): """ Convert the characters in a string to lowercase. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lcase_c.html :param instr: Input string. :type instr: str :param lenout: Maximum length of output string. :type lenout: int :return: Output string, all lowercase. :rtype: str """ instr = stypes.stringToCharP(instr) lenout = ctypes.c_int(lenout) outstr = stypes.stringToCharP(lenout) libspice.lcase_c(instr, lenout, outstr) return stypes.toPythonString(outstr)
[ "def", "lcase", "(", "instr", ",", "lenout", "=", "_default_len_out", ")", ":", "instr", "=", "stypes", ".", "stringToCharP", "(", "instr", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "outstr", "=", "stypes", ".", "stringToCharP", "(", "lenout", ")", "libspice", ".", "lcase_c", "(", "instr", ",", "lenout", ",", "outstr", ")", "return", "stypes", ".", "toPythonString", "(", "outstr", ")" ]
Convert the characters in a string to lowercase. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lcase_c.html :param instr: Input string. :type instr: str :param lenout: Maximum length of output string. :type lenout: int :return: Output string, all lowercase. :rtype: str
[ "Convert", "the", "characters", "in", "a", "string", "to", "lowercase", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7819-L7836
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lmpool
def lmpool(cvals): """ Load the variables contained in an internal buffer into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lmpool_c.html :param cvals: list of strings. :type cvals: list of str """ lenvals = ctypes.c_int(len(max(cvals, key=len)) + 1) n = ctypes.c_int(len(cvals)) cvals = stypes.listToCharArrayPtr(cvals, xLen=lenvals, yLen=n) libspice.lmpool_c(cvals, lenvals, n)
python
def lmpool(cvals): """ Load the variables contained in an internal buffer into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lmpool_c.html :param cvals: list of strings. :type cvals: list of str """ lenvals = ctypes.c_int(len(max(cvals, key=len)) + 1) n = ctypes.c_int(len(cvals)) cvals = stypes.listToCharArrayPtr(cvals, xLen=lenvals, yLen=n) libspice.lmpool_c(cvals, lenvals, n)
[ "def", "lmpool", "(", "cvals", ")", ":", "lenvals", "=", "ctypes", ".", "c_int", "(", "len", "(", "max", "(", "cvals", ",", "key", "=", "len", ")", ")", "+", "1", ")", "n", "=", "ctypes", ".", "c_int", "(", "len", "(", "cvals", ")", ")", "cvals", "=", "stypes", ".", "listToCharArrayPtr", "(", "cvals", ",", "xLen", "=", "lenvals", ",", "yLen", "=", "n", ")", "libspice", ".", "lmpool_c", "(", "cvals", ",", "lenvals", ",", "n", ")" ]
Load the variables contained in an internal buffer into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lmpool_c.html :param cvals: list of strings. :type cvals: list of str
[ "Load", "the", "variables", "contained", "in", "an", "internal", "buffer", "into", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7953-L7966
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lparse
def lparse(inlist, delim, nmax): """ Parse a list of items delimited by a single character. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lparse_c.html :param inlist: list of items delimited by delim. :type inlist: list :param delim: Single character used to delimit items. :type delim: str :param nmax: Maximum number of items to return. :type nmax: int :return: Items in the list, left justified. :rtype: list of str """ delim = stypes.stringToCharP(delim) lenout = ctypes.c_int(len(inlist)) inlist = stypes.stringToCharP(inlist) nmax = ctypes.c_int(nmax) items = stypes.emptyCharArray(lenout, nmax) n = ctypes.c_int() libspice.lparse_c(inlist, delim, nmax, lenout, ctypes.byref(n), ctypes.byref(items)) return [stypes.toPythonString(x.value) for x in items[0:n.value]]
python
def lparse(inlist, delim, nmax): """ Parse a list of items delimited by a single character. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lparse_c.html :param inlist: list of items delimited by delim. :type inlist: list :param delim: Single character used to delimit items. :type delim: str :param nmax: Maximum number of items to return. :type nmax: int :return: Items in the list, left justified. :rtype: list of str """ delim = stypes.stringToCharP(delim) lenout = ctypes.c_int(len(inlist)) inlist = stypes.stringToCharP(inlist) nmax = ctypes.c_int(nmax) items = stypes.emptyCharArray(lenout, nmax) n = ctypes.c_int() libspice.lparse_c(inlist, delim, nmax, lenout, ctypes.byref(n), ctypes.byref(items)) return [stypes.toPythonString(x.value) for x in items[0:n.value]]
[ "def", "lparse", "(", "inlist", ",", "delim", ",", "nmax", ")", ":", "delim", "=", "stypes", ".", "stringToCharP", "(", "delim", ")", "lenout", "=", "ctypes", ".", "c_int", "(", "len", "(", "inlist", ")", ")", "inlist", "=", "stypes", ".", "stringToCharP", "(", "inlist", ")", "nmax", "=", "ctypes", ".", "c_int", "(", "nmax", ")", "items", "=", "stypes", ".", "emptyCharArray", "(", "lenout", ",", "nmax", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "lparse_c", "(", "inlist", ",", "delim", ",", "nmax", ",", "lenout", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "ctypes", ".", "byref", "(", "items", ")", ")", "return", "[", "stypes", ".", "toPythonString", "(", "x", ".", "value", ")", "for", "x", "in", "items", "[", "0", ":", "n", ".", "value", "]", "]" ]
Parse a list of items delimited by a single character. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lparse_c.html :param inlist: list of items delimited by delim. :type inlist: list :param delim: Single character used to delimit items. :type delim: str :param nmax: Maximum number of items to return. :type nmax: int :return: Items in the list, left justified. :rtype: list of str
[ "Parse", "a", "list", "of", "items", "delimited", "by", "a", "single", "character", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7970-L7993
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lparsm
def lparsm(inlist, delims, nmax, lenout=None): """ Parse a list of items separated by multiple delimiters. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lparsm_c.html :param inlist: list of items delimited by delims. :type inlist: list of strings :param delims: Single characters which delimit items. :type delims: str :param nmax: Maximum number of items to return. :type nmax: int :param lenout: Optional Length of strings in item array. :type lenout: int :return: Items in the list, left justified. :rtype: list of strings """ if lenout is None: lenout = ctypes.c_int(len(inlist) + 1) else: lenout = ctypes.c_int(lenout) inlist = stypes.stringToCharP(inlist) delims = stypes.stringToCharP(delims) items = stypes.emptyCharArray(lenout.value, nmax) nmax = ctypes.c_int(nmax) n = ctypes.c_int() libspice.lparsm_c(inlist, delims, nmax, lenout, ctypes.byref(n), items) return [stypes.toPythonString(x.value) for x in items][0:n.value]
python
def lparsm(inlist, delims, nmax, lenout=None): """ Parse a list of items separated by multiple delimiters. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lparsm_c.html :param inlist: list of items delimited by delims. :type inlist: list of strings :param delims: Single characters which delimit items. :type delims: str :param nmax: Maximum number of items to return. :type nmax: int :param lenout: Optional Length of strings in item array. :type lenout: int :return: Items in the list, left justified. :rtype: list of strings """ if lenout is None: lenout = ctypes.c_int(len(inlist) + 1) else: lenout = ctypes.c_int(lenout) inlist = stypes.stringToCharP(inlist) delims = stypes.stringToCharP(delims) items = stypes.emptyCharArray(lenout.value, nmax) nmax = ctypes.c_int(nmax) n = ctypes.c_int() libspice.lparsm_c(inlist, delims, nmax, lenout, ctypes.byref(n), items) return [stypes.toPythonString(x.value) for x in items][0:n.value]
[ "def", "lparsm", "(", "inlist", ",", "delims", ",", "nmax", ",", "lenout", "=", "None", ")", ":", "if", "lenout", "is", "None", ":", "lenout", "=", "ctypes", ".", "c_int", "(", "len", "(", "inlist", ")", "+", "1", ")", "else", ":", "lenout", "=", "ctypes", ".", "c_int", "(", "lenout", ")", "inlist", "=", "stypes", ".", "stringToCharP", "(", "inlist", ")", "delims", "=", "stypes", ".", "stringToCharP", "(", "delims", ")", "items", "=", "stypes", ".", "emptyCharArray", "(", "lenout", ".", "value", ",", "nmax", ")", "nmax", "=", "ctypes", ".", "c_int", "(", "nmax", ")", "n", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "lparsm_c", "(", "inlist", ",", "delims", ",", "nmax", ",", "lenout", ",", "ctypes", ".", "byref", "(", "n", ")", ",", "items", ")", "return", "[", "stypes", ".", "toPythonString", "(", "x", ".", "value", ")", "for", "x", "in", "items", "]", "[", "0", ":", "n", ".", "value", "]" ]
Parse a list of items separated by multiple delimiters. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lparsm_c.html :param inlist: list of items delimited by delims. :type inlist: list of strings :param delims: Single characters which delimit items. :type delims: str :param nmax: Maximum number of items to return. :type nmax: int :param lenout: Optional Length of strings in item array. :type lenout: int :return: Items in the list, left justified. :rtype: list of strings
[ "Parse", "a", "list", "of", "items", "separated", "by", "multiple", "delimiters", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L7997-L8024
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lparss
def lparss(inlist, delims, NMAX=20, LENGTH=50): """ Parse a list of items separated by multiple delimiters, placing the resulting items into a set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lparss_c.html :param inlist: list of items delimited by delims. :type inlist: :param delims: Single characters which delimit items. :type delims: str :param NMAX: Optional nmax of spice set. :type NMAX: int :param LENGTH: Optional length of strings in spice set :type LENGTH: int :return: Set containing items in the list, left justified. :rtype: """ inlist = stypes.stringToCharP(inlist) delims = stypes.stringToCharP(delims) returnSet = stypes.SPICECHAR_CELL(NMAX, LENGTH) libspice.lparss_c(inlist, delims, ctypes.byref(returnSet)) return returnSet
python
def lparss(inlist, delims, NMAX=20, LENGTH=50): """ Parse a list of items separated by multiple delimiters, placing the resulting items into a set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lparss_c.html :param inlist: list of items delimited by delims. :type inlist: :param delims: Single characters which delimit items. :type delims: str :param NMAX: Optional nmax of spice set. :type NMAX: int :param LENGTH: Optional length of strings in spice set :type LENGTH: int :return: Set containing items in the list, left justified. :rtype: """ inlist = stypes.stringToCharP(inlist) delims = stypes.stringToCharP(delims) returnSet = stypes.SPICECHAR_CELL(NMAX, LENGTH) libspice.lparss_c(inlist, delims, ctypes.byref(returnSet)) return returnSet
[ "def", "lparss", "(", "inlist", ",", "delims", ",", "NMAX", "=", "20", ",", "LENGTH", "=", "50", ")", ":", "inlist", "=", "stypes", ".", "stringToCharP", "(", "inlist", ")", "delims", "=", "stypes", ".", "stringToCharP", "(", "delims", ")", "returnSet", "=", "stypes", ".", "SPICECHAR_CELL", "(", "NMAX", ",", "LENGTH", ")", "libspice", ".", "lparss_c", "(", "inlist", ",", "delims", ",", "ctypes", ".", "byref", "(", "returnSet", ")", ")", "return", "returnSet" ]
Parse a list of items separated by multiple delimiters, placing the resulting items into a set. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lparss_c.html :param inlist: list of items delimited by delims. :type inlist: :param delims: Single characters which delimit items. :type delims: str :param NMAX: Optional nmax of spice set. :type NMAX: int :param LENGTH: Optional length of strings in spice set :type LENGTH: int :return: Set containing items in the list, left justified. :rtype:
[ "Parse", "a", "list", "of", "items", "separated", "by", "multiple", "delimiters", "placing", "the", "resulting", "items", "into", "a", "set", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8028-L8050
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lspcn
def lspcn(body, et, abcorr): """ Compute L_s, the planetocentric longitude of the sun, as seen from a specified body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lspcn_c.html :param body: Name of central body. :type body: str :param et: Epoch in seconds past J2000 TDB. :type et: float :param abcorr: Aberration correction. :type abcorr: str :return: planetocentric longitude of the sun :rtype: float """ body = stypes.stringToCharP(body) et = ctypes.c_double(et) abcorr = stypes.stringToCharP(abcorr) return libspice.lspcn_c(body, et, abcorr)
python
def lspcn(body, et, abcorr): """ Compute L_s, the planetocentric longitude of the sun, as seen from a specified body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lspcn_c.html :param body: Name of central body. :type body: str :param et: Epoch in seconds past J2000 TDB. :type et: float :param abcorr: Aberration correction. :type abcorr: str :return: planetocentric longitude of the sun :rtype: float """ body = stypes.stringToCharP(body) et = ctypes.c_double(et) abcorr = stypes.stringToCharP(abcorr) return libspice.lspcn_c(body, et, abcorr)
[ "def", "lspcn", "(", "body", ",", "et", ",", "abcorr", ")", ":", "body", "=", "stypes", ".", "stringToCharP", "(", "body", ")", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "return", "libspice", ".", "lspcn_c", "(", "body", ",", "et", ",", "abcorr", ")" ]
Compute L_s, the planetocentric longitude of the sun, as seen from a specified body. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lspcn_c.html :param body: Name of central body. :type body: str :param et: Epoch in seconds past J2000 TDB. :type et: float :param abcorr: Aberration correction. :type abcorr: str :return: planetocentric longitude of the sun :rtype: float
[ "Compute", "L_s", "the", "planetocentric", "longitude", "of", "the", "sun", "as", "seen", "from", "a", "specified", "body", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8054-L8073
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lstlec
def lstlec(string, n, lenvals, array): """ Given a character string and an ordered array of character strings, find the index of the largest array element less than or equal to the given string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstlec_c.html :param string: Upper bound value to search against. :type string: str :param n: Number elements in array. :type n: int :param lenvals: String length. :type lenvals: int :param array: Array of possible lower bounds. :type array: list :return: index of the last element of array that is lexically less than or equal to string. :rtype: int """ string = stypes.stringToCharP(string) array = stypes.listToCharArrayPtr(array, xLen=lenvals, yLen=n) n = ctypes.c_int(n) lenvals = ctypes.c_int(lenvals) return libspice.lstlec_c(string, n, lenvals, array)
python
def lstlec(string, n, lenvals, array): """ Given a character string and an ordered array of character strings, find the index of the largest array element less than or equal to the given string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstlec_c.html :param string: Upper bound value to search against. :type string: str :param n: Number elements in array. :type n: int :param lenvals: String length. :type lenvals: int :param array: Array of possible lower bounds. :type array: list :return: index of the last element of array that is lexically less than or equal to string. :rtype: int """ string = stypes.stringToCharP(string) array = stypes.listToCharArrayPtr(array, xLen=lenvals, yLen=n) n = ctypes.c_int(n) lenvals = ctypes.c_int(lenvals) return libspice.lstlec_c(string, n, lenvals, array)
[ "def", "lstlec", "(", "string", ",", "n", ",", "lenvals", ",", "array", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "array", "=", "stypes", ".", "listToCharArrayPtr", "(", "array", ",", "xLen", "=", "lenvals", ",", "yLen", "=", "n", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "lenvals", ")", "return", "libspice", ".", "lstlec_c", "(", "string", ",", "n", ",", "lenvals", ",", "array", ")" ]
Given a character string and an ordered array of character strings, find the index of the largest array element less than or equal to the given string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstlec_c.html :param string: Upper bound value to search against. :type string: str :param n: Number elements in array. :type n: int :param lenvals: String length. :type lenvals: int :param array: Array of possible lower bounds. :type array: list :return: index of the last element of array that is lexically less than or equal to string. :rtype: int
[ "Given", "a", "character", "string", "and", "an", "ordered", "array", "of", "character", "strings", "find", "the", "index", "of", "the", "largest", "array", "element", "less", "than", "or", "equal", "to", "the", "given", "string", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8077-L8102
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lstled
def lstled(x, n, array): """ Given a number x and an array of non-decreasing floats find the index of the largest array element less than or equal to x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstled_c.html :param x: Value to search against. :type x: float :param n: Number elements in array. :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than or equal to x. :rtype: int """ array = stypes.toDoubleVector(array) x = ctypes.c_double(x) n = ctypes.c_int(n) return libspice.lstled_c(x, n, array)
python
def lstled(x, n, array): """ Given a number x and an array of non-decreasing floats find the index of the largest array element less than or equal to x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstled_c.html :param x: Value to search against. :type x: float :param n: Number elements in array. :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than or equal to x. :rtype: int """ array = stypes.toDoubleVector(array) x = ctypes.c_double(x) n = ctypes.c_int(n) return libspice.lstled_c(x, n, array)
[ "def", "lstled", "(", "x", ",", "n", ",", "array", ")", ":", "array", "=", "stypes", ".", "toDoubleVector", "(", "array", ")", "x", "=", "ctypes", ".", "c_double", "(", "x", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "return", "libspice", ".", "lstled_c", "(", "x", ",", "n", ",", "array", ")" ]
Given a number x and an array of non-decreasing floats find the index of the largest array element less than or equal to x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstled_c.html :param x: Value to search against. :type x: float :param n: Number elements in array. :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than or equal to x. :rtype: int
[ "Given", "a", "number", "x", "and", "an", "array", "of", "non", "-", "decreasing", "floats", "find", "the", "index", "of", "the", "largest", "array", "element", "less", "than", "or", "equal", "to", "x", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8106-L8125
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lstlei
def lstlei(x, n, array): """ Given a number x and an array of non-decreasing ints, find the index of the largest array element less than or equal to x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstlei_c.html :param x: Value to search against. :type x: int :param n: Number elements in array. :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than or equal to x. :rtype: int """ array = stypes.toIntVector(array) x = ctypes.c_int(x) n = ctypes.c_int(n) return libspice.lstlei_c(x, n, array)
python
def lstlei(x, n, array): """ Given a number x and an array of non-decreasing ints, find the index of the largest array element less than or equal to x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstlei_c.html :param x: Value to search against. :type x: int :param n: Number elements in array. :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than or equal to x. :rtype: int """ array = stypes.toIntVector(array) x = ctypes.c_int(x) n = ctypes.c_int(n) return libspice.lstlei_c(x, n, array)
[ "def", "lstlei", "(", "x", ",", "n", ",", "array", ")", ":", "array", "=", "stypes", ".", "toIntVector", "(", "array", ")", "x", "=", "ctypes", ".", "c_int", "(", "x", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "return", "libspice", ".", "lstlei_c", "(", "x", ",", "n", ",", "array", ")" ]
Given a number x and an array of non-decreasing ints, find the index of the largest array element less than or equal to x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstlei_c.html :param x: Value to search against. :type x: int :param n: Number elements in array. :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than or equal to x. :rtype: int
[ "Given", "a", "number", "x", "and", "an", "array", "of", "non", "-", "decreasing", "ints", "find", "the", "index", "of", "the", "largest", "array", "element", "less", "than", "or", "equal", "to", "x", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8129-L8148
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lstltc
def lstltc(string, n, lenvals, array): """ Given a character string and an ordered array of character strings, find the index of the largest array element less than the given string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstltc_c.html :param string: Upper bound value to search against. :type string: int :param n: Number elements in array. :type n: int :param lenvals: String length. :type lenvals: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is lexically less than string. :rtype: int """ string = stypes.stringToCharP(string) array = stypes.listToCharArrayPtr(array, xLen=lenvals, yLen=n) n = ctypes.c_int(n) lenvals = ctypes.c_int(lenvals) return libspice.lstltc_c(string, n, lenvals, array)
python
def lstltc(string, n, lenvals, array): """ Given a character string and an ordered array of character strings, find the index of the largest array element less than the given string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstltc_c.html :param string: Upper bound value to search against. :type string: int :param n: Number elements in array. :type n: int :param lenvals: String length. :type lenvals: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is lexically less than string. :rtype: int """ string = stypes.stringToCharP(string) array = stypes.listToCharArrayPtr(array, xLen=lenvals, yLen=n) n = ctypes.c_int(n) lenvals = ctypes.c_int(lenvals) return libspice.lstltc_c(string, n, lenvals, array)
[ "def", "lstltc", "(", "string", ",", "n", ",", "lenvals", ",", "array", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "array", "=", "stypes", ".", "listToCharArrayPtr", "(", "array", ",", "xLen", "=", "lenvals", ",", "yLen", "=", "n", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "lenvals", ")", "return", "libspice", ".", "lstltc_c", "(", "string", ",", "n", ",", "lenvals", ",", "array", ")" ]
Given a character string and an ordered array of character strings, find the index of the largest array element less than the given string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstltc_c.html :param string: Upper bound value to search against. :type string: int :param n: Number elements in array. :type n: int :param lenvals: String length. :type lenvals: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is lexically less than string. :rtype: int
[ "Given", "a", "character", "string", "and", "an", "ordered", "array", "of", "character", "strings", "find", "the", "index", "of", "the", "largest", "array", "element", "less", "than", "the", "given", "string", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8152-L8177
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lstltd
def lstltd(x, n, array): """ Given a number x and an array of non-decreasing floats find the index of the largest array element less than x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstltd_c.html :param x: Value to search against :type x: float :param n: Number elements in array :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than x. :rtype: int """ array = stypes.toDoubleVector(array) x = ctypes.c_double(x) n = ctypes.c_int(n) return libspice.lstltd_c(x, n, array)
python
def lstltd(x, n, array): """ Given a number x and an array of non-decreasing floats find the index of the largest array element less than x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstltd_c.html :param x: Value to search against :type x: float :param n: Number elements in array :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than x. :rtype: int """ array = stypes.toDoubleVector(array) x = ctypes.c_double(x) n = ctypes.c_int(n) return libspice.lstltd_c(x, n, array)
[ "def", "lstltd", "(", "x", ",", "n", ",", "array", ")", ":", "array", "=", "stypes", ".", "toDoubleVector", "(", "array", ")", "x", "=", "ctypes", ".", "c_double", "(", "x", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "return", "libspice", ".", "lstltd_c", "(", "x", ",", "n", ",", "array", ")" ]
Given a number x and an array of non-decreasing floats find the index of the largest array element less than x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstltd_c.html :param x: Value to search against :type x: float :param n: Number elements in array :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than x. :rtype: int
[ "Given", "a", "number", "x", "and", "an", "array", "of", "non", "-", "decreasing", "floats", "find", "the", "index", "of", "the", "largest", "array", "element", "less", "than", "x", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8181-L8200
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lstlti
def lstlti(x, n, array): """ Given a number x and an array of non-decreasing int, find the index of the largest array element less than x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstlti_c.html :param x: Value to search against :type x: int :param n: Number elements in array :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than x. :rtype: int """ array = stypes.toIntVector(array) x = ctypes.c_int(x) n = ctypes.c_int(n) return libspice.lstlti_c(x, n, array)
python
def lstlti(x, n, array): """ Given a number x and an array of non-decreasing int, find the index of the largest array element less than x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstlti_c.html :param x: Value to search against :type x: int :param n: Number elements in array :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than x. :rtype: int """ array = stypes.toIntVector(array) x = ctypes.c_int(x) n = ctypes.c_int(n) return libspice.lstlti_c(x, n, array)
[ "def", "lstlti", "(", "x", ",", "n", ",", "array", ")", ":", "array", "=", "stypes", ".", "toIntVector", "(", "array", ")", "x", "=", "ctypes", ".", "c_int", "(", "x", ")", "n", "=", "ctypes", ".", "c_int", "(", "n", ")", "return", "libspice", ".", "lstlti_c", "(", "x", ",", "n", ",", "array", ")" ]
Given a number x and an array of non-decreasing int, find the index of the largest array element less than x. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lstlti_c.html :param x: Value to search against :type x: int :param n: Number elements in array :type n: int :param array: Array of possible lower bounds :type array: list :return: index of the last element of array that is less than x. :rtype: int
[ "Given", "a", "number", "x", "and", "an", "array", "of", "non", "-", "decreasing", "int", "find", "the", "index", "of", "the", "largest", "array", "element", "less", "than", "x", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8204-L8223
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lx4dec
def lx4dec(string, first): """ Scan a string from a specified starting position for the end of a decimal number. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4dec_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple """ string = stypes.stringToCharP(string) first = ctypes.c_int(first) last = ctypes.c_int() nchar = ctypes.c_int() libspice.lx4dec_c(string, first, ctypes.byref(last), ctypes.byref(nchar)) return last.value, nchar.value
python
def lx4dec(string, first): """ Scan a string from a specified starting position for the end of a decimal number. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4dec_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple """ string = stypes.stringToCharP(string) first = ctypes.c_int(first) last = ctypes.c_int() nchar = ctypes.c_int() libspice.lx4dec_c(string, first, ctypes.byref(last), ctypes.byref(nchar)) return last.value, nchar.value
[ "def", "lx4dec", "(", "string", ",", "first", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "first", "=", "ctypes", ".", "c_int", "(", "first", ")", "last", "=", "ctypes", ".", "c_int", "(", ")", "nchar", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "lx4dec_c", "(", "string", ",", "first", ",", "ctypes", ".", "byref", "(", "last", ")", ",", "ctypes", ".", "byref", "(", "nchar", ")", ")", "return", "last", ".", "value", ",", "nchar", ".", "value" ]
Scan a string from a specified starting position for the end of a decimal number. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4dec_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple
[ "Scan", "a", "string", "from", "a", "specified", "starting", "position", "for", "the", "end", "of", "a", "decimal", "number", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8259-L8278
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lx4num
def lx4num(string, first): """ Scan a string from a specified starting position for the end of a number. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4num_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple """ string = stypes.stringToCharP(string) first = ctypes.c_int(first) last = ctypes.c_int() nchar = ctypes.c_int() libspice.lx4num_c(string, first, ctypes.byref(last), ctypes.byref(nchar)) return last.value, nchar.value
python
def lx4num(string, first): """ Scan a string from a specified starting position for the end of a number. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4num_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple """ string = stypes.stringToCharP(string) first = ctypes.c_int(first) last = ctypes.c_int() nchar = ctypes.c_int() libspice.lx4num_c(string, first, ctypes.byref(last), ctypes.byref(nchar)) return last.value, nchar.value
[ "def", "lx4num", "(", "string", ",", "first", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "first", "=", "ctypes", ".", "c_int", "(", "first", ")", "last", "=", "ctypes", ".", "c_int", "(", ")", "nchar", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "lx4num_c", "(", "string", ",", "first", ",", "ctypes", ".", "byref", "(", "last", ")", ",", "ctypes", ".", "byref", "(", "nchar", ")", ")", "return", "last", ".", "value", ",", "nchar", ".", "value" ]
Scan a string from a specified starting position for the end of a number. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4num_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple
[ "Scan", "a", "string", "from", "a", "specified", "starting", "position", "for", "the", "end", "of", "a", "number", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8282-L8301
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lx4sgn
def lx4sgn(string, first): """ Scan a string from a specified starting position for the end of a signed integer. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4sgn_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple """ string = stypes.stringToCharP(string) first = ctypes.c_int(first) last = ctypes.c_int() nchar = ctypes.c_int() libspice.lx4sgn_c(string, first, ctypes.byref(last), ctypes.byref(nchar)) return last.value, nchar.value
python
def lx4sgn(string, first): """ Scan a string from a specified starting position for the end of a signed integer. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4sgn_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple """ string = stypes.stringToCharP(string) first = ctypes.c_int(first) last = ctypes.c_int() nchar = ctypes.c_int() libspice.lx4sgn_c(string, first, ctypes.byref(last), ctypes.byref(nchar)) return last.value, nchar.value
[ "def", "lx4sgn", "(", "string", ",", "first", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "first", "=", "ctypes", ".", "c_int", "(", "first", ")", "last", "=", "ctypes", ".", "c_int", "(", ")", "nchar", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "lx4sgn_c", "(", "string", ",", "first", ",", "ctypes", ".", "byref", "(", "last", ")", ",", "ctypes", ".", "byref", "(", "nchar", ")", ")", "return", "last", ".", "value", ",", "nchar", ".", "value" ]
Scan a string from a specified starting position for the end of a signed integer. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4sgn_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple
[ "Scan", "a", "string", "from", "a", "specified", "starting", "position", "for", "the", "end", "of", "a", "signed", "integer", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8305-L8324
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
lx4uns
def lx4uns(string, first): """ Scan a string from a specified starting position for the end of an unsigned integer. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4uns_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple """ string = stypes.stringToCharP(string) first = ctypes.c_int(first) last = ctypes.c_int() nchar = ctypes.c_int() libspice.lx4uns_c(string, first, ctypes.byref(last), ctypes.byref(nchar)) return last.value, nchar.value
python
def lx4uns(string, first): """ Scan a string from a specified starting position for the end of an unsigned integer. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4uns_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple """ string = stypes.stringToCharP(string) first = ctypes.c_int(first) last = ctypes.c_int() nchar = ctypes.c_int() libspice.lx4uns_c(string, first, ctypes.byref(last), ctypes.byref(nchar)) return last.value, nchar.value
[ "def", "lx4uns", "(", "string", ",", "first", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "first", "=", "ctypes", ".", "c_int", "(", "first", ")", "last", "=", "ctypes", ".", "c_int", "(", ")", "nchar", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "lx4uns_c", "(", "string", ",", "first", ",", "ctypes", ".", "byref", "(", "last", ")", ",", "ctypes", ".", "byref", "(", "nchar", ")", ")", "return", "last", ".", "value", ",", "nchar", ".", "value" ]
Scan a string from a specified starting position for the end of an unsigned integer. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/lx4uns_c.html :param string: Any character string. :type string: str :param first: First character to scan from in string. :type first: int :return: last and nchar :rtype: tuple
[ "Scan", "a", "string", "from", "a", "specified", "starting", "position", "for", "the", "end", "of", "an", "unsigned", "integer", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8328-L8347
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
m2eul
def m2eul(r, axis3, axis2, axis1): """ Factor a rotation matrix as a product of three rotations about specified coordinate axes. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2eul_c.html :param r: A rotation matrix to be factored :type r: 3x3-Element Array of floats :param axis3: third rotation axes. :type axis3: int :param axis2: second rotation axes. :type axis2: int :param axis1: first rotation axes. :type axis1: int :return: Third, second, and first Euler angles, in radians. :rtype: tuple """ r = stypes.toDoubleMatrix(r) axis3 = ctypes.c_int(axis3) axis2 = ctypes.c_int(axis2) axis1 = ctypes.c_int(axis1) angle3 = ctypes.c_double() angle2 = ctypes.c_double() angle1 = ctypes.c_double() libspice.m2eul_c(r, axis3, axis2, axis1, ctypes.byref(angle3), ctypes.byref(angle2), ctypes.byref(angle1)) return angle3.value, angle2.value, angle1.value
python
def m2eul(r, axis3, axis2, axis1): """ Factor a rotation matrix as a product of three rotations about specified coordinate axes. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2eul_c.html :param r: A rotation matrix to be factored :type r: 3x3-Element Array of floats :param axis3: third rotation axes. :type axis3: int :param axis2: second rotation axes. :type axis2: int :param axis1: first rotation axes. :type axis1: int :return: Third, second, and first Euler angles, in radians. :rtype: tuple """ r = stypes.toDoubleMatrix(r) axis3 = ctypes.c_int(axis3) axis2 = ctypes.c_int(axis2) axis1 = ctypes.c_int(axis1) angle3 = ctypes.c_double() angle2 = ctypes.c_double() angle1 = ctypes.c_double() libspice.m2eul_c(r, axis3, axis2, axis1, ctypes.byref(angle3), ctypes.byref(angle2), ctypes.byref(angle1)) return angle3.value, angle2.value, angle1.value
[ "def", "m2eul", "(", "r", ",", "axis3", ",", "axis2", ",", "axis1", ")", ":", "r", "=", "stypes", ".", "toDoubleMatrix", "(", "r", ")", "axis3", "=", "ctypes", ".", "c_int", "(", "axis3", ")", "axis2", "=", "ctypes", ".", "c_int", "(", "axis2", ")", "axis1", "=", "ctypes", ".", "c_int", "(", "axis1", ")", "angle3", "=", "ctypes", ".", "c_double", "(", ")", "angle2", "=", "ctypes", ".", "c_double", "(", ")", "angle1", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "m2eul_c", "(", "r", ",", "axis3", ",", "axis2", ",", "axis1", ",", "ctypes", ".", "byref", "(", "angle3", ")", ",", "ctypes", ".", "byref", "(", "angle2", ")", ",", "ctypes", ".", "byref", "(", "angle1", ")", ")", "return", "angle3", ".", "value", ",", "angle2", ".", "value", ",", "angle1", ".", "value" ]
Factor a rotation matrix as a product of three rotations about specified coordinate axes. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2eul_c.html :param r: A rotation matrix to be factored :type r: 3x3-Element Array of floats :param axis3: third rotation axes. :type axis3: int :param axis2: second rotation axes. :type axis2: int :param axis1: first rotation axes. :type axis1: int :return: Third, second, and first Euler angles, in radians. :rtype: tuple
[ "Factor", "a", "rotation", "matrix", "as", "a", "product", "of", "three", "rotations", "about", "specified", "coordinate", "axes", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8381-L8408
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
m2q
def m2q(r): """ Find a unit quaternion corresponding to a specified rotation matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2q_c.html :param r: A rotation matrix to be factored :type r: 3x3-Element Array of floats :return: A unit quaternion representing the rotation matrix :rtype: 4-Element Array of floats """ r = stypes.toDoubleMatrix(r) q = stypes.emptyDoubleVector(4) libspice.m2q_c(r, q) return stypes.cVectorToPython(q)
python
def m2q(r): """ Find a unit quaternion corresponding to a specified rotation matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2q_c.html :param r: A rotation matrix to be factored :type r: 3x3-Element Array of floats :return: A unit quaternion representing the rotation matrix :rtype: 4-Element Array of floats """ r = stypes.toDoubleMatrix(r) q = stypes.emptyDoubleVector(4) libspice.m2q_c(r, q) return stypes.cVectorToPython(q)
[ "def", "m2q", "(", "r", ")", ":", "r", "=", "stypes", ".", "toDoubleMatrix", "(", "r", ")", "q", "=", "stypes", ".", "emptyDoubleVector", "(", "4", ")", "libspice", ".", "m2q_c", "(", "r", ",", "q", ")", "return", "stypes", ".", "cVectorToPython", "(", "q", ")" ]
Find a unit quaternion corresponding to a specified rotation matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/m2q_c.html :param r: A rotation matrix to be factored :type r: 3x3-Element Array of floats :return: A unit quaternion representing the rotation matrix :rtype: 4-Element Array of floats
[ "Find", "a", "unit", "quaternion", "corresponding", "to", "a", "specified", "rotation", "matrix", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8412-L8426
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
matchi
def matchi(string, templ, wstr, wchr): """ Determine whether a string is matched by a template containing wild cards. The pattern comparison is case-insensitive. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchi_c.html :param string: String to be tested. :type string: str :param templ: Template (with wild cards) to test against string. :type templ: str :param wstr: Wild string token. :type wstr: str of length 1 :param wchr: Wild character token. :type wchr: str of length 1 :return: The function returns True if string matches templ, else False :rtype: bool """ string = stypes.stringToCharP(string) templ = stypes.stringToCharP(templ) wstr = ctypes.c_char(wstr.encode(encoding='UTF-8')) wchr = ctypes.c_char(wchr.encode(encoding='UTF-8')) return bool(libspice.matchi_c(string, templ, wstr, wchr))
python
def matchi(string, templ, wstr, wchr): """ Determine whether a string is matched by a template containing wild cards. The pattern comparison is case-insensitive. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchi_c.html :param string: String to be tested. :type string: str :param templ: Template (with wild cards) to test against string. :type templ: str :param wstr: Wild string token. :type wstr: str of length 1 :param wchr: Wild character token. :type wchr: str of length 1 :return: The function returns True if string matches templ, else False :rtype: bool """ string = stypes.stringToCharP(string) templ = stypes.stringToCharP(templ) wstr = ctypes.c_char(wstr.encode(encoding='UTF-8')) wchr = ctypes.c_char(wchr.encode(encoding='UTF-8')) return bool(libspice.matchi_c(string, templ, wstr, wchr))
[ "def", "matchi", "(", "string", ",", "templ", ",", "wstr", ",", "wchr", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "templ", "=", "stypes", ".", "stringToCharP", "(", "templ", ")", "wstr", "=", "ctypes", ".", "c_char", "(", "wstr", ".", "encode", "(", "encoding", "=", "'UTF-8'", ")", ")", "wchr", "=", "ctypes", ".", "c_char", "(", "wchr", ".", "encode", "(", "encoding", "=", "'UTF-8'", ")", ")", "return", "bool", "(", "libspice", ".", "matchi_c", "(", "string", ",", "templ", ",", "wstr", ",", "wchr", ")", ")" ]
Determine whether a string is matched by a template containing wild cards. The pattern comparison is case-insensitive. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchi_c.html :param string: String to be tested. :type string: str :param templ: Template (with wild cards) to test against string. :type templ: str :param wstr: Wild string token. :type wstr: str of length 1 :param wchr: Wild character token. :type wchr: str of length 1 :return: The function returns True if string matches templ, else False :rtype: bool
[ "Determine", "whether", "a", "string", "is", "matched", "by", "a", "template", "containing", "wild", "cards", ".", "The", "pattern", "comparison", "is", "case", "-", "insensitive", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8430-L8452
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
matchw
def matchw(string, templ, wstr, wchr): # ctypes.c_char(wstr.encode(encoding='UTF-8') """ Determine whether a string is matched by a template containing wild cards. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchw_c.html :param string: String to be tested. :type string: str :param templ: Template (with wild cards) to test against string. :type templ: str :param wstr: Wild string token. :type wstr: str of length 1 :param wchr: Wild character token. :type wchr: str of length 1 :return: The function returns True if string matches templ, else False :rtype: bool """ string = stypes.stringToCharP(string) templ = stypes.stringToCharP(templ) wstr = ctypes.c_char(wstr.encode(encoding='UTF-8')) wchr = ctypes.c_char(wchr.encode(encoding='UTF-8')) return bool(libspice.matchw_c(string, templ, wstr, wchr))
python
def matchw(string, templ, wstr, wchr): # ctypes.c_char(wstr.encode(encoding='UTF-8') """ Determine whether a string is matched by a template containing wild cards. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchw_c.html :param string: String to be tested. :type string: str :param templ: Template (with wild cards) to test against string. :type templ: str :param wstr: Wild string token. :type wstr: str of length 1 :param wchr: Wild character token. :type wchr: str of length 1 :return: The function returns True if string matches templ, else False :rtype: bool """ string = stypes.stringToCharP(string) templ = stypes.stringToCharP(templ) wstr = ctypes.c_char(wstr.encode(encoding='UTF-8')) wchr = ctypes.c_char(wchr.encode(encoding='UTF-8')) return bool(libspice.matchw_c(string, templ, wstr, wchr))
[ "def", "matchw", "(", "string", ",", "templ", ",", "wstr", ",", "wchr", ")", ":", "# ctypes.c_char(wstr.encode(encoding='UTF-8')", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "templ", "=", "stypes", ".", "stringToCharP", "(", "templ", ")", "wstr", "=", "ctypes", ".", "c_char", "(", "wstr", ".", "encode", "(", "encoding", "=", "'UTF-8'", ")", ")", "wchr", "=", "ctypes", ".", "c_char", "(", "wchr", ".", "encode", "(", "encoding", "=", "'UTF-8'", ")", ")", "return", "bool", "(", "libspice", ".", "matchw_c", "(", "string", ",", "templ", ",", "wstr", ",", "wchr", ")", ")" ]
Determine whether a string is matched by a template containing wild cards. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/matchw_c.html :param string: String to be tested. :type string: str :param templ: Template (with wild cards) to test against string. :type templ: str :param wstr: Wild string token. :type wstr: str of length 1 :param wchr: Wild character token. :type wchr: str of length 1 :return: The function returns True if string matches templ, else False :rtype: bool
[ "Determine", "whether", "a", "string", "is", "matched", "by", "a", "template", "containing", "wild", "cards", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8456-L8478
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mequ
def mequ(m1): """ Set one double precision 3x3 matrix equal to another. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequ_c.html :param m1: input matrix. :type m1: 3x3-Element Array of floats :return: Output matrix equal to m1. :rtype: 3x3-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) mout = stypes.emptyDoubleMatrix() libspice.mequ_c(m1, mout) return stypes.cMatrixToNumpy(mout)
python
def mequ(m1): """ Set one double precision 3x3 matrix equal to another. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequ_c.html :param m1: input matrix. :type m1: 3x3-Element Array of floats :return: Output matrix equal to m1. :rtype: 3x3-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) mout = stypes.emptyDoubleMatrix() libspice.mequ_c(m1, mout) return stypes.cMatrixToNumpy(mout)
[ "def", "mequ", "(", "m1", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "mout", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "mequ_c", "(", "m1", ",", "mout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "mout", ")" ]
Set one double precision 3x3 matrix equal to another. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequ_c.html :param m1: input matrix. :type m1: 3x3-Element Array of floats :return: Output matrix equal to m1. :rtype: 3x3-Element Array of floats
[ "Set", "one", "double", "precision", "3x3", "matrix", "equal", "to", "another", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8490-L8504
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mequg
def mequg(m1, nr, nc): """ Set one double precision matrix of arbitrary size equal to another. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequg_c.html :param m1: Input matrix. :type m1: NxM-Element Array of floats :param nr: Row dimension of m1. :type nr: int :param nc: Column dimension of m1. :type nc: int :return: Output matrix equal to m1 :rtype: NxM-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) mout = stypes.emptyDoubleMatrix(x=nc, y=nr) nc = ctypes.c_int(nc) nr = ctypes.c_int(nr) libspice.mequg_c(m1, nc, nr, mout) return stypes.cMatrixToNumpy(mout)
python
def mequg(m1, nr, nc): """ Set one double precision matrix of arbitrary size equal to another. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequg_c.html :param m1: Input matrix. :type m1: NxM-Element Array of floats :param nr: Row dimension of m1. :type nr: int :param nc: Column dimension of m1. :type nc: int :return: Output matrix equal to m1 :rtype: NxM-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) mout = stypes.emptyDoubleMatrix(x=nc, y=nr) nc = ctypes.c_int(nc) nr = ctypes.c_int(nr) libspice.mequg_c(m1, nc, nr, mout) return stypes.cMatrixToNumpy(mout)
[ "def", "mequg", "(", "m1", ",", "nr", ",", "nc", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "mout", "=", "stypes", ".", "emptyDoubleMatrix", "(", "x", "=", "nc", ",", "y", "=", "nr", ")", "nc", "=", "ctypes", ".", "c_int", "(", "nc", ")", "nr", "=", "ctypes", ".", "c_int", "(", "nr", ")", "libspice", ".", "mequg_c", "(", "m1", ",", "nc", ",", "nr", ",", "mout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "mout", ")" ]
Set one double precision matrix of arbitrary size equal to another. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mequg_c.html :param m1: Input matrix. :type m1: NxM-Element Array of floats :param nr: Row dimension of m1. :type nr: int :param nc: Column dimension of m1. :type nc: int :return: Output matrix equal to m1 :rtype: NxM-Element Array of floats
[ "Set", "one", "double", "precision", "matrix", "of", "arbitrary", "size", "equal", "to", "another", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8508-L8528
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mtxm
def mtxm(m1, m2): """ Multiply the transpose of a 3x3 matrix and a 3x3 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxm_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param m2: 3x3 double precision matrix. :type m2: 3x3-Element Array of floats :return: The produce m1 transpose times m2. :rtype: 3x3-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix() libspice.mtxm_c(m1, m2, mout) return stypes.cMatrixToNumpy(mout)
python
def mtxm(m1, m2): """ Multiply the transpose of a 3x3 matrix and a 3x3 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxm_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param m2: 3x3 double precision matrix. :type m2: 3x3-Element Array of floats :return: The produce m1 transpose times m2. :rtype: 3x3-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix() libspice.mtxm_c(m1, m2, mout) return stypes.cMatrixToNumpy(mout)
[ "def", "mtxm", "(", "m1", ",", "m2", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "m2", "=", "stypes", ".", "toDoubleMatrix", "(", "m2", ")", "mout", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "mtxm_c", "(", "m1", ",", "m2", ",", "mout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "mout", ")" ]
Multiply the transpose of a 3x3 matrix and a 3x3 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxm_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param m2: 3x3 double precision matrix. :type m2: 3x3-Element Array of floats :return: The produce m1 transpose times m2. :rtype: 3x3-Element Array of floats
[ "Multiply", "the", "transpose", "of", "a", "3x3", "matrix", "and", "a", "3x3", "matrix", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8540-L8557
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mtxmg
def mtxmg(m1, m2, ncol1, nr1r2, ncol2): """ Multiply the transpose of a matrix with another matrix, both of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxmg_c.html :param m1: nr1r2 X ncol1 double precision matrix. :type m1: NxM-Element Array of floats :param m2: nr1r2 X ncol2 double precision matrix. :type m2: NxM-Element Array of floats :param ncol1: Column dimension of m1 and row dimension of mout. :type ncol1: int :param nr1r2: Row dimension of m1 and m2. :type nr1r2: int :param ncol2: Column dimension of m2. :type ncol2: int :return: Transpose of m1 times m2. :rtype: NxM-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix(x=ncol2, y=ncol1) ncol1 = ctypes.c_int(ncol1) nr1r2 = ctypes.c_int(nr1r2) ncol2 = ctypes.c_int(ncol2) libspice.mtxmg_c(m1, m2, ncol1, nr1r2, ncol2, mout) return stypes.cMatrixToNumpy(mout)
python
def mtxmg(m1, m2, ncol1, nr1r2, ncol2): """ Multiply the transpose of a matrix with another matrix, both of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxmg_c.html :param m1: nr1r2 X ncol1 double precision matrix. :type m1: NxM-Element Array of floats :param m2: nr1r2 X ncol2 double precision matrix. :type m2: NxM-Element Array of floats :param ncol1: Column dimension of m1 and row dimension of mout. :type ncol1: int :param nr1r2: Row dimension of m1 and m2. :type nr1r2: int :param ncol2: Column dimension of m2. :type ncol2: int :return: Transpose of m1 times m2. :rtype: NxM-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix(x=ncol2, y=ncol1) ncol1 = ctypes.c_int(ncol1) nr1r2 = ctypes.c_int(nr1r2) ncol2 = ctypes.c_int(ncol2) libspice.mtxmg_c(m1, m2, ncol1, nr1r2, ncol2, mout) return stypes.cMatrixToNumpy(mout)
[ "def", "mtxmg", "(", "m1", ",", "m2", ",", "ncol1", ",", "nr1r2", ",", "ncol2", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "m2", "=", "stypes", ".", "toDoubleMatrix", "(", "m2", ")", "mout", "=", "stypes", ".", "emptyDoubleMatrix", "(", "x", "=", "ncol2", ",", "y", "=", "ncol1", ")", "ncol1", "=", "ctypes", ".", "c_int", "(", "ncol1", ")", "nr1r2", "=", "ctypes", ".", "c_int", "(", "nr1r2", ")", "ncol2", "=", "ctypes", ".", "c_int", "(", "ncol2", ")", "libspice", ".", "mtxmg_c", "(", "m1", ",", "m2", ",", "ncol1", ",", "nr1r2", ",", "ncol2", ",", "mout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "mout", ")" ]
Multiply the transpose of a matrix with another matrix, both of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxmg_c.html :param m1: nr1r2 X ncol1 double precision matrix. :type m1: NxM-Element Array of floats :param m2: nr1r2 X ncol2 double precision matrix. :type m2: NxM-Element Array of floats :param ncol1: Column dimension of m1 and row dimension of mout. :type ncol1: int :param nr1r2: Row dimension of m1 and m2. :type nr1r2: int :param ncol2: Column dimension of m2. :type ncol2: int :return: Transpose of m1 times m2. :rtype: NxM-Element Array of floats
[ "Multiply", "the", "transpose", "of", "a", "matrix", "with", "another", "matrix", "both", "of", "arbitrary", "size", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8561-L8588
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mtxv
def mtxv(m1, vin): """ Multiplies the transpose of a 3x3 matrix on the left with a vector on the right. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxv_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param vin: 3-dimensional double precision vector. :type vin: 3-Element Array of floats :return: 3-dimensional double precision vector. :rtype: 3-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) vin = stypes.toDoubleVector(vin) vout = stypes.emptyDoubleVector(3) libspice.mtxv_c(m1, vin, vout) return stypes.cVectorToPython(vout)
python
def mtxv(m1, vin): """ Multiplies the transpose of a 3x3 matrix on the left with a vector on the right. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxv_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param vin: 3-dimensional double precision vector. :type vin: 3-Element Array of floats :return: 3-dimensional double precision vector. :rtype: 3-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) vin = stypes.toDoubleVector(vin) vout = stypes.emptyDoubleVector(3) libspice.mtxv_c(m1, vin, vout) return stypes.cVectorToPython(vout)
[ "def", "mtxv", "(", "m1", ",", "vin", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "vin", "=", "stypes", ".", "toDoubleVector", "(", "vin", ")", "vout", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "mtxv_c", "(", "m1", ",", "vin", ",", "vout", ")", "return", "stypes", ".", "cVectorToPython", "(", "vout", ")" ]
Multiplies the transpose of a 3x3 matrix on the left with a vector on the right. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxv_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param vin: 3-dimensional double precision vector. :type vin: 3-Element Array of floats :return: 3-dimensional double precision vector. :rtype: 3-Element Array of floats
[ "Multiplies", "the", "transpose", "of", "a", "3x3", "matrix", "on", "the", "left", "with", "a", "vector", "on", "the", "right", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8592-L8610
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mtxvg
def mtxvg(m1, v2, ncol1, nr1r2): """ Multiply the transpose of a matrix and a vector of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxvg_c.html :param m1: Left-hand matrix to be multiplied. :type m1: NxM-Element Array of floats :param v2: Right-hand vector to be multiplied. :type v2: Array of floats :param ncol1: Column dimension of m1 and length of vout. :type ncol1: int :param nr1r2: Row dimension of m1 and length of v2. :type nr1r2: int :return: Product vector m1 transpose * v2. :rtype: Array of floats """ m1 = stypes.toDoubleMatrix(m1) v2 = stypes.toDoubleVector(v2) ncol1 = ctypes.c_int(ncol1) nr1r2 = ctypes.c_int(nr1r2) vout = stypes.emptyDoubleVector(ncol1.value) libspice.mtxvg_c(m1, v2, ncol1, nr1r2, vout) return stypes.cVectorToPython(vout)
python
def mtxvg(m1, v2, ncol1, nr1r2): """ Multiply the transpose of a matrix and a vector of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxvg_c.html :param m1: Left-hand matrix to be multiplied. :type m1: NxM-Element Array of floats :param v2: Right-hand vector to be multiplied. :type v2: Array of floats :param ncol1: Column dimension of m1 and length of vout. :type ncol1: int :param nr1r2: Row dimension of m1 and length of v2. :type nr1r2: int :return: Product vector m1 transpose * v2. :rtype: Array of floats """ m1 = stypes.toDoubleMatrix(m1) v2 = stypes.toDoubleVector(v2) ncol1 = ctypes.c_int(ncol1) nr1r2 = ctypes.c_int(nr1r2) vout = stypes.emptyDoubleVector(ncol1.value) libspice.mtxvg_c(m1, v2, ncol1, nr1r2, vout) return stypes.cVectorToPython(vout)
[ "def", "mtxvg", "(", "m1", ",", "v2", ",", "ncol1", ",", "nr1r2", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "v2", "=", "stypes", ".", "toDoubleVector", "(", "v2", ")", "ncol1", "=", "ctypes", ".", "c_int", "(", "ncol1", ")", "nr1r2", "=", "ctypes", ".", "c_int", "(", "nr1r2", ")", "vout", "=", "stypes", ".", "emptyDoubleVector", "(", "ncol1", ".", "value", ")", "libspice", ".", "mtxvg_c", "(", "m1", ",", "v2", ",", "ncol1", ",", "nr1r2", ",", "vout", ")", "return", "stypes", ".", "cVectorToPython", "(", "vout", ")" ]
Multiply the transpose of a matrix and a vector of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxvg_c.html :param m1: Left-hand matrix to be multiplied. :type m1: NxM-Element Array of floats :param v2: Right-hand vector to be multiplied. :type v2: Array of floats :param ncol1: Column dimension of m1 and length of vout. :type ncol1: int :param nr1r2: Row dimension of m1 and length of v2. :type nr1r2: int :return: Product vector m1 transpose * v2. :rtype: Array of floats
[ "Multiply", "the", "transpose", "of", "a", "matrix", "and", "a", "vector", "of", "arbitrary", "size", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8614-L8638
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mxm
def mxm(m1, m2): """ Multiply two 3x3 matrices. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxm_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param m2: 3x3 double precision matrix. :type m2: 3x3-Element Array of floats :return: 3x3 double precision matrix. :rtype: 3x3-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix() libspice.mxm_c(m1, m2, mout) return stypes.cMatrixToNumpy(mout)
python
def mxm(m1, m2): """ Multiply two 3x3 matrices. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxm_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param m2: 3x3 double precision matrix. :type m2: 3x3-Element Array of floats :return: 3x3 double precision matrix. :rtype: 3x3-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix() libspice.mxm_c(m1, m2, mout) return stypes.cMatrixToNumpy(mout)
[ "def", "mxm", "(", "m1", ",", "m2", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "m2", "=", "stypes", ".", "toDoubleMatrix", "(", "m2", ")", "mout", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "mxm_c", "(", "m1", ",", "m2", ",", "mout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "mout", ")" ]
Multiply two 3x3 matrices. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxm_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param m2: 3x3 double precision matrix. :type m2: 3x3-Element Array of floats :return: 3x3 double precision matrix. :rtype: 3x3-Element Array of floats
[ "Multiply", "two", "3x3", "matrices", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8642-L8659
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mxmg
def mxmg(m1, m2, nrow1, ncol1, ncol2): """ Multiply two double precision matrices of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmg_c.html :param m1: nrow1 X ncol1 double precision matrix. :type m1: NxM-Element Array of floats :param m2: ncol1 X ncol2 double precision matrix. :type m2: NxM-Element Array of floats :param nrow1: Row dimension of m1 :type nrow1: int :param ncol1: Column dimension of m1 and row dimension of m2. :type ncol1: int :param ncol2: Column dimension of m2 :type ncol2: int :return: nrow1 X ncol2 double precision matrix. :rtype: NxM-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix(x=ncol2, y=nrow1) nrow1 = ctypes.c_int(nrow1) ncol1 = ctypes.c_int(ncol1) ncol2 = ctypes.c_int(ncol2) libspice.mxmg_c(m1, m2, nrow1, ncol1, ncol2, mout) return stypes.cMatrixToNumpy(mout)
python
def mxmg(m1, m2, nrow1, ncol1, ncol2): """ Multiply two double precision matrices of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmg_c.html :param m1: nrow1 X ncol1 double precision matrix. :type m1: NxM-Element Array of floats :param m2: ncol1 X ncol2 double precision matrix. :type m2: NxM-Element Array of floats :param nrow1: Row dimension of m1 :type nrow1: int :param ncol1: Column dimension of m1 and row dimension of m2. :type ncol1: int :param ncol2: Column dimension of m2 :type ncol2: int :return: nrow1 X ncol2 double precision matrix. :rtype: NxM-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix(x=ncol2, y=nrow1) nrow1 = ctypes.c_int(nrow1) ncol1 = ctypes.c_int(ncol1) ncol2 = ctypes.c_int(ncol2) libspice.mxmg_c(m1, m2, nrow1, ncol1, ncol2, mout) return stypes.cMatrixToNumpy(mout)
[ "def", "mxmg", "(", "m1", ",", "m2", ",", "nrow1", ",", "ncol1", ",", "ncol2", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "m2", "=", "stypes", ".", "toDoubleMatrix", "(", "m2", ")", "mout", "=", "stypes", ".", "emptyDoubleMatrix", "(", "x", "=", "ncol2", ",", "y", "=", "nrow1", ")", "nrow1", "=", "ctypes", ".", "c_int", "(", "nrow1", ")", "ncol1", "=", "ctypes", ".", "c_int", "(", "ncol1", ")", "ncol2", "=", "ctypes", ".", "c_int", "(", "ncol2", ")", "libspice", ".", "mxmg_c", "(", "m1", ",", "m2", ",", "nrow1", ",", "ncol1", ",", "ncol2", ",", "mout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "mout", ")" ]
Multiply two double precision matrices of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmg_c.html :param m1: nrow1 X ncol1 double precision matrix. :type m1: NxM-Element Array of floats :param m2: ncol1 X ncol2 double precision matrix. :type m2: NxM-Element Array of floats :param nrow1: Row dimension of m1 :type nrow1: int :param ncol1: Column dimension of m1 and row dimension of m2. :type ncol1: int :param ncol2: Column dimension of m2 :type ncol2: int :return: nrow1 X ncol2 double precision matrix. :rtype: NxM-Element Array of floats
[ "Multiply", "two", "double", "precision", "matrices", "of", "arbitrary", "size", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8663-L8689
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mxmt
def mxmt(m1, m2): """ Multiply a 3x3 matrix and the transpose of another 3x3 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmt_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param m2: 3x3 double precision matrix. :type m2: 3x3-Element Array of floats :return: The product m1 times m2 transpose. :rtype: float """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix() libspice.mxmt_c(m1, m2, mout) return stypes.cMatrixToNumpy(mout)
python
def mxmt(m1, m2): """ Multiply a 3x3 matrix and the transpose of another 3x3 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmt_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param m2: 3x3 double precision matrix. :type m2: 3x3-Element Array of floats :return: The product m1 times m2 transpose. :rtype: float """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix() libspice.mxmt_c(m1, m2, mout) return stypes.cMatrixToNumpy(mout)
[ "def", "mxmt", "(", "m1", ",", "m2", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "m2", "=", "stypes", ".", "toDoubleMatrix", "(", "m2", ")", "mout", "=", "stypes", ".", "emptyDoubleMatrix", "(", ")", "libspice", ".", "mxmt_c", "(", "m1", ",", "m2", ",", "mout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "mout", ")" ]
Multiply a 3x3 matrix and the transpose of another 3x3 matrix. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmt_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param m2: 3x3 double precision matrix. :type m2: 3x3-Element Array of floats :return: The product m1 times m2 transpose. :rtype: float
[ "Multiply", "a", "3x3", "matrix", "and", "the", "transpose", "of", "another", "3x3", "matrix", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8693-L8710
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mxmtg
def mxmtg(m1, m2, nrow1, nc1c2, nrow2): """ Multiply a matrix and the transpose of a matrix, both of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmtg_c.html :param m1: Left-hand matrix to be multiplied. :type m1: NxM-Element Array of floats :param m2: Right-hand matrix whose transpose is to be multiplied :type m2: NxM-Element Array of floats :param nrow1: Row dimension of m1 and row dimension of mout. :type nrow1: int :param nc1c2: Column dimension of m1 and column dimension of m2. :type nc1c2: int :param nrow2: Row dimension of m2 and column dimension of mout. :type nrow2: int :return: Product matrix. :rtype: NxM-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix(x=nrow2, y=nrow1) nrow1 = ctypes.c_int(nrow1) nc1c2 = ctypes.c_int(nc1c2) nrow2 = ctypes.c_int(nrow2) libspice.mxmtg_c(m1, m2, nrow1, nc1c2, nrow2, mout) return stypes.cMatrixToNumpy(mout)
python
def mxmtg(m1, m2, nrow1, nc1c2, nrow2): """ Multiply a matrix and the transpose of a matrix, both of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmtg_c.html :param m1: Left-hand matrix to be multiplied. :type m1: NxM-Element Array of floats :param m2: Right-hand matrix whose transpose is to be multiplied :type m2: NxM-Element Array of floats :param nrow1: Row dimension of m1 and row dimension of mout. :type nrow1: int :param nc1c2: Column dimension of m1 and column dimension of m2. :type nc1c2: int :param nrow2: Row dimension of m2 and column dimension of mout. :type nrow2: int :return: Product matrix. :rtype: NxM-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) m2 = stypes.toDoubleMatrix(m2) mout = stypes.emptyDoubleMatrix(x=nrow2, y=nrow1) nrow1 = ctypes.c_int(nrow1) nc1c2 = ctypes.c_int(nc1c2) nrow2 = ctypes.c_int(nrow2) libspice.mxmtg_c(m1, m2, nrow1, nc1c2, nrow2, mout) return stypes.cMatrixToNumpy(mout)
[ "def", "mxmtg", "(", "m1", ",", "m2", ",", "nrow1", ",", "nc1c2", ",", "nrow2", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "m2", "=", "stypes", ".", "toDoubleMatrix", "(", "m2", ")", "mout", "=", "stypes", ".", "emptyDoubleMatrix", "(", "x", "=", "nrow2", ",", "y", "=", "nrow1", ")", "nrow1", "=", "ctypes", ".", "c_int", "(", "nrow1", ")", "nc1c2", "=", "ctypes", ".", "c_int", "(", "nc1c2", ")", "nrow2", "=", "ctypes", ".", "c_int", "(", "nrow2", ")", "libspice", ".", "mxmtg_c", "(", "m1", ",", "m2", ",", "nrow1", ",", "nc1c2", ",", "nrow2", ",", "mout", ")", "return", "stypes", ".", "cMatrixToNumpy", "(", "mout", ")" ]
Multiply a matrix and the transpose of a matrix, both of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxmtg_c.html :param m1: Left-hand matrix to be multiplied. :type m1: NxM-Element Array of floats :param m2: Right-hand matrix whose transpose is to be multiplied :type m2: NxM-Element Array of floats :param nrow1: Row dimension of m1 and row dimension of mout. :type nrow1: int :param nc1c2: Column dimension of m1 and column dimension of m2. :type nc1c2: int :param nrow2: Row dimension of m2 and column dimension of mout. :type nrow2: int :return: Product matrix. :rtype: NxM-Element Array of floats
[ "Multiply", "a", "matrix", "and", "the", "transpose", "of", "a", "matrix", "both", "of", "arbitrary", "size", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8714-L8740
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mxv
def mxv(m1, vin): """ Multiply a 3x3 double precision matrix with a 3-dimensional double precision vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxv_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param vin: 3-dimensional double precision vector. :type vin: 3-Element Array of floats :return: 3-dimensional double precision vector. :rtype: 3-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) vin = stypes.toDoubleVector(vin) vout = stypes.emptyDoubleVector(3) libspice.mxv_c(m1, vin, vout) return stypes.cVectorToPython(vout)
python
def mxv(m1, vin): """ Multiply a 3x3 double precision matrix with a 3-dimensional double precision vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxv_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param vin: 3-dimensional double precision vector. :type vin: 3-Element Array of floats :return: 3-dimensional double precision vector. :rtype: 3-Element Array of floats """ m1 = stypes.toDoubleMatrix(m1) vin = stypes.toDoubleVector(vin) vout = stypes.emptyDoubleVector(3) libspice.mxv_c(m1, vin, vout) return stypes.cVectorToPython(vout)
[ "def", "mxv", "(", "m1", ",", "vin", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "vin", "=", "stypes", ".", "toDoubleVector", "(", "vin", ")", "vout", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "mxv_c", "(", "m1", ",", "vin", ",", "vout", ")", "return", "stypes", ".", "cVectorToPython", "(", "vout", ")" ]
Multiply a 3x3 double precision matrix with a 3-dimensional double precision vector. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxv_c.html :param m1: 3x3 double precision matrix. :type m1: 3x3-Element Array of floats :param vin: 3-dimensional double precision vector. :type vin: 3-Element Array of floats :return: 3-dimensional double precision vector. :rtype: 3-Element Array of floats
[ "Multiply", "a", "3x3", "double", "precision", "matrix", "with", "a", "3", "-", "dimensional", "double", "precision", "vector", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8744-L8762
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
mxvg
def mxvg(m1, v2, nrow1, nc1r2): """ Multiply a matrix and a vector of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxvg_c.html :param m1: Left-hand matrix to be multiplied. :type m1: NxM-Element Array of floats :param v2: Right-hand vector to be multiplied. :type v2: Array of floats :param nrow1: Row dimension of m1 and length of vout. :type nrow1: int :param nc1r2: Column dimension of m1 and length of v2. :type nc1r2: int :return: Product vector m1*v2 :rtype: Array of floats """ m1 = stypes.toDoubleMatrix(m1) v2 = stypes.toDoubleVector(v2) nrow1 = ctypes.c_int(nrow1) nc1r2 = ctypes.c_int(nc1r2) vout = stypes.emptyDoubleVector(nrow1.value) libspice.mxvg_c(m1, v2, nrow1, nc1r2, vout) return stypes.cVectorToPython(vout)
python
def mxvg(m1, v2, nrow1, nc1r2): """ Multiply a matrix and a vector of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxvg_c.html :param m1: Left-hand matrix to be multiplied. :type m1: NxM-Element Array of floats :param v2: Right-hand vector to be multiplied. :type v2: Array of floats :param nrow1: Row dimension of m1 and length of vout. :type nrow1: int :param nc1r2: Column dimension of m1 and length of v2. :type nc1r2: int :return: Product vector m1*v2 :rtype: Array of floats """ m1 = stypes.toDoubleMatrix(m1) v2 = stypes.toDoubleVector(v2) nrow1 = ctypes.c_int(nrow1) nc1r2 = ctypes.c_int(nc1r2) vout = stypes.emptyDoubleVector(nrow1.value) libspice.mxvg_c(m1, v2, nrow1, nc1r2, vout) return stypes.cVectorToPython(vout)
[ "def", "mxvg", "(", "m1", ",", "v2", ",", "nrow1", ",", "nc1r2", ")", ":", "m1", "=", "stypes", ".", "toDoubleMatrix", "(", "m1", ")", "v2", "=", "stypes", ".", "toDoubleVector", "(", "v2", ")", "nrow1", "=", "ctypes", ".", "c_int", "(", "nrow1", ")", "nc1r2", "=", "ctypes", ".", "c_int", "(", "nc1r2", ")", "vout", "=", "stypes", ".", "emptyDoubleVector", "(", "nrow1", ".", "value", ")", "libspice", ".", "mxvg_c", "(", "m1", ",", "v2", ",", "nrow1", ",", "nc1r2", ",", "vout", ")", "return", "stypes", ".", "cVectorToPython", "(", "vout", ")" ]
Multiply a matrix and a vector of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mxvg_c.html :param m1: Left-hand matrix to be multiplied. :type m1: NxM-Element Array of floats :param v2: Right-hand vector to be multiplied. :type v2: Array of floats :param nrow1: Row dimension of m1 and length of vout. :type nrow1: int :param nc1r2: Column dimension of m1 and length of v2. :type nc1r2: int :return: Product vector m1*v2 :rtype: Array of floats
[ "Multiply", "a", "matrix", "and", "a", "vector", "of", "arbitrary", "size", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8766-L8789
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
namfrm
def namfrm(frname): """ Look up the frame ID code associated with a string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/namfrm_c.html :param frname: The name of some reference frame. :type frname: str :return: The SPICE ID code of the frame. :rtype: int """ frname = stypes.stringToCharP(frname) frcode = ctypes.c_int() libspice.namfrm_c(frname, ctypes.byref(frcode)) return frcode.value
python
def namfrm(frname): """ Look up the frame ID code associated with a string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/namfrm_c.html :param frname: The name of some reference frame. :type frname: str :return: The SPICE ID code of the frame. :rtype: int """ frname = stypes.stringToCharP(frname) frcode = ctypes.c_int() libspice.namfrm_c(frname, ctypes.byref(frcode)) return frcode.value
[ "def", "namfrm", "(", "frname", ")", ":", "frname", "=", "stypes", ".", "stringToCharP", "(", "frname", ")", "frcode", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "namfrm_c", "(", "frname", ",", "ctypes", ".", "byref", "(", "frcode", ")", ")", "return", "frcode", ".", "value" ]
Look up the frame ID code associated with a string. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/namfrm_c.html :param frname: The name of some reference frame. :type frname: str :return: The SPICE ID code of the frame. :rtype: int
[ "Look", "up", "the", "frame", "ID", "code", "associated", "with", "a", "string", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8797-L8811
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ncpos
def ncpos(string, chars, start): """ Find the first occurrence in a string of a character NOT belonging to a collection of characters, starting at a specified location searching forward. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncpos_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one not in chars. :type start: int :return: index :rtype: int """ string = stypes.stringToCharP(string) chars = stypes.stringToCharP(chars) start = ctypes.c_int(start) return libspice.ncpos_c(string, chars, start)
python
def ncpos(string, chars, start): """ Find the first occurrence in a string of a character NOT belonging to a collection of characters, starting at a specified location searching forward. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncpos_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one not in chars. :type start: int :return: index :rtype: int """ string = stypes.stringToCharP(string) chars = stypes.stringToCharP(chars) start = ctypes.c_int(start) return libspice.ncpos_c(string, chars, start)
[ "def", "ncpos", "(", "string", ",", "chars", ",", "start", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "chars", "=", "stypes", ".", "stringToCharP", "(", "chars", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "return", "libspice", ".", "ncpos_c", "(", "string", ",", "chars", ",", "start", ")" ]
Find the first occurrence in a string of a character NOT belonging to a collection of characters, starting at a specified location searching forward. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncpos_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one not in chars. :type start: int :return: index :rtype: int
[ "Find", "the", "first", "occurrence", "in", "a", "string", "of", "a", "character", "NOT", "belonging", "to", "a", "collection", "of", "characters", "starting", "at", "a", "specified", "location", "searching", "forward", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8815-L8835
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ncposr
def ncposr(string, chars, start): """ Find the first occurrence in a string of a character NOT belonging to a collection of characters, starting at a specified location, searching in reverse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncposr_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one of chars. :type start: int :return: index :rtype: int """ string = stypes.stringToCharP(string) chars = stypes.stringToCharP(chars) start = ctypes.c_int(start) return libspice.ncposr_c(string, chars, start)
python
def ncposr(string, chars, start): """ Find the first occurrence in a string of a character NOT belonging to a collection of characters, starting at a specified location, searching in reverse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncposr_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one of chars. :type start: int :return: index :rtype: int """ string = stypes.stringToCharP(string) chars = stypes.stringToCharP(chars) start = ctypes.c_int(start) return libspice.ncposr_c(string, chars, start)
[ "def", "ncposr", "(", "string", ",", "chars", ",", "start", ")", ":", "string", "=", "stypes", ".", "stringToCharP", "(", "string", ")", "chars", "=", "stypes", ".", "stringToCharP", "(", "chars", ")", "start", "=", "ctypes", ".", "c_int", "(", "start", ")", "return", "libspice", ".", "ncposr_c", "(", "string", ",", "chars", ",", "start", ")" ]
Find the first occurrence in a string of a character NOT belonging to a collection of characters, starting at a specified location, searching in reverse. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ncposr_c.html :param string: Any character string. :type string: str :param chars: A collection of characters. :type chars: str :param start: Position to begin looking for one of chars. :type start: int :return: index :rtype: int
[ "Find", "the", "first", "occurrence", "in", "a", "string", "of", "a", "character", "NOT", "belonging", "to", "a", "collection", "of", "characters", "starting", "at", "a", "specified", "location", "searching", "in", "reverse", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8839-L8859
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
nearpt
def nearpt(positn, a, b, c): """ locates the point on the surface of an ellipsoid that is nearest to a specified position. It also returns the altitude of the position above the ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nearpt_c.html :param positn: Position of a point in bodyfixed frame. :type positn: 3-Element Array of floats :param a: Length of semi-axis parallel to x-axis. :type a: float :param b: Length of semi-axis parallel to y-axis. :type b: float :param c: Length on semi-axis parallel to z-axis. :type c: float :return: Point on the ellipsoid closest to positn, Altitude of positn above the ellipsoid. :rtype: tuple """ positn = stypes.toDoubleVector(positn) a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) npoint = stypes.emptyDoubleVector(3) alt = ctypes.c_double() libspice.nearpt_c(positn, a, b, c, npoint, ctypes.byref(alt)) return stypes.cVectorToPython(npoint), alt.value
python
def nearpt(positn, a, b, c): """ locates the point on the surface of an ellipsoid that is nearest to a specified position. It also returns the altitude of the position above the ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nearpt_c.html :param positn: Position of a point in bodyfixed frame. :type positn: 3-Element Array of floats :param a: Length of semi-axis parallel to x-axis. :type a: float :param b: Length of semi-axis parallel to y-axis. :type b: float :param c: Length on semi-axis parallel to z-axis. :type c: float :return: Point on the ellipsoid closest to positn, Altitude of positn above the ellipsoid. :rtype: tuple """ positn = stypes.toDoubleVector(positn) a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) npoint = stypes.emptyDoubleVector(3) alt = ctypes.c_double() libspice.nearpt_c(positn, a, b, c, npoint, ctypes.byref(alt)) return stypes.cVectorToPython(npoint), alt.value
[ "def", "nearpt", "(", "positn", ",", "a", ",", "b", ",", "c", ")", ":", "positn", "=", "stypes", ".", "toDoubleVector", "(", "positn", ")", "a", "=", "ctypes", ".", "c_double", "(", "a", ")", "b", "=", "ctypes", ".", "c_double", "(", "b", ")", "c", "=", "ctypes", ".", "c_double", "(", "c", ")", "npoint", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "alt", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "nearpt_c", "(", "positn", ",", "a", ",", "b", ",", "c", ",", "npoint", ",", "ctypes", ".", "byref", "(", "alt", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "npoint", ")", ",", "alt", ".", "value" ]
locates the point on the surface of an ellipsoid that is nearest to a specified position. It also returns the altitude of the position above the ellipsoid. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nearpt_c.html :param positn: Position of a point in bodyfixed frame. :type positn: 3-Element Array of floats :param a: Length of semi-axis parallel to x-axis. :type a: float :param b: Length of semi-axis parallel to y-axis. :type b: float :param c: Length on semi-axis parallel to z-axis. :type c: float :return: Point on the ellipsoid closest to positn, Altitude of positn above the ellipsoid. :rtype: tuple
[ "locates", "the", "point", "on", "the", "surface", "of", "an", "ellipsoid", "that", "is", "nearest", "to", "a", "specified", "position", ".", "It", "also", "returns", "the", "altitude", "of", "the", "position", "above", "the", "ellipsoid", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8863-L8891
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
npedln
def npedln(a, b, c, linept, linedr): """ Find nearest point on a triaxial ellipsoid to a specified line and the distance from the ellipsoid to the line. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/npedln_c.html :param a: Length of ellipsoid's semi-axis in the x direction :type a: float :param b: Length of ellipsoid's semi-axis in the y direction :type b: float :param c: Length of ellipsoid's semi-axis in the z direction :type c: float :param linept: Length of ellipsoid's semi-axis in the z direction :type linept: 3-Element Array of floats :param linedr: Direction vector of line :type linedr: 3-Element Array of floats :return: Nearest point on ellipsoid to line, Distance of ellipsoid from line :rtype: tuple """ a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) linept = stypes.toDoubleVector(linept) linedr = stypes.toDoubleVector(linedr) pnear = stypes.emptyDoubleVector(3) dist = ctypes.c_double() libspice.npedln_c(a, b, c, linept, linedr, pnear, ctypes.byref(dist)) return stypes.cVectorToPython(pnear), dist.value
python
def npedln(a, b, c, linept, linedr): """ Find nearest point on a triaxial ellipsoid to a specified line and the distance from the ellipsoid to the line. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/npedln_c.html :param a: Length of ellipsoid's semi-axis in the x direction :type a: float :param b: Length of ellipsoid's semi-axis in the y direction :type b: float :param c: Length of ellipsoid's semi-axis in the z direction :type c: float :param linept: Length of ellipsoid's semi-axis in the z direction :type linept: 3-Element Array of floats :param linedr: Direction vector of line :type linedr: 3-Element Array of floats :return: Nearest point on ellipsoid to line, Distance of ellipsoid from line :rtype: tuple """ a = ctypes.c_double(a) b = ctypes.c_double(b) c = ctypes.c_double(c) linept = stypes.toDoubleVector(linept) linedr = stypes.toDoubleVector(linedr) pnear = stypes.emptyDoubleVector(3) dist = ctypes.c_double() libspice.npedln_c(a, b, c, linept, linedr, pnear, ctypes.byref(dist)) return stypes.cVectorToPython(pnear), dist.value
[ "def", "npedln", "(", "a", ",", "b", ",", "c", ",", "linept", ",", "linedr", ")", ":", "a", "=", "ctypes", ".", "c_double", "(", "a", ")", "b", "=", "ctypes", ".", "c_double", "(", "b", ")", "c", "=", "ctypes", ".", "c_double", "(", "c", ")", "linept", "=", "stypes", ".", "toDoubleVector", "(", "linept", ")", "linedr", "=", "stypes", ".", "toDoubleVector", "(", "linedr", ")", "pnear", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "dist", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "npedln_c", "(", "a", ",", "b", ",", "c", ",", "linept", ",", "linedr", ",", "pnear", ",", "ctypes", ".", "byref", "(", "dist", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "pnear", ")", ",", "dist", ".", "value" ]
Find nearest point on a triaxial ellipsoid to a specified line and the distance from the ellipsoid to the line. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/npedln_c.html :param a: Length of ellipsoid's semi-axis in the x direction :type a: float :param b: Length of ellipsoid's semi-axis in the y direction :type b: float :param c: Length of ellipsoid's semi-axis in the z direction :type c: float :param linept: Length of ellipsoid's semi-axis in the z direction :type linept: 3-Element Array of floats :param linedr: Direction vector of line :type linedr: 3-Element Array of floats :return: Nearest point on ellipsoid to line, Distance of ellipsoid from line :rtype: tuple
[ "Find", "nearest", "point", "on", "a", "triaxial", "ellipsoid", "to", "a", "specified", "line", "and", "the", "distance", "from", "the", "ellipsoid", "to", "the", "line", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8895-L8923
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
nplnpt
def nplnpt(linpt, lindir, point): """ Find the nearest point on a line to a specified point, and find the distance between the two points. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nplnpt_c.html :param linpt: Point on a line :type linpt: 3-Element Array of floats :param lindir: line's direction vector :type lindir: 3-Element Array of floats :param point: A second point. :type point: 3-Element Array of floats :return: Nearest point on the line to point, Distance between point and pnear :rtype: tuple """ linpt = stypes.toDoubleVector(linpt) lindir = stypes.toDoubleVector(lindir) point = stypes.toDoubleVector(point) pnear = stypes.emptyDoubleVector(3) dist = ctypes.c_double() libspice.nplnpt_c(linpt, lindir, point, pnear, ctypes.byref(dist)) return stypes.cVectorToPython(pnear), dist.value
python
def nplnpt(linpt, lindir, point): """ Find the nearest point on a line to a specified point, and find the distance between the two points. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nplnpt_c.html :param linpt: Point on a line :type linpt: 3-Element Array of floats :param lindir: line's direction vector :type lindir: 3-Element Array of floats :param point: A second point. :type point: 3-Element Array of floats :return: Nearest point on the line to point, Distance between point and pnear :rtype: tuple """ linpt = stypes.toDoubleVector(linpt) lindir = stypes.toDoubleVector(lindir) point = stypes.toDoubleVector(point) pnear = stypes.emptyDoubleVector(3) dist = ctypes.c_double() libspice.nplnpt_c(linpt, lindir, point, pnear, ctypes.byref(dist)) return stypes.cVectorToPython(pnear), dist.value
[ "def", "nplnpt", "(", "linpt", ",", "lindir", ",", "point", ")", ":", "linpt", "=", "stypes", ".", "toDoubleVector", "(", "linpt", ")", "lindir", "=", "stypes", ".", "toDoubleVector", "(", "lindir", ")", "point", "=", "stypes", ".", "toDoubleVector", "(", "point", ")", "pnear", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "dist", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "nplnpt_c", "(", "linpt", ",", "lindir", ",", "point", ",", "pnear", ",", "ctypes", ".", "byref", "(", "dist", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "pnear", ")", ",", "dist", ".", "value" ]
Find the nearest point on a line to a specified point, and find the distance between the two points. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nplnpt_c.html :param linpt: Point on a line :type linpt: 3-Element Array of floats :param lindir: line's direction vector :type lindir: 3-Element Array of floats :param point: A second point. :type point: 3-Element Array of floats :return: Nearest point on the line to point, Distance between point and pnear :rtype: tuple
[ "Find", "the", "nearest", "point", "on", "a", "line", "to", "a", "specified", "point", "and", "find", "the", "distance", "between", "the", "two", "points", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8950-L8974
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
nvc2pl
def nvc2pl(normal, constant): """ Make a plane from a normal vector and a constant. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvc2pl_c.html :param normal: A normal vector defining a plane. :type normal: 3-Element Array of floats :param constant: A constant defining a plane. :type constant: float :return: plane :rtype: spiceypy.utils.support_types.Plane """ plane = stypes.Plane() normal = stypes.toDoubleVector(normal) constant = ctypes.c_double(constant) libspice.nvc2pl_c(normal, constant, ctypes.byref(plane)) return plane
python
def nvc2pl(normal, constant): """ Make a plane from a normal vector and a constant. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvc2pl_c.html :param normal: A normal vector defining a plane. :type normal: 3-Element Array of floats :param constant: A constant defining a plane. :type constant: float :return: plane :rtype: spiceypy.utils.support_types.Plane """ plane = stypes.Plane() normal = stypes.toDoubleVector(normal) constant = ctypes.c_double(constant) libspice.nvc2pl_c(normal, constant, ctypes.byref(plane)) return plane
[ "def", "nvc2pl", "(", "normal", ",", "constant", ")", ":", "plane", "=", "stypes", ".", "Plane", "(", ")", "normal", "=", "stypes", ".", "toDoubleVector", "(", "normal", ")", "constant", "=", "ctypes", ".", "c_double", "(", "constant", ")", "libspice", ".", "nvc2pl_c", "(", "normal", ",", "constant", ",", "ctypes", ".", "byref", "(", "plane", ")", ")", "return", "plane" ]
Make a plane from a normal vector and a constant. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvc2pl_c.html :param normal: A normal vector defining a plane. :type normal: 3-Element Array of floats :param constant: A constant defining a plane. :type constant: float :return: plane :rtype: spiceypy.utils.support_types.Plane
[ "Make", "a", "plane", "from", "a", "normal", "vector", "and", "a", "constant", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8978-L8995
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
nvp2pl
def nvp2pl(normal, point): """ Make a plane from a normal vector and a point. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvp2pl_c.html :param normal: A normal vector defining a plane. :type normal: 3-Element Array of floats :param point: A point defining a plane. :type point: 3-Element Array of floats :return: plane :rtype: spiceypy.utils.support_types.Plane """ normal = stypes.toDoubleVector(normal) point = stypes.toDoubleVector(point) plane = stypes.Plane() libspice.nvp2pl_c(normal, point, ctypes.byref(plane)) return plane
python
def nvp2pl(normal, point): """ Make a plane from a normal vector and a point. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvp2pl_c.html :param normal: A normal vector defining a plane. :type normal: 3-Element Array of floats :param point: A point defining a plane. :type point: 3-Element Array of floats :return: plane :rtype: spiceypy.utils.support_types.Plane """ normal = stypes.toDoubleVector(normal) point = stypes.toDoubleVector(point) plane = stypes.Plane() libspice.nvp2pl_c(normal, point, ctypes.byref(plane)) return plane
[ "def", "nvp2pl", "(", "normal", ",", "point", ")", ":", "normal", "=", "stypes", ".", "toDoubleVector", "(", "normal", ")", "point", "=", "stypes", ".", "toDoubleVector", "(", "point", ")", "plane", "=", "stypes", ".", "Plane", "(", ")", "libspice", ".", "nvp2pl_c", "(", "normal", ",", "point", ",", "ctypes", ".", "byref", "(", "plane", ")", ")", "return", "plane" ]
Make a plane from a normal vector and a point. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/nvp2pl_c.html :param normal: A normal vector defining a plane. :type normal: 3-Element Array of floats :param point: A point defining a plane. :type point: 3-Element Array of floats :return: plane :rtype: spiceypy.utils.support_types.Plane
[ "Make", "a", "plane", "from", "a", "normal", "vector", "and", "a", "point", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L8999-L9016
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ordc
def ordc(item, inset): """ The function returns the ordinal position of any given item in a character set. If the item does not appear in the set, the function returns -1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordc_c.html :param item: An item to locate within a set. :type item: str :param inset: A set to search for a given item. :type inset: SpiceCharCell :return: the ordinal position of item within the set :rtype: int """ assert isinstance(inset, stypes.SpiceCell) assert inset.is_char() assert isinstance(item, str) item = stypes.stringToCharP(item) return libspice.ordc_c(item, ctypes.byref(inset))
python
def ordc(item, inset): """ The function returns the ordinal position of any given item in a character set. If the item does not appear in the set, the function returns -1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordc_c.html :param item: An item to locate within a set. :type item: str :param inset: A set to search for a given item. :type inset: SpiceCharCell :return: the ordinal position of item within the set :rtype: int """ assert isinstance(inset, stypes.SpiceCell) assert inset.is_char() assert isinstance(item, str) item = stypes.stringToCharP(item) return libspice.ordc_c(item, ctypes.byref(inset))
[ "def", "ordc", "(", "item", ",", "inset", ")", ":", "assert", "isinstance", "(", "inset", ",", "stypes", ".", "SpiceCell", ")", "assert", "inset", ".", "is_char", "(", ")", "assert", "isinstance", "(", "item", ",", "str", ")", "item", "=", "stypes", ".", "stringToCharP", "(", "item", ")", "return", "libspice", ".", "ordc_c", "(", "item", ",", "ctypes", ".", "byref", "(", "inset", ")", ")" ]
The function returns the ordinal position of any given item in a character set. If the item does not appear in the set, the function returns -1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordc_c.html :param item: An item to locate within a set. :type item: str :param inset: A set to search for a given item. :type inset: SpiceCharCell :return: the ordinal position of item within the set :rtype: int
[ "The", "function", "returns", "the", "ordinal", "position", "of", "any", "given", "item", "in", "a", "character", "set", ".", "If", "the", "item", "does", "not", "appear", "in", "the", "set", "the", "function", "returns", "-", "1", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9069-L9088
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ordd
def ordd(item, inset): """ The function returns the ordinal position of any given item in a double precision set. If the item does not appear in the set, the function returns -1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordd_c.html :param item: An item to locate within a set. :type item: float :param inset: A set to search for a given item. :type inset: SpiceDoubleCell :return: the ordinal position of item within the set :rtype: int """ assert isinstance(inset, stypes.SpiceCell) assert inset.is_double() item = ctypes.c_double(item) return libspice.ordd_c(item, ctypes.byref(inset))
python
def ordd(item, inset): """ The function returns the ordinal position of any given item in a double precision set. If the item does not appear in the set, the function returns -1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordd_c.html :param item: An item to locate within a set. :type item: float :param inset: A set to search for a given item. :type inset: SpiceDoubleCell :return: the ordinal position of item within the set :rtype: int """ assert isinstance(inset, stypes.SpiceCell) assert inset.is_double() item = ctypes.c_double(item) return libspice.ordd_c(item, ctypes.byref(inset))
[ "def", "ordd", "(", "item", ",", "inset", ")", ":", "assert", "isinstance", "(", "inset", ",", "stypes", ".", "SpiceCell", ")", "assert", "inset", ".", "is_double", "(", ")", "item", "=", "ctypes", ".", "c_double", "(", "item", ")", "return", "libspice", ".", "ordd_c", "(", "item", ",", "ctypes", ".", "byref", "(", "inset", ")", ")" ]
The function returns the ordinal position of any given item in a double precision set. If the item does not appear in the set, the function returns -1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordd_c.html :param item: An item to locate within a set. :type item: float :param inset: A set to search for a given item. :type inset: SpiceDoubleCell :return: the ordinal position of item within the set :rtype: int
[ "The", "function", "returns", "the", "ordinal", "position", "of", "any", "given", "item", "in", "a", "double", "precision", "set", ".", "If", "the", "item", "does", "not", "appear", "in", "the", "set", "the", "function", "returns", "-", "1", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9092-L9110
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
ordi
def ordi(item, inset): """ The function returns the ordinal position of any given item in an integer set. If the item does not appear in the set, the function returns -1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordi_c.html :param item: An item to locate within a set. :type item: int :param inset: A set to search for a given item. :type inset: SpiceIntCell :return: the ordinal position of item within the set :rtype: int """ assert isinstance(inset, stypes.SpiceCell) assert inset.is_int() assert isinstance(item, int) item = ctypes.c_int(item) return libspice.ordi_c(item, ctypes.byref(inset))
python
def ordi(item, inset): """ The function returns the ordinal position of any given item in an integer set. If the item does not appear in the set, the function returns -1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordi_c.html :param item: An item to locate within a set. :type item: int :param inset: A set to search for a given item. :type inset: SpiceIntCell :return: the ordinal position of item within the set :rtype: int """ assert isinstance(inset, stypes.SpiceCell) assert inset.is_int() assert isinstance(item, int) item = ctypes.c_int(item) return libspice.ordi_c(item, ctypes.byref(inset))
[ "def", "ordi", "(", "item", ",", "inset", ")", ":", "assert", "isinstance", "(", "inset", ",", "stypes", ".", "SpiceCell", ")", "assert", "inset", ".", "is_int", "(", ")", "assert", "isinstance", "(", "item", ",", "int", ")", "item", "=", "ctypes", ".", "c_int", "(", "item", ")", "return", "libspice", ".", "ordi_c", "(", "item", ",", "ctypes", ".", "byref", "(", "inset", ")", ")" ]
The function returns the ordinal position of any given item in an integer set. If the item does not appear in the set, the function returns -1. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ordi_c.html :param item: An item to locate within a set. :type item: int :param inset: A set to search for a given item. :type inset: SpiceIntCell :return: the ordinal position of item within the set :rtype: int
[ "The", "function", "returns", "the", "ordinal", "position", "of", "any", "given", "item", "in", "an", "integer", "set", ".", "If", "the", "item", "does", "not", "appear", "in", "the", "set", "the", "function", "returns", "-", "1", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9114-L9133
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
orderc
def orderc(array, ndim=None): """ Determine the order of elements in an array of character strings. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderc_c.html :param array: Input array. :type array: Array of strings. :param ndim: Optional Length of input array :type ndim: int :return: Order vector for array. :rtype: array of ints """ if ndim is None: ndim = ctypes.c_int(len(array)) else: ndim = ctypes.c_int(ndim) lenvals = ctypes.c_int(len(max(array, key=len)) + 1) iorder = stypes.emptyIntVector(ndim) array = stypes.listToCharArray(array, lenvals, ndim) libspice.orderc_c(lenvals, array, ndim, iorder) return stypes.cVectorToPython(iorder)
python
def orderc(array, ndim=None): """ Determine the order of elements in an array of character strings. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderc_c.html :param array: Input array. :type array: Array of strings. :param ndim: Optional Length of input array :type ndim: int :return: Order vector for array. :rtype: array of ints """ if ndim is None: ndim = ctypes.c_int(len(array)) else: ndim = ctypes.c_int(ndim) lenvals = ctypes.c_int(len(max(array, key=len)) + 1) iorder = stypes.emptyIntVector(ndim) array = stypes.listToCharArray(array, lenvals, ndim) libspice.orderc_c(lenvals, array, ndim, iorder) return stypes.cVectorToPython(iorder)
[ "def", "orderc", "(", "array", ",", "ndim", "=", "None", ")", ":", "if", "ndim", "is", "None", ":", "ndim", "=", "ctypes", ".", "c_int", "(", "len", "(", "array", ")", ")", "else", ":", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "len", "(", "max", "(", "array", ",", "key", "=", "len", ")", ")", "+", "1", ")", "iorder", "=", "stypes", ".", "emptyIntVector", "(", "ndim", ")", "array", "=", "stypes", ".", "listToCharArray", "(", "array", ",", "lenvals", ",", "ndim", ")", "libspice", ".", "orderc_c", "(", "lenvals", ",", "array", ",", "ndim", ",", "iorder", ")", "return", "stypes", ".", "cVectorToPython", "(", "iorder", ")" ]
Determine the order of elements in an array of character strings. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderc_c.html :param array: Input array. :type array: Array of strings. :param ndim: Optional Length of input array :type ndim: int :return: Order vector for array. :rtype: array of ints
[ "Determine", "the", "order", "of", "elements", "in", "an", "array", "of", "character", "strings", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9137-L9158
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
orderd
def orderd(array, ndim=None): """ Determine the order of elements in a double precision array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderd_c.html :param array: Input array. :type array: Array of floats :param ndim: Optional Length of input array :type ndim: int :return: Order vector for array. :rtype: array of ints """ if ndim is None: ndim = ctypes.c_int(len(array)) else: ndim = ctypes.c_int(ndim) array = stypes.toDoubleVector(array) iorder = stypes.emptyIntVector(ndim) libspice.orderd_c(array, ndim, iorder) return stypes.cVectorToPython(iorder)
python
def orderd(array, ndim=None): """ Determine the order of elements in a double precision array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderd_c.html :param array: Input array. :type array: Array of floats :param ndim: Optional Length of input array :type ndim: int :return: Order vector for array. :rtype: array of ints """ if ndim is None: ndim = ctypes.c_int(len(array)) else: ndim = ctypes.c_int(ndim) array = stypes.toDoubleVector(array) iorder = stypes.emptyIntVector(ndim) libspice.orderd_c(array, ndim, iorder) return stypes.cVectorToPython(iorder)
[ "def", "orderd", "(", "array", ",", "ndim", "=", "None", ")", ":", "if", "ndim", "is", "None", ":", "ndim", "=", "ctypes", ".", "c_int", "(", "len", "(", "array", ")", ")", "else", ":", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "array", "=", "stypes", ".", "toDoubleVector", "(", "array", ")", "iorder", "=", "stypes", ".", "emptyIntVector", "(", "ndim", ")", "libspice", ".", "orderd_c", "(", "array", ",", "ndim", ",", "iorder", ")", "return", "stypes", ".", "cVectorToPython", "(", "iorder", ")" ]
Determine the order of elements in a double precision array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderd_c.html :param array: Input array. :type array: Array of floats :param ndim: Optional Length of input array :type ndim: int :return: Order vector for array. :rtype: array of ints
[ "Determine", "the", "order", "of", "elements", "in", "a", "double", "precision", "array", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9162-L9182
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
orderi
def orderi(array, ndim=None): """ Determine the order of elements in an integer array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderi_c.html :param array: Input array. :type array: Array of ints :param ndim: Optional Length of input array :type ndim: int :return: Order vector for array. :rtype: array of ints """ if ndim is None: ndim = ctypes.c_int(len(array)) else: ndim = ctypes.c_int(ndim) array = stypes.toIntVector(array) iorder = stypes.emptyIntVector(ndim) libspice.orderi_c(array, ndim, iorder) return stypes.cVectorToPython(iorder)
python
def orderi(array, ndim=None): """ Determine the order of elements in an integer array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderi_c.html :param array: Input array. :type array: Array of ints :param ndim: Optional Length of input array :type ndim: int :return: Order vector for array. :rtype: array of ints """ if ndim is None: ndim = ctypes.c_int(len(array)) else: ndim = ctypes.c_int(ndim) array = stypes.toIntVector(array) iorder = stypes.emptyIntVector(ndim) libspice.orderi_c(array, ndim, iorder) return stypes.cVectorToPython(iorder)
[ "def", "orderi", "(", "array", ",", "ndim", "=", "None", ")", ":", "if", "ndim", "is", "None", ":", "ndim", "=", "ctypes", ".", "c_int", "(", "len", "(", "array", ")", ")", "else", ":", "ndim", "=", "ctypes", ".", "c_int", "(", "ndim", ")", "array", "=", "stypes", ".", "toIntVector", "(", "array", ")", "iorder", "=", "stypes", ".", "emptyIntVector", "(", "ndim", ")", "libspice", ".", "orderi_c", "(", "array", ",", "ndim", ",", "iorder", ")", "return", "stypes", ".", "cVectorToPython", "(", "iorder", ")" ]
Determine the order of elements in an integer array. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderi_c.html :param array: Input array. :type array: Array of ints :param ndim: Optional Length of input array :type ndim: int :return: Order vector for array. :rtype: array of ints
[ "Determine", "the", "order", "of", "elements", "in", "an", "integer", "array", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9186-L9206
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
pckcov
def pckcov(pck, idcode, cover): """ Find the coverage window for a specified reference frame in a specified binary PCK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckcov_c.html :param pck: Name of PCK file. :type pck: str :param idcode: Class ID code of PCK reference frame. :type idcode: int :param cover: Window giving coverage in pck for idcode. :type cover: SpiceCell """ pck = stypes.stringToCharP(pck) idcode = ctypes.c_int(idcode) assert isinstance(cover, stypes.SpiceCell) assert cover.dtype == 1 libspice.pckcov_c(pck, idcode, ctypes.byref(cover))
python
def pckcov(pck, idcode, cover): """ Find the coverage window for a specified reference frame in a specified binary PCK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckcov_c.html :param pck: Name of PCK file. :type pck: str :param idcode: Class ID code of PCK reference frame. :type idcode: int :param cover: Window giving coverage in pck for idcode. :type cover: SpiceCell """ pck = stypes.stringToCharP(pck) idcode = ctypes.c_int(idcode) assert isinstance(cover, stypes.SpiceCell) assert cover.dtype == 1 libspice.pckcov_c(pck, idcode, ctypes.byref(cover))
[ "def", "pckcov", "(", "pck", ",", "idcode", ",", "cover", ")", ":", "pck", "=", "stypes", ".", "stringToCharP", "(", "pck", ")", "idcode", "=", "ctypes", ".", "c_int", "(", "idcode", ")", "assert", "isinstance", "(", "cover", ",", "stypes", ".", "SpiceCell", ")", "assert", "cover", ".", "dtype", "==", "1", "libspice", ".", "pckcov_c", "(", "pck", ",", "idcode", ",", "ctypes", ".", "byref", "(", "cover", ")", ")" ]
Find the coverage window for a specified reference frame in a specified binary PCK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckcov_c.html :param pck: Name of PCK file. :type pck: str :param idcode: Class ID code of PCK reference frame. :type idcode: int :param cover: Window giving coverage in pck for idcode. :type cover: SpiceCell
[ "Find", "the", "coverage", "window", "for", "a", "specified", "reference", "frame", "in", "a", "specified", "binary", "PCK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9277-L9295
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
pckfrm
def pckfrm(pck, ids): """ Find the set of reference frame class ID codes of all frames in a specified binary PCK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckfrm_c.html :param pck: Name of PCK file. :type pck: str :param ids: Set of frame class ID codes of frames in PCK file. :type ids: SpiceCell """ pck = stypes.stringToCharP(pck) assert isinstance(ids, stypes.SpiceCell) assert ids.dtype == 2 libspice.pckfrm_c(pck, ctypes.byref(ids))
python
def pckfrm(pck, ids): """ Find the set of reference frame class ID codes of all frames in a specified binary PCK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckfrm_c.html :param pck: Name of PCK file. :type pck: str :param ids: Set of frame class ID codes of frames in PCK file. :type ids: SpiceCell """ pck = stypes.stringToCharP(pck) assert isinstance(ids, stypes.SpiceCell) assert ids.dtype == 2 libspice.pckfrm_c(pck, ctypes.byref(ids))
[ "def", "pckfrm", "(", "pck", ",", "ids", ")", ":", "pck", "=", "stypes", ".", "stringToCharP", "(", "pck", ")", "assert", "isinstance", "(", "ids", ",", "stypes", ".", "SpiceCell", ")", "assert", "ids", ".", "dtype", "==", "2", "libspice", ".", "pckfrm_c", "(", "pck", ",", "ctypes", ".", "byref", "(", "ids", ")", ")" ]
Find the set of reference frame class ID codes of all frames in a specified binary PCK file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckfrm_c.html :param pck: Name of PCK file. :type pck: str :param ids: Set of frame class ID codes of frames in PCK file. :type ids: SpiceCell
[ "Find", "the", "set", "of", "reference", "frame", "class", "ID", "codes", "of", "all", "frames", "in", "a", "specified", "binary", "PCK", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9299-L9314
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
pcklof
def pcklof(filename): """ Load a binary PCK file for use by the readers. Return the handle of the loaded file which is used by other PCK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcklof_c.html :param filename: Name of the file to be loaded. :type filename: str :return: Loaded file's handle. :rtype: int """ filename = stypes.stringToCharP(filename) handle = ctypes.c_int() libspice.pcklof_c(filename, ctypes.byref(handle)) return handle.value
python
def pcklof(filename): """ Load a binary PCK file for use by the readers. Return the handle of the loaded file which is used by other PCK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcklof_c.html :param filename: Name of the file to be loaded. :type filename: str :return: Loaded file's handle. :rtype: int """ filename = stypes.stringToCharP(filename) handle = ctypes.c_int() libspice.pcklof_c(filename, ctypes.byref(handle)) return handle.value
[ "def", "pcklof", "(", "filename", ")", ":", "filename", "=", "stypes", ".", "stringToCharP", "(", "filename", ")", "handle", "=", "ctypes", ".", "c_int", "(", ")", "libspice", ".", "pcklof_c", "(", "filename", ",", "ctypes", ".", "byref", "(", "handle", ")", ")", "return", "handle", ".", "value" ]
Load a binary PCK file for use by the readers. Return the handle of the loaded file which is used by other PCK routines to refer to the file. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcklof_c.html :param filename: Name of the file to be loaded. :type filename: str :return: Loaded file's handle. :rtype: int
[ "Load", "a", "binary", "PCK", "file", "for", "use", "by", "the", "readers", ".", "Return", "the", "handle", "of", "the", "loaded", "file", "which", "is", "used", "by", "other", "PCK", "routines", "to", "refer", "to", "the", "file", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9318-L9334
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
pcpool
def pcpool(name, cvals): """ This entry point provides toolkit programmers a method for programmatically inserting character data into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcpool_c.html :param name: The kernel pool name to associate with cvals. :type name: str :param cvals: An array of strings to insert into the kernel pool. :type cvals: Array of str """ name = stypes.stringToCharP(name) lenvals = ctypes.c_int(len(max(cvals, key=len)) + 1) n = ctypes.c_int(len(cvals)) cvals = stypes.listToCharArray(cvals, lenvals, n) libspice.pcpool_c(name, n, lenvals, cvals)
python
def pcpool(name, cvals): """ This entry point provides toolkit programmers a method for programmatically inserting character data into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcpool_c.html :param name: The kernel pool name to associate with cvals. :type name: str :param cvals: An array of strings to insert into the kernel pool. :type cvals: Array of str """ name = stypes.stringToCharP(name) lenvals = ctypes.c_int(len(max(cvals, key=len)) + 1) n = ctypes.c_int(len(cvals)) cvals = stypes.listToCharArray(cvals, lenvals, n) libspice.pcpool_c(name, n, lenvals, cvals)
[ "def", "pcpool", "(", "name", ",", "cvals", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "lenvals", "=", "ctypes", ".", "c_int", "(", "len", "(", "max", "(", "cvals", ",", "key", "=", "len", ")", ")", "+", "1", ")", "n", "=", "ctypes", ".", "c_int", "(", "len", "(", "cvals", ")", ")", "cvals", "=", "stypes", ".", "listToCharArray", "(", "cvals", ",", "lenvals", ",", "n", ")", "libspice", ".", "pcpool_c", "(", "name", ",", "n", ",", "lenvals", ",", "cvals", ")" ]
This entry point provides toolkit programmers a method for programmatically inserting character data into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pcpool_c.html :param name: The kernel pool name to associate with cvals. :type name: str :param cvals: An array of strings to insert into the kernel pool. :type cvals: Array of str
[ "This", "entry", "point", "provides", "toolkit", "programmers", "a", "method", "for", "programmatically", "inserting", "character", "data", "into", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9423-L9440
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
pdpool
def pdpool(name, dvals): """ This entry point provides toolkit programmers a method for programmatically inserting double precision data into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pdpool_c.html :param name: The kernel pool name to associate with dvals. :type name: str :param dvals: An array of values to insert into the kernel pool. :type dvals: SpiceCell """ name = stypes.stringToCharP(name) n = ctypes.c_int(len(dvals)) dvals = stypes.toDoubleVector(dvals) libspice.pdpool_c(name, n, dvals)
python
def pdpool(name, dvals): """ This entry point provides toolkit programmers a method for programmatically inserting double precision data into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pdpool_c.html :param name: The kernel pool name to associate with dvals. :type name: str :param dvals: An array of values to insert into the kernel pool. :type dvals: SpiceCell """ name = stypes.stringToCharP(name) n = ctypes.c_int(len(dvals)) dvals = stypes.toDoubleVector(dvals) libspice.pdpool_c(name, n, dvals)
[ "def", "pdpool", "(", "name", ",", "dvals", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "n", "=", "ctypes", ".", "c_int", "(", "len", "(", "dvals", ")", ")", "dvals", "=", "stypes", ".", "toDoubleVector", "(", "dvals", ")", "libspice", ".", "pdpool_c", "(", "name", ",", "n", ",", "dvals", ")" ]
This entry point provides toolkit programmers a method for programmatically inserting double precision data into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pdpool_c.html :param name: The kernel pool name to associate with dvals. :type name: str :param dvals: An array of values to insert into the kernel pool. :type dvals: SpiceCell
[ "This", "entry", "point", "provides", "toolkit", "programmers", "a", "method", "for", "programmatically", "inserting", "double", "precision", "data", "into", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9444-L9460
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
pgrrec
def pgrrec(body, lon, lat, alt, re, f): """ Convert planetographic coordinates to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pgrrec_c.html :param body: Body with which coordinate system is associated. :type body: str :param lon: Planetographic longitude of a point (radians). :type lon: float :param lat: Planetographic latitude of a point (radians). :type lat: float :param alt: Altitude of a point above reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats """ body = stypes.stringToCharP(body) lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) alt = ctypes.c_double(alt) re = ctypes.c_double(re) f = ctypes.c_double(f) rectan = stypes.emptyDoubleVector(3) libspice.pgrrec_c(body, lon, lat, alt, re, f, rectan) return stypes.cVectorToPython(rectan)
python
def pgrrec(body, lon, lat, alt, re, f): """ Convert planetographic coordinates to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pgrrec_c.html :param body: Body with which coordinate system is associated. :type body: str :param lon: Planetographic longitude of a point (radians). :type lon: float :param lat: Planetographic latitude of a point (radians). :type lat: float :param alt: Altitude of a point above reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats """ body = stypes.stringToCharP(body) lon = ctypes.c_double(lon) lat = ctypes.c_double(lat) alt = ctypes.c_double(alt) re = ctypes.c_double(re) f = ctypes.c_double(f) rectan = stypes.emptyDoubleVector(3) libspice.pgrrec_c(body, lon, lat, alt, re, f, rectan) return stypes.cVectorToPython(rectan)
[ "def", "pgrrec", "(", "body", ",", "lon", ",", "lat", ",", "alt", ",", "re", ",", "f", ")", ":", "body", "=", "stypes", ".", "stringToCharP", "(", "body", ")", "lon", "=", "ctypes", ".", "c_double", "(", "lon", ")", "lat", "=", "ctypes", ".", "c_double", "(", "lat", ")", "alt", "=", "ctypes", ".", "c_double", "(", "alt", ")", "re", "=", "ctypes", ".", "c_double", "(", "re", ")", "f", "=", "ctypes", ".", "c_double", "(", "f", ")", "rectan", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "libspice", ".", "pgrrec_c", "(", "body", ",", "lon", ",", "lat", ",", "alt", ",", "re", ",", "f", ",", "rectan", ")", "return", "stypes", ".", "cVectorToPython", "(", "rectan", ")" ]
Convert planetographic coordinates to rectangular coordinates. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pgrrec_c.html :param body: Body with which coordinate system is associated. :type body: str :param lon: Planetographic longitude of a point (radians). :type lon: float :param lat: Planetographic latitude of a point (radians). :type lat: float :param alt: Altitude of a point above reference spheroid. :type alt: float :param re: Equatorial radius of the reference spheroid. :type re: float :param f: Flattening coefficient. :type f: float :return: Rectangular coordinates of the point. :rtype: 3-Element Array of floats
[ "Convert", "planetographic", "coordinates", "to", "rectangular", "coordinates", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9464-L9493
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
phaseq
def phaseq(et, target, illmn, obsrvr, abcorr): """ Compute the apparent phase angle for a target, observer, illuminator set of ephemeris objects. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/phaseq_c.html :param et: Ephemeris seconds past J2000 TDB. :type et: float :param target: Target body name. :type target: str :param illmn: Illuminating body name. :type illmn: str :param obsrvr: Observer body. :type obsrvr: str :param abcorr: Aberration correction flag. :type abcorr: str :return: Value of phase angle. :rtype: float """ et = ctypes.c_double(et) target = stypes.stringToCharP(target) illmn = stypes.stringToCharP(illmn) obsrvr = stypes.stringToCharP(obsrvr) abcorr = stypes.stringToCharP(abcorr) return libspice.phaseq_c(et, target, illmn, obsrvr, abcorr)
python
def phaseq(et, target, illmn, obsrvr, abcorr): """ Compute the apparent phase angle for a target, observer, illuminator set of ephemeris objects. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/phaseq_c.html :param et: Ephemeris seconds past J2000 TDB. :type et: float :param target: Target body name. :type target: str :param illmn: Illuminating body name. :type illmn: str :param obsrvr: Observer body. :type obsrvr: str :param abcorr: Aberration correction flag. :type abcorr: str :return: Value of phase angle. :rtype: float """ et = ctypes.c_double(et) target = stypes.stringToCharP(target) illmn = stypes.stringToCharP(illmn) obsrvr = stypes.stringToCharP(obsrvr) abcorr = stypes.stringToCharP(abcorr) return libspice.phaseq_c(et, target, illmn, obsrvr, abcorr)
[ "def", "phaseq", "(", "et", ",", "target", ",", "illmn", ",", "obsrvr", ",", "abcorr", ")", ":", "et", "=", "ctypes", ".", "c_double", "(", "et", ")", "target", "=", "stypes", ".", "stringToCharP", "(", "target", ")", "illmn", "=", "stypes", ".", "stringToCharP", "(", "illmn", ")", "obsrvr", "=", "stypes", ".", "stringToCharP", "(", "obsrvr", ")", "abcorr", "=", "stypes", ".", "stringToCharP", "(", "abcorr", ")", "return", "libspice", ".", "phaseq_c", "(", "et", ",", "target", ",", "illmn", ",", "obsrvr", ",", "abcorr", ")" ]
Compute the apparent phase angle for a target, observer, illuminator set of ephemeris objects. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/phaseq_c.html :param et: Ephemeris seconds past J2000 TDB. :type et: float :param target: Target body name. :type target: str :param illmn: Illuminating body name. :type illmn: str :param obsrvr: Observer body. :type obsrvr: str :param abcorr: Aberration correction flag. :type abcorr: str :return: Value of phase angle. :rtype: float
[ "Compute", "the", "apparent", "phase", "angle", "for", "a", "target", "observer", "illuminator", "set", "of", "ephemeris", "objects", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9497-L9522
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
pipool
def pipool(name, ivals): """ This entry point provides toolkit programmers a method for programmatically inserting integer data into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pipool_c.html :param name: The kernel pool name to associate with values. :type name: str :param ivals: An array of integers to insert into the pool. :type ivals: Array of ints """ name = stypes.stringToCharP(name) n = ctypes.c_int(len(ivals)) ivals = stypes.toIntVector(ivals) libspice.pipool_c(name, n, ivals)
python
def pipool(name, ivals): """ This entry point provides toolkit programmers a method for programmatically inserting integer data into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pipool_c.html :param name: The kernel pool name to associate with values. :type name: str :param ivals: An array of integers to insert into the pool. :type ivals: Array of ints """ name = stypes.stringToCharP(name) n = ctypes.c_int(len(ivals)) ivals = stypes.toIntVector(ivals) libspice.pipool_c(name, n, ivals)
[ "def", "pipool", "(", "name", ",", "ivals", ")", ":", "name", "=", "stypes", ".", "stringToCharP", "(", "name", ")", "n", "=", "ctypes", ".", "c_int", "(", "len", "(", "ivals", ")", ")", "ivals", "=", "stypes", ".", "toIntVector", "(", "ivals", ")", "libspice", ".", "pipool_c", "(", "name", ",", "n", ",", "ivals", ")" ]
This entry point provides toolkit programmers a method for programmatically inserting integer data into the kernel pool. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pipool_c.html :param name: The kernel pool name to associate with values. :type name: str :param ivals: An array of integers to insert into the pool. :type ivals: Array of ints
[ "This", "entry", "point", "provides", "toolkit", "programmers", "a", "method", "for", "programmatically", "inserting", "integer", "data", "into", "the", "kernel", "pool", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9540-L9555
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
pjelpl
def pjelpl(elin, plane): """ Project an ellipse onto a plane, orthogonally. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pjelpl_c.html :param elin: A SPICE ellipse to be projected. :type elin: spiceypy.utils.support_types.Ellipse :param plane: A plane onto which elin is to be projected. :type plane: supporttypes.Plane :return: A SPICE ellipse resulting from the projection. :rtype: spiceypy.utils.support_types.Ellipse """ assert (isinstance(elin, stypes.Ellipse)) assert (isinstance(plane, stypes.Plane)) elout = stypes.Ellipse() libspice.pjelpl_c(ctypes.byref(elin), ctypes.byref(plane), ctypes.byref(elout)) return elout
python
def pjelpl(elin, plane): """ Project an ellipse onto a plane, orthogonally. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pjelpl_c.html :param elin: A SPICE ellipse to be projected. :type elin: spiceypy.utils.support_types.Ellipse :param plane: A plane onto which elin is to be projected. :type plane: supporttypes.Plane :return: A SPICE ellipse resulting from the projection. :rtype: spiceypy.utils.support_types.Ellipse """ assert (isinstance(elin, stypes.Ellipse)) assert (isinstance(plane, stypes.Plane)) elout = stypes.Ellipse() libspice.pjelpl_c(ctypes.byref(elin), ctypes.byref(plane), ctypes.byref(elout)) return elout
[ "def", "pjelpl", "(", "elin", ",", "plane", ")", ":", "assert", "(", "isinstance", "(", "elin", ",", "stypes", ".", "Ellipse", ")", ")", "assert", "(", "isinstance", "(", "plane", ",", "stypes", ".", "Plane", ")", ")", "elout", "=", "stypes", ".", "Ellipse", "(", ")", "libspice", ".", "pjelpl_c", "(", "ctypes", ".", "byref", "(", "elin", ")", ",", "ctypes", ".", "byref", "(", "plane", ")", ",", "ctypes", ".", "byref", "(", "elout", ")", ")", "return", "elout" ]
Project an ellipse onto a plane, orthogonally. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pjelpl_c.html :param elin: A SPICE ellipse to be projected. :type elin: spiceypy.utils.support_types.Ellipse :param plane: A plane onto which elin is to be projected. :type plane: supporttypes.Plane :return: A SPICE ellipse resulting from the projection. :rtype: spiceypy.utils.support_types.Ellipse
[ "Project", "an", "ellipse", "onto", "a", "plane", "orthogonally", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9559-L9577
train
AndrewAnnex/SpiceyPy
spiceypy/spiceypy.py
pl2nvc
def pl2nvc(plane): """ Return a unit normal vector and constant that define a specified plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2nvc_c.html :param plane: A SPICE plane. :type plane: supporttypes.Plane :return: A normal vector and constant defining the geometric plane represented by plane. :rtype: tuple """ assert (isinstance(plane, stypes.Plane)) normal = stypes.emptyDoubleVector(3) constant = ctypes.c_double() libspice.pl2nvc_c(ctypes.byref(plane), normal, ctypes.byref(constant)) return stypes.cVectorToPython(normal), constant.value
python
def pl2nvc(plane): """ Return a unit normal vector and constant that define a specified plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2nvc_c.html :param plane: A SPICE plane. :type plane: supporttypes.Plane :return: A normal vector and constant defining the geometric plane represented by plane. :rtype: tuple """ assert (isinstance(plane, stypes.Plane)) normal = stypes.emptyDoubleVector(3) constant = ctypes.c_double() libspice.pl2nvc_c(ctypes.byref(plane), normal, ctypes.byref(constant)) return stypes.cVectorToPython(normal), constant.value
[ "def", "pl2nvc", "(", "plane", ")", ":", "assert", "(", "isinstance", "(", "plane", ",", "stypes", ".", "Plane", ")", ")", "normal", "=", "stypes", ".", "emptyDoubleVector", "(", "3", ")", "constant", "=", "ctypes", ".", "c_double", "(", ")", "libspice", ".", "pl2nvc_c", "(", "ctypes", ".", "byref", "(", "plane", ")", ",", "normal", ",", "ctypes", ".", "byref", "(", "constant", ")", ")", "return", "stypes", ".", "cVectorToPython", "(", "normal", ")", ",", "constant", ".", "value" ]
Return a unit normal vector and constant that define a specified plane. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pl2nvc_c.html :param plane: A SPICE plane. :type plane: supporttypes.Plane :return: A normal vector and constant defining the geometric plane represented by plane. :rtype: tuple
[ "Return", "a", "unit", "normal", "vector", "and", "constant", "that", "define", "a", "specified", "plane", "." ]
fc20a9b9de68b58eed5b332f0c051fb343a6e335
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L9581-L9598
train