id
int32 0
252k
| repo
stringlengths 7
55
| path
stringlengths 4
127
| func_name
stringlengths 1
88
| original_string
stringlengths 75
19.8k
| language
stringclasses 1
value | code
stringlengths 75
19.8k
| code_tokens
list | docstring
stringlengths 3
17.3k
| docstring_tokens
list | sha
stringlengths 40
40
| url
stringlengths 87
242
|
|---|---|---|---|---|---|---|---|---|---|---|---|
14,700
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekifld
|
def ekifld(handle, tabnam, ncols, nrows, cnmlen, cnames, declen, decls):
"""
Initialize a new E-kernel segment to allow fast writing.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekifld_c.html
:param handle: File handle.
:type handle: int
:param tabnam: Table name.
:type tabnam: str
:param ncols: Number of columns in the segment.
:type ncols: int
:param nrows: Number of rows in the segment.
:type nrows: int
:param cnmlen: Length of names in in column name array.
:type cnmlen: int
:param cnames: Names of columns.
:type cnames: list of str.
:param declen: Length of declaration strings in declaration array.
:type declen: int
:param decls: Declarations of columns.
:type decls: list of str.
:return: Segment number, Array of record pointers.
:rtype: tuple
"""
handle = ctypes.c_int(handle)
tabnam = stypes.stringToCharP(tabnam)
ncols = ctypes.c_int(ncols)
nrows = ctypes.c_int(nrows)
cnmlen = ctypes.c_int(cnmlen)
cnames = stypes.listToCharArray(cnames)
declen = ctypes.c_int(declen)
recptrs = stypes.emptyIntVector(nrows)
decls = stypes.listToCharArray(decls)
segno = ctypes.c_int()
libspice.ekifld_c(handle, tabnam, ncols, nrows, cnmlen, cnames, declen,
decls, ctypes.byref(segno), recptrs)
return segno.value, stypes.cVectorToPython(recptrs)
|
python
|
def ekifld(handle, tabnam, ncols, nrows, cnmlen, cnames, declen, decls):
"""
Initialize a new E-kernel segment to allow fast writing.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekifld_c.html
:param handle: File handle.
:type handle: int
:param tabnam: Table name.
:type tabnam: str
:param ncols: Number of columns in the segment.
:type ncols: int
:param nrows: Number of rows in the segment.
:type nrows: int
:param cnmlen: Length of names in in column name array.
:type cnmlen: int
:param cnames: Names of columns.
:type cnames: list of str.
:param declen: Length of declaration strings in declaration array.
:type declen: int
:param decls: Declarations of columns.
:type decls: list of str.
:return: Segment number, Array of record pointers.
:rtype: tuple
"""
handle = ctypes.c_int(handle)
tabnam = stypes.stringToCharP(tabnam)
ncols = ctypes.c_int(ncols)
nrows = ctypes.c_int(nrows)
cnmlen = ctypes.c_int(cnmlen)
cnames = stypes.listToCharArray(cnames)
declen = ctypes.c_int(declen)
recptrs = stypes.emptyIntVector(nrows)
decls = stypes.listToCharArray(decls)
segno = ctypes.c_int()
libspice.ekifld_c(handle, tabnam, ncols, nrows, cnmlen, cnames, declen,
decls, ctypes.byref(segno), recptrs)
return segno.value, stypes.cVectorToPython(recptrs)
|
[
"def",
"ekifld",
"(",
"handle",
",",
"tabnam",
",",
"ncols",
",",
"nrows",
",",
"cnmlen",
",",
"cnames",
",",
"declen",
",",
"decls",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"tabnam",
"=",
"stypes",
".",
"stringToCharP",
"(",
"tabnam",
")",
"ncols",
"=",
"ctypes",
".",
"c_int",
"(",
"ncols",
")",
"nrows",
"=",
"ctypes",
".",
"c_int",
"(",
"nrows",
")",
"cnmlen",
"=",
"ctypes",
".",
"c_int",
"(",
"cnmlen",
")",
"cnames",
"=",
"stypes",
".",
"listToCharArray",
"(",
"cnames",
")",
"declen",
"=",
"ctypes",
".",
"c_int",
"(",
"declen",
")",
"recptrs",
"=",
"stypes",
".",
"emptyIntVector",
"(",
"nrows",
")",
"decls",
"=",
"stypes",
".",
"listToCharArray",
"(",
"decls",
")",
"segno",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"ekifld_c",
"(",
"handle",
",",
"tabnam",
",",
"ncols",
",",
"nrows",
",",
"cnmlen",
",",
"cnames",
",",
"declen",
",",
"decls",
",",
"ctypes",
".",
"byref",
"(",
"segno",
")",
",",
"recptrs",
")",
"return",
"segno",
".",
"value",
",",
"stypes",
".",
"cVectorToPython",
"(",
"recptrs",
")"
] |
Initialize a new E-kernel segment to allow fast writing.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekifld_c.html
:param handle: File handle.
:type handle: int
:param tabnam: Table name.
:type tabnam: str
:param ncols: Number of columns in the segment.
:type ncols: int
:param nrows: Number of rows in the segment.
:type nrows: int
:param cnmlen: Length of names in in column name array.
:type cnmlen: int
:param cnames: Names of columns.
:type cnames: list of str.
:param declen: Length of declaration strings in declaration array.
:type declen: int
:param decls: Declarations of columns.
:type decls: list of str.
:return: Segment number, Array of record pointers.
:rtype: tuple
|
[
"Initialize",
"a",
"new",
"E",
"-",
"kernel",
"segment",
"to",
"allow",
"fast",
"writing",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4182-L4219
|
14,701
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekinsr
|
def ekinsr(handle, segno, recno):
"""
Add a new, empty record to a specified E-kernel segment at a specified
index.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekinsr_c.html
:param handle: File handle.
:type handle: int
:param segno: Segment number.
:type segno: int
:param recno: Record number.
:type recno: int
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
libspice.ekinsr_c(handle, segno, recno)
|
python
|
def ekinsr(handle, segno, recno):
"""
Add a new, empty record to a specified E-kernel segment at a specified
index.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekinsr_c.html
:param handle: File handle.
:type handle: int
:param segno: Segment number.
:type segno: int
:param recno: Record number.
:type recno: int
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
libspice.ekinsr_c(handle, segno, recno)
|
[
"def",
"ekinsr",
"(",
"handle",
",",
"segno",
",",
"recno",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"segno",
"=",
"ctypes",
".",
"c_int",
"(",
"segno",
")",
"recno",
"=",
"ctypes",
".",
"c_int",
"(",
"recno",
")",
"libspice",
".",
"ekinsr_c",
"(",
"handle",
",",
"segno",
",",
"recno",
")"
] |
Add a new, empty record to a specified E-kernel segment at a specified
index.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekinsr_c.html
:param handle: File handle.
:type handle: int
:param segno: Segment number.
:type segno: int
:param recno: Record number.
:type recno: int
|
[
"Add",
"a",
"new",
"empty",
"record",
"to",
"a",
"specified",
"E",
"-",
"kernel",
"segment",
"at",
"a",
"specified",
"index",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4223-L4240
|
14,702
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
eklef
|
def eklef(fname):
"""
Load an EK file, making it accessible to the EK readers.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eklef_c.html
:param fname: Name of EK file to load.
:type fname: str
:return: File handle of loaded EK file.
:rtype: int
"""
fname = stypes.stringToCharP(fname)
handle = ctypes.c_int()
libspice.eklef_c(fname, ctypes.byref(handle))
return handle.value
|
python
|
def eklef(fname):
"""
Load an EK file, making it accessible to the EK readers.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eklef_c.html
:param fname: Name of EK file to load.
:type fname: str
:return: File handle of loaded EK file.
:rtype: int
"""
fname = stypes.stringToCharP(fname)
handle = ctypes.c_int()
libspice.eklef_c(fname, ctypes.byref(handle))
return handle.value
|
[
"def",
"eklef",
"(",
"fname",
")",
":",
"fname",
"=",
"stypes",
".",
"stringToCharP",
"(",
"fname",
")",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"eklef_c",
"(",
"fname",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
"return",
"handle",
".",
"value"
] |
Load an EK file, making it accessible to the EK readers.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eklef_c.html
:param fname: Name of EK file to load.
:type fname: str
:return: File handle of loaded EK file.
:rtype: int
|
[
"Load",
"an",
"EK",
"file",
"making",
"it",
"accessible",
"to",
"the",
"EK",
"readers",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4244-L4258
|
14,703
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
eknelt
|
def eknelt(selidx, row):
"""
Return the number of elements in a specified column entry in
the current row.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eknelt_c.html
:param selidx: Index of parent column in SELECT clause.
:type selidx: int
:param row: Row containing element.
:type row: int
:return: The number of elements in entry in current row.
:rtype: int
"""
selidx = ctypes.c_int(selidx)
row = ctypes.c_int(row)
return libspice.eknelt_c(selidx, row)
|
python
|
def eknelt(selidx, row):
"""
Return the number of elements in a specified column entry in
the current row.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eknelt_c.html
:param selidx: Index of parent column in SELECT clause.
:type selidx: int
:param row: Row containing element.
:type row: int
:return: The number of elements in entry in current row.
:rtype: int
"""
selidx = ctypes.c_int(selidx)
row = ctypes.c_int(row)
return libspice.eknelt_c(selidx, row)
|
[
"def",
"eknelt",
"(",
"selidx",
",",
"row",
")",
":",
"selidx",
"=",
"ctypes",
".",
"c_int",
"(",
"selidx",
")",
"row",
"=",
"ctypes",
".",
"c_int",
"(",
"row",
")",
"return",
"libspice",
".",
"eknelt_c",
"(",
"selidx",
",",
"row",
")"
] |
Return the number of elements in a specified column entry in
the current row.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eknelt_c.html
:param selidx: Index of parent column in SELECT clause.
:type selidx: int
:param row: Row containing element.
:type row: int
:return: The number of elements in entry in current row.
:rtype: int
|
[
"Return",
"the",
"number",
"of",
"elements",
"in",
"a",
"specified",
"column",
"entry",
"in",
"the",
"current",
"row",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4262-L4278
|
14,704
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekntab
|
def ekntab():
"""
Return the number of loaded EK tables.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekntab_c.html
:return: The number of loaded EK tables.
:rtype: int
"""
n = ctypes.c_int(0)
libspice.ekntab_c(ctypes.byref(n))
return n.value
|
python
|
def ekntab():
"""
Return the number of loaded EK tables.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekntab_c.html
:return: The number of loaded EK tables.
:rtype: int
"""
n = ctypes.c_int(0)
libspice.ekntab_c(ctypes.byref(n))
return n.value
|
[
"def",
"ekntab",
"(",
")",
":",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"0",
")",
"libspice",
".",
"ekntab_c",
"(",
"ctypes",
".",
"byref",
"(",
"n",
")",
")",
"return",
"n",
".",
"value"
] |
Return the number of loaded EK tables.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekntab_c.html
:return: The number of loaded EK tables.
:rtype: int
|
[
"Return",
"the",
"number",
"of",
"loaded",
"EK",
"tables",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4298-L4309
|
14,705
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekopn
|
def ekopn(fname, ifname, ncomch):
"""
Open a new E-kernel file and prepare the file for writing.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopn_c.html
:param fname: Name of EK file.
:type fname: str
:param ifname: Internal file name.
:type ifname: str
:param ncomch: The number of characters to reserve for comments.
:type ncomch: int
:return: Handle attached to new EK file.
:rtype: int
"""
fname = stypes.stringToCharP(fname)
ifname = stypes.stringToCharP(ifname)
ncomch = ctypes.c_int(ncomch)
handle = ctypes.c_int()
libspice.ekopn_c(fname, ifname, ncomch, ctypes.byref(handle))
return handle.value
|
python
|
def ekopn(fname, ifname, ncomch):
"""
Open a new E-kernel file and prepare the file for writing.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopn_c.html
:param fname: Name of EK file.
:type fname: str
:param ifname: Internal file name.
:type ifname: str
:param ncomch: The number of characters to reserve for comments.
:type ncomch: int
:return: Handle attached to new EK file.
:rtype: int
"""
fname = stypes.stringToCharP(fname)
ifname = stypes.stringToCharP(ifname)
ncomch = ctypes.c_int(ncomch)
handle = ctypes.c_int()
libspice.ekopn_c(fname, ifname, ncomch, ctypes.byref(handle))
return handle.value
|
[
"def",
"ekopn",
"(",
"fname",
",",
"ifname",
",",
"ncomch",
")",
":",
"fname",
"=",
"stypes",
".",
"stringToCharP",
"(",
"fname",
")",
"ifname",
"=",
"stypes",
".",
"stringToCharP",
"(",
"ifname",
")",
"ncomch",
"=",
"ctypes",
".",
"c_int",
"(",
"ncomch",
")",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"ekopn_c",
"(",
"fname",
",",
"ifname",
",",
"ncomch",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
"return",
"handle",
".",
"value"
] |
Open a new E-kernel file and prepare the file for writing.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopn_c.html
:param fname: Name of EK file.
:type fname: str
:param ifname: Internal file name.
:type ifname: str
:param ncomch: The number of characters to reserve for comments.
:type ncomch: int
:return: Handle attached to new EK file.
:rtype: int
|
[
"Open",
"a",
"new",
"E",
"-",
"kernel",
"file",
"and",
"prepare",
"the",
"file",
"for",
"writing",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4313-L4333
|
14,706
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekopr
|
def ekopr(fname):
"""
Open an existing E-kernel file for reading.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopr_c.html
:param fname: Name of EK file.
:type fname: str
:return: Handle attached to EK file.
:rtype: int
"""
fname = stypes.stringToCharP(fname)
handle = ctypes.c_int()
libspice.ekopr_c(fname, ctypes.byref(handle))
return handle.value
|
python
|
def ekopr(fname):
"""
Open an existing E-kernel file for reading.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopr_c.html
:param fname: Name of EK file.
:type fname: str
:return: Handle attached to EK file.
:rtype: int
"""
fname = stypes.stringToCharP(fname)
handle = ctypes.c_int()
libspice.ekopr_c(fname, ctypes.byref(handle))
return handle.value
|
[
"def",
"ekopr",
"(",
"fname",
")",
":",
"fname",
"=",
"stypes",
".",
"stringToCharP",
"(",
"fname",
")",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"ekopr_c",
"(",
"fname",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
"return",
"handle",
".",
"value"
] |
Open an existing E-kernel file for reading.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopr_c.html
:param fname: Name of EK file.
:type fname: str
:return: Handle attached to EK file.
:rtype: int
|
[
"Open",
"an",
"existing",
"E",
"-",
"kernel",
"file",
"for",
"reading",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4337-L4351
|
14,707
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekopw
|
def ekopw(fname):
"""
Open an existing E-kernel file for writing.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopw_c.html
:param fname: Name of EK file.
:type fname: str
:return: Handle attached to EK file.
:rtype: int
"""
fname = stypes.stringToCharP(fname)
handle = ctypes.c_int()
libspice.ekopw_c(fname, ctypes.byref(handle))
return handle.value
|
python
|
def ekopw(fname):
"""
Open an existing E-kernel file for writing.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopw_c.html
:param fname: Name of EK file.
:type fname: str
:return: Handle attached to EK file.
:rtype: int
"""
fname = stypes.stringToCharP(fname)
handle = ctypes.c_int()
libspice.ekopw_c(fname, ctypes.byref(handle))
return handle.value
|
[
"def",
"ekopw",
"(",
"fname",
")",
":",
"fname",
"=",
"stypes",
".",
"stringToCharP",
"(",
"fname",
")",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"ekopw_c",
"(",
"fname",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
"return",
"handle",
".",
"value"
] |
Open an existing E-kernel file for writing.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekopw_c.html
:param fname: Name of EK file.
:type fname: str
:return: Handle attached to EK file.
:rtype: int
|
[
"Open",
"an",
"existing",
"E",
"-",
"kernel",
"file",
"for",
"writing",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4371-L4385
|
14,708
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekpsel
|
def ekpsel(query, msglen, tablen, collen):
"""
Parse the SELECT clause of an EK query, returning full particulars
concerning each selected item.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekpsel_c.html
note: oddly docs at url are incomplete/incorrect.
:param query: EK query.
:type query: str
:param msglen: Available space in the output error message string.
:type msglen: int
:param tablen: UNKNOWN? Length of Table?
:type tablen: int
:param collen: UNKOWN? Length of Column?
:return:
Number of items in SELECT clause of query,
Begin positions of expressions in SELECT clause,
End positions of expressions in SELECT clause,
Data types of expressions,
Classes of expressions,
Names of tables qualifying SELECT columns,
Names of columns in SELECT clause of query,
Error flag,
Parse error message.
:rtype: tuple
"""
query = stypes.stringToCharP(query)
msglen = ctypes.c_int(msglen)
tablen = ctypes.c_int(tablen)
collen = ctypes.c_int(collen)
n = ctypes.c_int()
xbegs = stypes.emptyIntVector(_SPICE_EK_MAXQSEL)
xends = stypes.emptyIntVector(_SPICE_EK_MAXQSEL)
xtypes = stypes.emptyIntVector(_SPICE_EK_MAXQSEL)
xclass = stypes.emptyIntVector(_SPICE_EK_MAXQSEL)
tabs = stypes.emptyCharArray(yLen=_SPICE_EK_MAXQSEL, xLen=tablen)
cols = stypes.emptyCharArray(yLen=_SPICE_EK_MAXQSEL, xLen=collen)
error = ctypes.c_int()
errmsg = stypes.stringToCharP(msglen)
libspice.ekpsel_c(query, msglen, tablen, collen, ctypes.byref(n),
xbegs, xends, xtypes, xclass, ctypes.byref(tabs),
ctypes.byref(cols), ctypes.byref(error), errmsg)
return (n.value,
stypes.cVectorToPython(xbegs)[:n.value],
stypes.cVectorToPython(xends)[:n.value],
stypes.cVectorToPython(xtypes)[:n.value],
stypes.cVectorToPython(xclass)[:n.value],
stypes.cVectorToPython(tabs)[:n.value],
stypes.cVectorToPython(cols)[:n.value],
error.value,
stypes.toPythonString(errmsg))
|
python
|
def ekpsel(query, msglen, tablen, collen):
"""
Parse the SELECT clause of an EK query, returning full particulars
concerning each selected item.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekpsel_c.html
note: oddly docs at url are incomplete/incorrect.
:param query: EK query.
:type query: str
:param msglen: Available space in the output error message string.
:type msglen: int
:param tablen: UNKNOWN? Length of Table?
:type tablen: int
:param collen: UNKOWN? Length of Column?
:return:
Number of items in SELECT clause of query,
Begin positions of expressions in SELECT clause,
End positions of expressions in SELECT clause,
Data types of expressions,
Classes of expressions,
Names of tables qualifying SELECT columns,
Names of columns in SELECT clause of query,
Error flag,
Parse error message.
:rtype: tuple
"""
query = stypes.stringToCharP(query)
msglen = ctypes.c_int(msglen)
tablen = ctypes.c_int(tablen)
collen = ctypes.c_int(collen)
n = ctypes.c_int()
xbegs = stypes.emptyIntVector(_SPICE_EK_MAXQSEL)
xends = stypes.emptyIntVector(_SPICE_EK_MAXQSEL)
xtypes = stypes.emptyIntVector(_SPICE_EK_MAXQSEL)
xclass = stypes.emptyIntVector(_SPICE_EK_MAXQSEL)
tabs = stypes.emptyCharArray(yLen=_SPICE_EK_MAXQSEL, xLen=tablen)
cols = stypes.emptyCharArray(yLen=_SPICE_EK_MAXQSEL, xLen=collen)
error = ctypes.c_int()
errmsg = stypes.stringToCharP(msglen)
libspice.ekpsel_c(query, msglen, tablen, collen, ctypes.byref(n),
xbegs, xends, xtypes, xclass, ctypes.byref(tabs),
ctypes.byref(cols), ctypes.byref(error), errmsg)
return (n.value,
stypes.cVectorToPython(xbegs)[:n.value],
stypes.cVectorToPython(xends)[:n.value],
stypes.cVectorToPython(xtypes)[:n.value],
stypes.cVectorToPython(xclass)[:n.value],
stypes.cVectorToPython(tabs)[:n.value],
stypes.cVectorToPython(cols)[:n.value],
error.value,
stypes.toPythonString(errmsg))
|
[
"def",
"ekpsel",
"(",
"query",
",",
"msglen",
",",
"tablen",
",",
"collen",
")",
":",
"query",
"=",
"stypes",
".",
"stringToCharP",
"(",
"query",
")",
"msglen",
"=",
"ctypes",
".",
"c_int",
"(",
"msglen",
")",
"tablen",
"=",
"ctypes",
".",
"c_int",
"(",
"tablen",
")",
"collen",
"=",
"ctypes",
".",
"c_int",
"(",
"collen",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"xbegs",
"=",
"stypes",
".",
"emptyIntVector",
"(",
"_SPICE_EK_MAXQSEL",
")",
"xends",
"=",
"stypes",
".",
"emptyIntVector",
"(",
"_SPICE_EK_MAXQSEL",
")",
"xtypes",
"=",
"stypes",
".",
"emptyIntVector",
"(",
"_SPICE_EK_MAXQSEL",
")",
"xclass",
"=",
"stypes",
".",
"emptyIntVector",
"(",
"_SPICE_EK_MAXQSEL",
")",
"tabs",
"=",
"stypes",
".",
"emptyCharArray",
"(",
"yLen",
"=",
"_SPICE_EK_MAXQSEL",
",",
"xLen",
"=",
"tablen",
")",
"cols",
"=",
"stypes",
".",
"emptyCharArray",
"(",
"yLen",
"=",
"_SPICE_EK_MAXQSEL",
",",
"xLen",
"=",
"collen",
")",
"error",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"errmsg",
"=",
"stypes",
".",
"stringToCharP",
"(",
"msglen",
")",
"libspice",
".",
"ekpsel_c",
"(",
"query",
",",
"msglen",
",",
"tablen",
",",
"collen",
",",
"ctypes",
".",
"byref",
"(",
"n",
")",
",",
"xbegs",
",",
"xends",
",",
"xtypes",
",",
"xclass",
",",
"ctypes",
".",
"byref",
"(",
"tabs",
")",
",",
"ctypes",
".",
"byref",
"(",
"cols",
")",
",",
"ctypes",
".",
"byref",
"(",
"error",
")",
",",
"errmsg",
")",
"return",
"(",
"n",
".",
"value",
",",
"stypes",
".",
"cVectorToPython",
"(",
"xbegs",
")",
"[",
":",
"n",
".",
"value",
"]",
",",
"stypes",
".",
"cVectorToPython",
"(",
"xends",
")",
"[",
":",
"n",
".",
"value",
"]",
",",
"stypes",
".",
"cVectorToPython",
"(",
"xtypes",
")",
"[",
":",
"n",
".",
"value",
"]",
",",
"stypes",
".",
"cVectorToPython",
"(",
"xclass",
")",
"[",
":",
"n",
".",
"value",
"]",
",",
"stypes",
".",
"cVectorToPython",
"(",
"tabs",
")",
"[",
":",
"n",
".",
"value",
"]",
",",
"stypes",
".",
"cVectorToPython",
"(",
"cols",
")",
"[",
":",
"n",
".",
"value",
"]",
",",
"error",
".",
"value",
",",
"stypes",
".",
"toPythonString",
"(",
"errmsg",
")",
")"
] |
Parse the SELECT clause of an EK query, returning full particulars
concerning each selected item.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekpsel_c.html
note: oddly docs at url are incomplete/incorrect.
:param query: EK query.
:type query: str
:param msglen: Available space in the output error message string.
:type msglen: int
:param tablen: UNKNOWN? Length of Table?
:type tablen: int
:param collen: UNKOWN? Length of Column?
:return:
Number of items in SELECT clause of query,
Begin positions of expressions in SELECT clause,
End positions of expressions in SELECT clause,
Data types of expressions,
Classes of expressions,
Names of tables qualifying SELECT columns,
Names of columns in SELECT clause of query,
Error flag,
Parse error message.
:rtype: tuple
|
[
"Parse",
"the",
"SELECT",
"clause",
"of",
"an",
"EK",
"query",
"returning",
"full",
"particulars",
"concerning",
"each",
"selected",
"item",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4389-L4440
|
14,709
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekrcec
|
def ekrcec(handle, segno, recno, column, lenout, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT):
"""
Read data from a character column in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcec_c.html
:param handle: Handle attached to EK file.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record from which data is to be read.
:type recno: int
:param column: Column name.
:type column: str
:param lenout: Maximum length of output strings.
:type lenout: int
:param nelts: Number of elements to allow for (default=100)
:type nelts: int
:return:
Number of values in column entry,
Character values in column entry,
Flag indicating whether column entry is null.
:rtype: tuple
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
lenout = ctypes.c_int(lenout)
nvals = ctypes.c_int()
cvals = stypes.emptyCharArray(yLen=nelts, xLen=lenout)
isnull = ctypes.c_int()
libspice.ekrcec_c(handle, segno, recno, column, lenout, ctypes.byref(nvals), ctypes.byref(cvals), ctypes.byref(isnull))
assert failed() or (nvals.value <= nelts)
return nvals.value, stypes.cVectorToPython(cvals)[:nvals.value], bool(isnull.value)
|
python
|
def ekrcec(handle, segno, recno, column, lenout, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT):
"""
Read data from a character column in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcec_c.html
:param handle: Handle attached to EK file.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record from which data is to be read.
:type recno: int
:param column: Column name.
:type column: str
:param lenout: Maximum length of output strings.
:type lenout: int
:param nelts: Number of elements to allow for (default=100)
:type nelts: int
:return:
Number of values in column entry,
Character values in column entry,
Flag indicating whether column entry is null.
:rtype: tuple
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
lenout = ctypes.c_int(lenout)
nvals = ctypes.c_int()
cvals = stypes.emptyCharArray(yLen=nelts, xLen=lenout)
isnull = ctypes.c_int()
libspice.ekrcec_c(handle, segno, recno, column, lenout, ctypes.byref(nvals), ctypes.byref(cvals), ctypes.byref(isnull))
assert failed() or (nvals.value <= nelts)
return nvals.value, stypes.cVectorToPython(cvals)[:nvals.value], bool(isnull.value)
|
[
"def",
"ekrcec",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"lenout",
",",
"nelts",
"=",
"_SPICE_EK_EKRCEX_ROOM_DEFAULT",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"segno",
"=",
"ctypes",
".",
"c_int",
"(",
"segno",
")",
"recno",
"=",
"ctypes",
".",
"c_int",
"(",
"recno",
")",
"column",
"=",
"stypes",
".",
"stringToCharP",
"(",
"column",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"nvals",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"cvals",
"=",
"stypes",
".",
"emptyCharArray",
"(",
"yLen",
"=",
"nelts",
",",
"xLen",
"=",
"lenout",
")",
"isnull",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"ekrcec_c",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"lenout",
",",
"ctypes",
".",
"byref",
"(",
"nvals",
")",
",",
"ctypes",
".",
"byref",
"(",
"cvals",
")",
",",
"ctypes",
".",
"byref",
"(",
"isnull",
")",
")",
"assert",
"failed",
"(",
")",
"or",
"(",
"nvals",
".",
"value",
"<=",
"nelts",
")",
"return",
"nvals",
".",
"value",
",",
"stypes",
".",
"cVectorToPython",
"(",
"cvals",
")",
"[",
":",
"nvals",
".",
"value",
"]",
",",
"bool",
"(",
"isnull",
".",
"value",
")"
] |
Read data from a character column in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcec_c.html
:param handle: Handle attached to EK file.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record from which data is to be read.
:type recno: int
:param column: Column name.
:type column: str
:param lenout: Maximum length of output strings.
:type lenout: int
:param nelts: Number of elements to allow for (default=100)
:type nelts: int
:return:
Number of values in column entry,
Character values in column entry,
Flag indicating whether column entry is null.
:rtype: tuple
|
[
"Read",
"data",
"from",
"a",
"character",
"column",
"in",
"a",
"specified",
"EK",
"record",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4444-L4478
|
14,710
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekrced
|
def ekrced(handle, segno, recno, column, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT):
"""
Read data from a double precision column in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrced_c.html
:param handle: Handle attached to EK file.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record from which data is to be read.
:type recno: int
:param column: Column name.
:type column: str
:return:
Number of values in column entry,
Float values in column entry,
Flag indicating whether column entry is null.
:rtype: tuple
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
nvals = ctypes.c_int(0)
dvals = stypes.emptyDoubleVector(nelts)
isnull = ctypes.c_int()
libspice.ekrced_c(handle, segno, recno, column, ctypes.byref(nvals), dvals,
ctypes.byref(isnull))
assert failed() or (nvals.value <= nelts)
return nvals.value, stypes.cVectorToPython(dvals)[:nvals.value], bool(isnull.value)
|
python
|
def ekrced(handle, segno, recno, column, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT):
"""
Read data from a double precision column in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrced_c.html
:param handle: Handle attached to EK file.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record from which data is to be read.
:type recno: int
:param column: Column name.
:type column: str
:return:
Number of values in column entry,
Float values in column entry,
Flag indicating whether column entry is null.
:rtype: tuple
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
nvals = ctypes.c_int(0)
dvals = stypes.emptyDoubleVector(nelts)
isnull = ctypes.c_int()
libspice.ekrced_c(handle, segno, recno, column, ctypes.byref(nvals), dvals,
ctypes.byref(isnull))
assert failed() or (nvals.value <= nelts)
return nvals.value, stypes.cVectorToPython(dvals)[:nvals.value], bool(isnull.value)
|
[
"def",
"ekrced",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"nelts",
"=",
"_SPICE_EK_EKRCEX_ROOM_DEFAULT",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"segno",
"=",
"ctypes",
".",
"c_int",
"(",
"segno",
")",
"recno",
"=",
"ctypes",
".",
"c_int",
"(",
"recno",
")",
"column",
"=",
"stypes",
".",
"stringToCharP",
"(",
"column",
")",
"nvals",
"=",
"ctypes",
".",
"c_int",
"(",
"0",
")",
"dvals",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"nelts",
")",
"isnull",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"ekrced_c",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"ctypes",
".",
"byref",
"(",
"nvals",
")",
",",
"dvals",
",",
"ctypes",
".",
"byref",
"(",
"isnull",
")",
")",
"assert",
"failed",
"(",
")",
"or",
"(",
"nvals",
".",
"value",
"<=",
"nelts",
")",
"return",
"nvals",
".",
"value",
",",
"stypes",
".",
"cVectorToPython",
"(",
"dvals",
")",
"[",
":",
"nvals",
".",
"value",
"]",
",",
"bool",
"(",
"isnull",
".",
"value",
")"
] |
Read data from a double precision column in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrced_c.html
:param handle: Handle attached to EK file.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record from which data is to be read.
:type recno: int
:param column: Column name.
:type column: str
:return:
Number of values in column entry,
Float values in column entry,
Flag indicating whether column entry is null.
:rtype: tuple
|
[
"Read",
"data",
"from",
"a",
"double",
"precision",
"column",
"in",
"a",
"specified",
"EK",
"record",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4482-L4512
|
14,711
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekrcei
|
def ekrcei(handle, segno, recno, column, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT):
"""
Read data from an integer column in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcei_c.html
:param handle: Handle attached to EK file.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record from which data is to be read.
:type recno: int
:param column: Column name.
:type column: str
:return:
Number of values in column entry,
Integer values in column entry,
Flag indicating whether column entry is null.
:rtype: tuple
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
nvals = ctypes.c_int()
ivals = stypes.emptyIntVector(nelts)
isnull = ctypes.c_int()
libspice.ekrcei_c(handle, segno, recno, column, ctypes.byref(nvals), ivals,
ctypes.byref(isnull))
assert failed() or (nvals.value <= nelts)
return nvals.value, stypes.cVectorToPython(ivals)[:nvals.value], bool(isnull.value)
|
python
|
def ekrcei(handle, segno, recno, column, nelts=_SPICE_EK_EKRCEX_ROOM_DEFAULT):
"""
Read data from an integer column in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcei_c.html
:param handle: Handle attached to EK file.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record from which data is to be read.
:type recno: int
:param column: Column name.
:type column: str
:return:
Number of values in column entry,
Integer values in column entry,
Flag indicating whether column entry is null.
:rtype: tuple
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
nvals = ctypes.c_int()
ivals = stypes.emptyIntVector(nelts)
isnull = ctypes.c_int()
libspice.ekrcei_c(handle, segno, recno, column, ctypes.byref(nvals), ivals,
ctypes.byref(isnull))
assert failed() or (nvals.value <= nelts)
return nvals.value, stypes.cVectorToPython(ivals)[:nvals.value], bool(isnull.value)
|
[
"def",
"ekrcei",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"nelts",
"=",
"_SPICE_EK_EKRCEX_ROOM_DEFAULT",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"segno",
"=",
"ctypes",
".",
"c_int",
"(",
"segno",
")",
"recno",
"=",
"ctypes",
".",
"c_int",
"(",
"recno",
")",
"column",
"=",
"stypes",
".",
"stringToCharP",
"(",
"column",
")",
"nvals",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"ivals",
"=",
"stypes",
".",
"emptyIntVector",
"(",
"nelts",
")",
"isnull",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"ekrcei_c",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"ctypes",
".",
"byref",
"(",
"nvals",
")",
",",
"ivals",
",",
"ctypes",
".",
"byref",
"(",
"isnull",
")",
")",
"assert",
"failed",
"(",
")",
"or",
"(",
"nvals",
".",
"value",
"<=",
"nelts",
")",
"return",
"nvals",
".",
"value",
",",
"stypes",
".",
"cVectorToPython",
"(",
"ivals",
")",
"[",
":",
"nvals",
".",
"value",
"]",
",",
"bool",
"(",
"isnull",
".",
"value",
")"
] |
Read data from an integer column in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekrcei_c.html
:param handle: Handle attached to EK file.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record from which data is to be read.
:type recno: int
:param column: Column name.
:type column: str
:return:
Number of values in column entry,
Integer values in column entry,
Flag indicating whether column entry is null.
:rtype: tuple
|
[
"Read",
"data",
"from",
"an",
"integer",
"column",
"in",
"a",
"specified",
"EK",
"record",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4516-L4546
|
14,712
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekssum
|
def ekssum(handle, segno):
"""
Return summary information for a specified segment in a specified EK.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekssum_c.html
:param handle: Handle of EK.
:type handle: int
:param segno: Number of segment to be summarized.
:type segno: int
:return: EK segment summary.
:rtype: spicepy.utils.support_types.SpiceEKSegSum
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
segsum = stypes.SpiceEKSegSum()
libspice.ekssum_c(handle, segno, ctypes.byref(segsum))
return segsum
|
python
|
def ekssum(handle, segno):
"""
Return summary information for a specified segment in a specified EK.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekssum_c.html
:param handle: Handle of EK.
:type handle: int
:param segno: Number of segment to be summarized.
:type segno: int
:return: EK segment summary.
:rtype: spicepy.utils.support_types.SpiceEKSegSum
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
segsum = stypes.SpiceEKSegSum()
libspice.ekssum_c(handle, segno, ctypes.byref(segsum))
return segsum
|
[
"def",
"ekssum",
"(",
"handle",
",",
"segno",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"segno",
"=",
"ctypes",
".",
"c_int",
"(",
"segno",
")",
"segsum",
"=",
"stypes",
".",
"SpiceEKSegSum",
"(",
")",
"libspice",
".",
"ekssum_c",
"(",
"handle",
",",
"segno",
",",
"ctypes",
".",
"byref",
"(",
"segsum",
")",
")",
"return",
"segsum"
] |
Return summary information for a specified segment in a specified EK.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekssum_c.html
:param handle: Handle of EK.
:type handle: int
:param segno: Number of segment to be summarized.
:type segno: int
:return: EK segment summary.
:rtype: spicepy.utils.support_types.SpiceEKSegSum
|
[
"Return",
"summary",
"information",
"for",
"a",
"specified",
"segment",
"in",
"a",
"specified",
"EK",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4550-L4567
|
14,713
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ektnam
|
def ektnam(n, lenout=_default_len_out):
"""
Return the name of a specified, loaded table.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ektnam_c.html
:param n: Index of table.
:type n: int
:param lenout: Maximum table name length.
:type lenout: int
:return: Name of table.
:rtype: str
"""
n = ctypes.c_int(n)
lenout = ctypes.c_int(lenout)
table = stypes.stringToCharP(lenout)
libspice.ektnam_c(n, lenout, table)
return stypes.toPythonString(table)
|
python
|
def ektnam(n, lenout=_default_len_out):
"""
Return the name of a specified, loaded table.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ektnam_c.html
:param n: Index of table.
:type n: int
:param lenout: Maximum table name length.
:type lenout: int
:return: Name of table.
:rtype: str
"""
n = ctypes.c_int(n)
lenout = ctypes.c_int(lenout)
table = stypes.stringToCharP(lenout)
libspice.ektnam_c(n, lenout, table)
return stypes.toPythonString(table)
|
[
"def",
"ektnam",
"(",
"n",
",",
"lenout",
"=",
"_default_len_out",
")",
":",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"table",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenout",
")",
"libspice",
".",
"ektnam_c",
"(",
"n",
",",
"lenout",
",",
"table",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"table",
")"
] |
Return the name of a specified, loaded table.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ektnam_c.html
:param n: Index of table.
:type n: int
:param lenout: Maximum table name length.
:type lenout: int
:return: Name of table.
:rtype: str
|
[
"Return",
"the",
"name",
"of",
"a",
"specified",
"loaded",
"table",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4571-L4588
|
14,714
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekucec
|
def ekucec(handle, segno, recno, column, nvals, cvals, isnull):
"""
Update a character column entry in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucec_c.html
:param handle: EK file handle.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record to which data is to be updated.
:type recno: int
:param column: Column name.
:type column: str
:param nvals: Number of values in new column entry.
:type nvals: int
:param cvals: Character values comprising new column entry.
:type cvals: list of str.
:param isnull: Flag indicating whether column entry is null.
:type isnull: bool
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
nvals = ctypes.c_int(nvals)
vallen = ctypes.c_int(len(max(cvals, key=len)) + 1)
cvals = stypes.listToCharArrayPtr(cvals, xLen=vallen)
isnull = ctypes.c_int(isnull)
libspice.ekucec_c(handle, segno, recno, column, nvals, vallen, cvals, isnull)
|
python
|
def ekucec(handle, segno, recno, column, nvals, cvals, isnull):
"""
Update a character column entry in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucec_c.html
:param handle: EK file handle.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record to which data is to be updated.
:type recno: int
:param column: Column name.
:type column: str
:param nvals: Number of values in new column entry.
:type nvals: int
:param cvals: Character values comprising new column entry.
:type cvals: list of str.
:param isnull: Flag indicating whether column entry is null.
:type isnull: bool
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
nvals = ctypes.c_int(nvals)
vallen = ctypes.c_int(len(max(cvals, key=len)) + 1)
cvals = stypes.listToCharArrayPtr(cvals, xLen=vallen)
isnull = ctypes.c_int(isnull)
libspice.ekucec_c(handle, segno, recno, column, nvals, vallen, cvals, isnull)
|
[
"def",
"ekucec",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"nvals",
",",
"cvals",
",",
"isnull",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"segno",
"=",
"ctypes",
".",
"c_int",
"(",
"segno",
")",
"recno",
"=",
"ctypes",
".",
"c_int",
"(",
"recno",
")",
"column",
"=",
"stypes",
".",
"stringToCharP",
"(",
"column",
")",
"nvals",
"=",
"ctypes",
".",
"c_int",
"(",
"nvals",
")",
"vallen",
"=",
"ctypes",
".",
"c_int",
"(",
"len",
"(",
"max",
"(",
"cvals",
",",
"key",
"=",
"len",
")",
")",
"+",
"1",
")",
"cvals",
"=",
"stypes",
".",
"listToCharArrayPtr",
"(",
"cvals",
",",
"xLen",
"=",
"vallen",
")",
"isnull",
"=",
"ctypes",
".",
"c_int",
"(",
"isnull",
")",
"libspice",
".",
"ekucec_c",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"nvals",
",",
"vallen",
",",
"cvals",
",",
"isnull",
")"
] |
Update a character column entry in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucec_c.html
:param handle: EK file handle.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record to which data is to be updated.
:type recno: int
:param column: Column name.
:type column: str
:param nvals: Number of values in new column entry.
:type nvals: int
:param cvals: Character values comprising new column entry.
:type cvals: list of str.
:param isnull: Flag indicating whether column entry is null.
:type isnull: bool
|
[
"Update",
"a",
"character",
"column",
"entry",
"in",
"a",
"specified",
"EK",
"record",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4592-L4621
|
14,715
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekuced
|
def ekuced(handle, segno, recno, column, nvals, dvals, isnull):
"""
Update a double precision column entry in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekuced_c.html
:param handle: EK file handle.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record to which data is to be updated.
:type recno: int
:param column: Column name.
:type column: str
:param nvals: Number of values in new column entry.
:type nvals: int
:param dvals: Double precision values comprising new column entry.
:type dvals: Array of floats
:param isnull: Flag indicating whether column entry is null.
:type isnull: bool
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
nvals = ctypes.c_int(nvals)
dvals = stypes.toDoubleVector(dvals)
isnull = ctypes.c_int(isnull)
libspice.ekaced_c(handle, segno, recno, column, nvals, dvals, isnull)
|
python
|
def ekuced(handle, segno, recno, column, nvals, dvals, isnull):
"""
Update a double precision column entry in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekuced_c.html
:param handle: EK file handle.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record to which data is to be updated.
:type recno: int
:param column: Column name.
:type column: str
:param nvals: Number of values in new column entry.
:type nvals: int
:param dvals: Double precision values comprising new column entry.
:type dvals: Array of floats
:param isnull: Flag indicating whether column entry is null.
:type isnull: bool
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
nvals = ctypes.c_int(nvals)
dvals = stypes.toDoubleVector(dvals)
isnull = ctypes.c_int(isnull)
libspice.ekaced_c(handle, segno, recno, column, nvals, dvals, isnull)
|
[
"def",
"ekuced",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"nvals",
",",
"dvals",
",",
"isnull",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"segno",
"=",
"ctypes",
".",
"c_int",
"(",
"segno",
")",
"recno",
"=",
"ctypes",
".",
"c_int",
"(",
"recno",
")",
"column",
"=",
"stypes",
".",
"stringToCharP",
"(",
"column",
")",
"nvals",
"=",
"ctypes",
".",
"c_int",
"(",
"nvals",
")",
"dvals",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"dvals",
")",
"isnull",
"=",
"ctypes",
".",
"c_int",
"(",
"isnull",
")",
"libspice",
".",
"ekaced_c",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"nvals",
",",
"dvals",
",",
"isnull",
")"
] |
Update a double precision column entry in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekuced_c.html
:param handle: EK file handle.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record to which data is to be updated.
:type recno: int
:param column: Column name.
:type column: str
:param nvals: Number of values in new column entry.
:type nvals: int
:param dvals: Double precision values comprising new column entry.
:type dvals: Array of floats
:param isnull: Flag indicating whether column entry is null.
:type isnull: bool
|
[
"Update",
"a",
"double",
"precision",
"column",
"entry",
"in",
"a",
"specified",
"EK",
"record",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4625-L4653
|
14,716
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ekucei
|
def ekucei(handle, segno, recno, column, nvals, ivals, isnull):
"""
Update an integer column entry in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucei_c.html
:param handle: EK file handle.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record to which data is to be updated.
:type recno: int
:param column: Column name.
:type column: str
:param nvals: Number of values in new column entry.
:type nvals: int
:param ivals: Integer values comprising new column entry.
:type ivals: Array of ints
:param isnull: Flag indicating whether column entry is null.
:type isnull: bool
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
nvals = ctypes.c_int(nvals)
ivals = stypes.toIntVector(ivals)
isnull = ctypes.c_int(isnull)
libspice.ekucei_c(handle, segno, recno, column, nvals, ivals, isnull)
|
python
|
def ekucei(handle, segno, recno, column, nvals, ivals, isnull):
"""
Update an integer column entry in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucei_c.html
:param handle: EK file handle.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record to which data is to be updated.
:type recno: int
:param column: Column name.
:type column: str
:param nvals: Number of values in new column entry.
:type nvals: int
:param ivals: Integer values comprising new column entry.
:type ivals: Array of ints
:param isnull: Flag indicating whether column entry is null.
:type isnull: bool
"""
handle = ctypes.c_int(handle)
segno = ctypes.c_int(segno)
recno = ctypes.c_int(recno)
column = stypes.stringToCharP(column)
nvals = ctypes.c_int(nvals)
ivals = stypes.toIntVector(ivals)
isnull = ctypes.c_int(isnull)
libspice.ekucei_c(handle, segno, recno, column, nvals, ivals, isnull)
|
[
"def",
"ekucei",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"nvals",
",",
"ivals",
",",
"isnull",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"segno",
"=",
"ctypes",
".",
"c_int",
"(",
"segno",
")",
"recno",
"=",
"ctypes",
".",
"c_int",
"(",
"recno",
")",
"column",
"=",
"stypes",
".",
"stringToCharP",
"(",
"column",
")",
"nvals",
"=",
"ctypes",
".",
"c_int",
"(",
"nvals",
")",
"ivals",
"=",
"stypes",
".",
"toIntVector",
"(",
"ivals",
")",
"isnull",
"=",
"ctypes",
".",
"c_int",
"(",
"isnull",
")",
"libspice",
".",
"ekucei_c",
"(",
"handle",
",",
"segno",
",",
"recno",
",",
"column",
",",
"nvals",
",",
"ivals",
",",
"isnull",
")"
] |
Update an integer column entry in a specified EK record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekucei_c.html
:param handle: EK file handle.
:type handle: int
:param segno: Index of segment containing record.
:type segno: int
:param recno: Record to which data is to be updated.
:type recno: int
:param column: Column name.
:type column: str
:param nvals: Number of values in new column entry.
:type nvals: int
:param ivals: Integer values comprising new column entry.
:type ivals: Array of ints
:param isnull: Flag indicating whether column entry is null.
:type isnull: bool
|
[
"Update",
"an",
"integer",
"column",
"entry",
"in",
"a",
"specified",
"EK",
"record",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4657-L4685
|
14,717
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
el2cgv
|
def el2cgv(ellipse):
"""
Convert an ellipse to a center vector and two generating
vectors. The selected generating vectors are semi-axes of the
ellipse.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/el2cgv_c.html
:param ellipse: An Ellipse
:type ellipse: spiceypy.utils.support_types.Ellipse
:return: Center and semi-axes of ellipse.
:rtype: tuple
"""
assert (isinstance(ellipse, stypes.Ellipse))
center = stypes.emptyDoubleVector(3)
smajor = stypes.emptyDoubleVector(3)
sminor = stypes.emptyDoubleVector(3)
libspice.el2cgv_c(ctypes.byref(ellipse), center, smajor, sminor)
return stypes.cVectorToPython(center), stypes.cVectorToPython(
smajor), stypes.cVectorToPython(sminor)
|
python
|
def el2cgv(ellipse):
"""
Convert an ellipse to a center vector and two generating
vectors. The selected generating vectors are semi-axes of the
ellipse.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/el2cgv_c.html
:param ellipse: An Ellipse
:type ellipse: spiceypy.utils.support_types.Ellipse
:return: Center and semi-axes of ellipse.
:rtype: tuple
"""
assert (isinstance(ellipse, stypes.Ellipse))
center = stypes.emptyDoubleVector(3)
smajor = stypes.emptyDoubleVector(3)
sminor = stypes.emptyDoubleVector(3)
libspice.el2cgv_c(ctypes.byref(ellipse), center, smajor, sminor)
return stypes.cVectorToPython(center), stypes.cVectorToPython(
smajor), stypes.cVectorToPython(sminor)
|
[
"def",
"el2cgv",
"(",
"ellipse",
")",
":",
"assert",
"(",
"isinstance",
"(",
"ellipse",
",",
"stypes",
".",
"Ellipse",
")",
")",
"center",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"smajor",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"sminor",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"el2cgv_c",
"(",
"ctypes",
".",
"byref",
"(",
"ellipse",
")",
",",
"center",
",",
"smajor",
",",
"sminor",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"center",
")",
",",
"stypes",
".",
"cVectorToPython",
"(",
"smajor",
")",
",",
"stypes",
".",
"cVectorToPython",
"(",
"sminor",
")"
] |
Convert an ellipse to a center vector and two generating
vectors. The selected generating vectors are semi-axes of the
ellipse.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/el2cgv_c.html
:param ellipse: An Ellipse
:type ellipse: spiceypy.utils.support_types.Ellipse
:return: Center and semi-axes of ellipse.
:rtype: tuple
|
[
"Convert",
"an",
"ellipse",
"to",
"a",
"center",
"vector",
"and",
"two",
"generating",
"vectors",
".",
"The",
"selected",
"generating",
"vectors",
"are",
"semi",
"-",
"axes",
"of",
"the",
"ellipse",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4705-L4724
|
14,718
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
elemc
|
def elemc(item, inset):
"""
Determine whether an item is an element of a character set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemc_c.html
:param item: Item to be tested.
:type item: str
:param inset: Set to be tested.
:type inset: spiceypy.utils.support_types.SpiceCell
:return: True if item is an element of set.
:rtype: bool
"""
assert isinstance(inset, stypes.SpiceCell)
item = stypes.stringToCharP(item)
return bool(libspice.elemc_c(item, ctypes.byref(inset)))
|
python
|
def elemc(item, inset):
"""
Determine whether an item is an element of a character set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemc_c.html
:param item: Item to be tested.
:type item: str
:param inset: Set to be tested.
:type inset: spiceypy.utils.support_types.SpiceCell
:return: True if item is an element of set.
:rtype: bool
"""
assert isinstance(inset, stypes.SpiceCell)
item = stypes.stringToCharP(item)
return bool(libspice.elemc_c(item, ctypes.byref(inset)))
|
[
"def",
"elemc",
"(",
"item",
",",
"inset",
")",
":",
"assert",
"isinstance",
"(",
"inset",
",",
"stypes",
".",
"SpiceCell",
")",
"item",
"=",
"stypes",
".",
"stringToCharP",
"(",
"item",
")",
"return",
"bool",
"(",
"libspice",
".",
"elemc_c",
"(",
"item",
",",
"ctypes",
".",
"byref",
"(",
"inset",
")",
")",
")"
] |
Determine whether an item is an element of a character set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemc_c.html
:param item: Item to be tested.
:type item: str
:param inset: Set to be tested.
:type inset: spiceypy.utils.support_types.SpiceCell
:return: True if item is an element of set.
:rtype: bool
|
[
"Determine",
"whether",
"an",
"item",
"is",
"an",
"element",
"of",
"a",
"character",
"set",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4728-L4743
|
14,719
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
elemd
|
def elemd(item, inset):
"""
Determine whether an item is an element of a double precision set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemd_c.html
:param item: Item to be tested.
:type item: float
:param inset: Set to be tested.
:type inset: spiceypy.utils.support_types.SpiceCell
:return: True if item is an element of set.
:rtype: bool
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.dtype == 1
item = ctypes.c_double(item)
return bool(libspice.elemd_c(item, ctypes.byref(inset)))
|
python
|
def elemd(item, inset):
"""
Determine whether an item is an element of a double precision set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemd_c.html
:param item: Item to be tested.
:type item: float
:param inset: Set to be tested.
:type inset: spiceypy.utils.support_types.SpiceCell
:return: True if item is an element of set.
:rtype: bool
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.dtype == 1
item = ctypes.c_double(item)
return bool(libspice.elemd_c(item, ctypes.byref(inset)))
|
[
"def",
"elemd",
"(",
"item",
",",
"inset",
")",
":",
"assert",
"isinstance",
"(",
"inset",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"inset",
".",
"dtype",
"==",
"1",
"item",
"=",
"ctypes",
".",
"c_double",
"(",
"item",
")",
"return",
"bool",
"(",
"libspice",
".",
"elemd_c",
"(",
"item",
",",
"ctypes",
".",
"byref",
"(",
"inset",
")",
")",
")"
] |
Determine whether an item is an element of a double precision set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemd_c.html
:param item: Item to be tested.
:type item: float
:param inset: Set to be tested.
:type inset: spiceypy.utils.support_types.SpiceCell
:return: True if item is an element of set.
:rtype: bool
|
[
"Determine",
"whether",
"an",
"item",
"is",
"an",
"element",
"of",
"a",
"double",
"precision",
"set",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4747-L4763
|
14,720
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
elemi
|
def elemi(item, inset):
"""
Determine whether an item is an element of an integer set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemi_c.html
:param item: Item to be tested.
:type item: int
:param inset: Set to be tested.
:type inset: spiceypy.utils.support_types.SpiceCell
:return: True if item is an element of set.
:rtype: bool
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.dtype == 2
item = ctypes.c_int(item)
return bool(libspice.elemi_c(item, ctypes.byref(inset)))
|
python
|
def elemi(item, inset):
"""
Determine whether an item is an element of an integer set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemi_c.html
:param item: Item to be tested.
:type item: int
:param inset: Set to be tested.
:type inset: spiceypy.utils.support_types.SpiceCell
:return: True if item is an element of set.
:rtype: bool
"""
assert isinstance(inset, stypes.SpiceCell)
assert inset.dtype == 2
item = ctypes.c_int(item)
return bool(libspice.elemi_c(item, ctypes.byref(inset)))
|
[
"def",
"elemi",
"(",
"item",
",",
"inset",
")",
":",
"assert",
"isinstance",
"(",
"inset",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"inset",
".",
"dtype",
"==",
"2",
"item",
"=",
"ctypes",
".",
"c_int",
"(",
"item",
")",
"return",
"bool",
"(",
"libspice",
".",
"elemi_c",
"(",
"item",
",",
"ctypes",
".",
"byref",
"(",
"inset",
")",
")",
")"
] |
Determine whether an item is an element of an integer set.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/elemi_c.html
:param item: Item to be tested.
:type item: int
:param inset: Set to be tested.
:type inset: spiceypy.utils.support_types.SpiceCell
:return: True if item is an element of set.
:rtype: bool
|
[
"Determine",
"whether",
"an",
"item",
"is",
"an",
"element",
"of",
"an",
"integer",
"set",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4767-L4783
|
14,721
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
eqstr
|
def eqstr(a, b):
"""
Determine whether two strings are equivalent.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eqstr_c.html
:param a: Arbitrary character string.
:type a: str
:param b: Arbitrary character string.
:type b: str
:return: True if A and B are equivalent.
:rtype: bool
"""
return bool(libspice.eqstr_c(stypes.stringToCharP(a), stypes.stringToCharP(b)))
|
python
|
def eqstr(a, b):
"""
Determine whether two strings are equivalent.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eqstr_c.html
:param a: Arbitrary character string.
:type a: str
:param b: Arbitrary character string.
:type b: str
:return: True if A and B are equivalent.
:rtype: bool
"""
return bool(libspice.eqstr_c(stypes.stringToCharP(a), stypes.stringToCharP(b)))
|
[
"def",
"eqstr",
"(",
"a",
",",
"b",
")",
":",
"return",
"bool",
"(",
"libspice",
".",
"eqstr_c",
"(",
"stypes",
".",
"stringToCharP",
"(",
"a",
")",
",",
"stypes",
".",
"stringToCharP",
"(",
"b",
")",
")",
")"
] |
Determine whether two strings are equivalent.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eqstr_c.html
:param a: Arbitrary character string.
:type a: str
:param b: Arbitrary character string.
:type b: str
:return: True if A and B are equivalent.
:rtype: bool
|
[
"Determine",
"whether",
"two",
"strings",
"are",
"equivalent",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4819-L4832
|
14,722
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
erract
|
def erract(op, lenout, action=None):
"""
Retrieve or set the default error action.
spiceypy sets the default error action to "report" on init.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/erract_c.html
:param op: peration, "GET" or "SET".
:type op: str
:param lenout: Length of list for output.
:type lenout: int
:param action: Error response action.
:type action: str
:return: Error response action.
:rtype: str
"""
if action is None:
action = ""
lenout = ctypes.c_int(lenout)
op = stypes.stringToCharP(op)
action = ctypes.create_string_buffer(str.encode(action), lenout.value)
actionptr = ctypes.c_char_p(ctypes.addressof(action))
libspice.erract_c(op, lenout, actionptr)
return stypes.toPythonString(actionptr)
|
python
|
def erract(op, lenout, action=None):
"""
Retrieve or set the default error action.
spiceypy sets the default error action to "report" on init.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/erract_c.html
:param op: peration, "GET" or "SET".
:type op: str
:param lenout: Length of list for output.
:type lenout: int
:param action: Error response action.
:type action: str
:return: Error response action.
:rtype: str
"""
if action is None:
action = ""
lenout = ctypes.c_int(lenout)
op = stypes.stringToCharP(op)
action = ctypes.create_string_buffer(str.encode(action), lenout.value)
actionptr = ctypes.c_char_p(ctypes.addressof(action))
libspice.erract_c(op, lenout, actionptr)
return stypes.toPythonString(actionptr)
|
[
"def",
"erract",
"(",
"op",
",",
"lenout",
",",
"action",
"=",
"None",
")",
":",
"if",
"action",
"is",
"None",
":",
"action",
"=",
"\"\"",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"op",
"=",
"stypes",
".",
"stringToCharP",
"(",
"op",
")",
"action",
"=",
"ctypes",
".",
"create_string_buffer",
"(",
"str",
".",
"encode",
"(",
"action",
")",
",",
"lenout",
".",
"value",
")",
"actionptr",
"=",
"ctypes",
".",
"c_char_p",
"(",
"ctypes",
".",
"addressof",
"(",
"action",
")",
")",
"libspice",
".",
"erract_c",
"(",
"op",
",",
"lenout",
",",
"actionptr",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"actionptr",
")"
] |
Retrieve or set the default error action.
spiceypy sets the default error action to "report" on init.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/erract_c.html
:param op: peration, "GET" or "SET".
:type op: str
:param lenout: Length of list for output.
:type lenout: int
:param action: Error response action.
:type action: str
:return: Error response action.
:rtype: str
|
[
"Retrieve",
"or",
"set",
"the",
"default",
"error",
"action",
".",
"spiceypy",
"sets",
"the",
"default",
"error",
"action",
"to",
"report",
"on",
"init",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4835-L4858
|
14,723
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
errch
|
def errch(marker, string):
"""
Substitute a character string for the first occurrence of
a marker in the current long error message.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errch_c.html
:param marker: A substring of the error message to be replaced.
:type marker: str
:param string: The character string to substitute for marker.
:type string: str
"""
marker = stypes.stringToCharP(marker)
string = stypes.stringToCharP(string)
libspice.errch_c(marker, string)
|
python
|
def errch(marker, string):
"""
Substitute a character string for the first occurrence of
a marker in the current long error message.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errch_c.html
:param marker: A substring of the error message to be replaced.
:type marker: str
:param string: The character string to substitute for marker.
:type string: str
"""
marker = stypes.stringToCharP(marker)
string = stypes.stringToCharP(string)
libspice.errch_c(marker, string)
|
[
"def",
"errch",
"(",
"marker",
",",
"string",
")",
":",
"marker",
"=",
"stypes",
".",
"stringToCharP",
"(",
"marker",
")",
"string",
"=",
"stypes",
".",
"stringToCharP",
"(",
"string",
")",
"libspice",
".",
"errch_c",
"(",
"marker",
",",
"string",
")"
] |
Substitute a character string for the first occurrence of
a marker in the current long error message.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errch_c.html
:param marker: A substring of the error message to be replaced.
:type marker: str
:param string: The character string to substitute for marker.
:type string: str
|
[
"Substitute",
"a",
"character",
"string",
"for",
"the",
"first",
"occurrence",
"of",
"a",
"marker",
"in",
"the",
"current",
"long",
"error",
"message",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4861-L4875
|
14,724
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
errdev
|
def errdev(op, lenout, device):
"""
Retrieve or set the name of the current output device for error messages.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdev_c.html
:param op: The operation, "GET" or "SET".
:type op: str
:param lenout: Length of device for output.
:type lenout: int
:param device: The device name.
:type device: str
:return: The device name.
:rtype: str
"""
lenout = ctypes.c_int(lenout)
op = stypes.stringToCharP(op)
device = ctypes.create_string_buffer(str.encode(device), lenout.value)
deviceptr = ctypes.c_char_p(ctypes.addressof(device))
libspice.errdev_c(op, lenout, deviceptr)
return stypes.toPythonString(deviceptr)
|
python
|
def errdev(op, lenout, device):
"""
Retrieve or set the name of the current output device for error messages.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdev_c.html
:param op: The operation, "GET" or "SET".
:type op: str
:param lenout: Length of device for output.
:type lenout: int
:param device: The device name.
:type device: str
:return: The device name.
:rtype: str
"""
lenout = ctypes.c_int(lenout)
op = stypes.stringToCharP(op)
device = ctypes.create_string_buffer(str.encode(device), lenout.value)
deviceptr = ctypes.c_char_p(ctypes.addressof(device))
libspice.errdev_c(op, lenout, deviceptr)
return stypes.toPythonString(deviceptr)
|
[
"def",
"errdev",
"(",
"op",
",",
"lenout",
",",
"device",
")",
":",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"op",
"=",
"stypes",
".",
"stringToCharP",
"(",
"op",
")",
"device",
"=",
"ctypes",
".",
"create_string_buffer",
"(",
"str",
".",
"encode",
"(",
"device",
")",
",",
"lenout",
".",
"value",
")",
"deviceptr",
"=",
"ctypes",
".",
"c_char_p",
"(",
"ctypes",
".",
"addressof",
"(",
"device",
")",
")",
"libspice",
".",
"errdev_c",
"(",
"op",
",",
"lenout",
",",
"deviceptr",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"deviceptr",
")"
] |
Retrieve or set the name of the current output device for error messages.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdev_c.html
:param op: The operation, "GET" or "SET".
:type op: str
:param lenout: Length of device for output.
:type lenout: int
:param device: The device name.
:type device: str
:return: The device name.
:rtype: str
|
[
"Retrieve",
"or",
"set",
"the",
"name",
"of",
"the",
"current",
"output",
"device",
"for",
"error",
"messages",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4878-L4898
|
14,725
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
errdp
|
def errdp(marker, number):
"""
Substitute a double precision number for the first occurrence of
a marker found in the current long error message.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdp_c.html
:param marker: A substring of the error message to be replaced.
:type marker: str
:param number: The d.p. number to substitute for marker.
:type number: float
"""
marker = stypes.stringToCharP(marker)
number = ctypes.c_double(number)
libspice.errdp_c(marker, number)
|
python
|
def errdp(marker, number):
"""
Substitute a double precision number for the first occurrence of
a marker found in the current long error message.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdp_c.html
:param marker: A substring of the error message to be replaced.
:type marker: str
:param number: The d.p. number to substitute for marker.
:type number: float
"""
marker = stypes.stringToCharP(marker)
number = ctypes.c_double(number)
libspice.errdp_c(marker, number)
|
[
"def",
"errdp",
"(",
"marker",
",",
"number",
")",
":",
"marker",
"=",
"stypes",
".",
"stringToCharP",
"(",
"marker",
")",
"number",
"=",
"ctypes",
".",
"c_double",
"(",
"number",
")",
"libspice",
".",
"errdp_c",
"(",
"marker",
",",
"number",
")"
] |
Substitute a double precision number for the first occurrence of
a marker found in the current long error message.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errdp_c.html
:param marker: A substring of the error message to be replaced.
:type marker: str
:param number: The d.p. number to substitute for marker.
:type number: float
|
[
"Substitute",
"a",
"double",
"precision",
"number",
"for",
"the",
"first",
"occurrence",
"of",
"a",
"marker",
"found",
"in",
"the",
"current",
"long",
"error",
"message",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4901-L4915
|
14,726
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
errint
|
def errint(marker, number):
"""
Substitute an integer for the first occurrence of a marker found
in the current long error message.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errint_c.html
:param marker: A substring of the error message to be replaced.
:type marker: str
:param number: The integer to substitute for marker.
:type number: int
"""
marker = stypes.stringToCharP(marker)
number = ctypes.c_int(number)
libspice.errint_c(marker, number)
|
python
|
def errint(marker, number):
"""
Substitute an integer for the first occurrence of a marker found
in the current long error message.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errint_c.html
:param marker: A substring of the error message to be replaced.
:type marker: str
:param number: The integer to substitute for marker.
:type number: int
"""
marker = stypes.stringToCharP(marker)
number = ctypes.c_int(number)
libspice.errint_c(marker, number)
|
[
"def",
"errint",
"(",
"marker",
",",
"number",
")",
":",
"marker",
"=",
"stypes",
".",
"stringToCharP",
"(",
"marker",
")",
"number",
"=",
"ctypes",
".",
"c_int",
"(",
"number",
")",
"libspice",
".",
"errint_c",
"(",
"marker",
",",
"number",
")"
] |
Substitute an integer for the first occurrence of a marker found
in the current long error message.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errint_c.html
:param marker: A substring of the error message to be replaced.
:type marker: str
:param number: The integer to substitute for marker.
:type number: int
|
[
"Substitute",
"an",
"integer",
"for",
"the",
"first",
"occurrence",
"of",
"a",
"marker",
"found",
"in",
"the",
"current",
"long",
"error",
"message",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4918-L4932
|
14,727
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
errprt
|
def errprt(op, lenout, inlist):
"""
Retrieve or set the list of error message items to be output when an
error is detected.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errprt_c.html
:param op: The operation, "GET" or "SET".
:type op: str
:param lenout: Length of list for output.
:type lenout: int
:param inlist: Specification of error messages to be output.
:type inlist: list of str.
:return: A list of error message items.
:rtype: list of str.
"""
lenout = ctypes.c_int(lenout)
op = stypes.stringToCharP(op)
inlist = ctypes.create_string_buffer(str.encode(inlist), lenout.value)
inlistptr = ctypes.c_char_p(ctypes.addressof(inlist))
libspice.errdev_c(op, lenout, inlistptr)
return stypes.toPythonString(inlistptr)
|
python
|
def errprt(op, lenout, inlist):
"""
Retrieve or set the list of error message items to be output when an
error is detected.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errprt_c.html
:param op: The operation, "GET" or "SET".
:type op: str
:param lenout: Length of list for output.
:type lenout: int
:param inlist: Specification of error messages to be output.
:type inlist: list of str.
:return: A list of error message items.
:rtype: list of str.
"""
lenout = ctypes.c_int(lenout)
op = stypes.stringToCharP(op)
inlist = ctypes.create_string_buffer(str.encode(inlist), lenout.value)
inlistptr = ctypes.c_char_p(ctypes.addressof(inlist))
libspice.errdev_c(op, lenout, inlistptr)
return stypes.toPythonString(inlistptr)
|
[
"def",
"errprt",
"(",
"op",
",",
"lenout",
",",
"inlist",
")",
":",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"op",
"=",
"stypes",
".",
"stringToCharP",
"(",
"op",
")",
"inlist",
"=",
"ctypes",
".",
"create_string_buffer",
"(",
"str",
".",
"encode",
"(",
"inlist",
")",
",",
"lenout",
".",
"value",
")",
"inlistptr",
"=",
"ctypes",
".",
"c_char_p",
"(",
"ctypes",
".",
"addressof",
"(",
"inlist",
")",
")",
"libspice",
".",
"errdev_c",
"(",
"op",
",",
"lenout",
",",
"inlistptr",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"inlistptr",
")"
] |
Retrieve or set the list of error message items to be output when an
error is detected.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/errprt_c.html
:param op: The operation, "GET" or "SET".
:type op: str
:param lenout: Length of list for output.
:type lenout: int
:param inlist: Specification of error messages to be output.
:type inlist: list of str.
:return: A list of error message items.
:rtype: list of str.
|
[
"Retrieve",
"or",
"set",
"the",
"list",
"of",
"error",
"message",
"items",
"to",
"be",
"output",
"when",
"an",
"error",
"is",
"detected",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4935-L4956
|
14,728
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
esrchc
|
def esrchc(value, array):
"""
Search for a given value within a character string array.
Return the index of the first equivalent array entry, or -1
if no equivalent element is found.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/esrchc_c.html
:param value: Key value to be found in array.
:type value: str
:param array: Character string array to search.
:type array: list of str.
:return:
The index of the first array entry equivalent to value,
or -1 if none is found.
:rtype: int
"""
value = stypes.stringToCharP(value)
ndim = ctypes.c_int(len(array))
lenvals = ctypes.c_int(len(max(array, key=len)) + 1)
array = stypes.listToCharArray(array, xLen=lenvals, yLen=ndim)
return libspice.esrchc_c(value, ndim, lenvals, array)
|
python
|
def esrchc(value, array):
"""
Search for a given value within a character string array.
Return the index of the first equivalent array entry, or -1
if no equivalent element is found.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/esrchc_c.html
:param value: Key value to be found in array.
:type value: str
:param array: Character string array to search.
:type array: list of str.
:return:
The index of the first array entry equivalent to value,
or -1 if none is found.
:rtype: int
"""
value = stypes.stringToCharP(value)
ndim = ctypes.c_int(len(array))
lenvals = ctypes.c_int(len(max(array, key=len)) + 1)
array = stypes.listToCharArray(array, xLen=lenvals, yLen=ndim)
return libspice.esrchc_c(value, ndim, lenvals, array)
|
[
"def",
"esrchc",
"(",
"value",
",",
"array",
")",
":",
"value",
"=",
"stypes",
".",
"stringToCharP",
"(",
"value",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"len",
"(",
"array",
")",
")",
"lenvals",
"=",
"ctypes",
".",
"c_int",
"(",
"len",
"(",
"max",
"(",
"array",
",",
"key",
"=",
"len",
")",
")",
"+",
"1",
")",
"array",
"=",
"stypes",
".",
"listToCharArray",
"(",
"array",
",",
"xLen",
"=",
"lenvals",
",",
"yLen",
"=",
"ndim",
")",
"return",
"libspice",
".",
"esrchc_c",
"(",
"value",
",",
"ndim",
",",
"lenvals",
",",
"array",
")"
] |
Search for a given value within a character string array.
Return the index of the first equivalent array entry, or -1
if no equivalent element is found.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/esrchc_c.html
:param value: Key value to be found in array.
:type value: str
:param array: Character string array to search.
:type array: list of str.
:return:
The index of the first array entry equivalent to value,
or -1 if none is found.
:rtype: int
|
[
"Search",
"for",
"a",
"given",
"value",
"within",
"a",
"character",
"string",
"array",
".",
"Return",
"the",
"index",
"of",
"the",
"first",
"equivalent",
"array",
"entry",
"or",
"-",
"1",
"if",
"no",
"equivalent",
"element",
"is",
"found",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4959-L4980
|
14,729
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
et2lst
|
def et2lst(et, body, lon, typein, timlen=_default_len_out, ampmlen=_default_len_out):
"""
Given an ephemeris epoch, compute the local solar time for
an object on the surface of a body at a specified longitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2lst_c.html
:param et: Epoch in seconds past J2000 epoch.
:type et: float
:param body: ID-code of the body of interest.
:type body: int
:param lon: Longitude of surface point (RADIANS).
:type lon: float
:param typein: Type of longitude "PLANETOCENTRIC", etc.
:type typein: str
:param timlen: Available room in output time string.
:type timlen: int
:param ampmlen: Available room in output ampm string.
:type ampmlen: int
:return:
Local hour on a "24 hour" clock,
Minutes past the hour,
Seconds past the minute,
String giving local time on 24 hour clock,
String giving time on A.M. / P.M. scale.
:rtype: tuple
"""
et = ctypes.c_double(et)
body = ctypes.c_int(body)
lon = ctypes.c_double(lon)
typein = stypes.stringToCharP(typein)
timlen = ctypes.c_int(timlen)
ampmlen = ctypes.c_int(ampmlen)
hr = ctypes.c_int()
mn = ctypes.c_int()
sc = ctypes.c_int()
time = stypes.stringToCharP(timlen)
ampm = stypes.stringToCharP(ampmlen)
libspice.et2lst_c(et, body, lon, typein, timlen, ampmlen,
ctypes.byref(hr), ctypes.byref(mn), ctypes.byref(sc),
time, ampm)
return hr.value, mn.value, sc.value, stypes.toPythonString(
time), stypes.toPythonString(ampm)
|
python
|
def et2lst(et, body, lon, typein, timlen=_default_len_out, ampmlen=_default_len_out):
"""
Given an ephemeris epoch, compute the local solar time for
an object on the surface of a body at a specified longitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2lst_c.html
:param et: Epoch in seconds past J2000 epoch.
:type et: float
:param body: ID-code of the body of interest.
:type body: int
:param lon: Longitude of surface point (RADIANS).
:type lon: float
:param typein: Type of longitude "PLANETOCENTRIC", etc.
:type typein: str
:param timlen: Available room in output time string.
:type timlen: int
:param ampmlen: Available room in output ampm string.
:type ampmlen: int
:return:
Local hour on a "24 hour" clock,
Minutes past the hour,
Seconds past the minute,
String giving local time on 24 hour clock,
String giving time on A.M. / P.M. scale.
:rtype: tuple
"""
et = ctypes.c_double(et)
body = ctypes.c_int(body)
lon = ctypes.c_double(lon)
typein = stypes.stringToCharP(typein)
timlen = ctypes.c_int(timlen)
ampmlen = ctypes.c_int(ampmlen)
hr = ctypes.c_int()
mn = ctypes.c_int()
sc = ctypes.c_int()
time = stypes.stringToCharP(timlen)
ampm = stypes.stringToCharP(ampmlen)
libspice.et2lst_c(et, body, lon, typein, timlen, ampmlen,
ctypes.byref(hr), ctypes.byref(mn), ctypes.byref(sc),
time, ampm)
return hr.value, mn.value, sc.value, stypes.toPythonString(
time), stypes.toPythonString(ampm)
|
[
"def",
"et2lst",
"(",
"et",
",",
"body",
",",
"lon",
",",
"typein",
",",
"timlen",
"=",
"_default_len_out",
",",
"ampmlen",
"=",
"_default_len_out",
")",
":",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"lon",
"=",
"ctypes",
".",
"c_double",
"(",
"lon",
")",
"typein",
"=",
"stypes",
".",
"stringToCharP",
"(",
"typein",
")",
"timlen",
"=",
"ctypes",
".",
"c_int",
"(",
"timlen",
")",
"ampmlen",
"=",
"ctypes",
".",
"c_int",
"(",
"ampmlen",
")",
"hr",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"mn",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"sc",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"time",
"=",
"stypes",
".",
"stringToCharP",
"(",
"timlen",
")",
"ampm",
"=",
"stypes",
".",
"stringToCharP",
"(",
"ampmlen",
")",
"libspice",
".",
"et2lst_c",
"(",
"et",
",",
"body",
",",
"lon",
",",
"typein",
",",
"timlen",
",",
"ampmlen",
",",
"ctypes",
".",
"byref",
"(",
"hr",
")",
",",
"ctypes",
".",
"byref",
"(",
"mn",
")",
",",
"ctypes",
".",
"byref",
"(",
"sc",
")",
",",
"time",
",",
"ampm",
")",
"return",
"hr",
".",
"value",
",",
"mn",
".",
"value",
",",
"sc",
".",
"value",
",",
"stypes",
".",
"toPythonString",
"(",
"time",
")",
",",
"stypes",
".",
"toPythonString",
"(",
"ampm",
")"
] |
Given an ephemeris epoch, compute the local solar time for
an object on the surface of a body at a specified longitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2lst_c.html
:param et: Epoch in seconds past J2000 epoch.
:type et: float
:param body: ID-code of the body of interest.
:type body: int
:param lon: Longitude of surface point (RADIANS).
:type lon: float
:param typein: Type of longitude "PLANETOCENTRIC", etc.
:type typein: str
:param timlen: Available room in output time string.
:type timlen: int
:param ampmlen: Available room in output ampm string.
:type ampmlen: int
:return:
Local hour on a "24 hour" clock,
Minutes past the hour,
Seconds past the minute,
String giving local time on 24 hour clock,
String giving time on A.M. / P.M. scale.
:rtype: tuple
|
[
"Given",
"an",
"ephemeris",
"epoch",
"compute",
"the",
"local",
"solar",
"time",
"for",
"an",
"object",
"on",
"the",
"surface",
"of",
"a",
"body",
"at",
"a",
"specified",
"longitude",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L4984-L5026
|
14,730
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
et2utc
|
def et2utc(et, formatStr, prec, lenout=_default_len_out):
"""
Convert an input time from ephemeris seconds past J2000
to Calendar, Day-of-Year, or Julian Date format, UTC.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2utc_c.html
:param et: Input epoch, given in ephemeris seconds past J2000.
:type et: float
:param formatStr: Format of output epoch.
:type formatStr: str
:param prec: Digits of precision in fractional seconds or days.
:type prec: int
:param lenout: The length of the output string plus 1.
:type lenout: int
:return: Output time string in UTC
:rtype: str
"""
et = ctypes.c_double(et)
prec = ctypes.c_int(prec)
lenout = ctypes.c_int(lenout)
formatStr = stypes.stringToCharP(formatStr)
utcstr = stypes.stringToCharP(lenout)
libspice.et2utc_c(et, formatStr, prec, lenout, utcstr)
return stypes.toPythonString(utcstr)
|
python
|
def et2utc(et, formatStr, prec, lenout=_default_len_out):
"""
Convert an input time from ephemeris seconds past J2000
to Calendar, Day-of-Year, or Julian Date format, UTC.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2utc_c.html
:param et: Input epoch, given in ephemeris seconds past J2000.
:type et: float
:param formatStr: Format of output epoch.
:type formatStr: str
:param prec: Digits of precision in fractional seconds or days.
:type prec: int
:param lenout: The length of the output string plus 1.
:type lenout: int
:return: Output time string in UTC
:rtype: str
"""
et = ctypes.c_double(et)
prec = ctypes.c_int(prec)
lenout = ctypes.c_int(lenout)
formatStr = stypes.stringToCharP(formatStr)
utcstr = stypes.stringToCharP(lenout)
libspice.et2utc_c(et, formatStr, prec, lenout, utcstr)
return stypes.toPythonString(utcstr)
|
[
"def",
"et2utc",
"(",
"et",
",",
"formatStr",
",",
"prec",
",",
"lenout",
"=",
"_default_len_out",
")",
":",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"prec",
"=",
"ctypes",
".",
"c_int",
"(",
"prec",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"formatStr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"formatStr",
")",
"utcstr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenout",
")",
"libspice",
".",
"et2utc_c",
"(",
"et",
",",
"formatStr",
",",
"prec",
",",
"lenout",
",",
"utcstr",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"utcstr",
")"
] |
Convert an input time from ephemeris seconds past J2000
to Calendar, Day-of-Year, or Julian Date format, UTC.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/et2utc_c.html
:param et: Input epoch, given in ephemeris seconds past J2000.
:type et: float
:param formatStr: Format of output epoch.
:type formatStr: str
:param prec: Digits of precision in fractional seconds or days.
:type prec: int
:param lenout: The length of the output string plus 1.
:type lenout: int
:return: Output time string in UTC
:rtype: str
|
[
"Convert",
"an",
"input",
"time",
"from",
"ephemeris",
"seconds",
"past",
"J2000",
"to",
"Calendar",
"Day",
"-",
"of",
"-",
"Year",
"or",
"Julian",
"Date",
"format",
"UTC",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5030-L5054
|
14,731
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
etcal
|
def etcal(et, lenout=_default_len_out):
"""
Convert from an ephemeris epoch measured in seconds past
the epoch of J2000 to a calendar string format using a
formal calendar free of leapseconds.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/etcal_c.html
:param et: Ephemeris time measured in seconds past J2000.
:type et: Union[float,Iterable[float]]
:param lenout: Length of output string.
:type lenout: int
:return: A standard calendar representation of et.
:rtype: str
"""
lenout = ctypes.c_int(lenout)
string = stypes.stringToCharP(lenout)
if hasattr(et, "__iter__"):
strings = []
for t in et:
libspice.etcal_c(t, lenout, string)
checkForSpiceError(None)
strings.append(stypes.toPythonString(string))
return strings
else:
et = ctypes.c_double(et)
libspice.etcal_c(et, lenout, string)
return stypes.toPythonString(string)
|
python
|
def etcal(et, lenout=_default_len_out):
"""
Convert from an ephemeris epoch measured in seconds past
the epoch of J2000 to a calendar string format using a
formal calendar free of leapseconds.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/etcal_c.html
:param et: Ephemeris time measured in seconds past J2000.
:type et: Union[float,Iterable[float]]
:param lenout: Length of output string.
:type lenout: int
:return: A standard calendar representation of et.
:rtype: str
"""
lenout = ctypes.c_int(lenout)
string = stypes.stringToCharP(lenout)
if hasattr(et, "__iter__"):
strings = []
for t in et:
libspice.etcal_c(t, lenout, string)
checkForSpiceError(None)
strings.append(stypes.toPythonString(string))
return strings
else:
et = ctypes.c_double(et)
libspice.etcal_c(et, lenout, string)
return stypes.toPythonString(string)
|
[
"def",
"etcal",
"(",
"et",
",",
"lenout",
"=",
"_default_len_out",
")",
":",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"string",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenout",
")",
"if",
"hasattr",
"(",
"et",
",",
"\"__iter__\"",
")",
":",
"strings",
"=",
"[",
"]",
"for",
"t",
"in",
"et",
":",
"libspice",
".",
"etcal_c",
"(",
"t",
",",
"lenout",
",",
"string",
")",
"checkForSpiceError",
"(",
"None",
")",
"strings",
".",
"append",
"(",
"stypes",
".",
"toPythonString",
"(",
"string",
")",
")",
"return",
"strings",
"else",
":",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"libspice",
".",
"etcal_c",
"(",
"et",
",",
"lenout",
",",
"string",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"string",
")"
] |
Convert from an ephemeris epoch measured in seconds past
the epoch of J2000 to a calendar string format using a
formal calendar free of leapseconds.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/etcal_c.html
:param et: Ephemeris time measured in seconds past J2000.
:type et: Union[float,Iterable[float]]
:param lenout: Length of output string.
:type lenout: int
:return: A standard calendar representation of et.
:rtype: str
|
[
"Convert",
"from",
"an",
"ephemeris",
"epoch",
"measured",
"in",
"seconds",
"past",
"the",
"epoch",
"of",
"J2000",
"to",
"a",
"calendar",
"string",
"format",
"using",
"a",
"formal",
"calendar",
"free",
"of",
"leapseconds",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5058-L5085
|
14,732
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
eul2m
|
def eul2m(angle3, angle2, angle1, axis3, axis2, axis1):
"""
Construct a rotation matrix from a set of Euler angles.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2m_c.html
:param angle3: Rotation angle about third rotation axis (radians).
:type angle3: float
:param angle2: Rotation angle about second rotation axis (radians).
:type angle2: float
:param angle1: Rotation angle about first rotation axis (radians).
:type angle1: float
:param axis3: Axis number of third rotation axis.
:type axis3: int
:param axis2: Axis number of second rotation axis.
:type axis2: int
:param axis1: Axis number of first rotation axis.]
:type axis1: int
:return: Product of the 3 rotations.
:rtype: 3x3-Element Array of floats
"""
angle3 = ctypes.c_double(angle3)
angle2 = ctypes.c_double(angle2)
angle1 = ctypes.c_double(angle1)
axis3 = ctypes.c_int(axis3)
axis2 = ctypes.c_int(axis2)
axis1 = ctypes.c_int(axis1)
r = stypes.emptyDoubleMatrix()
libspice.eul2m_c(angle3, angle2, angle1, axis3, axis2, axis1, r)
return stypes.cMatrixToNumpy(r)
|
python
|
def eul2m(angle3, angle2, angle1, axis3, axis2, axis1):
"""
Construct a rotation matrix from a set of Euler angles.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2m_c.html
:param angle3: Rotation angle about third rotation axis (radians).
:type angle3: float
:param angle2: Rotation angle about second rotation axis (radians).
:type angle2: float
:param angle1: Rotation angle about first rotation axis (radians).
:type angle1: float
:param axis3: Axis number of third rotation axis.
:type axis3: int
:param axis2: Axis number of second rotation axis.
:type axis2: int
:param axis1: Axis number of first rotation axis.]
:type axis1: int
:return: Product of the 3 rotations.
:rtype: 3x3-Element Array of floats
"""
angle3 = ctypes.c_double(angle3)
angle2 = ctypes.c_double(angle2)
angle1 = ctypes.c_double(angle1)
axis3 = ctypes.c_int(axis3)
axis2 = ctypes.c_int(axis2)
axis1 = ctypes.c_int(axis1)
r = stypes.emptyDoubleMatrix()
libspice.eul2m_c(angle3, angle2, angle1, axis3, axis2, axis1, r)
return stypes.cMatrixToNumpy(r)
|
[
"def",
"eul2m",
"(",
"angle3",
",",
"angle2",
",",
"angle1",
",",
"axis3",
",",
"axis2",
",",
"axis1",
")",
":",
"angle3",
"=",
"ctypes",
".",
"c_double",
"(",
"angle3",
")",
"angle2",
"=",
"ctypes",
".",
"c_double",
"(",
"angle2",
")",
"angle1",
"=",
"ctypes",
".",
"c_double",
"(",
"angle1",
")",
"axis3",
"=",
"ctypes",
".",
"c_int",
"(",
"axis3",
")",
"axis2",
"=",
"ctypes",
".",
"c_int",
"(",
"axis2",
")",
"axis1",
"=",
"ctypes",
".",
"c_int",
"(",
"axis1",
")",
"r",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
")",
"libspice",
".",
"eul2m_c",
"(",
"angle3",
",",
"angle2",
",",
"angle1",
",",
"axis3",
",",
"axis2",
",",
"axis1",
",",
"r",
")",
"return",
"stypes",
".",
"cMatrixToNumpy",
"(",
"r",
")"
] |
Construct a rotation matrix from a set of Euler angles.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2m_c.html
:param angle3: Rotation angle about third rotation axis (radians).
:type angle3: float
:param angle2: Rotation angle about second rotation axis (radians).
:type angle2: float
:param angle1: Rotation angle about first rotation axis (radians).
:type angle1: float
:param axis3: Axis number of third rotation axis.
:type axis3: int
:param axis2: Axis number of second rotation axis.
:type axis2: int
:param axis1: Axis number of first rotation axis.]
:type axis1: int
:return: Product of the 3 rotations.
:rtype: 3x3-Element Array of floats
|
[
"Construct",
"a",
"rotation",
"matrix",
"from",
"a",
"set",
"of",
"Euler",
"angles",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5089-L5118
|
14,733
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
eul2xf
|
def eul2xf(eulang, axisa, axisb, axisc):
"""
This routine computes a state transformation from an Euler angle
factorization of a rotation and the derivatives of those Euler
angles.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2xf_c.html
:param eulang: An array of Euler angles and their derivatives.
:type eulang: 6-Element Array of floats
:param axisa: Axis A of the Euler angle factorization.
:type axisa: int
:param axisb: Axis B of the Euler angle factorization.
:type axisb: int
:param axisc: Axis C of the Euler angle factorization.
:type axisc: int
:return: A state transformation matrix.
:rtype: 6x6-Element Array of floats
"""
assert len(eulang) is 6
eulang = stypes.toDoubleVector(eulang)
axisa = ctypes.c_int(axisa)
axisb = ctypes.c_int(axisb)
axisc = ctypes.c_int(axisc)
xform = stypes.emptyDoubleMatrix(x=6, y=6)
libspice.eul2xf_c(eulang, axisa, axisb, axisc, xform)
return stypes.cMatrixToNumpy(xform)
|
python
|
def eul2xf(eulang, axisa, axisb, axisc):
"""
This routine computes a state transformation from an Euler angle
factorization of a rotation and the derivatives of those Euler
angles.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2xf_c.html
:param eulang: An array of Euler angles and their derivatives.
:type eulang: 6-Element Array of floats
:param axisa: Axis A of the Euler angle factorization.
:type axisa: int
:param axisb: Axis B of the Euler angle factorization.
:type axisb: int
:param axisc: Axis C of the Euler angle factorization.
:type axisc: int
:return: A state transformation matrix.
:rtype: 6x6-Element Array of floats
"""
assert len(eulang) is 6
eulang = stypes.toDoubleVector(eulang)
axisa = ctypes.c_int(axisa)
axisb = ctypes.c_int(axisb)
axisc = ctypes.c_int(axisc)
xform = stypes.emptyDoubleMatrix(x=6, y=6)
libspice.eul2xf_c(eulang, axisa, axisb, axisc, xform)
return stypes.cMatrixToNumpy(xform)
|
[
"def",
"eul2xf",
"(",
"eulang",
",",
"axisa",
",",
"axisb",
",",
"axisc",
")",
":",
"assert",
"len",
"(",
"eulang",
")",
"is",
"6",
"eulang",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"eulang",
")",
"axisa",
"=",
"ctypes",
".",
"c_int",
"(",
"axisa",
")",
"axisb",
"=",
"ctypes",
".",
"c_int",
"(",
"axisb",
")",
"axisc",
"=",
"ctypes",
".",
"c_int",
"(",
"axisc",
")",
"xform",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
"x",
"=",
"6",
",",
"y",
"=",
"6",
")",
"libspice",
".",
"eul2xf_c",
"(",
"eulang",
",",
"axisa",
",",
"axisb",
",",
"axisc",
",",
"xform",
")",
"return",
"stypes",
".",
"cMatrixToNumpy",
"(",
"xform",
")"
] |
This routine computes a state transformation from an Euler angle
factorization of a rotation and the derivatives of those Euler
angles.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/eul2xf_c.html
:param eulang: An array of Euler angles and their derivatives.
:type eulang: 6-Element Array of floats
:param axisa: Axis A of the Euler angle factorization.
:type axisa: int
:param axisb: Axis B of the Euler angle factorization.
:type axisb: int
:param axisc: Axis C of the Euler angle factorization.
:type axisc: int
:return: A state transformation matrix.
:rtype: 6x6-Element Array of floats
|
[
"This",
"routine",
"computes",
"a",
"state",
"transformation",
"from",
"an",
"Euler",
"angle",
"factorization",
"of",
"a",
"rotation",
"and",
"the",
"derivatives",
"of",
"those",
"Euler",
"angles",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5122-L5148
|
14,734
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
exists
|
def exists(fname):
"""
Determine whether a file exists.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/exists_c.html
:param fname: Name of the file in question.
:return: True if the file exists, False otherwise.
:rtype: bool
"""
fname = stypes.stringToCharP(fname)
return bool(libspice.exists_c(fname))
|
python
|
def exists(fname):
"""
Determine whether a file exists.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/exists_c.html
:param fname: Name of the file in question.
:return: True if the file exists, False otherwise.
:rtype: bool
"""
fname = stypes.stringToCharP(fname)
return bool(libspice.exists_c(fname))
|
[
"def",
"exists",
"(",
"fname",
")",
":",
"fname",
"=",
"stypes",
".",
"stringToCharP",
"(",
"fname",
")",
"return",
"bool",
"(",
"libspice",
".",
"exists_c",
"(",
"fname",
")",
")"
] |
Determine whether a file exists.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/exists_c.html
:param fname: Name of the file in question.
:return: True if the file exists, False otherwise.
:rtype: bool
|
[
"Determine",
"whether",
"a",
"file",
"exists",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5152-L5163
|
14,735
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
expool
|
def expool(name):
"""
Confirm the existence of a kernel variable in the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/expool_c.html
:param name: Name of the variable whose value is to be returned.
:type name: str
:return: True when the variable is in the pool.
:rtype: bool
"""
name = stypes.stringToCharP(name)
found = ctypes.c_int()
libspice.expool_c(name, ctypes.byref(found))
return bool(found.value)
|
python
|
def expool(name):
"""
Confirm the existence of a kernel variable in the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/expool_c.html
:param name: Name of the variable whose value is to be returned.
:type name: str
:return: True when the variable is in the pool.
:rtype: bool
"""
name = stypes.stringToCharP(name)
found = ctypes.c_int()
libspice.expool_c(name, ctypes.byref(found))
return bool(found.value)
|
[
"def",
"expool",
"(",
"name",
")",
":",
"name",
"=",
"stypes",
".",
"stringToCharP",
"(",
"name",
")",
"found",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"expool_c",
"(",
"name",
",",
"ctypes",
".",
"byref",
"(",
"found",
")",
")",
"return",
"bool",
"(",
"found",
".",
"value",
")"
] |
Confirm the existence of a kernel variable in the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/expool_c.html
:param name: Name of the variable whose value is to be returned.
:type name: str
:return: True when the variable is in the pool.
:rtype: bool
|
[
"Confirm",
"the",
"existence",
"of",
"a",
"kernel",
"variable",
"in",
"the",
"kernel",
"pool",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5167-L5181
|
14,736
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
frmnam
|
def frmnam(frcode, lenout=_default_len_out):
"""
Retrieve the name of a reference frame associated with a SPICE ID code.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/frmnam_c.html
:param frcode: an integer code for a reference frame
:type frcode: int
:param lenout: Maximum length of output string.
:type lenout: int
:return: the name associated with the reference frame.
:rtype: str
"""
frcode = ctypes.c_int(frcode)
lenout = ctypes.c_int(lenout)
frname = stypes.stringToCharP(lenout)
libspice.frmnam_c(frcode, lenout, frname)
return stypes.toPythonString(frname)
|
python
|
def frmnam(frcode, lenout=_default_len_out):
"""
Retrieve the name of a reference frame associated with a SPICE ID code.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/frmnam_c.html
:param frcode: an integer code for a reference frame
:type frcode: int
:param lenout: Maximum length of output string.
:type lenout: int
:return: the name associated with the reference frame.
:rtype: str
"""
frcode = ctypes.c_int(frcode)
lenout = ctypes.c_int(lenout)
frname = stypes.stringToCharP(lenout)
libspice.frmnam_c(frcode, lenout, frname)
return stypes.toPythonString(frname)
|
[
"def",
"frmnam",
"(",
"frcode",
",",
"lenout",
"=",
"_default_len_out",
")",
":",
"frcode",
"=",
"ctypes",
".",
"c_int",
"(",
"frcode",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"frname",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenout",
")",
"libspice",
".",
"frmnam_c",
"(",
"frcode",
",",
"lenout",
",",
"frname",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"frname",
")"
] |
Retrieve the name of a reference frame associated with a SPICE ID code.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/frmnam_c.html
:param frcode: an integer code for a reference frame
:type frcode: int
:param lenout: Maximum length of output string.
:type lenout: int
:return: the name associated with the reference frame.
:rtype: str
|
[
"Retrieve",
"the",
"name",
"of",
"a",
"reference",
"frame",
"associated",
"with",
"a",
"SPICE",
"ID",
"code",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5333-L5350
|
14,737
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
furnsh
|
def furnsh(path):
"""
Load one or more SPICE kernels into a program.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/furnsh_c.html
:param path: one or more paths to kernels
:type path: str or list of str
"""
if isinstance(path, list):
for p in path:
libspice.furnsh_c(stypes.stringToCharP(p))
else:
path = stypes.stringToCharP(path)
libspice.furnsh_c(path)
|
python
|
def furnsh(path):
"""
Load one or more SPICE kernels into a program.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/furnsh_c.html
:param path: one or more paths to kernels
:type path: str or list of str
"""
if isinstance(path, list):
for p in path:
libspice.furnsh_c(stypes.stringToCharP(p))
else:
path = stypes.stringToCharP(path)
libspice.furnsh_c(path)
|
[
"def",
"furnsh",
"(",
"path",
")",
":",
"if",
"isinstance",
"(",
"path",
",",
"list",
")",
":",
"for",
"p",
"in",
"path",
":",
"libspice",
".",
"furnsh_c",
"(",
"stypes",
".",
"stringToCharP",
"(",
"p",
")",
")",
"else",
":",
"path",
"=",
"stypes",
".",
"stringToCharP",
"(",
"path",
")",
"libspice",
".",
"furnsh_c",
"(",
"path",
")"
] |
Load one or more SPICE kernels into a program.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/furnsh_c.html
:param path: one or more paths to kernels
:type path: str or list of str
|
[
"Load",
"one",
"or",
"more",
"SPICE",
"kernels",
"into",
"a",
"program",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5368-L5382
|
14,738
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
gcpool
|
def gcpool(name, start, room, lenout=_default_len_out):
"""
Return the character value of a kernel variable from the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gcpool_c.html
:param name: Name of the variable whose value is to be returned.
:type name: str
:param start: Which component to start retrieving for name.
:type start: int
:param room: The largest number of values to return.
:type room: int
:param lenout: The length of the output string.
:type lenout: int
:return: Values associated with name.
:rtype: list of str
"""
name = stypes.stringToCharP(name)
start = ctypes.c_int(start)
room = ctypes.c_int(room)
lenout = ctypes.c_int(lenout)
n = ctypes.c_int()
cvals = stypes.emptyCharArray(lenout, room)
found = ctypes.c_int()
libspice.gcpool_c(name, start, room, lenout, ctypes.byref(n),
ctypes.byref(cvals), ctypes.byref(found))
return [stypes.toPythonString(x.value) for x in
cvals[0:n.value]], bool(found.value)
|
python
|
def gcpool(name, start, room, lenout=_default_len_out):
"""
Return the character value of a kernel variable from the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gcpool_c.html
:param name: Name of the variable whose value is to be returned.
:type name: str
:param start: Which component to start retrieving for name.
:type start: int
:param room: The largest number of values to return.
:type room: int
:param lenout: The length of the output string.
:type lenout: int
:return: Values associated with name.
:rtype: list of str
"""
name = stypes.stringToCharP(name)
start = ctypes.c_int(start)
room = ctypes.c_int(room)
lenout = ctypes.c_int(lenout)
n = ctypes.c_int()
cvals = stypes.emptyCharArray(lenout, room)
found = ctypes.c_int()
libspice.gcpool_c(name, start, room, lenout, ctypes.byref(n),
ctypes.byref(cvals), ctypes.byref(found))
return [stypes.toPythonString(x.value) for x in
cvals[0:n.value]], bool(found.value)
|
[
"def",
"gcpool",
"(",
"name",
",",
"start",
",",
"room",
",",
"lenout",
"=",
"_default_len_out",
")",
":",
"name",
"=",
"stypes",
".",
"stringToCharP",
"(",
"name",
")",
"start",
"=",
"ctypes",
".",
"c_int",
"(",
"start",
")",
"room",
"=",
"ctypes",
".",
"c_int",
"(",
"room",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"cvals",
"=",
"stypes",
".",
"emptyCharArray",
"(",
"lenout",
",",
"room",
")",
"found",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"gcpool_c",
"(",
"name",
",",
"start",
",",
"room",
",",
"lenout",
",",
"ctypes",
".",
"byref",
"(",
"n",
")",
",",
"ctypes",
".",
"byref",
"(",
"cvals",
")",
",",
"ctypes",
".",
"byref",
"(",
"found",
")",
")",
"return",
"[",
"stypes",
".",
"toPythonString",
"(",
"x",
".",
"value",
")",
"for",
"x",
"in",
"cvals",
"[",
"0",
":",
"n",
".",
"value",
"]",
"]",
",",
"bool",
"(",
"found",
".",
"value",
")"
] |
Return the character value of a kernel variable from the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gcpool_c.html
:param name: Name of the variable whose value is to be returned.
:type name: str
:param start: Which component to start retrieving for name.
:type start: int
:param room: The largest number of values to return.
:type room: int
:param lenout: The length of the output string.
:type lenout: int
:return: Values associated with name.
:rtype: list of str
|
[
"Return",
"the",
"character",
"value",
"of",
"a",
"kernel",
"variable",
"from",
"the",
"kernel",
"pool",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5391-L5418
|
14,739
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
gdpool
|
def gdpool(name, start, room):
"""
Return the d.p. value of a kernel variable from the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gdpool_c.html
:param name: Name of the variable whose value is to be returned.
:type name: str
:param start: Which component to start retrieving for name.
:type start: int
:param room: The largest number of values to return.
:type room: int
:return: Values associated with name.
:rtype: list of float
"""
name = stypes.stringToCharP(name)
start = ctypes.c_int(start)
values = stypes.emptyDoubleVector(room)
room = ctypes.c_int(room)
n = ctypes.c_int()
found = ctypes.c_int()
libspice.gdpool_c(name, start, room, ctypes.byref(n),
ctypes.cast(values, ctypes.POINTER(ctypes.c_double)),
ctypes.byref(found))
return stypes.cVectorToPython(values)[0:n.value], bool(found.value)
|
python
|
def gdpool(name, start, room):
"""
Return the d.p. value of a kernel variable from the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gdpool_c.html
:param name: Name of the variable whose value is to be returned.
:type name: str
:param start: Which component to start retrieving for name.
:type start: int
:param room: The largest number of values to return.
:type room: int
:return: Values associated with name.
:rtype: list of float
"""
name = stypes.stringToCharP(name)
start = ctypes.c_int(start)
values = stypes.emptyDoubleVector(room)
room = ctypes.c_int(room)
n = ctypes.c_int()
found = ctypes.c_int()
libspice.gdpool_c(name, start, room, ctypes.byref(n),
ctypes.cast(values, ctypes.POINTER(ctypes.c_double)),
ctypes.byref(found))
return stypes.cVectorToPython(values)[0:n.value], bool(found.value)
|
[
"def",
"gdpool",
"(",
"name",
",",
"start",
",",
"room",
")",
":",
"name",
"=",
"stypes",
".",
"stringToCharP",
"(",
"name",
")",
"start",
"=",
"ctypes",
".",
"c_int",
"(",
"start",
")",
"values",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"room",
")",
"room",
"=",
"ctypes",
".",
"c_int",
"(",
"room",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"found",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"gdpool_c",
"(",
"name",
",",
"start",
",",
"room",
",",
"ctypes",
".",
"byref",
"(",
"n",
")",
",",
"ctypes",
".",
"cast",
"(",
"values",
",",
"ctypes",
".",
"POINTER",
"(",
"ctypes",
".",
"c_double",
")",
")",
",",
"ctypes",
".",
"byref",
"(",
"found",
")",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"values",
")",
"[",
"0",
":",
"n",
".",
"value",
"]",
",",
"bool",
"(",
"found",
".",
"value",
")"
] |
Return the d.p. value of a kernel variable from the kernel pool.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gdpool_c.html
:param name: Name of the variable whose value is to be returned.
:type name: str
:param start: Which component to start retrieving for name.
:type start: int
:param room: The largest number of values to return.
:type room: int
:return: Values associated with name.
:rtype: list of float
|
[
"Return",
"the",
"d",
".",
"p",
".",
"value",
"of",
"a",
"kernel",
"variable",
"from",
"the",
"kernel",
"pool",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5423-L5447
|
14,740
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
georec
|
def georec(lon, lat, alt, re, f):
"""
Convert geodetic coordinates to rectangular coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/georec_c.html
:param lon: Geodetic longitude of point (radians).
:type lon: float
:param lat: Geodetic latitude of point (radians).
:type lat: float
:param alt: Altitude of point above the reference spheroid.
:type alt: float
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return: Rectangular coordinates of point.
:rtype: 3-Element Array of floats
"""
lon = ctypes.c_double(lon)
lat = ctypes.c_double(lat)
alt = ctypes.c_double(alt)
re = ctypes.c_double(re)
f = ctypes.c_double(f)
rectan = stypes.emptyDoubleVector(3)
libspice.georec_c(lon, lat, alt, re, f, rectan)
return stypes.cVectorToPython(rectan)
|
python
|
def georec(lon, lat, alt, re, f):
"""
Convert geodetic coordinates to rectangular coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/georec_c.html
:param lon: Geodetic longitude of point (radians).
:type lon: float
:param lat: Geodetic latitude of point (radians).
:type lat: float
:param alt: Altitude of point above the reference spheroid.
:type alt: float
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return: Rectangular coordinates of point.
:rtype: 3-Element Array of floats
"""
lon = ctypes.c_double(lon)
lat = ctypes.c_double(lat)
alt = ctypes.c_double(alt)
re = ctypes.c_double(re)
f = ctypes.c_double(f)
rectan = stypes.emptyDoubleVector(3)
libspice.georec_c(lon, lat, alt, re, f, rectan)
return stypes.cVectorToPython(rectan)
|
[
"def",
"georec",
"(",
"lon",
",",
"lat",
",",
"alt",
",",
"re",
",",
"f",
")",
":",
"lon",
"=",
"ctypes",
".",
"c_double",
"(",
"lon",
")",
"lat",
"=",
"ctypes",
".",
"c_double",
"(",
"lat",
")",
"alt",
"=",
"ctypes",
".",
"c_double",
"(",
"alt",
")",
"re",
"=",
"ctypes",
".",
"c_double",
"(",
"re",
")",
"f",
"=",
"ctypes",
".",
"c_double",
"(",
"f",
")",
"rectan",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"georec_c",
"(",
"lon",
",",
"lat",
",",
"alt",
",",
"re",
",",
"f",
",",
"rectan",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"rectan",
")"
] |
Convert geodetic coordinates to rectangular coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/georec_c.html
:param lon: Geodetic longitude of point (radians).
:type lon: float
:param lat: Geodetic latitude of point (radians).
:type lat: float
:param alt: Altitude of point above the reference spheroid.
:type alt: float
:param re: Equatorial radius of the reference spheroid.
:type re: float
:param f: Flattening coefficient.
:type f: float
:return: Rectangular coordinates of point.
:rtype: 3-Element Array of floats
|
[
"Convert",
"geodetic",
"coordinates",
"to",
"rectangular",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5451-L5477
|
14,741
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
getelm
|
def getelm(frstyr, lineln, lines):
"""
Given a the "lines" of a two-line element set, parse the
lines and return the elements in units suitable for use
in SPICE software.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getelm_c.html
:param frstyr: Year of earliest representable two-line elements.
:type frstyr: int
:param lineln: Length of strings in lines array.
:type lineln: int
:param lines: A pair of "lines" containing two-line elements.
:type lines: list of str
:return:
The epoch of the elements in seconds past J2000,
The elements converted to SPICE units.
:rtype: tuple
"""
frstyr = ctypes.c_int(frstyr)
lineln = ctypes.c_int(lineln)
lines = stypes.listToCharArrayPtr(lines, xLen=lineln, yLen=2)
epoch = ctypes.c_double()
elems = stypes.emptyDoubleVector(10) # guess for length
libspice.getelm_c(frstyr, lineln, lines, ctypes.byref(epoch), elems)
return epoch.value, stypes.cVectorToPython(elems)
|
python
|
def getelm(frstyr, lineln, lines):
"""
Given a the "lines" of a two-line element set, parse the
lines and return the elements in units suitable for use
in SPICE software.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getelm_c.html
:param frstyr: Year of earliest representable two-line elements.
:type frstyr: int
:param lineln: Length of strings in lines array.
:type lineln: int
:param lines: A pair of "lines" containing two-line elements.
:type lines: list of str
:return:
The epoch of the elements in seconds past J2000,
The elements converted to SPICE units.
:rtype: tuple
"""
frstyr = ctypes.c_int(frstyr)
lineln = ctypes.c_int(lineln)
lines = stypes.listToCharArrayPtr(lines, xLen=lineln, yLen=2)
epoch = ctypes.c_double()
elems = stypes.emptyDoubleVector(10) # guess for length
libspice.getelm_c(frstyr, lineln, lines, ctypes.byref(epoch), elems)
return epoch.value, stypes.cVectorToPython(elems)
|
[
"def",
"getelm",
"(",
"frstyr",
",",
"lineln",
",",
"lines",
")",
":",
"frstyr",
"=",
"ctypes",
".",
"c_int",
"(",
"frstyr",
")",
"lineln",
"=",
"ctypes",
".",
"c_int",
"(",
"lineln",
")",
"lines",
"=",
"stypes",
".",
"listToCharArrayPtr",
"(",
"lines",
",",
"xLen",
"=",
"lineln",
",",
"yLen",
"=",
"2",
")",
"epoch",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"elems",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"10",
")",
"# guess for length",
"libspice",
".",
"getelm_c",
"(",
"frstyr",
",",
"lineln",
",",
"lines",
",",
"ctypes",
".",
"byref",
"(",
"epoch",
")",
",",
"elems",
")",
"return",
"epoch",
".",
"value",
",",
"stypes",
".",
"cVectorToPython",
"(",
"elems",
")"
] |
Given a the "lines" of a two-line element set, parse the
lines and return the elements in units suitable for use
in SPICE software.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/getelm_c.html
:param frstyr: Year of earliest representable two-line elements.
:type frstyr: int
:param lineln: Length of strings in lines array.
:type lineln: int
:param lines: A pair of "lines" containing two-line elements.
:type lines: list of str
:return:
The epoch of the elements in seconds past J2000,
The elements converted to SPICE units.
:rtype: tuple
|
[
"Given",
"a",
"the",
"lines",
"of",
"a",
"two",
"-",
"line",
"element",
"set",
"parse",
"the",
"lines",
"and",
"return",
"the",
"elements",
"in",
"units",
"suitable",
"for",
"use",
"in",
"SPICE",
"software",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L5484-L5509
|
14,742
|
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
|
14,743
|
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
|
14,744
|
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
|
14,745
|
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
|
14,746
|
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
|
14,747
|
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
|
14,748
|
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
|
14,749
|
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
|
14,750
|
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
|
14,751
|
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
|
14,752
|
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
|
14,753
|
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
|
14,754
|
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
|
14,755
|
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
|
14,756
|
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
|
14,757
|
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
|
14,758
|
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
|
14,759
|
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
|
14,760
|
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
|
14,761
|
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
|
14,762
|
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
|
14,763
|
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
|
14,764
|
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
|
14,765
|
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
|
14,766
|
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
|
14,767
|
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
|
14,768
|
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
|
14,769
|
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
|
14,770
|
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
|
14,771
|
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
|
14,772
|
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
|
14,773
|
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
|
14,774
|
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
|
14,775
|
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
|
14,776
|
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
|
14,777
|
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
|
14,778
|
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
|
14,779
|
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
|
14,780
|
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
|
14,781
|
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
|
14,782
|
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
|
14,783
|
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
|
14,784
|
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
|
14,785
|
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
|
14,786
|
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
|
14,787
|
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
|
14,788
|
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
|
14,789
|
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
|
14,790
|
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
|
14,791
|
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
|
14,792
|
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
|
14,793
|
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
|
14,794
|
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
|
14,795
|
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
|
14,796
|
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
|
14,797
|
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
|
14,798
|
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
|
14,799
|
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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.