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,900
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkcpt
|
def spkcpt(trgpos, trgctr, trgref, et, outref, refloc, abcorr, obsrvr):
"""
Return the state, relative to a specified observer, of a target
having constant position in a specified reference frame. The
target's position is provided by the calling program rather than by
loaded SPK files.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcpt_c.html
:param trgpos: Target position relative to center of motion.
:type trgpos: 3-Element Array of floats
:param trgctr: Center of motion of target.
:type trgctr: str
:param trgref: Observation epoch.
:type trgref: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing ephemeris object.
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
"""
trgpos = stypes.toDoubleVector(trgpos)
trgctr = stypes.stringToCharP(trgctr)
trgref = stypes.stringToCharP(trgref)
et = ctypes.c_double(et)
outref = stypes.stringToCharP(outref)
refloc = stypes.stringToCharP(refloc)
abcorr = stypes.stringToCharP(abcorr)
obsrvr = stypes.stringToCharP(obsrvr)
state = stypes.emptyDoubleVector(6)
lt = ctypes.c_double()
libspice.spkcpt_c(trgpos, trgctr, trgref, et, outref, refloc, abcorr,
obsrvr, state, ctypes.byref(lt))
return stypes.cVectorToPython(state), lt.value
|
python
|
def spkcpt(trgpos, trgctr, trgref, et, outref, refloc, abcorr, obsrvr):
"""
Return the state, relative to a specified observer, of a target
having constant position in a specified reference frame. The
target's position is provided by the calling program rather than by
loaded SPK files.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcpt_c.html
:param trgpos: Target position relative to center of motion.
:type trgpos: 3-Element Array of floats
:param trgctr: Center of motion of target.
:type trgctr: str
:param trgref: Observation epoch.
:type trgref: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing ephemeris object.
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
"""
trgpos = stypes.toDoubleVector(trgpos)
trgctr = stypes.stringToCharP(trgctr)
trgref = stypes.stringToCharP(trgref)
et = ctypes.c_double(et)
outref = stypes.stringToCharP(outref)
refloc = stypes.stringToCharP(refloc)
abcorr = stypes.stringToCharP(abcorr)
obsrvr = stypes.stringToCharP(obsrvr)
state = stypes.emptyDoubleVector(6)
lt = ctypes.c_double()
libspice.spkcpt_c(trgpos, trgctr, trgref, et, outref, refloc, abcorr,
obsrvr, state, ctypes.byref(lt))
return stypes.cVectorToPython(state), lt.value
|
[
"def",
"spkcpt",
"(",
"trgpos",
",",
"trgctr",
",",
"trgref",
",",
"et",
",",
"outref",
",",
"refloc",
",",
"abcorr",
",",
"obsrvr",
")",
":",
"trgpos",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"trgpos",
")",
"trgctr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"trgctr",
")",
"trgref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"trgref",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"outref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"outref",
")",
"refloc",
"=",
"stypes",
".",
"stringToCharP",
"(",
"refloc",
")",
"abcorr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"abcorr",
")",
"obsrvr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"obsrvr",
")",
"state",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"6",
")",
"lt",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"spkcpt_c",
"(",
"trgpos",
",",
"trgctr",
",",
"trgref",
",",
"et",
",",
"outref",
",",
"refloc",
",",
"abcorr",
",",
"obsrvr",
",",
"state",
",",
"ctypes",
".",
"byref",
"(",
"lt",
")",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"state",
")",
",",
"lt",
".",
"value"
] |
Return the state, relative to a specified observer, of a target
having constant position in a specified reference frame. The
target's position is provided by the calling program rather than by
loaded SPK files.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcpt_c.html
:param trgpos: Target position relative to center of motion.
:type trgpos: 3-Element Array of floats
:param trgctr: Center of motion of target.
:type trgctr: str
:param trgref: Observation epoch.
:type trgref: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing ephemeris object.
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
|
[
"Return",
"the",
"state",
"relative",
"to",
"a",
"specified",
"observer",
"of",
"a",
"target",
"having",
"constant",
"position",
"in",
"a",
"specified",
"reference",
"frame",
".",
"The",
"target",
"s",
"position",
"is",
"provided",
"by",
"the",
"calling",
"program",
"rather",
"than",
"by",
"loaded",
"SPK",
"files",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11720-L11761
|
14,901
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkcvo
|
def spkcvo(target, et, outref, refloc, abcorr, obssta, obsepc, obsctr, obsref):
"""
Return the state of a specified target relative to an "observer,"
where the observer has constant velocity in a specified reference
frame. The observer's state is provided by the calling program
rather than by loaded SPK files.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvo_c.html
:param target: Name of target ephemeris object.
:type target: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obssta: Observer state relative to center of motion.
:type obssta: 6-Element Array of floats
:param obsepc: Epoch of observer state.
:type obsepc: float
:param obsctr: Center of motion of observer.
:type obsctr: str
:param obsref: Frame of observer state.
:type obsref: str
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
"""
target = stypes.stringToCharP(target)
et = ctypes.c_double(et)
outref = stypes.stringToCharP(outref)
refloc = stypes.stringToCharP(refloc)
abcorr = stypes.stringToCharP(abcorr)
obssta = stypes.toDoubleVector(obssta)
obsepc = ctypes.c_double(obsepc)
obsctr = stypes.stringToCharP(obsctr)
obsref = stypes.stringToCharP(obsref)
state = stypes.emptyDoubleVector(6)
lt = ctypes.c_double()
libspice.spkcvo_c(target, et, outref, refloc, abcorr, obssta, obsepc,
obsctr, obsref, state, ctypes.byref(lt))
return stypes.cVectorToPython(state), lt.value
|
python
|
def spkcvo(target, et, outref, refloc, abcorr, obssta, obsepc, obsctr, obsref):
"""
Return the state of a specified target relative to an "observer,"
where the observer has constant velocity in a specified reference
frame. The observer's state is provided by the calling program
rather than by loaded SPK files.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvo_c.html
:param target: Name of target ephemeris object.
:type target: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obssta: Observer state relative to center of motion.
:type obssta: 6-Element Array of floats
:param obsepc: Epoch of observer state.
:type obsepc: float
:param obsctr: Center of motion of observer.
:type obsctr: str
:param obsref: Frame of observer state.
:type obsref: str
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
"""
target = stypes.stringToCharP(target)
et = ctypes.c_double(et)
outref = stypes.stringToCharP(outref)
refloc = stypes.stringToCharP(refloc)
abcorr = stypes.stringToCharP(abcorr)
obssta = stypes.toDoubleVector(obssta)
obsepc = ctypes.c_double(obsepc)
obsctr = stypes.stringToCharP(obsctr)
obsref = stypes.stringToCharP(obsref)
state = stypes.emptyDoubleVector(6)
lt = ctypes.c_double()
libspice.spkcvo_c(target, et, outref, refloc, abcorr, obssta, obsepc,
obsctr, obsref, state, ctypes.byref(lt))
return stypes.cVectorToPython(state), lt.value
|
[
"def",
"spkcvo",
"(",
"target",
",",
"et",
",",
"outref",
",",
"refloc",
",",
"abcorr",
",",
"obssta",
",",
"obsepc",
",",
"obsctr",
",",
"obsref",
")",
":",
"target",
"=",
"stypes",
".",
"stringToCharP",
"(",
"target",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"outref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"outref",
")",
"refloc",
"=",
"stypes",
".",
"stringToCharP",
"(",
"refloc",
")",
"abcorr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"abcorr",
")",
"obssta",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"obssta",
")",
"obsepc",
"=",
"ctypes",
".",
"c_double",
"(",
"obsepc",
")",
"obsctr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"obsctr",
")",
"obsref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"obsref",
")",
"state",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"6",
")",
"lt",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"spkcvo_c",
"(",
"target",
",",
"et",
",",
"outref",
",",
"refloc",
",",
"abcorr",
",",
"obssta",
",",
"obsepc",
",",
"obsctr",
",",
"obsref",
",",
"state",
",",
"ctypes",
".",
"byref",
"(",
"lt",
")",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"state",
")",
",",
"lt",
".",
"value"
] |
Return the state of a specified target relative to an "observer,"
where the observer has constant velocity in a specified reference
frame. The observer's state is provided by the calling program
rather than by loaded SPK files.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvo_c.html
:param target: Name of target ephemeris object.
:type target: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obssta: Observer state relative to center of motion.
:type obssta: 6-Element Array of floats
:param obsepc: Epoch of observer state.
:type obsepc: float
:param obsctr: Center of motion of observer.
:type obsctr: str
:param obsref: Frame of observer state.
:type obsref: str
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
|
[
"Return",
"the",
"state",
"of",
"a",
"specified",
"target",
"relative",
"to",
"an",
"observer",
"where",
"the",
"observer",
"has",
"constant",
"velocity",
"in",
"a",
"specified",
"reference",
"frame",
".",
"The",
"observer",
"s",
"state",
"is",
"provided",
"by",
"the",
"calling",
"program",
"rather",
"than",
"by",
"loaded",
"SPK",
"files",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11765-L11810
|
14,902
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkcvt
|
def spkcvt(trgsta, trgepc, trgctr, trgref, et, outref, refloc, abcorr, obsrvr):
"""
Return the state, relative to a specified observer, of a target
having constant velocity in a specified reference frame. The
target's state is provided by the calling program rather than by
loaded SPK files.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvt_c.html
:param trgsta: Target state relative to center of motion.
:type trgsta: 6-Element Array of floats
:param trgepc: Epoch of target state.
:type trgepc: float
:param trgctr: Center of motion of target.
:type trgctr: str
:param trgref: Frame of target state.
:type trgref: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing ephemeris object.
:type obsrvr: str
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
"""
trgpos = stypes.toDoubleVector(trgsta)
trgepc = ctypes.c_double(trgepc)
trgctr = stypes.stringToCharP(trgctr)
trgref = stypes.stringToCharP(trgref)
et = ctypes.c_double(et)
outref = stypes.stringToCharP(outref)
refloc = stypes.stringToCharP(refloc)
abcorr = stypes.stringToCharP(abcorr)
obsrvr = stypes.stringToCharP(obsrvr)
state = stypes.emptyDoubleVector(6)
lt = ctypes.c_double()
libspice.spkcvt_c(trgpos, trgepc, trgctr, trgref, et, outref, refloc,
abcorr, obsrvr, state, ctypes.byref(lt))
return stypes.cVectorToPython(state), lt.value
|
python
|
def spkcvt(trgsta, trgepc, trgctr, trgref, et, outref, refloc, abcorr, obsrvr):
"""
Return the state, relative to a specified observer, of a target
having constant velocity in a specified reference frame. The
target's state is provided by the calling program rather than by
loaded SPK files.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvt_c.html
:param trgsta: Target state relative to center of motion.
:type trgsta: 6-Element Array of floats
:param trgepc: Epoch of target state.
:type trgepc: float
:param trgctr: Center of motion of target.
:type trgctr: str
:param trgref: Frame of target state.
:type trgref: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing ephemeris object.
:type obsrvr: str
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
"""
trgpos = stypes.toDoubleVector(trgsta)
trgepc = ctypes.c_double(trgepc)
trgctr = stypes.stringToCharP(trgctr)
trgref = stypes.stringToCharP(trgref)
et = ctypes.c_double(et)
outref = stypes.stringToCharP(outref)
refloc = stypes.stringToCharP(refloc)
abcorr = stypes.stringToCharP(abcorr)
obsrvr = stypes.stringToCharP(obsrvr)
state = stypes.emptyDoubleVector(6)
lt = ctypes.c_double()
libspice.spkcvt_c(trgpos, trgepc, trgctr, trgref, et, outref, refloc,
abcorr, obsrvr, state, ctypes.byref(lt))
return stypes.cVectorToPython(state), lt.value
|
[
"def",
"spkcvt",
"(",
"trgsta",
",",
"trgepc",
",",
"trgctr",
",",
"trgref",
",",
"et",
",",
"outref",
",",
"refloc",
",",
"abcorr",
",",
"obsrvr",
")",
":",
"trgpos",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"trgsta",
")",
"trgepc",
"=",
"ctypes",
".",
"c_double",
"(",
"trgepc",
")",
"trgctr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"trgctr",
")",
"trgref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"trgref",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"outref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"outref",
")",
"refloc",
"=",
"stypes",
".",
"stringToCharP",
"(",
"refloc",
")",
"abcorr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"abcorr",
")",
"obsrvr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"obsrvr",
")",
"state",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"6",
")",
"lt",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"spkcvt_c",
"(",
"trgpos",
",",
"trgepc",
",",
"trgctr",
",",
"trgref",
",",
"et",
",",
"outref",
",",
"refloc",
",",
"abcorr",
",",
"obsrvr",
",",
"state",
",",
"ctypes",
".",
"byref",
"(",
"lt",
")",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"state",
")",
",",
"lt",
".",
"value"
] |
Return the state, relative to a specified observer, of a target
having constant velocity in a specified reference frame. The
target's state is provided by the calling program rather than by
loaded SPK files.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkcvt_c.html
:param trgsta: Target state relative to center of motion.
:type trgsta: 6-Element Array of floats
:param trgepc: Epoch of target state.
:type trgepc: float
:param trgctr: Center of motion of target.
:type trgctr: str
:param trgref: Frame of target state.
:type trgref: str
:param et: Observation epoch.
:type et: float
:param outref: Reference frame of output state.
:type outref: str
:param refloc: Output reference frame evaluation locus.
:type refloc: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing ephemeris object.
:type obsrvr: str
:return:
State of target with respect to observer,
One way light time between target and observer.
:rtype: tuple
|
[
"Return",
"the",
"state",
"relative",
"to",
"a",
"specified",
"observer",
"of",
"a",
"target",
"having",
"constant",
"velocity",
"in",
"a",
"specified",
"reference",
"frame",
".",
"The",
"target",
"s",
"state",
"is",
"provided",
"by",
"the",
"calling",
"program",
"rather",
"than",
"by",
"loaded",
"SPK",
"files",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L11814-L11859
|
14,903
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkgps
|
def spkgps(targ, et, ref, obs):
"""
Compute the geometric position of a target body relative to an
observing body.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkgps_c.html
:param targ: Target body.
:type targ: int
:param et: Target epoch.
:type et: float
:param ref: Target reference frame.
:type ref: str
:param obs: Observing body.
:type obs: int
:return: Position of target, Light time.
:rtype: tuple
"""
targ = ctypes.c_int(targ)
et = ctypes.c_double(et)
ref = stypes.stringToCharP(ref)
obs = ctypes.c_int(obs)
position = stypes.emptyDoubleVector(3)
lt = ctypes.c_double()
libspice.spkgps_c(targ, et, ref, obs, position, ctypes.byref(lt))
return stypes.cVectorToPython(position), lt.value
|
python
|
def spkgps(targ, et, ref, obs):
"""
Compute the geometric position of a target body relative to an
observing body.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkgps_c.html
:param targ: Target body.
:type targ: int
:param et: Target epoch.
:type et: float
:param ref: Target reference frame.
:type ref: str
:param obs: Observing body.
:type obs: int
:return: Position of target, Light time.
:rtype: tuple
"""
targ = ctypes.c_int(targ)
et = ctypes.c_double(et)
ref = stypes.stringToCharP(ref)
obs = ctypes.c_int(obs)
position = stypes.emptyDoubleVector(3)
lt = ctypes.c_double()
libspice.spkgps_c(targ, et, ref, obs, position, ctypes.byref(lt))
return stypes.cVectorToPython(position), lt.value
|
[
"def",
"spkgps",
"(",
"targ",
",",
"et",
",",
"ref",
",",
"obs",
")",
":",
"targ",
"=",
"ctypes",
".",
"c_int",
"(",
"targ",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"ref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"ref",
")",
"obs",
"=",
"ctypes",
".",
"c_int",
"(",
"obs",
")",
"position",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"lt",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"spkgps_c",
"(",
"targ",
",",
"et",
",",
"ref",
",",
"obs",
",",
"position",
",",
"ctypes",
".",
"byref",
"(",
"lt",
")",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"position",
")",
",",
"lt",
".",
"value"
] |
Compute the geometric position of a target body relative to an
observing body.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkgps_c.html
:param targ: Target body.
:type targ: int
:param et: Target epoch.
:type et: float
:param ref: Target reference frame.
:type ref: str
:param obs: Observing body.
:type obs: int
:return: Position of target, Light time.
:rtype: tuple
|
[
"Compute",
"the",
"geometric",
"position",
"of",
"a",
"target",
"body",
"relative",
"to",
"an",
"observing",
"body",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12005-L12030
|
14,904
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spklef
|
def spklef(filename):
"""
Load an ephemeris file for use by the readers. Return that file's
handle, to be used by other SPK routines to refer to the file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spklef_c.html
:param filename: Name of the file to be loaded.
:type filename: str
:return: Loaded file's handle.
:rtype: int
"""
filename = stypes.stringToCharP(filename)
handle = ctypes.c_int()
libspice.spklef_c(filename, ctypes.byref(handle))
return handle.value
|
python
|
def spklef(filename):
"""
Load an ephemeris file for use by the readers. Return that file's
handle, to be used by other SPK routines to refer to the file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spklef_c.html
:param filename: Name of the file to be loaded.
:type filename: str
:return: Loaded file's handle.
:rtype: int
"""
filename = stypes.stringToCharP(filename)
handle = ctypes.c_int()
libspice.spklef_c(filename, ctypes.byref(handle))
return handle.value
|
[
"def",
"spklef",
"(",
"filename",
")",
":",
"filename",
"=",
"stypes",
".",
"stringToCharP",
"(",
"filename",
")",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"spklef_c",
"(",
"filename",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
"return",
"handle",
".",
"value"
] |
Load an ephemeris file for use by the readers. Return that file's
handle, to be used by other SPK routines to refer to the file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spklef_c.html
:param filename: Name of the file to be loaded.
:type filename: str
:return: Loaded file's handle.
:rtype: int
|
[
"Load",
"an",
"ephemeris",
"file",
"for",
"use",
"by",
"the",
"readers",
".",
"Return",
"that",
"file",
"s",
"handle",
"to",
"be",
"used",
"by",
"other",
"SPK",
"routines",
"to",
"refer",
"to",
"the",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12034-L12049
|
14,905
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkobj
|
def spkobj(spk, outCell=None):
"""
Find the set of ID codes of all objects in a specified SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkobj_c.html
:param spk: Name of SPK file.
:type spk: str
:param outCell: Optional Spice Int Cell.
:type outCell: spiceypy.utils.support_types.SpiceCell
"""
spk = stypes.stringToCharP(spk)
if not outCell:
outCell = stypes.SPICEINT_CELL(1000)
assert isinstance(outCell, stypes.SpiceCell)
assert outCell.dtype == 2
libspice.spkobj_c(spk, ctypes.byref(outCell))
return outCell
|
python
|
def spkobj(spk, outCell=None):
"""
Find the set of ID codes of all objects in a specified SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkobj_c.html
:param spk: Name of SPK file.
:type spk: str
:param outCell: Optional Spice Int Cell.
:type outCell: spiceypy.utils.support_types.SpiceCell
"""
spk = stypes.stringToCharP(spk)
if not outCell:
outCell = stypes.SPICEINT_CELL(1000)
assert isinstance(outCell, stypes.SpiceCell)
assert outCell.dtype == 2
libspice.spkobj_c(spk, ctypes.byref(outCell))
return outCell
|
[
"def",
"spkobj",
"(",
"spk",
",",
"outCell",
"=",
"None",
")",
":",
"spk",
"=",
"stypes",
".",
"stringToCharP",
"(",
"spk",
")",
"if",
"not",
"outCell",
":",
"outCell",
"=",
"stypes",
".",
"SPICEINT_CELL",
"(",
"1000",
")",
"assert",
"isinstance",
"(",
"outCell",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"outCell",
".",
"dtype",
"==",
"2",
"libspice",
".",
"spkobj_c",
"(",
"spk",
",",
"ctypes",
".",
"byref",
"(",
"outCell",
")",
")",
"return",
"outCell"
] |
Find the set of ID codes of all objects in a specified SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkobj_c.html
:param spk: Name of SPK file.
:type spk: str
:param outCell: Optional Spice Int Cell.
:type outCell: spiceypy.utils.support_types.SpiceCell
|
[
"Find",
"the",
"set",
"of",
"ID",
"codes",
"of",
"all",
"objects",
"in",
"a",
"specified",
"SPK",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12091-L12108
|
14,906
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkopa
|
def spkopa(filename):
"""
Open an existing SPK file for subsequent write.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopa_c.html
:param filename: The name of an existing SPK file.
:type filename: str
:return: A handle attached to the SPK file opened to append.
:rtype: int
"""
filename = stypes.stringToCharP(filename)
handle = ctypes.c_int()
libspice.spkopa_c(filename, ctypes.byref(handle))
return handle.value
|
python
|
def spkopa(filename):
"""
Open an existing SPK file for subsequent write.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopa_c.html
:param filename: The name of an existing SPK file.
:type filename: str
:return: A handle attached to the SPK file opened to append.
:rtype: int
"""
filename = stypes.stringToCharP(filename)
handle = ctypes.c_int()
libspice.spkopa_c(filename, ctypes.byref(handle))
return handle.value
|
[
"def",
"spkopa",
"(",
"filename",
")",
":",
"filename",
"=",
"stypes",
".",
"stringToCharP",
"(",
"filename",
")",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"spkopa_c",
"(",
"filename",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
"return",
"handle",
".",
"value"
] |
Open an existing SPK file for subsequent write.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopa_c.html
:param filename: The name of an existing SPK file.
:type filename: str
:return: A handle attached to the SPK file opened to append.
:rtype: int
|
[
"Open",
"an",
"existing",
"SPK",
"file",
"for",
"subsequent",
"write",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12112-L12126
|
14,907
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkopn
|
def spkopn(filename, ifname, ncomch):
"""
Create a new SPK file, returning the handle of the opened file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopn_c.html
:param filename: The name of the new SPK file to be created.
:type filename: str
:param ifname: The internal filename for the SPK file.
:type ifname: str
:param ncomch: The number of characters to reserve for comments.
:type ncomch: int
:return: The handle of the opened SPK file.
:rtype: int
"""
filename = stypes.stringToCharP(filename)
ifname = stypes.stringToCharP(ifname)
ncomch = ctypes.c_int(ncomch)
handle = ctypes.c_int()
libspice.spkopn_c(filename, ifname, ncomch, ctypes.byref(handle))
return handle.value
|
python
|
def spkopn(filename, ifname, ncomch):
"""
Create a new SPK file, returning the handle of the opened file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopn_c.html
:param filename: The name of the new SPK file to be created.
:type filename: str
:param ifname: The internal filename for the SPK file.
:type ifname: str
:param ncomch: The number of characters to reserve for comments.
:type ncomch: int
:return: The handle of the opened SPK file.
:rtype: int
"""
filename = stypes.stringToCharP(filename)
ifname = stypes.stringToCharP(ifname)
ncomch = ctypes.c_int(ncomch)
handle = ctypes.c_int()
libspice.spkopn_c(filename, ifname, ncomch, ctypes.byref(handle))
return handle.value
|
[
"def",
"spkopn",
"(",
"filename",
",",
"ifname",
",",
"ncomch",
")",
":",
"filename",
"=",
"stypes",
".",
"stringToCharP",
"(",
"filename",
")",
"ifname",
"=",
"stypes",
".",
"stringToCharP",
"(",
"ifname",
")",
"ncomch",
"=",
"ctypes",
".",
"c_int",
"(",
"ncomch",
")",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"spkopn_c",
"(",
"filename",
",",
"ifname",
",",
"ncomch",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
"return",
"handle",
".",
"value"
] |
Create a new SPK file, returning the handle of the opened file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkopn_c.html
:param filename: The name of the new SPK file to be created.
:type filename: str
:param ifname: The internal filename for the SPK file.
:type ifname: str
:param ncomch: The number of characters to reserve for comments.
:type ncomch: int
:return: The handle of the opened SPK file.
:rtype: int
|
[
"Create",
"a",
"new",
"SPK",
"file",
"returning",
"the",
"handle",
"of",
"the",
"opened",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12130-L12150
|
14,908
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkpds
|
def spkpds(body, center, framestr, typenum, first, last):
"""
Perform routine error checks and if all check pass, pack the
descriptor for an SPK segment
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkpds_c.html
:param body: The NAIF ID code for the body of the segment.
:type body: int
:param center: The center of motion for body.
:type center: int
:param framestr: The frame for this segment.
:type framestr: str
:param typenum: The type of SPK segment to create.
:type typenum: int
:param first: The first epoch for which the segment is valid.
:type first: float
:param last: The last epoch for which the segment is valid.
:type last: float
:return: An SPK segment descriptor.
:rtype: 5-Element Array of floats
"""
body = ctypes.c_int(body)
center = ctypes.c_int(center)
framestr = stypes.stringToCharP(framestr)
typenum = ctypes.c_int(typenum)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
descr = stypes.emptyDoubleVector(5)
libspice.spkpds_c(body, center, framestr, typenum, first, last, descr)
return stypes.cVectorToPython(descr)
|
python
|
def spkpds(body, center, framestr, typenum, first, last):
"""
Perform routine error checks and if all check pass, pack the
descriptor for an SPK segment
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkpds_c.html
:param body: The NAIF ID code for the body of the segment.
:type body: int
:param center: The center of motion for body.
:type center: int
:param framestr: The frame for this segment.
:type framestr: str
:param typenum: The type of SPK segment to create.
:type typenum: int
:param first: The first epoch for which the segment is valid.
:type first: float
:param last: The last epoch for which the segment is valid.
:type last: float
:return: An SPK segment descriptor.
:rtype: 5-Element Array of floats
"""
body = ctypes.c_int(body)
center = ctypes.c_int(center)
framestr = stypes.stringToCharP(framestr)
typenum = ctypes.c_int(typenum)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
descr = stypes.emptyDoubleVector(5)
libspice.spkpds_c(body, center, framestr, typenum, first, last, descr)
return stypes.cVectorToPython(descr)
|
[
"def",
"spkpds",
"(",
"body",
",",
"center",
",",
"framestr",
",",
"typenum",
",",
"first",
",",
"last",
")",
":",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"framestr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"framestr",
")",
"typenum",
"=",
"ctypes",
".",
"c_int",
"(",
"typenum",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"descr",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"5",
")",
"libspice",
".",
"spkpds_c",
"(",
"body",
",",
"center",
",",
"framestr",
",",
"typenum",
",",
"first",
",",
"last",
",",
"descr",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"descr",
")"
] |
Perform routine error checks and if all check pass, pack the
descriptor for an SPK segment
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkpds_c.html
:param body: The NAIF ID code for the body of the segment.
:type body: int
:param center: The center of motion for body.
:type center: int
:param framestr: The frame for this segment.
:type framestr: str
:param typenum: The type of SPK segment to create.
:type typenum: int
:param first: The first epoch for which the segment is valid.
:type first: float
:param last: The last epoch for which the segment is valid.
:type last: float
:return: An SPK segment descriptor.
:rtype: 5-Element Array of floats
|
[
"Perform",
"routine",
"error",
"checks",
"and",
"if",
"all",
"check",
"pass",
"pack",
"the",
"descriptor",
"for",
"an",
"SPK",
"segment"
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12154-L12184
|
14,909
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spksfs
|
def spksfs(body, et, idlen):
# spksfs has a Parameter SIDLEN,
# sounds like an optional but is that possible?
"""
Search through loaded SPK files to find the highest-priority segment
applicable to the body and time specified.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksfs_c.html
:param body: Body ID.
:type body: int
:param et: Ephemeris time.
:type et: float
:param idlen: Length of output segment ID string.
:type idlen: int
:return:
Handle of file containing the applicable segment,
Descriptor of the applicable segment,
Identifier of the applicable segment.
:rtype: tuple
"""
body = ctypes.c_int(body)
et = ctypes.c_double(et)
idlen = ctypes.c_int(idlen)
handle = ctypes.c_int()
descr = stypes.emptyDoubleVector(5)
identstring = stypes.stringToCharP(idlen)
found = ctypes.c_int()
libspice.spksfs_c(body, et, idlen, ctypes.byref(handle), descr, identstring,
ctypes.byref(found))
return handle.value, stypes.cVectorToPython(descr), \
stypes.toPythonString(identstring), bool(found.value)
|
python
|
def spksfs(body, et, idlen):
# spksfs has a Parameter SIDLEN,
# sounds like an optional but is that possible?
"""
Search through loaded SPK files to find the highest-priority segment
applicable to the body and time specified.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksfs_c.html
:param body: Body ID.
:type body: int
:param et: Ephemeris time.
:type et: float
:param idlen: Length of output segment ID string.
:type idlen: int
:return:
Handle of file containing the applicable segment,
Descriptor of the applicable segment,
Identifier of the applicable segment.
:rtype: tuple
"""
body = ctypes.c_int(body)
et = ctypes.c_double(et)
idlen = ctypes.c_int(idlen)
handle = ctypes.c_int()
descr = stypes.emptyDoubleVector(5)
identstring = stypes.stringToCharP(idlen)
found = ctypes.c_int()
libspice.spksfs_c(body, et, idlen, ctypes.byref(handle), descr, identstring,
ctypes.byref(found))
return handle.value, stypes.cVectorToPython(descr), \
stypes.toPythonString(identstring), bool(found.value)
|
[
"def",
"spksfs",
"(",
"body",
",",
"et",
",",
"idlen",
")",
":",
"# spksfs has a Parameter SIDLEN,",
"# sounds like an optional but is that possible?",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"idlen",
"=",
"ctypes",
".",
"c_int",
"(",
"idlen",
")",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"descr",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"5",
")",
"identstring",
"=",
"stypes",
".",
"stringToCharP",
"(",
"idlen",
")",
"found",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"spksfs_c",
"(",
"body",
",",
"et",
",",
"idlen",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
",",
"descr",
",",
"identstring",
",",
"ctypes",
".",
"byref",
"(",
"found",
")",
")",
"return",
"handle",
".",
"value",
",",
"stypes",
".",
"cVectorToPython",
"(",
"descr",
")",
",",
"stypes",
".",
"toPythonString",
"(",
"identstring",
")",
",",
"bool",
"(",
"found",
".",
"value",
")"
] |
Search through loaded SPK files to find the highest-priority segment
applicable to the body and time specified.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksfs_c.html
:param body: Body ID.
:type body: int
:param et: Ephemeris time.
:type et: float
:param idlen: Length of output segment ID string.
:type idlen: int
:return:
Handle of file containing the applicable segment,
Descriptor of the applicable segment,
Identifier of the applicable segment.
:rtype: tuple
|
[
"Search",
"through",
"loaded",
"SPK",
"files",
"to",
"find",
"the",
"highest",
"-",
"priority",
"segment",
"applicable",
"to",
"the",
"body",
"and",
"time",
"specified",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12265-L12296
|
14,910
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spksub
|
def spksub(handle, descr, identin, begin, end, newh):
"""
Extract a subset of the data in an SPK segment into a
separate segment.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksub_c.html
:param handle: Handle of source segment.
:type handle: int
:param descr: Descriptor of source segment.
:type descr: 5-Element Array of floats
:param identin: Indentifier of source segment.
:type identin: str
:param begin: Beginning (initial epoch) of subset.
:type begin: int
:param end: End (fincal epoch) of subset.
:type end: int
:param newh: Handle of new segment.
:type newh: int
"""
assert len(descr) is 5
handle = ctypes.c_int(handle)
descr = stypes.toDoubleVector(descr)
identin = stypes.stringToCharP(identin)
begin = ctypes.c_double(begin)
end = ctypes.c_double(end)
newh = ctypes.c_int(newh)
libspice.spksub_c(handle, descr, identin, begin, end, newh)
|
python
|
def spksub(handle, descr, identin, begin, end, newh):
"""
Extract a subset of the data in an SPK segment into a
separate segment.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksub_c.html
:param handle: Handle of source segment.
:type handle: int
:param descr: Descriptor of source segment.
:type descr: 5-Element Array of floats
:param identin: Indentifier of source segment.
:type identin: str
:param begin: Beginning (initial epoch) of subset.
:type begin: int
:param end: End (fincal epoch) of subset.
:type end: int
:param newh: Handle of new segment.
:type newh: int
"""
assert len(descr) is 5
handle = ctypes.c_int(handle)
descr = stypes.toDoubleVector(descr)
identin = stypes.stringToCharP(identin)
begin = ctypes.c_double(begin)
end = ctypes.c_double(end)
newh = ctypes.c_int(newh)
libspice.spksub_c(handle, descr, identin, begin, end, newh)
|
[
"def",
"spksub",
"(",
"handle",
",",
"descr",
",",
"identin",
",",
"begin",
",",
"end",
",",
"newh",
")",
":",
"assert",
"len",
"(",
"descr",
")",
"is",
"5",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"descr",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"descr",
")",
"identin",
"=",
"stypes",
".",
"stringToCharP",
"(",
"identin",
")",
"begin",
"=",
"ctypes",
".",
"c_double",
"(",
"begin",
")",
"end",
"=",
"ctypes",
".",
"c_double",
"(",
"end",
")",
"newh",
"=",
"ctypes",
".",
"c_int",
"(",
"newh",
")",
"libspice",
".",
"spksub_c",
"(",
"handle",
",",
"descr",
",",
"identin",
",",
"begin",
",",
"end",
",",
"newh",
")"
] |
Extract a subset of the data in an SPK segment into a
separate segment.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spksub_c.html
:param handle: Handle of source segment.
:type handle: int
:param descr: Descriptor of source segment.
:type descr: 5-Element Array of floats
:param identin: Indentifier of source segment.
:type identin: str
:param begin: Beginning (initial epoch) of subset.
:type begin: int
:param end: End (fincal epoch) of subset.
:type end: int
:param newh: Handle of new segment.
:type newh: int
|
[
"Extract",
"a",
"subset",
"of",
"the",
"data",
"in",
"an",
"SPK",
"segment",
"into",
"a",
"separate",
"segment",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12325-L12352
|
14,911
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkuds
|
def spkuds(descr):
"""
Unpack the contents of an SPK segment descriptor.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkuds_c.html
:param descr: An SPK segment descriptor.
:type descr: 5-Element Array of floats
:return:
The NAIF ID code for the body of the segment,
The center of motion for body,
The ID code for the frame of this segment,
The type of SPK segment,
The first epoch for which the segment is valid,
The last epoch for which the segment is valid,
Beginning DAF address of the segment,
Ending DAF address of the segment.
:rtype: tuple
"""
assert len(descr) is 5
descr = stypes.toDoubleVector(descr)
body = ctypes.c_int()
center = ctypes.c_int()
framenum = ctypes.c_int()
typenum = ctypes.c_int()
first = ctypes.c_double()
last = ctypes.c_double()
begin = ctypes.c_int()
end = ctypes.c_int()
libspice.spkuds_c(descr, ctypes.byref(body), ctypes.byref(center),
ctypes.byref(framenum), ctypes.byref(typenum),
ctypes.byref(first), ctypes.byref(last),
ctypes.byref(begin), ctypes.byref(end))
return body.value, center.value, framenum.value, typenum.value, \
first.value, last.value, begin.value, end.value
|
python
|
def spkuds(descr):
"""
Unpack the contents of an SPK segment descriptor.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkuds_c.html
:param descr: An SPK segment descriptor.
:type descr: 5-Element Array of floats
:return:
The NAIF ID code for the body of the segment,
The center of motion for body,
The ID code for the frame of this segment,
The type of SPK segment,
The first epoch for which the segment is valid,
The last epoch for which the segment is valid,
Beginning DAF address of the segment,
Ending DAF address of the segment.
:rtype: tuple
"""
assert len(descr) is 5
descr = stypes.toDoubleVector(descr)
body = ctypes.c_int()
center = ctypes.c_int()
framenum = ctypes.c_int()
typenum = ctypes.c_int()
first = ctypes.c_double()
last = ctypes.c_double()
begin = ctypes.c_int()
end = ctypes.c_int()
libspice.spkuds_c(descr, ctypes.byref(body), ctypes.byref(center),
ctypes.byref(framenum), ctypes.byref(typenum),
ctypes.byref(first), ctypes.byref(last),
ctypes.byref(begin), ctypes.byref(end))
return body.value, center.value, framenum.value, typenum.value, \
first.value, last.value, begin.value, end.value
|
[
"def",
"spkuds",
"(",
"descr",
")",
":",
"assert",
"len",
"(",
"descr",
")",
"is",
"5",
"descr",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"descr",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"framenum",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"typenum",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"begin",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"end",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"spkuds_c",
"(",
"descr",
",",
"ctypes",
".",
"byref",
"(",
"body",
")",
",",
"ctypes",
".",
"byref",
"(",
"center",
")",
",",
"ctypes",
".",
"byref",
"(",
"framenum",
")",
",",
"ctypes",
".",
"byref",
"(",
"typenum",
")",
",",
"ctypes",
".",
"byref",
"(",
"first",
")",
",",
"ctypes",
".",
"byref",
"(",
"last",
")",
",",
"ctypes",
".",
"byref",
"(",
"begin",
")",
",",
"ctypes",
".",
"byref",
"(",
"end",
")",
")",
"return",
"body",
".",
"value",
",",
"center",
".",
"value",
",",
"framenum",
".",
"value",
",",
"typenum",
".",
"value",
",",
"first",
".",
"value",
",",
"last",
".",
"value",
",",
"begin",
".",
"value",
",",
"end",
".",
"value"
] |
Unpack the contents of an SPK segment descriptor.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkuds_c.html
:param descr: An SPK segment descriptor.
:type descr: 5-Element Array of floats
:return:
The NAIF ID code for the body of the segment,
The center of motion for body,
The ID code for the frame of this segment,
The type of SPK segment,
The first epoch for which the segment is valid,
The last epoch for which the segment is valid,
Beginning DAF address of the segment,
Ending DAF address of the segment.
:rtype: tuple
|
[
"Unpack",
"the",
"contents",
"of",
"an",
"SPK",
"segment",
"descriptor",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12356-L12390
|
14,912
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkw02
|
def spkw02(handle, body, center, inframe, first, last, segid, intlen, n, polydg,
cdata, btime):
"""
Write a type 2 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw02_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param intlen: Length of time covered by logical record.
:type intlen: float
:param n: Number of coefficient sets.
:type n: int
:param polydg: Chebyshev polynomial degree.
:type polydg: int
:param cdata: Array of Chebyshev coefficients.
:type cdata: Array of floats
:param btime: Begin time of first logical record.
:type btime: float
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
intlen = ctypes.c_double(intlen)
n = ctypes.c_int(n)
polydg = ctypes.c_int(polydg)
cdata = stypes.toDoubleVector(cdata)
btime = ctypes.c_double(btime)
libspice.spkw02_c(handle, body, center, inframe, first, last, segid, intlen,
n, polydg, cdata, btime)
|
python
|
def spkw02(handle, body, center, inframe, first, last, segid, intlen, n, polydg,
cdata, btime):
"""
Write a type 2 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw02_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param intlen: Length of time covered by logical record.
:type intlen: float
:param n: Number of coefficient sets.
:type n: int
:param polydg: Chebyshev polynomial degree.
:type polydg: int
:param cdata: Array of Chebyshev coefficients.
:type cdata: Array of floats
:param btime: Begin time of first logical record.
:type btime: float
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
intlen = ctypes.c_double(intlen)
n = ctypes.c_int(n)
polydg = ctypes.c_int(polydg)
cdata = stypes.toDoubleVector(cdata)
btime = ctypes.c_double(btime)
libspice.spkw02_c(handle, body, center, inframe, first, last, segid, intlen,
n, polydg, cdata, btime)
|
[
"def",
"spkw02",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"intlen",
",",
"n",
",",
"polydg",
",",
"cdata",
",",
"btime",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"inframe",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inframe",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"segid",
"=",
"stypes",
".",
"stringToCharP",
"(",
"segid",
")",
"intlen",
"=",
"ctypes",
".",
"c_double",
"(",
"intlen",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"polydg",
"=",
"ctypes",
".",
"c_int",
"(",
"polydg",
")",
"cdata",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"cdata",
")",
"btime",
"=",
"ctypes",
".",
"c_double",
"(",
"btime",
")",
"libspice",
".",
"spkw02_c",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"intlen",
",",
"n",
",",
"polydg",
",",
"cdata",
",",
"btime",
")"
] |
Write a type 2 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw02_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param intlen: Length of time covered by logical record.
:type intlen: float
:param n: Number of coefficient sets.
:type n: int
:param polydg: Chebyshev polynomial degree.
:type polydg: int
:param cdata: Array of Chebyshev coefficients.
:type cdata: Array of floats
:param btime: Begin time of first logical record.
:type btime: float
|
[
"Write",
"a",
"type",
"2",
"segment",
"to",
"an",
"SPK",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12409-L12454
|
14,913
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkw05
|
def spkw05(handle, body, center, inframe, first, last, segid, gm, n, states,
epochs):
# see libspice args for solution to array[][N] problem
"""
Write an SPK segment of type 5 given a time-ordered set of
discrete states and epochs, and the gravitational parameter
of a central body.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw05_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param gm: Gravitational parameter of central body.
:type gm: float
:param n: Number of states and epochs.
:type n: int
:param states: States.
:type states: Nx6-Element Array of floats
:param epochs: Epochs.
:type epochs: Array of floats
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
gm = ctypes.c_double(gm)
n = ctypes.c_int(n)
states = stypes.toDoubleMatrix(states)
epochs = stypes.toDoubleVector(epochs)
libspice.spkw05_c(handle, body, center, inframe, first, last, segid, gm, n,
states, epochs)
|
python
|
def spkw05(handle, body, center, inframe, first, last, segid, gm, n, states,
epochs):
# see libspice args for solution to array[][N] problem
"""
Write an SPK segment of type 5 given a time-ordered set of
discrete states and epochs, and the gravitational parameter
of a central body.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw05_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param gm: Gravitational parameter of central body.
:type gm: float
:param n: Number of states and epochs.
:type n: int
:param states: States.
:type states: Nx6-Element Array of floats
:param epochs: Epochs.
:type epochs: Array of floats
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
gm = ctypes.c_double(gm)
n = ctypes.c_int(n)
states = stypes.toDoubleMatrix(states)
epochs = stypes.toDoubleVector(epochs)
libspice.spkw05_c(handle, body, center, inframe, first, last, segid, gm, n,
states, epochs)
|
[
"def",
"spkw05",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"gm",
",",
"n",
",",
"states",
",",
"epochs",
")",
":",
"# see libspice args for solution to array[][N] problem",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"inframe",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inframe",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"segid",
"=",
"stypes",
".",
"stringToCharP",
"(",
"segid",
")",
"gm",
"=",
"ctypes",
".",
"c_double",
"(",
"gm",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"states",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"states",
")",
"epochs",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"epochs",
")",
"libspice",
".",
"spkw05_c",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"gm",
",",
"n",
",",
"states",
",",
"epochs",
")"
] |
Write an SPK segment of type 5 given a time-ordered set of
discrete states and epochs, and the gravitational parameter
of a central body.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw05_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param gm: Gravitational parameter of central body.
:type gm: float
:param n: Number of states and epochs.
:type n: int
:param states: States.
:type states: Nx6-Element Array of floats
:param epochs: Epochs.
:type epochs: Array of floats
|
[
"Write",
"an",
"SPK",
"segment",
"of",
"type",
"5",
"given",
"a",
"time",
"-",
"ordered",
"set",
"of",
"discrete",
"states",
"and",
"epochs",
"and",
"the",
"gravitational",
"parameter",
"of",
"a",
"central",
"body",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12507-L12552
|
14,914
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkw08
|
def spkw08(handle, body, center, inframe, first, last, segid, degree, n, states,
epoch1, step):
# see libspice args for solution to array[][N] problem
"""
Write a type 8 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw08_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: NAIF code for an ephemeris object.
:type body: int
:param center: NAIF code for center of motion of "body".
:type center: int
:param inframe: Reference frame name.
:type inframe: str
:param first: Start time of interval covered by segment.
:type first: float
:param last: End time of interval covered by segment.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param n: Number of states.
:type n: int
:param states: Array of states.
:type states: Nx6-Element Array of floats
:param epoch1: Epoch of first state in states array.
:type epoch1: float
:param step: Time step separating epochs of states.
:type step: float
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
degree = ctypes.c_int(degree)
n = ctypes.c_int(n)
states = stypes.toDoubleMatrix(states) # X by 6 array
epoch1 = ctypes.c_double(epoch1)
step = ctypes.c_double(step)
libspice.spkw08_c(handle, body, center, inframe, first, last, segid, degree,
n, states, epoch1, step)
|
python
|
def spkw08(handle, body, center, inframe, first, last, segid, degree, n, states,
epoch1, step):
# see libspice args for solution to array[][N] problem
"""
Write a type 8 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw08_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: NAIF code for an ephemeris object.
:type body: int
:param center: NAIF code for center of motion of "body".
:type center: int
:param inframe: Reference frame name.
:type inframe: str
:param first: Start time of interval covered by segment.
:type first: float
:param last: End time of interval covered by segment.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param n: Number of states.
:type n: int
:param states: Array of states.
:type states: Nx6-Element Array of floats
:param epoch1: Epoch of first state in states array.
:type epoch1: float
:param step: Time step separating epochs of states.
:type step: float
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
degree = ctypes.c_int(degree)
n = ctypes.c_int(n)
states = stypes.toDoubleMatrix(states) # X by 6 array
epoch1 = ctypes.c_double(epoch1)
step = ctypes.c_double(step)
libspice.spkw08_c(handle, body, center, inframe, first, last, segid, degree,
n, states, epoch1, step)
|
[
"def",
"spkw08",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"degree",
",",
"n",
",",
"states",
",",
"epoch1",
",",
"step",
")",
":",
"# see libspice args for solution to array[][N] problem",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"inframe",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inframe",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"segid",
"=",
"stypes",
".",
"stringToCharP",
"(",
"segid",
")",
"degree",
"=",
"ctypes",
".",
"c_int",
"(",
"degree",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"states",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"states",
")",
"# X by 6 array",
"epoch1",
"=",
"ctypes",
".",
"c_double",
"(",
"epoch1",
")",
"step",
"=",
"ctypes",
".",
"c_double",
"(",
"step",
")",
"libspice",
".",
"spkw08_c",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"degree",
",",
"n",
",",
"states",
",",
"epoch1",
",",
"step",
")"
] |
Write a type 8 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw08_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: NAIF code for an ephemeris object.
:type body: int
:param center: NAIF code for center of motion of "body".
:type center: int
:param inframe: Reference frame name.
:type inframe: str
:param first: Start time of interval covered by segment.
:type first: float
:param last: End time of interval covered by segment.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param n: Number of states.
:type n: int
:param states: Array of states.
:type states: Nx6-Element Array of floats
:param epoch1: Epoch of first state in states array.
:type epoch1: float
:param step: Time step separating epochs of states.
:type step: float
|
[
"Write",
"a",
"type",
"8",
"segment",
"to",
"an",
"SPK",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12556-L12602
|
14,915
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkw09
|
def spkw09(handle, body, center, inframe, first, last, segid, degree, n, states,
epochs):
"""
Write a type 9 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw09_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: NAIF code for an ephemeris object.
:type body: int
:param center: NAIF code for center of motion of "body".
:type center: int
:param inframe: Reference frame name.
:type inframe: str
:param first: Start time of interval covered by segment.
:type first: float
:param last: End time of interval covered by segment.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param n: Number of states.
:type n: int
:param states: Array of states.
:type states: Nx6-Element Array of floats
:param epochs: Array of epochs corresponding to states.
:type epochs: Array of floats
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
degree = ctypes.c_int(degree)
n = ctypes.c_int(n)
states = stypes.toDoubleMatrix(states) # X by 6 array
epochs = stypes.toDoubleVector(epochs)
libspice.spkw09_c(handle, body, center, inframe, first, last, segid, degree,
n, states, epochs)
|
python
|
def spkw09(handle, body, center, inframe, first, last, segid, degree, n, states,
epochs):
"""
Write a type 9 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw09_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: NAIF code for an ephemeris object.
:type body: int
:param center: NAIF code for center of motion of "body".
:type center: int
:param inframe: Reference frame name.
:type inframe: str
:param first: Start time of interval covered by segment.
:type first: float
:param last: End time of interval covered by segment.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param n: Number of states.
:type n: int
:param states: Array of states.
:type states: Nx6-Element Array of floats
:param epochs: Array of epochs corresponding to states.
:type epochs: Array of floats
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
degree = ctypes.c_int(degree)
n = ctypes.c_int(n)
states = stypes.toDoubleMatrix(states) # X by 6 array
epochs = stypes.toDoubleVector(epochs)
libspice.spkw09_c(handle, body, center, inframe, first, last, segid, degree,
n, states, epochs)
|
[
"def",
"spkw09",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"degree",
",",
"n",
",",
"states",
",",
"epochs",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"inframe",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inframe",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"segid",
"=",
"stypes",
".",
"stringToCharP",
"(",
"segid",
")",
"degree",
"=",
"ctypes",
".",
"c_int",
"(",
"degree",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"states",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"states",
")",
"# X by 6 array",
"epochs",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"epochs",
")",
"libspice",
".",
"spkw09_c",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"degree",
",",
"n",
",",
"states",
",",
"epochs",
")"
] |
Write a type 9 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw09_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: NAIF code for an ephemeris object.
:type body: int
:param center: NAIF code for center of motion of "body".
:type center: int
:param inframe: Reference frame name.
:type inframe: str
:param first: Start time of interval covered by segment.
:type first: float
:param last: End time of interval covered by segment.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param n: Number of states.
:type n: int
:param states: Array of states.
:type states: Nx6-Element Array of floats
:param epochs: Array of epochs corresponding to states.
:type epochs: Array of floats
|
[
"Write",
"a",
"type",
"9",
"segment",
"to",
"an",
"SPK",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12606-L12648
|
14,916
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkw10
|
def spkw10(handle, body, center, inframe, first, last, segid, consts, n, elems,
epochs):
"""
Write an SPK type 10 segment to the DAF open and attached to
the input handle.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw10_c.html
:param handle: The handle of a DAF file open for writing.
:type handle: int
:param body: The NAIF ID code for the body of the segment.
:type body: int
:param center: The center of motion for body.
:type center: int
:param inframe: The reference frame for this segment.
:type inframe: str
:param first: The first epoch for which the segment is valid.
:type first: float
:param last: The last epoch for which the segment is valid.
:type last: float
:param segid: The string to use for segment identifier.
:type segid: str
:param consts: The array of geophysical constants for the segment.
:type consts: 8-Element Array of floats
:param n: The number of element/epoch pairs to be stored.
:type n: int
:param elems: The collection of "two-line" element sets.
:type elems: Array of floats
:param epochs: The epochs associated with the element sets.
:type epochs: Array of floats
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
consts = stypes.toDoubleVector(consts)
n = ctypes.c_int(n)
elems = stypes.toDoubleVector(elems)
epochs = stypes.toDoubleVector(epochs)
libspice.spkw10_c(handle, body, center, inframe, first, last, segid, consts,
n, elems, epochs)
|
python
|
def spkw10(handle, body, center, inframe, first, last, segid, consts, n, elems,
epochs):
"""
Write an SPK type 10 segment to the DAF open and attached to
the input handle.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw10_c.html
:param handle: The handle of a DAF file open for writing.
:type handle: int
:param body: The NAIF ID code for the body of the segment.
:type body: int
:param center: The center of motion for body.
:type center: int
:param inframe: The reference frame for this segment.
:type inframe: str
:param first: The first epoch for which the segment is valid.
:type first: float
:param last: The last epoch for which the segment is valid.
:type last: float
:param segid: The string to use for segment identifier.
:type segid: str
:param consts: The array of geophysical constants for the segment.
:type consts: 8-Element Array of floats
:param n: The number of element/epoch pairs to be stored.
:type n: int
:param elems: The collection of "two-line" element sets.
:type elems: Array of floats
:param epochs: The epochs associated with the element sets.
:type epochs: Array of floats
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
consts = stypes.toDoubleVector(consts)
n = ctypes.c_int(n)
elems = stypes.toDoubleVector(elems)
epochs = stypes.toDoubleVector(epochs)
libspice.spkw10_c(handle, body, center, inframe, first, last, segid, consts,
n, elems, epochs)
|
[
"def",
"spkw10",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"consts",
",",
"n",
",",
"elems",
",",
"epochs",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"inframe",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inframe",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"segid",
"=",
"stypes",
".",
"stringToCharP",
"(",
"segid",
")",
"consts",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"consts",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"elems",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"elems",
")",
"epochs",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"epochs",
")",
"libspice",
".",
"spkw10_c",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"consts",
",",
"n",
",",
"elems",
",",
"epochs",
")"
] |
Write an SPK type 10 segment to the DAF open and attached to
the input handle.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw10_c.html
:param handle: The handle of a DAF file open for writing.
:type handle: int
:param body: The NAIF ID code for the body of the segment.
:type body: int
:param center: The center of motion for body.
:type center: int
:param inframe: The reference frame for this segment.
:type inframe: str
:param first: The first epoch for which the segment is valid.
:type first: float
:param last: The last epoch for which the segment is valid.
:type last: float
:param segid: The string to use for segment identifier.
:type segid: str
:param consts: The array of geophysical constants for the segment.
:type consts: 8-Element Array of floats
:param n: The number of element/epoch pairs to be stored.
:type n: int
:param elems: The collection of "two-line" element sets.
:type elems: Array of floats
:param epochs: The epochs associated with the element sets.
:type epochs: Array of floats
|
[
"Write",
"an",
"SPK",
"type",
"10",
"segment",
"to",
"the",
"DAF",
"open",
"and",
"attached",
"to",
"the",
"input",
"handle",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12652-L12695
|
14,917
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkw12
|
def spkw12(handle, body, center, inframe, first, last, segid, degree, n, states,
epoch0, step):
"""
Write a type 12 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw12_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: NAIF code for an ephemeris object.
:type body: int
:param center: NAIF code for center of motion of body.
:type center: int
:param inframe: Reference frame name.
:type inframe: str
:param first: Start time of interval covered by segment.
:type first: float
:param last: End time of interval covered by segment.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param n: Number of states.
:type n: int
:param states: Array of states.
:type states: Nx6-Element Array of floats
:param epoch0: Epoch of first state in states array.
:type epoch0: float
:param step: Time step separating epochs of states.
:type step: float
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
degree = ctypes.c_int(degree)
n = ctypes.c_int(n)
states = stypes.toDoubleMatrix(states) # X by 6 array
epoch0 = ctypes.c_double(epoch0)
step = ctypes.c_double(step)
libspice.spkw12_c(handle, body, center, inframe, first, last, segid, degree,
n, states, epoch0, step)
|
python
|
def spkw12(handle, body, center, inframe, first, last, segid, degree, n, states,
epoch0, step):
"""
Write a type 12 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw12_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: NAIF code for an ephemeris object.
:type body: int
:param center: NAIF code for center of motion of body.
:type center: int
:param inframe: Reference frame name.
:type inframe: str
:param first: Start time of interval covered by segment.
:type first: float
:param last: End time of interval covered by segment.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param n: Number of states.
:type n: int
:param states: Array of states.
:type states: Nx6-Element Array of floats
:param epoch0: Epoch of first state in states array.
:type epoch0: float
:param step: Time step separating epochs of states.
:type step: float
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
degree = ctypes.c_int(degree)
n = ctypes.c_int(n)
states = stypes.toDoubleMatrix(states) # X by 6 array
epoch0 = ctypes.c_double(epoch0)
step = ctypes.c_double(step)
libspice.spkw12_c(handle, body, center, inframe, first, last, segid, degree,
n, states, epoch0, step)
|
[
"def",
"spkw12",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"degree",
",",
"n",
",",
"states",
",",
"epoch0",
",",
"step",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"inframe",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inframe",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"segid",
"=",
"stypes",
".",
"stringToCharP",
"(",
"segid",
")",
"degree",
"=",
"ctypes",
".",
"c_int",
"(",
"degree",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"states",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"states",
")",
"# X by 6 array",
"epoch0",
"=",
"ctypes",
".",
"c_double",
"(",
"epoch0",
")",
"step",
"=",
"ctypes",
".",
"c_double",
"(",
"step",
")",
"libspice",
".",
"spkw12_c",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"degree",
",",
"n",
",",
"states",
",",
"epoch0",
",",
"step",
")"
] |
Write a type 12 segment to an SPK file.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw12_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: NAIF code for an ephemeris object.
:type body: int
:param center: NAIF code for center of motion of body.
:type center: int
:param inframe: Reference frame name.
:type inframe: str
:param first: Start time of interval covered by segment.
:type first: float
:param last: End time of interval covered by segment.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param n: Number of states.
:type n: int
:param states: Array of states.
:type states: Nx6-Element Array of floats
:param epoch0: Epoch of first state in states array.
:type epoch0: float
:param step: Time step separating epochs of states.
:type step: float
|
[
"Write",
"a",
"type",
"12",
"segment",
"to",
"an",
"SPK",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12699-L12744
|
14,918
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkw15
|
def spkw15(handle, body, center, inframe, first, last, segid, epoch, tp, pa, p,
ecc, j2flg, pv, gm, j2, radius):
"""
Write an SPK segment of type 15 given a type 15 data record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw15_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param epoch: Epoch of the periapse.
:type epoch: float
:param tp: Trajectory pole vector.
:type tp: 3-Element Array of floats
:param pa: Periapsis vector.
:type pa: 3-Element Array of floats
:param p: Semi-latus rectum.
:type p: float
:param ecc: Eccentricity.
:type ecc: float
:param j2flg: J2 processing flag.
:type j2flg: float
:param pv: Central body pole vector.
:type pv: 3-Element Array of floats
:param gm: Central body GM.
:type gm: float
:param j2: Central body J2.
:type j2: float
:param radius: Equatorial radius of central body.
:type radius: float
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
epoch = ctypes.c_double(epoch)
tp = stypes.toDoubleVector(tp)
pa = stypes.toDoubleVector(pa)
p = ctypes.c_double(p)
ecc = ctypes.c_double(ecc)
j2flg = ctypes.c_double(j2flg)
pv = stypes.toDoubleVector(pv)
gm = ctypes.c_double(gm)
j2 = ctypes.c_double(j2)
radius = ctypes.c_double(radius)
libspice.spkw15_c(handle, body, center, inframe, first, last, segid, epoch,
tp, pa, p, ecc, j2flg, pv, gm, j2, radius)
|
python
|
def spkw15(handle, body, center, inframe, first, last, segid, epoch, tp, pa, p,
ecc, j2flg, pv, gm, j2, radius):
"""
Write an SPK segment of type 15 given a type 15 data record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw15_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param epoch: Epoch of the periapse.
:type epoch: float
:param tp: Trajectory pole vector.
:type tp: 3-Element Array of floats
:param pa: Periapsis vector.
:type pa: 3-Element Array of floats
:param p: Semi-latus rectum.
:type p: float
:param ecc: Eccentricity.
:type ecc: float
:param j2flg: J2 processing flag.
:type j2flg: float
:param pv: Central body pole vector.
:type pv: 3-Element Array of floats
:param gm: Central body GM.
:type gm: float
:param j2: Central body J2.
:type j2: float
:param radius: Equatorial radius of central body.
:type radius: float
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
epoch = ctypes.c_double(epoch)
tp = stypes.toDoubleVector(tp)
pa = stypes.toDoubleVector(pa)
p = ctypes.c_double(p)
ecc = ctypes.c_double(ecc)
j2flg = ctypes.c_double(j2flg)
pv = stypes.toDoubleVector(pv)
gm = ctypes.c_double(gm)
j2 = ctypes.c_double(j2)
radius = ctypes.c_double(radius)
libspice.spkw15_c(handle, body, center, inframe, first, last, segid, epoch,
tp, pa, p, ecc, j2flg, pv, gm, j2, radius)
|
[
"def",
"spkw15",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"epoch",
",",
"tp",
",",
"pa",
",",
"p",
",",
"ecc",
",",
"j2flg",
",",
"pv",
",",
"gm",
",",
"j2",
",",
"radius",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"inframe",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inframe",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"segid",
"=",
"stypes",
".",
"stringToCharP",
"(",
"segid",
")",
"epoch",
"=",
"ctypes",
".",
"c_double",
"(",
"epoch",
")",
"tp",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"tp",
")",
"pa",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"pa",
")",
"p",
"=",
"ctypes",
".",
"c_double",
"(",
"p",
")",
"ecc",
"=",
"ctypes",
".",
"c_double",
"(",
"ecc",
")",
"j2flg",
"=",
"ctypes",
".",
"c_double",
"(",
"j2flg",
")",
"pv",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"pv",
")",
"gm",
"=",
"ctypes",
".",
"c_double",
"(",
"gm",
")",
"j2",
"=",
"ctypes",
".",
"c_double",
"(",
"j2",
")",
"radius",
"=",
"ctypes",
".",
"c_double",
"(",
"radius",
")",
"libspice",
".",
"spkw15_c",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"epoch",
",",
"tp",
",",
"pa",
",",
"p",
",",
"ecc",
",",
"j2flg",
",",
"pv",
",",
"gm",
",",
"j2",
",",
"radius",
")"
] |
Write an SPK segment of type 15 given a type 15 data record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw15_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param epoch: Epoch of the periapse.
:type epoch: float
:param tp: Trajectory pole vector.
:type tp: 3-Element Array of floats
:param pa: Periapsis vector.
:type pa: 3-Element Array of floats
:param p: Semi-latus rectum.
:type p: float
:param ecc: Eccentricity.
:type ecc: float
:param j2flg: J2 processing flag.
:type j2flg: float
:param pv: Central body pole vector.
:type pv: 3-Element Array of floats
:param gm: Central body GM.
:type gm: float
:param j2: Central body J2.
:type j2: float
:param radius: Equatorial radius of central body.
:type radius: float
|
[
"Write",
"an",
"SPK",
"segment",
"of",
"type",
"15",
"given",
"a",
"type",
"15",
"data",
"record",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12794-L12854
|
14,919
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkw17
|
def spkw17(handle, body, center, inframe, first, last, segid, epoch, eqel,
rapol, decpol):
"""
Write an SPK segment of type 17 given a type 17 data record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw17_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param epoch: Epoch of elements in seconds past J2000.
:type epoch: float
:param eqel: Array of equinoctial elements.
:type eqel: 9-Element Array of floats
:param rapol: Right Ascension of the pole of the reference plane.
:type rapol: float
:param decpol: Declination of the pole of the reference plane.
:type decpol: float
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
epoch = ctypes.c_double(epoch)
eqel = stypes.toDoubleVector(eqel)
rapol = ctypes.c_double(rapol)
decpol = ctypes.c_double(decpol)
libspice.spkw17_c(handle, body, center, inframe, first, last, segid, epoch,
eqel, rapol, decpol)
|
python
|
def spkw17(handle, body, center, inframe, first, last, segid, epoch, eqel,
rapol, decpol):
"""
Write an SPK segment of type 17 given a type 17 data record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw17_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param epoch: Epoch of elements in seconds past J2000.
:type epoch: float
:param eqel: Array of equinoctial elements.
:type eqel: 9-Element Array of floats
:param rapol: Right Ascension of the pole of the reference plane.
:type rapol: float
:param decpol: Declination of the pole of the reference plane.
:type decpol: float
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
epoch = ctypes.c_double(epoch)
eqel = stypes.toDoubleVector(eqel)
rapol = ctypes.c_double(rapol)
decpol = ctypes.c_double(decpol)
libspice.spkw17_c(handle, body, center, inframe, first, last, segid, epoch,
eqel, rapol, decpol)
|
[
"def",
"spkw17",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"epoch",
",",
"eqel",
",",
"rapol",
",",
"decpol",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"inframe",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inframe",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"segid",
"=",
"stypes",
".",
"stringToCharP",
"(",
"segid",
")",
"epoch",
"=",
"ctypes",
".",
"c_double",
"(",
"epoch",
")",
"eqel",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"eqel",
")",
"rapol",
"=",
"ctypes",
".",
"c_double",
"(",
"rapol",
")",
"decpol",
"=",
"ctypes",
".",
"c_double",
"(",
"decpol",
")",
"libspice",
".",
"spkw17_c",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"epoch",
",",
"eqel",
",",
"rapol",
",",
"decpol",
")"
] |
Write an SPK segment of type 17 given a type 17 data record.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw17_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param epoch: Epoch of elements in seconds past J2000.
:type epoch: float
:param eqel: Array of equinoctial elements.
:type eqel: 9-Element Array of floats
:param rapol: Right Ascension of the pole of the reference plane.
:type rapol: float
:param decpol: Declination of the pole of the reference plane.
:type decpol: float
|
[
"Write",
"an",
"SPK",
"segment",
"of",
"type",
"17",
"given",
"a",
"type",
"17",
"data",
"record",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12858-L12900
|
14,920
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkw18
|
def spkw18(handle, subtyp, body, center, inframe, first, last, segid, degree, packts, epochs):
"""
Write a type 18 segment to an SPK file.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw18_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param subtyp: SPK type 18 subtype code.
:type subtyp: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param packts: data packets
:type packts: 2D Array of floats
:param epochs: Array of epochs corresponding to states.
:type epochs: N-Element Array of floats
"""
handle = ctypes.c_int(handle)
subtyp = ctypes.c_int(subtyp)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
degree = ctypes.c_int(degree)
n = ctypes.c_int(len(packts))
packts = stypes.toDoubleMatrix(packts)
epochs = stypes.toDoubleVector(epochs)
libspice.spkw18_c(handle, subtyp, body, center, inframe, first, last, segid, degree, n, packts, epochs)
|
python
|
def spkw18(handle, subtyp, body, center, inframe, first, last, segid, degree, packts, epochs):
"""
Write a type 18 segment to an SPK file.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw18_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param subtyp: SPK type 18 subtype code.
:type subtyp: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param packts: data packets
:type packts: 2D Array of floats
:param epochs: Array of epochs corresponding to states.
:type epochs: N-Element Array of floats
"""
handle = ctypes.c_int(handle)
subtyp = ctypes.c_int(subtyp)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
degree = ctypes.c_int(degree)
n = ctypes.c_int(len(packts))
packts = stypes.toDoubleMatrix(packts)
epochs = stypes.toDoubleVector(epochs)
libspice.spkw18_c(handle, subtyp, body, center, inframe, first, last, segid, degree, n, packts, epochs)
|
[
"def",
"spkw18",
"(",
"handle",
",",
"subtyp",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"degree",
",",
"packts",
",",
"epochs",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"subtyp",
"=",
"ctypes",
".",
"c_int",
"(",
"subtyp",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"inframe",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inframe",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"segid",
"=",
"stypes",
".",
"stringToCharP",
"(",
"segid",
")",
"degree",
"=",
"ctypes",
".",
"c_int",
"(",
"degree",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"len",
"(",
"packts",
")",
")",
"packts",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"packts",
")",
"epochs",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"epochs",
")",
"libspice",
".",
"spkw18_c",
"(",
"handle",
",",
"subtyp",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"degree",
",",
"n",
",",
"packts",
",",
"epochs",
")"
] |
Write a type 18 segment to an SPK file.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw18_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param subtyp: SPK type 18 subtype code.
:type subtyp: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param degree: Degree of interpolating polynomials.
:type degree: int
:param packts: data packets
:type packts: 2D Array of floats
:param epochs: Array of epochs corresponding to states.
:type epochs: N-Element Array of floats
|
[
"Write",
"a",
"type",
"18",
"segment",
"to",
"an",
"SPK",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12904-L12945
|
14,921
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
spkw20
|
def spkw20(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, dscale, tscale, initjd, initfr):
"""
Write a type 20 segment to an SPK file.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw20_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param intlen: Length of time covered by logical record (days).
:param n: Number of logical records in segment.
:param polydg: Chebyshev polynomial degree.
:param cdata: Array of Chebyshev coefficients and positions.
:param dscale: Distance scale of data.
:param tscale: Time scale of data.
:param initjd: Integer part of begin time (TDB Julian date) of first record.
:param initfr: Fractional part of begin time (TDB Julian date) of first record.
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
intlen = ctypes.c_double(intlen)
n = ctypes.c_int(n)
polydg = ctypes.c_int(polydg)
cdata = stypes.toDoubleVector(cdata)
dscale = ctypes.c_double(dscale)
tscale = ctypes.c_double(tscale)
initjd = ctypes.c_double(initjd)
initfr = ctypes.c_double(initfr)
libspice.spkw20_c(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, dscale, tscale, initjd, initfr)
|
python
|
def spkw20(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, dscale, tscale, initjd, initfr):
"""
Write a type 20 segment to an SPK file.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw20_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param intlen: Length of time covered by logical record (days).
:param n: Number of logical records in segment.
:param polydg: Chebyshev polynomial degree.
:param cdata: Array of Chebyshev coefficients and positions.
:param dscale: Distance scale of data.
:param tscale: Time scale of data.
:param initjd: Integer part of begin time (TDB Julian date) of first record.
:param initfr: Fractional part of begin time (TDB Julian date) of first record.
"""
handle = ctypes.c_int(handle)
body = ctypes.c_int(body)
center = ctypes.c_int(center)
inframe = stypes.stringToCharP(inframe)
first = ctypes.c_double(first)
last = ctypes.c_double(last)
segid = stypes.stringToCharP(segid)
intlen = ctypes.c_double(intlen)
n = ctypes.c_int(n)
polydg = ctypes.c_int(polydg)
cdata = stypes.toDoubleVector(cdata)
dscale = ctypes.c_double(dscale)
tscale = ctypes.c_double(tscale)
initjd = ctypes.c_double(initjd)
initfr = ctypes.c_double(initfr)
libspice.spkw20_c(handle, body, center, inframe, first, last, segid, intlen, n, polydg, cdata, dscale, tscale, initjd, initfr)
|
[
"def",
"spkw20",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"intlen",
",",
"n",
",",
"polydg",
",",
"cdata",
",",
"dscale",
",",
"tscale",
",",
"initjd",
",",
"initfr",
")",
":",
"handle",
"=",
"ctypes",
".",
"c_int",
"(",
"handle",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"center",
"=",
"ctypes",
".",
"c_int",
"(",
"center",
")",
"inframe",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inframe",
")",
"first",
"=",
"ctypes",
".",
"c_double",
"(",
"first",
")",
"last",
"=",
"ctypes",
".",
"c_double",
"(",
"last",
")",
"segid",
"=",
"stypes",
".",
"stringToCharP",
"(",
"segid",
")",
"intlen",
"=",
"ctypes",
".",
"c_double",
"(",
"intlen",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"polydg",
"=",
"ctypes",
".",
"c_int",
"(",
"polydg",
")",
"cdata",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"cdata",
")",
"dscale",
"=",
"ctypes",
".",
"c_double",
"(",
"dscale",
")",
"tscale",
"=",
"ctypes",
".",
"c_double",
"(",
"tscale",
")",
"initjd",
"=",
"ctypes",
".",
"c_double",
"(",
"initjd",
")",
"initfr",
"=",
"ctypes",
".",
"c_double",
"(",
"initfr",
")",
"libspice",
".",
"spkw20_c",
"(",
"handle",
",",
"body",
",",
"center",
",",
"inframe",
",",
"first",
",",
"last",
",",
"segid",
",",
"intlen",
",",
"n",
",",
"polydg",
",",
"cdata",
",",
"dscale",
",",
"tscale",
",",
"initjd",
",",
"initfr",
")"
] |
Write a type 20 segment to an SPK file.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkw20_c.html
:param handle: Handle of an SPK file open for writing.
:type handle: int
:param body: Body code for ephemeris object.
:type body: int
:param center: Body code for the center of motion of the body.
:type center: int
:param inframe: The reference frame of the states.
:type inframe: str
:param first: First valid time for which states can be computed.
:type first: float
:param last: Last valid time for which states can be computed.
:type last: float
:param segid: Segment identifier.
:type segid: str
:param intlen: Length of time covered by logical record (days).
:param n: Number of logical records in segment.
:param polydg: Chebyshev polynomial degree.
:param cdata: Array of Chebyshev coefficients and positions.
:param dscale: Distance scale of data.
:param tscale: Time scale of data.
:param initjd: Integer part of begin time (TDB Julian date) of first record.
:param initfr: Fractional part of begin time (TDB Julian date) of first record.
|
[
"Write",
"a",
"type",
"20",
"segment",
"to",
"an",
"SPK",
"file",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L12949-L12993
|
14,922
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
srfrec
|
def srfrec(body, longitude, latitude):
"""
Convert planetocentric latitude and longitude of a surface
point on a specified body to rectangular coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/srfrec_c.html
:param body: NAIF integer code of an extended body.
:type body: int
:param longitude: Longitude of point in radians.
:type longitude: float
:param latitude: Latitude of point in radians.
:type latitude: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
"""
body = ctypes.c_int(body)
longitude = ctypes.c_double(longitude)
latitude = ctypes.c_double(latitude)
rectan = stypes.emptyDoubleVector(3)
libspice.srfrec_c(body, longitude, latitude, rectan)
return stypes.cVectorToPython(rectan)
|
python
|
def srfrec(body, longitude, latitude):
"""
Convert planetocentric latitude and longitude of a surface
point on a specified body to rectangular coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/srfrec_c.html
:param body: NAIF integer code of an extended body.
:type body: int
:param longitude: Longitude of point in radians.
:type longitude: float
:param latitude: Latitude of point in radians.
:type latitude: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
"""
body = ctypes.c_int(body)
longitude = ctypes.c_double(longitude)
latitude = ctypes.c_double(latitude)
rectan = stypes.emptyDoubleVector(3)
libspice.srfrec_c(body, longitude, latitude, rectan)
return stypes.cVectorToPython(rectan)
|
[
"def",
"srfrec",
"(",
"body",
",",
"longitude",
",",
"latitude",
")",
":",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"longitude",
"=",
"ctypes",
".",
"c_double",
"(",
"longitude",
")",
"latitude",
"=",
"ctypes",
".",
"c_double",
"(",
"latitude",
")",
"rectan",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"srfrec_c",
"(",
"body",
",",
"longitude",
",",
"latitude",
",",
"rectan",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"rectan",
")"
] |
Convert planetocentric latitude and longitude of a surface
point on a specified body to rectangular coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/srfrec_c.html
:param body: NAIF integer code of an extended body.
:type body: int
:param longitude: Longitude of point in radians.
:type longitude: float
:param latitude: Latitude of point in radians.
:type latitude: float
:return: Rectangular coordinates of the point.
:rtype: 3-Element Array of floats
|
[
"Convert",
"planetocentric",
"latitude",
"and",
"longitude",
"of",
"a",
"surface",
"point",
"on",
"a",
"specified",
"body",
"to",
"rectangular",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13090-L13111
|
14,923
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
stelab
|
def stelab(pobj, vobs):
"""
Correct the apparent position of an object for stellar
aberration.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stelab_c.html
:param pobj: Position of an object with respect to the observer.
:type pobj: 3-Element Array of floats
:param vobs:
Velocity of the observer with respect
to the Solar System barycenter.
:type vobs: 3-Element Array of floats
:return:
Apparent position of the object with respect to
the observer, corrected for stellar aberration.
:rtype: 3-Element Array of floats
"""
pobj = stypes.toDoubleVector(pobj)
vobs = stypes.toDoubleVector(vobs)
appobj = stypes.emptyDoubleVector(3)
libspice.stelab_c(pobj, vobs, appobj)
return stypes.cVectorToPython(appobj)
|
python
|
def stelab(pobj, vobs):
"""
Correct the apparent position of an object for stellar
aberration.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stelab_c.html
:param pobj: Position of an object with respect to the observer.
:type pobj: 3-Element Array of floats
:param vobs:
Velocity of the observer with respect
to the Solar System barycenter.
:type vobs: 3-Element Array of floats
:return:
Apparent position of the object with respect to
the observer, corrected for stellar aberration.
:rtype: 3-Element Array of floats
"""
pobj = stypes.toDoubleVector(pobj)
vobs = stypes.toDoubleVector(vobs)
appobj = stypes.emptyDoubleVector(3)
libspice.stelab_c(pobj, vobs, appobj)
return stypes.cVectorToPython(appobj)
|
[
"def",
"stelab",
"(",
"pobj",
",",
"vobs",
")",
":",
"pobj",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"pobj",
")",
"vobs",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"vobs",
")",
"appobj",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"stelab_c",
"(",
"pobj",
",",
"vobs",
",",
"appobj",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"appobj",
")"
] |
Correct the apparent position of an object for stellar
aberration.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stelab_c.html
:param pobj: Position of an object with respect to the observer.
:type pobj: 3-Element Array of floats
:param vobs:
Velocity of the observer with respect
to the Solar System barycenter.
:type vobs: 3-Element Array of floats
:return:
Apparent position of the object with respect to
the observer, corrected for stellar aberration.
:rtype: 3-Element Array of floats
|
[
"Correct",
"the",
"apparent",
"position",
"of",
"an",
"object",
"for",
"stellar",
"aberration",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13255-L13277
|
14,924
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
stpool
|
def stpool(item, nth, contin, lenout=_default_len_out):
"""
Retrieve the nth string from the kernel pool variable, where the
string may be continued across several components of the kernel pool
variable.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stpool_c.html
:param item: Name of the kernel pool variable.
:type item: str
:param nth: Index of the full string to retrieve.
:type nth: int
:param contin: Character sequence used to indicate continuation.
:type contin: str
:param lenout: Available space in output string.
:type lenout: int
:return:
A full string concatenated across continuations,
The number of characters in the full string value.
:rtype: tuple
"""
item = stypes.stringToCharP(item)
contin = stypes.stringToCharP(contin)
nth = ctypes.c_int(nth)
strout = stypes.stringToCharP(lenout)
lenout = ctypes.c_int(lenout)
found = ctypes.c_int()
sizet = ctypes.c_int()
libspice.stpool_c(item, nth, contin, lenout, strout, ctypes.byref(sizet),
ctypes.byref(found))
return stypes.toPythonString(strout), sizet.value, bool(found.value)
|
python
|
def stpool(item, nth, contin, lenout=_default_len_out):
"""
Retrieve the nth string from the kernel pool variable, where the
string may be continued across several components of the kernel pool
variable.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stpool_c.html
:param item: Name of the kernel pool variable.
:type item: str
:param nth: Index of the full string to retrieve.
:type nth: int
:param contin: Character sequence used to indicate continuation.
:type contin: str
:param lenout: Available space in output string.
:type lenout: int
:return:
A full string concatenated across continuations,
The number of characters in the full string value.
:rtype: tuple
"""
item = stypes.stringToCharP(item)
contin = stypes.stringToCharP(contin)
nth = ctypes.c_int(nth)
strout = stypes.stringToCharP(lenout)
lenout = ctypes.c_int(lenout)
found = ctypes.c_int()
sizet = ctypes.c_int()
libspice.stpool_c(item, nth, contin, lenout, strout, ctypes.byref(sizet),
ctypes.byref(found))
return stypes.toPythonString(strout), sizet.value, bool(found.value)
|
[
"def",
"stpool",
"(",
"item",
",",
"nth",
",",
"contin",
",",
"lenout",
"=",
"_default_len_out",
")",
":",
"item",
"=",
"stypes",
".",
"stringToCharP",
"(",
"item",
")",
"contin",
"=",
"stypes",
".",
"stringToCharP",
"(",
"contin",
")",
"nth",
"=",
"ctypes",
".",
"c_int",
"(",
"nth",
")",
"strout",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenout",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"found",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"sizet",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"stpool_c",
"(",
"item",
",",
"nth",
",",
"contin",
",",
"lenout",
",",
"strout",
",",
"ctypes",
".",
"byref",
"(",
"sizet",
")",
",",
"ctypes",
".",
"byref",
"(",
"found",
")",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"strout",
")",
",",
"sizet",
".",
"value",
",",
"bool",
"(",
"found",
".",
"value",
")"
] |
Retrieve the nth string from the kernel pool variable, where the
string may be continued across several components of the kernel pool
variable.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/stpool_c.html
:param item: Name of the kernel pool variable.
:type item: str
:param nth: Index of the full string to retrieve.
:type nth: int
:param contin: Character sequence used to indicate continuation.
:type contin: str
:param lenout: Available space in output string.
:type lenout: int
:return:
A full string concatenated across continuations,
The number of characters in the full string value.
:rtype: tuple
|
[
"Retrieve",
"the",
"nth",
"string",
"from",
"the",
"kernel",
"pool",
"variable",
"where",
"the",
"string",
"may",
"be",
"continued",
"across",
"several",
"components",
"of",
"the",
"kernel",
"pool",
"variable",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13282-L13312
|
14,925
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
str2et
|
def str2et(time):
"""
Convert a string representing an epoch to a double precision
value representing the number of TDB seconds past the J2000
epoch corresponding to the input epoch.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/str2et_c.html
:param time: A string representing an epoch.
:type time: str
:return: The equivalent value in seconds past J2000, TDB.
:rtype: float
"""
if isinstance(time, list):
return numpy.array([str2et(t) for t in time])
time = stypes.stringToCharP(time)
et = ctypes.c_double()
libspice.str2et_c(time, ctypes.byref(et))
return et.value
|
python
|
def str2et(time):
"""
Convert a string representing an epoch to a double precision
value representing the number of TDB seconds past the J2000
epoch corresponding to the input epoch.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/str2et_c.html
:param time: A string representing an epoch.
:type time: str
:return: The equivalent value in seconds past J2000, TDB.
:rtype: float
"""
if isinstance(time, list):
return numpy.array([str2et(t) for t in time])
time = stypes.stringToCharP(time)
et = ctypes.c_double()
libspice.str2et_c(time, ctypes.byref(et))
return et.value
|
[
"def",
"str2et",
"(",
"time",
")",
":",
"if",
"isinstance",
"(",
"time",
",",
"list",
")",
":",
"return",
"numpy",
".",
"array",
"(",
"[",
"str2et",
"(",
"t",
")",
"for",
"t",
"in",
"time",
"]",
")",
"time",
"=",
"stypes",
".",
"stringToCharP",
"(",
"time",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"str2et_c",
"(",
"time",
",",
"ctypes",
".",
"byref",
"(",
"et",
")",
")",
"return",
"et",
".",
"value"
] |
Convert a string representing an epoch to a double precision
value representing the number of TDB seconds past the J2000
epoch corresponding to the input epoch.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/str2et_c.html
:param time: A string representing an epoch.
:type time: str
:return: The equivalent value in seconds past J2000, TDB.
:rtype: float
|
[
"Convert",
"a",
"string",
"representing",
"an",
"epoch",
"to",
"a",
"double",
"precision",
"value",
"representing",
"the",
"number",
"of",
"TDB",
"seconds",
"past",
"the",
"J2000",
"epoch",
"corresponding",
"to",
"the",
"input",
"epoch",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13316-L13334
|
14,926
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
datetime2et
|
def datetime2et(dt):
"""
Converts a standard Python datetime to a double precision value
representing the number of TDB seconds past the J2000 epoch
corresponding to the input epoch.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/time.html#The%20J2000%20Epoch
:param dt: A standard Python datetime
:type time: datetime
:return: The equivalent value in seconds past J2000, TDB.
:rtype: float
"""
lt = ctypes.c_double()
if hasattr(dt, "__iter__"):
ets = []
for t in dt:
libspice.utc2et_c(stypes.stringToCharP(t.isoformat()),ctypes.byref(lt))
checkForSpiceError(None)
ets.append(lt.value)
return ets
dt = stypes.stringToCharP(dt.isoformat())
et = ctypes.c_double()
libspice.utc2et_c(dt, ctypes.byref(et))
return et.value
|
python
|
def datetime2et(dt):
"""
Converts a standard Python datetime to a double precision value
representing the number of TDB seconds past the J2000 epoch
corresponding to the input epoch.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/time.html#The%20J2000%20Epoch
:param dt: A standard Python datetime
:type time: datetime
:return: The equivalent value in seconds past J2000, TDB.
:rtype: float
"""
lt = ctypes.c_double()
if hasattr(dt, "__iter__"):
ets = []
for t in dt:
libspice.utc2et_c(stypes.stringToCharP(t.isoformat()),ctypes.byref(lt))
checkForSpiceError(None)
ets.append(lt.value)
return ets
dt = stypes.stringToCharP(dt.isoformat())
et = ctypes.c_double()
libspice.utc2et_c(dt, ctypes.byref(et))
return et.value
|
[
"def",
"datetime2et",
"(",
"dt",
")",
":",
"lt",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"if",
"hasattr",
"(",
"dt",
",",
"\"__iter__\"",
")",
":",
"ets",
"=",
"[",
"]",
"for",
"t",
"in",
"dt",
":",
"libspice",
".",
"utc2et_c",
"(",
"stypes",
".",
"stringToCharP",
"(",
"t",
".",
"isoformat",
"(",
")",
")",
",",
"ctypes",
".",
"byref",
"(",
"lt",
")",
")",
"checkForSpiceError",
"(",
"None",
")",
"ets",
".",
"append",
"(",
"lt",
".",
"value",
")",
"return",
"ets",
"dt",
"=",
"stypes",
".",
"stringToCharP",
"(",
"dt",
".",
"isoformat",
"(",
")",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"utc2et_c",
"(",
"dt",
",",
"ctypes",
".",
"byref",
"(",
"et",
")",
")",
"return",
"et",
".",
"value"
] |
Converts a standard Python datetime to a double precision value
representing the number of TDB seconds past the J2000 epoch
corresponding to the input epoch.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/time.html#The%20J2000%20Epoch
:param dt: A standard Python datetime
:type time: datetime
:return: The equivalent value in seconds past J2000, TDB.
:rtype: float
|
[
"Converts",
"a",
"standard",
"Python",
"datetime",
"to",
"a",
"double",
"precision",
"value",
"representing",
"the",
"number",
"of",
"TDB",
"seconds",
"past",
"the",
"J2000",
"epoch",
"corresponding",
"to",
"the",
"input",
"epoch",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13337-L13361
|
14,927
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
subpnt
|
def subpnt(method, target, et, fixref, abcorr, obsrvr):
"""
Compute the rectangular coordinates of the sub-observer point on
a target body at a specified epoch, optionally corrected for
light time and stellar aberration.
This routine supersedes :func:`subpt`.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/subpnt_c.html
:param method: Computation method.
:type method: str
:param target: Name of target body.
:type target: str
:param et: Epoch in ephemeris seconds past J2000 TDB.
:type et: float
:param fixref: Body-fixed, body-centered target body frame.
:type fixref: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing body.
:type obsrvr: str
:return:
Sub-observer point on the target body,
Sub-observer point epoch,
Vector from observer to sub-observer point.
:rtype: tuple
"""
method = stypes.stringToCharP(method)
target = stypes.stringToCharP(target)
et = ctypes.c_double(et)
fixref = stypes.stringToCharP(fixref)
abcorr = stypes.stringToCharP(abcorr)
obsrvr = stypes.stringToCharP(obsrvr)
spoint = stypes.emptyDoubleVector(3)
trgepc = ctypes.c_double(0)
srfvec = stypes.emptyDoubleVector(3)
libspice.subpnt_c(method, target, et, fixref, abcorr, obsrvr, spoint,
ctypes.byref(trgepc), srfvec)
return stypes.cVectorToPython(spoint), trgepc.value, stypes.cVectorToPython(
srfvec)
|
python
|
def subpnt(method, target, et, fixref, abcorr, obsrvr):
"""
Compute the rectangular coordinates of the sub-observer point on
a target body at a specified epoch, optionally corrected for
light time and stellar aberration.
This routine supersedes :func:`subpt`.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/subpnt_c.html
:param method: Computation method.
:type method: str
:param target: Name of target body.
:type target: str
:param et: Epoch in ephemeris seconds past J2000 TDB.
:type et: float
:param fixref: Body-fixed, body-centered target body frame.
:type fixref: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing body.
:type obsrvr: str
:return:
Sub-observer point on the target body,
Sub-observer point epoch,
Vector from observer to sub-observer point.
:rtype: tuple
"""
method = stypes.stringToCharP(method)
target = stypes.stringToCharP(target)
et = ctypes.c_double(et)
fixref = stypes.stringToCharP(fixref)
abcorr = stypes.stringToCharP(abcorr)
obsrvr = stypes.stringToCharP(obsrvr)
spoint = stypes.emptyDoubleVector(3)
trgepc = ctypes.c_double(0)
srfvec = stypes.emptyDoubleVector(3)
libspice.subpnt_c(method, target, et, fixref, abcorr, obsrvr, spoint,
ctypes.byref(trgepc), srfvec)
return stypes.cVectorToPython(spoint), trgepc.value, stypes.cVectorToPython(
srfvec)
|
[
"def",
"subpnt",
"(",
"method",
",",
"target",
",",
"et",
",",
"fixref",
",",
"abcorr",
",",
"obsrvr",
")",
":",
"method",
"=",
"stypes",
".",
"stringToCharP",
"(",
"method",
")",
"target",
"=",
"stypes",
".",
"stringToCharP",
"(",
"target",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"fixref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"fixref",
")",
"abcorr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"abcorr",
")",
"obsrvr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"obsrvr",
")",
"spoint",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"trgepc",
"=",
"ctypes",
".",
"c_double",
"(",
"0",
")",
"srfvec",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"subpnt_c",
"(",
"method",
",",
"target",
",",
"et",
",",
"fixref",
",",
"abcorr",
",",
"obsrvr",
",",
"spoint",
",",
"ctypes",
".",
"byref",
"(",
"trgepc",
")",
",",
"srfvec",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"spoint",
")",
",",
"trgepc",
".",
"value",
",",
"stypes",
".",
"cVectorToPython",
"(",
"srfvec",
")"
] |
Compute the rectangular coordinates of the sub-observer point on
a target body at a specified epoch, optionally corrected for
light time and stellar aberration.
This routine supersedes :func:`subpt`.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/subpnt_c.html
:param method: Computation method.
:type method: str
:param target: Name of target body.
:type target: str
:param et: Epoch in ephemeris seconds past J2000 TDB.
:type et: float
:param fixref: Body-fixed, body-centered target body frame.
:type fixref: str
:param abcorr: Aberration correction.
:type abcorr: str
:param obsrvr: Name of observing body.
:type obsrvr: str
:return:
Sub-observer point on the target body,
Sub-observer point epoch,
Vector from observer to sub-observer point.
:rtype: tuple
|
[
"Compute",
"the",
"rectangular",
"coordinates",
"of",
"the",
"sub",
"-",
"observer",
"point",
"on",
"a",
"target",
"body",
"at",
"a",
"specified",
"epoch",
"optionally",
"corrected",
"for",
"light",
"time",
"and",
"stellar",
"aberration",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13364-L13404
|
14,928
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
sumad
|
def sumad(array):
"""
Return the sum of the elements of a double precision array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumad_c.html
:param array: Input Array.
:type array: Array of floats
:return: The sum of the array.
:rtype: float
"""
n = ctypes.c_int(len(array))
array = stypes.toDoubleVector(array)
return libspice.sumad_c(array, n)
|
python
|
def sumad(array):
"""
Return the sum of the elements of a double precision array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumad_c.html
:param array: Input Array.
:type array: Array of floats
:return: The sum of the array.
:rtype: float
"""
n = ctypes.c_int(len(array))
array = stypes.toDoubleVector(array)
return libspice.sumad_c(array, n)
|
[
"def",
"sumad",
"(",
"array",
")",
":",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"len",
"(",
"array",
")",
")",
"array",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"array",
")",
"return",
"libspice",
".",
"sumad_c",
"(",
"array",
",",
"n",
")"
] |
Return the sum of the elements of a double precision array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumad_c.html
:param array: Input Array.
:type array: Array of floats
:return: The sum of the array.
:rtype: float
|
[
"Return",
"the",
"sum",
"of",
"the",
"elements",
"of",
"a",
"double",
"precision",
"array",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13541-L13554
|
14,929
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
sumai
|
def sumai(array):
"""
Return the sum of the elements of an integer array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumai_c.html
:param array: Input Array.
:type array: Array of ints
:return: The sum of the array.
:rtype: int
"""
n = ctypes.c_int(len(array))
array = stypes.toIntVector(array)
return libspice.sumai_c(array, n)
|
python
|
def sumai(array):
"""
Return the sum of the elements of an integer array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumai_c.html
:param array: Input Array.
:type array: Array of ints
:return: The sum of the array.
:rtype: int
"""
n = ctypes.c_int(len(array))
array = stypes.toIntVector(array)
return libspice.sumai_c(array, n)
|
[
"def",
"sumai",
"(",
"array",
")",
":",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"len",
"(",
"array",
")",
")",
"array",
"=",
"stypes",
".",
"toIntVector",
"(",
"array",
")",
"return",
"libspice",
".",
"sumai_c",
"(",
"array",
",",
"n",
")"
] |
Return the sum of the elements of an integer array.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sumai_c.html
:param array: Input Array.
:type array: Array of ints
:return: The sum of the array.
:rtype: int
|
[
"Return",
"the",
"sum",
"of",
"the",
"elements",
"of",
"an",
"integer",
"array",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13558-L13571
|
14,930
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
surfnm
|
def surfnm(a, b, c, point):
"""
This routine computes the outward-pointing, unit normal vector
from a point on the surface of an ellipsoid.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfnm_c.html
:param a: Length of the ellisoid semi-axis along the x-axis.
:type a: float
:param b: Length of the ellisoid semi-axis along the y-axis.
:type b: float
:param c: Length of the ellisoid semi-axis along the z-axis.
:type c: float
:param point: Body-fixed coordinates of a point on the ellipsoid'
:type point: 3-Element Array of floats
:return: Outward pointing unit normal to ellipsoid at point.
:rtype: 3-Element Array of floats
"""
a = ctypes.c_double(a)
b = ctypes.c_double(b)
c = ctypes.c_double(c)
point = stypes.toDoubleVector(point)
normal = stypes.emptyDoubleVector(3)
libspice.surfnm_c(a, b, c, point, normal)
return stypes.cVectorToPython(normal)
|
python
|
def surfnm(a, b, c, point):
"""
This routine computes the outward-pointing, unit normal vector
from a point on the surface of an ellipsoid.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfnm_c.html
:param a: Length of the ellisoid semi-axis along the x-axis.
:type a: float
:param b: Length of the ellisoid semi-axis along the y-axis.
:type b: float
:param c: Length of the ellisoid semi-axis along the z-axis.
:type c: float
:param point: Body-fixed coordinates of a point on the ellipsoid'
:type point: 3-Element Array of floats
:return: Outward pointing unit normal to ellipsoid at point.
:rtype: 3-Element Array of floats
"""
a = ctypes.c_double(a)
b = ctypes.c_double(b)
c = ctypes.c_double(c)
point = stypes.toDoubleVector(point)
normal = stypes.emptyDoubleVector(3)
libspice.surfnm_c(a, b, c, point, normal)
return stypes.cVectorToPython(normal)
|
[
"def",
"surfnm",
"(",
"a",
",",
"b",
",",
"c",
",",
"point",
")",
":",
"a",
"=",
"ctypes",
".",
"c_double",
"(",
"a",
")",
"b",
"=",
"ctypes",
".",
"c_double",
"(",
"b",
")",
"c",
"=",
"ctypes",
".",
"c_double",
"(",
"c",
")",
"point",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"point",
")",
"normal",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"surfnm_c",
"(",
"a",
",",
"b",
",",
"c",
",",
"point",
",",
"normal",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"normal",
")"
] |
This routine computes the outward-pointing, unit normal vector
from a point on the surface of an ellipsoid.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfnm_c.html
:param a: Length of the ellisoid semi-axis along the x-axis.
:type a: float
:param b: Length of the ellisoid semi-axis along the y-axis.
:type b: float
:param c: Length of the ellisoid semi-axis along the z-axis.
:type c: float
:param point: Body-fixed coordinates of a point on the ellipsoid'
:type point: 3-Element Array of floats
:return: Outward pointing unit normal to ellipsoid at point.
:rtype: 3-Element Array of floats
|
[
"This",
"routine",
"computes",
"the",
"outward",
"-",
"pointing",
"unit",
"normal",
"vector",
"from",
"a",
"point",
"on",
"the",
"surface",
"of",
"an",
"ellipsoid",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13575-L13599
|
14,931
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
surfpt
|
def surfpt(positn, u, a, b, c):
"""
Determine the intersection of a line-of-sight vector with the
surface of an ellipsoid.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfpt_c.html
:param positn: Position of the observer in body-fixed frame.
:type positn: 3-Element Array of floats
:param u: Vector from the observer in some direction.
:type u: 3-Element Array of floats
:param a: Length of the ellisoid semi-axis along the x-axis.
:type a: float
:param b: Length of the ellisoid semi-axis along the y-axis.
:type b: float
:param c: Length of the ellisoid semi-axis along the z-axis.
:type c: float
:return: Point on the ellipsoid pointed to by u.
:rtype: 3-Element Array of floats
"""
a = ctypes.c_double(a)
b = ctypes.c_double(b)
c = ctypes.c_double(c)
positn = stypes.toDoubleVector(positn)
u = stypes.toDoubleVector(u)
point = stypes.emptyDoubleVector(3)
found = ctypes.c_int()
libspice.surfpt_c(positn, u, a, b, c, point, ctypes.byref(found))
return stypes.cVectorToPython(point), bool(found.value)
|
python
|
def surfpt(positn, u, a, b, c):
"""
Determine the intersection of a line-of-sight vector with the
surface of an ellipsoid.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfpt_c.html
:param positn: Position of the observer in body-fixed frame.
:type positn: 3-Element Array of floats
:param u: Vector from the observer in some direction.
:type u: 3-Element Array of floats
:param a: Length of the ellisoid semi-axis along the x-axis.
:type a: float
:param b: Length of the ellisoid semi-axis along the y-axis.
:type b: float
:param c: Length of the ellisoid semi-axis along the z-axis.
:type c: float
:return: Point on the ellipsoid pointed to by u.
:rtype: 3-Element Array of floats
"""
a = ctypes.c_double(a)
b = ctypes.c_double(b)
c = ctypes.c_double(c)
positn = stypes.toDoubleVector(positn)
u = stypes.toDoubleVector(u)
point = stypes.emptyDoubleVector(3)
found = ctypes.c_int()
libspice.surfpt_c(positn, u, a, b, c, point, ctypes.byref(found))
return stypes.cVectorToPython(point), bool(found.value)
|
[
"def",
"surfpt",
"(",
"positn",
",",
"u",
",",
"a",
",",
"b",
",",
"c",
")",
":",
"a",
"=",
"ctypes",
".",
"c_double",
"(",
"a",
")",
"b",
"=",
"ctypes",
".",
"c_double",
"(",
"b",
")",
"c",
"=",
"ctypes",
".",
"c_double",
"(",
"c",
")",
"positn",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"positn",
")",
"u",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"u",
")",
"point",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"found",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"surfpt_c",
"(",
"positn",
",",
"u",
",",
"a",
",",
"b",
",",
"c",
",",
"point",
",",
"ctypes",
".",
"byref",
"(",
"found",
")",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"point",
")",
",",
"bool",
"(",
"found",
".",
"value",
")"
] |
Determine the intersection of a line-of-sight vector with the
surface of an ellipsoid.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/surfpt_c.html
:param positn: Position of the observer in body-fixed frame.
:type positn: 3-Element Array of floats
:param u: Vector from the observer in some direction.
:type u: 3-Element Array of floats
:param a: Length of the ellisoid semi-axis along the x-axis.
:type a: float
:param b: Length of the ellisoid semi-axis along the y-axis.
:type b: float
:param c: Length of the ellisoid semi-axis along the z-axis.
:type c: float
:return: Point on the ellipsoid pointed to by u.
:rtype: 3-Element Array of floats
|
[
"Determine",
"the",
"intersection",
"of",
"a",
"line",
"-",
"of",
"-",
"sight",
"vector",
"with",
"the",
"surface",
"of",
"an",
"ellipsoid",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13604-L13632
|
14,932
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
swpool
|
def swpool(agent, nnames, lenvals, names):
"""
Add a name to the list of agents to notify whenever a member of
a list of kernel variables is updated.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/swpool_c.html
:param agent: The name of an agent to be notified after updates.
:type agent: str
:param nnames: The number of variables to associate with agent.
:type nnames: int
:param lenvals: Length of strings in the names array.
:type lenvals: int
:param names: Variable names whose update causes the notice.
:type names: list of strs.
"""
agent = stypes.stringToCharP(agent)
nnames = ctypes.c_int(nnames)
lenvals = ctypes.c_int(lenvals)
names = stypes.listToCharArray(names)
libspice.swpool_c(agent, nnames, lenvals, names)
|
python
|
def swpool(agent, nnames, lenvals, names):
"""
Add a name to the list of agents to notify whenever a member of
a list of kernel variables is updated.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/swpool_c.html
:param agent: The name of an agent to be notified after updates.
:type agent: str
:param nnames: The number of variables to associate with agent.
:type nnames: int
:param lenvals: Length of strings in the names array.
:type lenvals: int
:param names: Variable names whose update causes the notice.
:type names: list of strs.
"""
agent = stypes.stringToCharP(agent)
nnames = ctypes.c_int(nnames)
lenvals = ctypes.c_int(lenvals)
names = stypes.listToCharArray(names)
libspice.swpool_c(agent, nnames, lenvals, names)
|
[
"def",
"swpool",
"(",
"agent",
",",
"nnames",
",",
"lenvals",
",",
"names",
")",
":",
"agent",
"=",
"stypes",
".",
"stringToCharP",
"(",
"agent",
")",
"nnames",
"=",
"ctypes",
".",
"c_int",
"(",
"nnames",
")",
"lenvals",
"=",
"ctypes",
".",
"c_int",
"(",
"lenvals",
")",
"names",
"=",
"stypes",
".",
"listToCharArray",
"(",
"names",
")",
"libspice",
".",
"swpool_c",
"(",
"agent",
",",
"nnames",
",",
"lenvals",
",",
"names",
")"
] |
Add a name to the list of agents to notify whenever a member of
a list of kernel variables is updated.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/swpool_c.html
:param agent: The name of an agent to be notified after updates.
:type agent: str
:param nnames: The number of variables to associate with agent.
:type nnames: int
:param lenvals: Length of strings in the names array.
:type lenvals: int
:param names: Variable names whose update causes the notice.
:type names: list of strs.
|
[
"Add",
"a",
"name",
"to",
"the",
"list",
"of",
"agents",
"to",
"notify",
"whenever",
"a",
"member",
"of",
"a",
"list",
"of",
"kernel",
"variables",
"is",
"updated",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13669-L13689
|
14,933
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
sxform
|
def sxform(instring, tostring, et):
"""
Return the state transformation matrix from one frame to
another at a specified epoch.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sxform_c.html
:param instring: Name of the frame to transform from.
:type instring: str
:param tostring: Name of the frame to transform to.
:type tostring: str
:param et: Epoch of the state transformation matrix.
:type et: Union[float,Iterable[float]]
:return: A state transformation matrix.
:rtype: 6x6-Element Array of floats
"""
instring = stypes.stringToCharP(instring)
tostring = stypes.stringToCharP(tostring)
xform = stypes.emptyDoubleMatrix(x=6, y=6)
if hasattr(et, "__iter__"):
xforms = []
for t in et:
libspice.sxform_c(instring, tostring, ctypes.c_double(t), xform)
checkForSpiceError(None)
xforms.append(stypes.cMatrixToNumpy(xform))
return xforms
else:
et = ctypes.c_double(et)
libspice.sxform_c(instring, tostring, et, xform)
return stypes.cMatrixToNumpy(xform)
|
python
|
def sxform(instring, tostring, et):
"""
Return the state transformation matrix from one frame to
another at a specified epoch.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sxform_c.html
:param instring: Name of the frame to transform from.
:type instring: str
:param tostring: Name of the frame to transform to.
:type tostring: str
:param et: Epoch of the state transformation matrix.
:type et: Union[float,Iterable[float]]
:return: A state transformation matrix.
:rtype: 6x6-Element Array of floats
"""
instring = stypes.stringToCharP(instring)
tostring = stypes.stringToCharP(tostring)
xform = stypes.emptyDoubleMatrix(x=6, y=6)
if hasattr(et, "__iter__"):
xforms = []
for t in et:
libspice.sxform_c(instring, tostring, ctypes.c_double(t), xform)
checkForSpiceError(None)
xforms.append(stypes.cMatrixToNumpy(xform))
return xforms
else:
et = ctypes.c_double(et)
libspice.sxform_c(instring, tostring, et, xform)
return stypes.cMatrixToNumpy(xform)
|
[
"def",
"sxform",
"(",
"instring",
",",
"tostring",
",",
"et",
")",
":",
"instring",
"=",
"stypes",
".",
"stringToCharP",
"(",
"instring",
")",
"tostring",
"=",
"stypes",
".",
"stringToCharP",
"(",
"tostring",
")",
"xform",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
"x",
"=",
"6",
",",
"y",
"=",
"6",
")",
"if",
"hasattr",
"(",
"et",
",",
"\"__iter__\"",
")",
":",
"xforms",
"=",
"[",
"]",
"for",
"t",
"in",
"et",
":",
"libspice",
".",
"sxform_c",
"(",
"instring",
",",
"tostring",
",",
"ctypes",
".",
"c_double",
"(",
"t",
")",
",",
"xform",
")",
"checkForSpiceError",
"(",
"None",
")",
"xforms",
".",
"append",
"(",
"stypes",
".",
"cMatrixToNumpy",
"(",
"xform",
")",
")",
"return",
"xforms",
"else",
":",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"libspice",
".",
"sxform_c",
"(",
"instring",
",",
"tostring",
",",
"et",
",",
"xform",
")",
"return",
"stypes",
".",
"cMatrixToNumpy",
"(",
"xform",
")"
] |
Return the state transformation matrix from one frame to
another at a specified epoch.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sxform_c.html
:param instring: Name of the frame to transform from.
:type instring: str
:param tostring: Name of the frame to transform to.
:type tostring: str
:param et: Epoch of the state transformation matrix.
:type et: Union[float,Iterable[float]]
:return: A state transformation matrix.
:rtype: 6x6-Element Array of floats
|
[
"Return",
"the",
"state",
"transformation",
"matrix",
"from",
"one",
"frame",
"to",
"another",
"at",
"a",
"specified",
"epoch",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13693-L13723
|
14,934
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
szpool
|
def szpool(name):
"""
Return the kernel pool size limitations.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/szpool_c.html
:param name: Name of the parameter to be returned.
:type name: str
:return: Value of parameter specified by name,
:rtype: int
"""
name = stypes.stringToCharP(name)
n = ctypes.c_int()
found = ctypes.c_int(0)
libspice.szpool_c(name, ctypes.byref(n), ctypes.byref(found))
return n.value, bool(found.value)
|
python
|
def szpool(name):
"""
Return the kernel pool size limitations.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/szpool_c.html
:param name: Name of the parameter to be returned.
:type name: str
:return: Value of parameter specified by name,
:rtype: int
"""
name = stypes.stringToCharP(name)
n = ctypes.c_int()
found = ctypes.c_int(0)
libspice.szpool_c(name, ctypes.byref(n), ctypes.byref(found))
return n.value, bool(found.value)
|
[
"def",
"szpool",
"(",
"name",
")",
":",
"name",
"=",
"stypes",
".",
"stringToCharP",
"(",
"name",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"found",
"=",
"ctypes",
".",
"c_int",
"(",
"0",
")",
"libspice",
".",
"szpool_c",
"(",
"name",
",",
"ctypes",
".",
"byref",
"(",
"n",
")",
",",
"ctypes",
".",
"byref",
"(",
"found",
")",
")",
"return",
"n",
".",
"value",
",",
"bool",
"(",
"found",
".",
"value",
")"
] |
Return the kernel pool size limitations.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/szpool_c.html
:param name: Name of the parameter to be returned.
:type name: str
:return: Value of parameter specified by name,
:rtype: int
|
[
"Return",
"the",
"kernel",
"pool",
"size",
"limitations",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13728-L13743
|
14,935
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
termpt
|
def termpt(method, ilusrc, target, et, fixref, abcorr, corloc, obsrvr, refvec, rolstp,
ncuts, schstp, soltol, maxn):
"""
Find terminator points on a target body. The caller specifies
half-planes, bounded by the illumination source center-target center
vector, in which to search for terminator points.
The terminator can be either umbral or penumbral. The umbral
terminator is the boundary of the region on the target surface
where no light from the source is visible. The penumbral
terminator is the boundary of the region on the target surface
where none of the light from the source is blocked by the target
itself.
The surface of the target body may be represented either by a
triaxial ellipsoid or by topographic data.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/termpt_c.html
:param method: Computation method.
:type method: str
:param ilusrc: Illumination source.
:type ilusrc: str
:param target: Name of target body.
:type target: str
:param et: Epoch in ephemeris seconds past J2000 TDB.
:type et: float
:param fixref: Body-fixed, body-centered target body frame.
:type fixref: str
:param abcorr: Aberration correction.
:type abcorr: str
:param corloc: Aberration correction locus.
:type corloc: str
:param obsrvr: Name of observing body.
:type obsrvr: str
:param refvec: Reference vector for cutting half-planes.
:type refvec: 3-Element Array of floats
:param rolstp: Roll angular step for cutting half-planes.
:type rolstp: float
:param ncuts: Number of cutting half-planes.
:type ncuts: int
:param schstp: Angular step size for searching.
:type schstp: float
:param soltol: Solution convergence tolerance.
:type soltol: float
:param maxn: Maximum number of entries in output arrays.
:type maxn: int
:return: Counts of terminator points corresponding to cuts, Terminator points, Times associated with terminator points, Terminator vectors emanating from the observer
:rtype: tuple
"""
method = stypes.stringToCharP(method)
ilusrc = stypes.stringToCharP(ilusrc)
target = stypes.stringToCharP(target)
et = ctypes.c_double(et)
fixref = stypes.stringToCharP(fixref)
abcorr = stypes.stringToCharP(abcorr)
corloc = stypes.stringToCharP(corloc)
obsrvr = stypes.stringToCharP(obsrvr)
refvec = stypes.toDoubleVector(refvec)
rolstp = ctypes.c_double(rolstp)
ncuts = ctypes.c_int(ncuts)
schstp = ctypes.c_double(schstp)
soltol = ctypes.c_double(soltol)
maxn = ctypes.c_int(maxn)
npts = stypes.emptyIntVector(maxn.value)
points = stypes.emptyDoubleMatrix(3, maxn.value)
epochs = stypes.emptyDoubleVector(maxn)
trmvcs = stypes.emptyDoubleMatrix(3, maxn.value)
libspice.termpt_c(method, ilusrc, target, et, fixref,
abcorr, corloc, obsrvr, refvec,
rolstp, ncuts, schstp, soltol,
maxn, npts, points, epochs, trmvcs)
# Clip the empty elements out of returned results
npts = stypes.cVectorToPython(npts)
valid_points = numpy.where(npts >= 1)
return npts[valid_points], stypes.cMatrixToNumpy(points)[valid_points], \
stypes.cVectorToPython(epochs)[valid_points], \
stypes.cMatrixToNumpy(trmvcs)[valid_points]
|
python
|
def termpt(method, ilusrc, target, et, fixref, abcorr, corloc, obsrvr, refvec, rolstp,
ncuts, schstp, soltol, maxn):
"""
Find terminator points on a target body. The caller specifies
half-planes, bounded by the illumination source center-target center
vector, in which to search for terminator points.
The terminator can be either umbral or penumbral. The umbral
terminator is the boundary of the region on the target surface
where no light from the source is visible. The penumbral
terminator is the boundary of the region on the target surface
where none of the light from the source is blocked by the target
itself.
The surface of the target body may be represented either by a
triaxial ellipsoid or by topographic data.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/termpt_c.html
:param method: Computation method.
:type method: str
:param ilusrc: Illumination source.
:type ilusrc: str
:param target: Name of target body.
:type target: str
:param et: Epoch in ephemeris seconds past J2000 TDB.
:type et: float
:param fixref: Body-fixed, body-centered target body frame.
:type fixref: str
:param abcorr: Aberration correction.
:type abcorr: str
:param corloc: Aberration correction locus.
:type corloc: str
:param obsrvr: Name of observing body.
:type obsrvr: str
:param refvec: Reference vector for cutting half-planes.
:type refvec: 3-Element Array of floats
:param rolstp: Roll angular step for cutting half-planes.
:type rolstp: float
:param ncuts: Number of cutting half-planes.
:type ncuts: int
:param schstp: Angular step size for searching.
:type schstp: float
:param soltol: Solution convergence tolerance.
:type soltol: float
:param maxn: Maximum number of entries in output arrays.
:type maxn: int
:return: Counts of terminator points corresponding to cuts, Terminator points, Times associated with terminator points, Terminator vectors emanating from the observer
:rtype: tuple
"""
method = stypes.stringToCharP(method)
ilusrc = stypes.stringToCharP(ilusrc)
target = stypes.stringToCharP(target)
et = ctypes.c_double(et)
fixref = stypes.stringToCharP(fixref)
abcorr = stypes.stringToCharP(abcorr)
corloc = stypes.stringToCharP(corloc)
obsrvr = stypes.stringToCharP(obsrvr)
refvec = stypes.toDoubleVector(refvec)
rolstp = ctypes.c_double(rolstp)
ncuts = ctypes.c_int(ncuts)
schstp = ctypes.c_double(schstp)
soltol = ctypes.c_double(soltol)
maxn = ctypes.c_int(maxn)
npts = stypes.emptyIntVector(maxn.value)
points = stypes.emptyDoubleMatrix(3, maxn.value)
epochs = stypes.emptyDoubleVector(maxn)
trmvcs = stypes.emptyDoubleMatrix(3, maxn.value)
libspice.termpt_c(method, ilusrc, target, et, fixref,
abcorr, corloc, obsrvr, refvec,
rolstp, ncuts, schstp, soltol,
maxn, npts, points, epochs, trmvcs)
# Clip the empty elements out of returned results
npts = stypes.cVectorToPython(npts)
valid_points = numpy.where(npts >= 1)
return npts[valid_points], stypes.cMatrixToNumpy(points)[valid_points], \
stypes.cVectorToPython(epochs)[valid_points], \
stypes.cMatrixToNumpy(trmvcs)[valid_points]
|
[
"def",
"termpt",
"(",
"method",
",",
"ilusrc",
",",
"target",
",",
"et",
",",
"fixref",
",",
"abcorr",
",",
"corloc",
",",
"obsrvr",
",",
"refvec",
",",
"rolstp",
",",
"ncuts",
",",
"schstp",
",",
"soltol",
",",
"maxn",
")",
":",
"method",
"=",
"stypes",
".",
"stringToCharP",
"(",
"method",
")",
"ilusrc",
"=",
"stypes",
".",
"stringToCharP",
"(",
"ilusrc",
")",
"target",
"=",
"stypes",
".",
"stringToCharP",
"(",
"target",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"fixref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"fixref",
")",
"abcorr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"abcorr",
")",
"corloc",
"=",
"stypes",
".",
"stringToCharP",
"(",
"corloc",
")",
"obsrvr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"obsrvr",
")",
"refvec",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"refvec",
")",
"rolstp",
"=",
"ctypes",
".",
"c_double",
"(",
"rolstp",
")",
"ncuts",
"=",
"ctypes",
".",
"c_int",
"(",
"ncuts",
")",
"schstp",
"=",
"ctypes",
".",
"c_double",
"(",
"schstp",
")",
"soltol",
"=",
"ctypes",
".",
"c_double",
"(",
"soltol",
")",
"maxn",
"=",
"ctypes",
".",
"c_int",
"(",
"maxn",
")",
"npts",
"=",
"stypes",
".",
"emptyIntVector",
"(",
"maxn",
".",
"value",
")",
"points",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
"3",
",",
"maxn",
".",
"value",
")",
"epochs",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"maxn",
")",
"trmvcs",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
"3",
",",
"maxn",
".",
"value",
")",
"libspice",
".",
"termpt_c",
"(",
"method",
",",
"ilusrc",
",",
"target",
",",
"et",
",",
"fixref",
",",
"abcorr",
",",
"corloc",
",",
"obsrvr",
",",
"refvec",
",",
"rolstp",
",",
"ncuts",
",",
"schstp",
",",
"soltol",
",",
"maxn",
",",
"npts",
",",
"points",
",",
"epochs",
",",
"trmvcs",
")",
"# Clip the empty elements out of returned results",
"npts",
"=",
"stypes",
".",
"cVectorToPython",
"(",
"npts",
")",
"valid_points",
"=",
"numpy",
".",
"where",
"(",
"npts",
">=",
"1",
")",
"return",
"npts",
"[",
"valid_points",
"]",
",",
"stypes",
".",
"cMatrixToNumpy",
"(",
"points",
")",
"[",
"valid_points",
"]",
",",
"stypes",
".",
"cVectorToPython",
"(",
"epochs",
")",
"[",
"valid_points",
"]",
",",
"stypes",
".",
"cMatrixToNumpy",
"(",
"trmvcs",
")",
"[",
"valid_points",
"]"
] |
Find terminator points on a target body. The caller specifies
half-planes, bounded by the illumination source center-target center
vector, in which to search for terminator points.
The terminator can be either umbral or penumbral. The umbral
terminator is the boundary of the region on the target surface
where no light from the source is visible. The penumbral
terminator is the boundary of the region on the target surface
where none of the light from the source is blocked by the target
itself.
The surface of the target body may be represented either by a
triaxial ellipsoid or by topographic data.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/termpt_c.html
:param method: Computation method.
:type method: str
:param ilusrc: Illumination source.
:type ilusrc: str
:param target: Name of target body.
:type target: str
:param et: Epoch in ephemeris seconds past J2000 TDB.
:type et: float
:param fixref: Body-fixed, body-centered target body frame.
:type fixref: str
:param abcorr: Aberration correction.
:type abcorr: str
:param corloc: Aberration correction locus.
:type corloc: str
:param obsrvr: Name of observing body.
:type obsrvr: str
:param refvec: Reference vector for cutting half-planes.
:type refvec: 3-Element Array of floats
:param rolstp: Roll angular step for cutting half-planes.
:type rolstp: float
:param ncuts: Number of cutting half-planes.
:type ncuts: int
:param schstp: Angular step size for searching.
:type schstp: float
:param soltol: Solution convergence tolerance.
:type soltol: float
:param maxn: Maximum number of entries in output arrays.
:type maxn: int
:return: Counts of terminator points corresponding to cuts, Terminator points, Times associated with terminator points, Terminator vectors emanating from the observer
:rtype: tuple
|
[
"Find",
"terminator",
"points",
"on",
"a",
"target",
"body",
".",
"The",
"caller",
"specifies",
"half",
"-",
"planes",
"bounded",
"by",
"the",
"illumination",
"source",
"center",
"-",
"target",
"center",
"vector",
"in",
"which",
"to",
"search",
"for",
"terminator",
"points",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13751-L13828
|
14,936
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
timdef
|
def timdef(action, item, lenout, value=None):
"""
Set and retrieve the defaults associated with calendar input strings.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timdef_c.html
:param action: the kind of action to take "SET" or "GET".
:type action: str
:param item: the default item of interest.
:type item: str
:param lenout: the length of list for output.
:type lenout: int
:param value: the optional string used if action is "SET"
:type value: str
:return: the value associated with the default item.
:rtype: str
"""
action = stypes.stringToCharP(action)
item = stypes.stringToCharP(item)
lenout = ctypes.c_int(lenout)
if value is None:
value = stypes.stringToCharP(lenout)
else:
value = stypes.stringToCharP(value)
libspice.timdef_c(action, item, lenout, value)
return stypes.toPythonString(value)
|
python
|
def timdef(action, item, lenout, value=None):
"""
Set and retrieve the defaults associated with calendar input strings.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timdef_c.html
:param action: the kind of action to take "SET" or "GET".
:type action: str
:param item: the default item of interest.
:type item: str
:param lenout: the length of list for output.
:type lenout: int
:param value: the optional string used if action is "SET"
:type value: str
:return: the value associated with the default item.
:rtype: str
"""
action = stypes.stringToCharP(action)
item = stypes.stringToCharP(item)
lenout = ctypes.c_int(lenout)
if value is None:
value = stypes.stringToCharP(lenout)
else:
value = stypes.stringToCharP(value)
libspice.timdef_c(action, item, lenout, value)
return stypes.toPythonString(value)
|
[
"def",
"timdef",
"(",
"action",
",",
"item",
",",
"lenout",
",",
"value",
"=",
"None",
")",
":",
"action",
"=",
"stypes",
".",
"stringToCharP",
"(",
"action",
")",
"item",
"=",
"stypes",
".",
"stringToCharP",
"(",
"item",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"if",
"value",
"is",
"None",
":",
"value",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenout",
")",
"else",
":",
"value",
"=",
"stypes",
".",
"stringToCharP",
"(",
"value",
")",
"libspice",
".",
"timdef_c",
"(",
"action",
",",
"item",
",",
"lenout",
",",
"value",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"value",
")"
] |
Set and retrieve the defaults associated with calendar input strings.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timdef_c.html
:param action: the kind of action to take "SET" or "GET".
:type action: str
:param item: the default item of interest.
:type item: str
:param lenout: the length of list for output.
:type lenout: int
:param value: the optional string used if action is "SET"
:type value: str
:return: the value associated with the default item.
:rtype: str
|
[
"Set",
"and",
"retrieve",
"the",
"defaults",
"associated",
"with",
"calendar",
"input",
"strings",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13832-L13857
|
14,937
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
timout
|
def timout(et, pictur, lenout=_default_len_out):
"""
This vectorized routine converts an input epoch represented in TDB seconds
past the TDB epoch of J2000 to a character string formatted to
the specifications of a user's format picture.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timout_c.html
:param et: An epoch in seconds past the ephemeris epoch J2000.
:type et: Union[float,Iterable[float]]
:param pictur: A format specification for the output string.
:type pictur: str
:param lenout: The length of the output string plus 1.
:type lenout: int
:return: A string representation of the input epoch.
:rtype: str or array of str
"""
pictur = stypes.stringToCharP(pictur)
output = stypes.stringToCharP(lenout)
lenout = ctypes.c_int(lenout)
if hasattr(et, "__iter__"):
times = []
for t in et:
libspice.timout_c(ctypes.c_double(t), pictur, lenout, output)
checkForSpiceError(None)
times.append(stypes.toPythonString(output))
return times
else:
et = ctypes.c_double(et)
libspice.timout_c(et, pictur, lenout, output)
return stypes.toPythonString(output)
|
python
|
def timout(et, pictur, lenout=_default_len_out):
"""
This vectorized routine converts an input epoch represented in TDB seconds
past the TDB epoch of J2000 to a character string formatted to
the specifications of a user's format picture.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timout_c.html
:param et: An epoch in seconds past the ephemeris epoch J2000.
:type et: Union[float,Iterable[float]]
:param pictur: A format specification for the output string.
:type pictur: str
:param lenout: The length of the output string plus 1.
:type lenout: int
:return: A string representation of the input epoch.
:rtype: str or array of str
"""
pictur = stypes.stringToCharP(pictur)
output = stypes.stringToCharP(lenout)
lenout = ctypes.c_int(lenout)
if hasattr(et, "__iter__"):
times = []
for t in et:
libspice.timout_c(ctypes.c_double(t), pictur, lenout, output)
checkForSpiceError(None)
times.append(stypes.toPythonString(output))
return times
else:
et = ctypes.c_double(et)
libspice.timout_c(et, pictur, lenout, output)
return stypes.toPythonString(output)
|
[
"def",
"timout",
"(",
"et",
",",
"pictur",
",",
"lenout",
"=",
"_default_len_out",
")",
":",
"pictur",
"=",
"stypes",
".",
"stringToCharP",
"(",
"pictur",
")",
"output",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenout",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"if",
"hasattr",
"(",
"et",
",",
"\"__iter__\"",
")",
":",
"times",
"=",
"[",
"]",
"for",
"t",
"in",
"et",
":",
"libspice",
".",
"timout_c",
"(",
"ctypes",
".",
"c_double",
"(",
"t",
")",
",",
"pictur",
",",
"lenout",
",",
"output",
")",
"checkForSpiceError",
"(",
"None",
")",
"times",
".",
"append",
"(",
"stypes",
".",
"toPythonString",
"(",
"output",
")",
")",
"return",
"times",
"else",
":",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"libspice",
".",
"timout_c",
"(",
"et",
",",
"pictur",
",",
"lenout",
",",
"output",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"output",
")"
] |
This vectorized routine converts an input epoch represented in TDB seconds
past the TDB epoch of J2000 to a character string formatted to
the specifications of a user's format picture.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timout_c.html
:param et: An epoch in seconds past the ephemeris epoch J2000.
:type et: Union[float,Iterable[float]]
:param pictur: A format specification for the output string.
:type pictur: str
:param lenout: The length of the output string plus 1.
:type lenout: int
:return: A string representation of the input epoch.
:rtype: str or array of str
|
[
"This",
"vectorized",
"routine",
"converts",
"an",
"input",
"epoch",
"represented",
"in",
"TDB",
"seconds",
"past",
"the",
"TDB",
"epoch",
"of",
"J2000",
"to",
"a",
"character",
"string",
"formatted",
"to",
"the",
"specifications",
"of",
"a",
"user",
"s",
"format",
"picture",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13861-L13891
|
14,938
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
tipbod
|
def tipbod(ref, body, et):
"""
Return a 3x3 matrix that transforms positions in inertial
coordinates to positions in body-equator-and-prime-meridian
coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tipbod_c.html
:param ref: ID of inertial reference frame to transform from.
:type ref: str
:param body: ID code of body.
:type body: int
:param et: Epoch of transformation.
:type et: float
:return: Transformation (position), inertial to prime meridian.
:rtype: 3x3-Element Array of floats
"""
ref = stypes.stringToCharP(ref)
body = ctypes.c_int(body)
et = ctypes.c_double(et)
retmatrix = stypes.emptyDoubleMatrix()
libspice.tipbod_c(ref, body, et, retmatrix)
return stypes.cMatrixToNumpy(retmatrix)
|
python
|
def tipbod(ref, body, et):
"""
Return a 3x3 matrix that transforms positions in inertial
coordinates to positions in body-equator-and-prime-meridian
coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tipbod_c.html
:param ref: ID of inertial reference frame to transform from.
:type ref: str
:param body: ID code of body.
:type body: int
:param et: Epoch of transformation.
:type et: float
:return: Transformation (position), inertial to prime meridian.
:rtype: 3x3-Element Array of floats
"""
ref = stypes.stringToCharP(ref)
body = ctypes.c_int(body)
et = ctypes.c_double(et)
retmatrix = stypes.emptyDoubleMatrix()
libspice.tipbod_c(ref, body, et, retmatrix)
return stypes.cMatrixToNumpy(retmatrix)
|
[
"def",
"tipbod",
"(",
"ref",
",",
"body",
",",
"et",
")",
":",
"ref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"ref",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"retmatrix",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
")",
"libspice",
".",
"tipbod_c",
"(",
"ref",
",",
"body",
",",
"et",
",",
"retmatrix",
")",
"return",
"stypes",
".",
"cMatrixToNumpy",
"(",
"retmatrix",
")"
] |
Return a 3x3 matrix that transforms positions in inertial
coordinates to positions in body-equator-and-prime-meridian
coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tipbod_c.html
:param ref: ID of inertial reference frame to transform from.
:type ref: str
:param body: ID code of body.
:type body: int
:param et: Epoch of transformation.
:type et: float
:return: Transformation (position), inertial to prime meridian.
:rtype: 3x3-Element Array of floats
|
[
"Return",
"a",
"3x3",
"matrix",
"that",
"transforms",
"positions",
"in",
"inertial",
"coordinates",
"to",
"positions",
"in",
"body",
"-",
"equator",
"-",
"and",
"-",
"prime",
"-",
"meridian",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13895-L13917
|
14,939
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
tisbod
|
def tisbod(ref, body, et):
"""
Return a 6x6 matrix that transforms states in inertial coordinates to
states in body-equator-and-prime-meridian coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tisbod_c.html
:param ref: ID of inertial reference frame to transform from.
:type ref: str
:param body: ID code of body.
:type body: int
:param et: Epoch of transformation.
:type et: float
:return: Transformation (state), inertial to prime meridian.
:rtype: 6x6-Element Array of floats
"""
ref = stypes.stringToCharP(ref)
body = ctypes.c_int(body)
et = ctypes.c_double(et)
retmatrix = stypes.emptyDoubleMatrix(x=6, y=6)
libspice.tisbod_c(ref, body, et, retmatrix)
return stypes.cMatrixToNumpy(retmatrix)
|
python
|
def tisbod(ref, body, et):
"""
Return a 6x6 matrix that transforms states in inertial coordinates to
states in body-equator-and-prime-meridian coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tisbod_c.html
:param ref: ID of inertial reference frame to transform from.
:type ref: str
:param body: ID code of body.
:type body: int
:param et: Epoch of transformation.
:type et: float
:return: Transformation (state), inertial to prime meridian.
:rtype: 6x6-Element Array of floats
"""
ref = stypes.stringToCharP(ref)
body = ctypes.c_int(body)
et = ctypes.c_double(et)
retmatrix = stypes.emptyDoubleMatrix(x=6, y=6)
libspice.tisbod_c(ref, body, et, retmatrix)
return stypes.cMatrixToNumpy(retmatrix)
|
[
"def",
"tisbod",
"(",
"ref",
",",
"body",
",",
"et",
")",
":",
"ref",
"=",
"stypes",
".",
"stringToCharP",
"(",
"ref",
")",
"body",
"=",
"ctypes",
".",
"c_int",
"(",
"body",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
"et",
")",
"retmatrix",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
"x",
"=",
"6",
",",
"y",
"=",
"6",
")",
"libspice",
".",
"tisbod_c",
"(",
"ref",
",",
"body",
",",
"et",
",",
"retmatrix",
")",
"return",
"stypes",
".",
"cMatrixToNumpy",
"(",
"retmatrix",
")"
] |
Return a 6x6 matrix that transforms states in inertial coordinates to
states in body-equator-and-prime-meridian coordinates.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tisbod_c.html
:param ref: ID of inertial reference frame to transform from.
:type ref: str
:param body: ID code of body.
:type body: int
:param et: Epoch of transformation.
:type et: float
:return: Transformation (state), inertial to prime meridian.
:rtype: 6x6-Element Array of floats
|
[
"Return",
"a",
"6x6",
"matrix",
"that",
"transforms",
"states",
"in",
"inertial",
"coordinates",
"to",
"states",
"in",
"body",
"-",
"equator",
"-",
"and",
"-",
"prime",
"-",
"meridian",
"coordinates",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13921-L13942
|
14,940
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
tkvrsn
|
def tkvrsn(item):
"""
Given an item such as the Toolkit or an entry point name, return
the latest version string.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tkvrsn_c.html
:param item: Item for which a version string is desired.
:type item: str
:return: the latest version string.
:rtype: str
"""
item = stypes.stringToCharP(item)
return stypes.toPythonString(libspice.tkvrsn_c(item))
|
python
|
def tkvrsn(item):
"""
Given an item such as the Toolkit or an entry point name, return
the latest version string.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tkvrsn_c.html
:param item: Item for which a version string is desired.
:type item: str
:return: the latest version string.
:rtype: str
"""
item = stypes.stringToCharP(item)
return stypes.toPythonString(libspice.tkvrsn_c(item))
|
[
"def",
"tkvrsn",
"(",
"item",
")",
":",
"item",
"=",
"stypes",
".",
"stringToCharP",
"(",
"item",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"libspice",
".",
"tkvrsn_c",
"(",
"item",
")",
")"
] |
Given an item such as the Toolkit or an entry point name, return
the latest version string.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tkvrsn_c.html
:param item: Item for which a version string is desired.
:type item: str
:return: the latest version string.
:rtype: str
|
[
"Given",
"an",
"item",
"such",
"as",
"the",
"Toolkit",
"or",
"an",
"entry",
"point",
"name",
"return",
"the",
"latest",
"version",
"string",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13946-L13959
|
14,941
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
tparse
|
def tparse(instring, lenout=_default_len_out):
"""
Parse a time string and return seconds past the J2000
epoch on a formal calendar.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tparse_c.html
:param instring: Input time string, UTC.
:type instring: str
:param lenout: Available space in output error message string.
:type lenout: int
:return: Equivalent UTC seconds past J2000, Descriptive error message.
:rtype: tuple
"""
errmsg = stypes.stringToCharP(lenout)
lenout = ctypes.c_int(lenout)
instring = stypes.stringToCharP(instring)
sp2000 = ctypes.c_double()
libspice.tparse_c(instring, lenout, ctypes.byref(sp2000), errmsg)
return sp2000.value, stypes.toPythonString(errmsg)
|
python
|
def tparse(instring, lenout=_default_len_out):
"""
Parse a time string and return seconds past the J2000
epoch on a formal calendar.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tparse_c.html
:param instring: Input time string, UTC.
:type instring: str
:param lenout: Available space in output error message string.
:type lenout: int
:return: Equivalent UTC seconds past J2000, Descriptive error message.
:rtype: tuple
"""
errmsg = stypes.stringToCharP(lenout)
lenout = ctypes.c_int(lenout)
instring = stypes.stringToCharP(instring)
sp2000 = ctypes.c_double()
libspice.tparse_c(instring, lenout, ctypes.byref(sp2000), errmsg)
return sp2000.value, stypes.toPythonString(errmsg)
|
[
"def",
"tparse",
"(",
"instring",
",",
"lenout",
"=",
"_default_len_out",
")",
":",
"errmsg",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenout",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"instring",
"=",
"stypes",
".",
"stringToCharP",
"(",
"instring",
")",
"sp2000",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"tparse_c",
"(",
"instring",
",",
"lenout",
",",
"ctypes",
".",
"byref",
"(",
"sp2000",
")",
",",
"errmsg",
")",
"return",
"sp2000",
".",
"value",
",",
"stypes",
".",
"toPythonString",
"(",
"errmsg",
")"
] |
Parse a time string and return seconds past the J2000
epoch on a formal calendar.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tparse_c.html
:param instring: Input time string, UTC.
:type instring: str
:param lenout: Available space in output error message string.
:type lenout: int
:return: Equivalent UTC seconds past J2000, Descriptive error message.
:rtype: tuple
|
[
"Parse",
"a",
"time",
"string",
"and",
"return",
"seconds",
"past",
"the",
"J2000",
"epoch",
"on",
"a",
"formal",
"calendar",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13963-L13982
|
14,942
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
tpictr
|
def tpictr(sample, lenout=_default_len_out, lenerr=_default_len_out):
"""
Given a sample time string, create a time format picture
suitable for use by the routine timout.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tpictr_c.html
:param sample: A sample time string.
:type sample: str
:param lenout: The length for the output picture string.
:type lenout: int
:param lenerr: The length for the output error string.
:type lenerr: int
:return:
A format picture that describes sample,
Flag indicating whether sample parsed successfully,
Diagnostic returned if sample cannot be parsed
:rtype: tuple
"""
sample = stypes.stringToCharP(sample)
pictur = stypes.stringToCharP(lenout)
errmsg = stypes.stringToCharP(lenerr)
lenout = ctypes.c_int(lenout)
lenerr = ctypes.c_int(lenerr)
ok = ctypes.c_int()
libspice.tpictr_c(sample, lenout, lenerr, pictur, ctypes.byref(ok), errmsg)
return stypes.toPythonString(pictur), ok.value, stypes.toPythonString(
errmsg)
|
python
|
def tpictr(sample, lenout=_default_len_out, lenerr=_default_len_out):
"""
Given a sample time string, create a time format picture
suitable for use by the routine timout.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tpictr_c.html
:param sample: A sample time string.
:type sample: str
:param lenout: The length for the output picture string.
:type lenout: int
:param lenerr: The length for the output error string.
:type lenerr: int
:return:
A format picture that describes sample,
Flag indicating whether sample parsed successfully,
Diagnostic returned if sample cannot be parsed
:rtype: tuple
"""
sample = stypes.stringToCharP(sample)
pictur = stypes.stringToCharP(lenout)
errmsg = stypes.stringToCharP(lenerr)
lenout = ctypes.c_int(lenout)
lenerr = ctypes.c_int(lenerr)
ok = ctypes.c_int()
libspice.tpictr_c(sample, lenout, lenerr, pictur, ctypes.byref(ok), errmsg)
return stypes.toPythonString(pictur), ok.value, stypes.toPythonString(
errmsg)
|
[
"def",
"tpictr",
"(",
"sample",
",",
"lenout",
"=",
"_default_len_out",
",",
"lenerr",
"=",
"_default_len_out",
")",
":",
"sample",
"=",
"stypes",
".",
"stringToCharP",
"(",
"sample",
")",
"pictur",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenout",
")",
"errmsg",
"=",
"stypes",
".",
"stringToCharP",
"(",
"lenerr",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"lenerr",
"=",
"ctypes",
".",
"c_int",
"(",
"lenerr",
")",
"ok",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"tpictr_c",
"(",
"sample",
",",
"lenout",
",",
"lenerr",
",",
"pictur",
",",
"ctypes",
".",
"byref",
"(",
"ok",
")",
",",
"errmsg",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"pictur",
")",
",",
"ok",
".",
"value",
",",
"stypes",
".",
"toPythonString",
"(",
"errmsg",
")"
] |
Given a sample time string, create a time format picture
suitable for use by the routine timout.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/tpictr_c.html
:param sample: A sample time string.
:type sample: str
:param lenout: The length for the output picture string.
:type lenout: int
:param lenerr: The length for the output error string.
:type lenerr: int
:return:
A format picture that describes sample,
Flag indicating whether sample parsed successfully,
Diagnostic returned if sample cannot be parsed
:rtype: tuple
|
[
"Given",
"a",
"sample",
"time",
"string",
"create",
"a",
"time",
"format",
"picture",
"suitable",
"for",
"use",
"by",
"the",
"routine",
"timout",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L13986-L14013
|
14,943
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
trcdep
|
def trcdep():
"""
Return the number of modules in the traceback representation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcdep_c.html
:return: The number of modules in the traceback.
:rtype: int
"""
depth = ctypes.c_int()
libspice.trcdep_c(ctypes.byref(depth))
return depth.value
|
python
|
def trcdep():
"""
Return the number of modules in the traceback representation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcdep_c.html
:return: The number of modules in the traceback.
:rtype: int
"""
depth = ctypes.c_int()
libspice.trcdep_c(ctypes.byref(depth))
return depth.value
|
[
"def",
"trcdep",
"(",
")",
":",
"depth",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"trcdep_c",
"(",
"ctypes",
".",
"byref",
"(",
"depth",
")",
")",
"return",
"depth",
".",
"value"
] |
Return the number of modules in the traceback representation.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcdep_c.html
:return: The number of modules in the traceback.
:rtype: int
|
[
"Return",
"the",
"number",
"of",
"modules",
"in",
"the",
"traceback",
"representation",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14033-L14044
|
14,944
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
trcnam
|
def trcnam(index, namlen=_default_len_out):
"""
Return the name of the module having the specified position in
the trace representation. The first module to check in is at
index 0.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcnam_c.html
:param index: The position of the requested module name.
:type index: int
:param namlen: Available space in output name string.
:type namlen: int
:return: The name at position index in the traceback.
:rtype: str
"""
index = ctypes.c_int(index)
name = stypes.stringToCharP(namlen)
namlen = ctypes.c_int(namlen)
libspice.trcnam_c(index, namlen, name)
return stypes.toPythonString(name)
|
python
|
def trcnam(index, namlen=_default_len_out):
"""
Return the name of the module having the specified position in
the trace representation. The first module to check in is at
index 0.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcnam_c.html
:param index: The position of the requested module name.
:type index: int
:param namlen: Available space in output name string.
:type namlen: int
:return: The name at position index in the traceback.
:rtype: str
"""
index = ctypes.c_int(index)
name = stypes.stringToCharP(namlen)
namlen = ctypes.c_int(namlen)
libspice.trcnam_c(index, namlen, name)
return stypes.toPythonString(name)
|
[
"def",
"trcnam",
"(",
"index",
",",
"namlen",
"=",
"_default_len_out",
")",
":",
"index",
"=",
"ctypes",
".",
"c_int",
"(",
"index",
")",
"name",
"=",
"stypes",
".",
"stringToCharP",
"(",
"namlen",
")",
"namlen",
"=",
"ctypes",
".",
"c_int",
"(",
"namlen",
")",
"libspice",
".",
"trcnam_c",
"(",
"index",
",",
"namlen",
",",
"name",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"name",
")"
] |
Return the name of the module having the specified position in
the trace representation. The first module to check in is at
index 0.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/trcnam_c.html
:param index: The position of the requested module name.
:type index: int
:param namlen: Available space in output name string.
:type namlen: int
:return: The name at position index in the traceback.
:rtype: str
|
[
"Return",
"the",
"name",
"of",
"the",
"module",
"having",
"the",
"specified",
"position",
"in",
"the",
"trace",
"representation",
".",
"The",
"first",
"module",
"to",
"check",
"in",
"is",
"at",
"index",
"0",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14048-L14067
|
14,945
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
twovec
|
def twovec(axdef, indexa, plndef, indexp):
"""
Find the transformation to the right-handed frame having a
given vector as a specified axis and having a second given
vector lying in a specified coordinate plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/twovec_c.html
:param axdef: Vector defining a principal axis.
:type axdef: 3-Element Array of floats
:param indexa: Principal axis number of axdef (X=1, Y=2, Z=3).
:type indexa: int
:param plndef: Vector defining (with axdef) a principal plane.
:type plndef: 3-Element Array of floats
:param indexp: Second axis number (with indexa) of principal plane.
:type indexp: int
:return: Output rotation matrix.
:rtype: 3x3-Element Array of floats
"""
axdef = stypes.toDoubleVector(axdef)
indexa = ctypes.c_int(indexa)
plndef = stypes.toDoubleVector(plndef)
indexp = ctypes.c_int(indexp)
mout = stypes.emptyDoubleMatrix()
libspice.twovec_c(axdef, indexa, plndef, indexp, mout)
return stypes.cMatrixToNumpy(mout)
|
python
|
def twovec(axdef, indexa, plndef, indexp):
"""
Find the transformation to the right-handed frame having a
given vector as a specified axis and having a second given
vector lying in a specified coordinate plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/twovec_c.html
:param axdef: Vector defining a principal axis.
:type axdef: 3-Element Array of floats
:param indexa: Principal axis number of axdef (X=1, Y=2, Z=3).
:type indexa: int
:param plndef: Vector defining (with axdef) a principal plane.
:type plndef: 3-Element Array of floats
:param indexp: Second axis number (with indexa) of principal plane.
:type indexp: int
:return: Output rotation matrix.
:rtype: 3x3-Element Array of floats
"""
axdef = stypes.toDoubleVector(axdef)
indexa = ctypes.c_int(indexa)
plndef = stypes.toDoubleVector(plndef)
indexp = ctypes.c_int(indexp)
mout = stypes.emptyDoubleMatrix()
libspice.twovec_c(axdef, indexa, plndef, indexp, mout)
return stypes.cMatrixToNumpy(mout)
|
[
"def",
"twovec",
"(",
"axdef",
",",
"indexa",
",",
"plndef",
",",
"indexp",
")",
":",
"axdef",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"axdef",
")",
"indexa",
"=",
"ctypes",
".",
"c_int",
"(",
"indexa",
")",
"plndef",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"plndef",
")",
"indexp",
"=",
"ctypes",
".",
"c_int",
"(",
"indexp",
")",
"mout",
"=",
"stypes",
".",
"emptyDoubleMatrix",
"(",
")",
"libspice",
".",
"twovec_c",
"(",
"axdef",
",",
"indexa",
",",
"plndef",
",",
"indexp",
",",
"mout",
")",
"return",
"stypes",
".",
"cMatrixToNumpy",
"(",
"mout",
")"
] |
Find the transformation to the right-handed frame having a
given vector as a specified axis and having a second given
vector lying in a specified coordinate plane.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/twovec_c.html
:param axdef: Vector defining a principal axis.
:type axdef: 3-Element Array of floats
:param indexa: Principal axis number of axdef (X=1, Y=2, Z=3).
:type indexa: int
:param plndef: Vector defining (with axdef) a principal plane.
:type plndef: 3-Element Array of floats
:param indexp: Second axis number (with indexa) of principal plane.
:type indexp: int
:return: Output rotation matrix.
:rtype: 3x3-Element Array of floats
|
[
"Find",
"the",
"transformation",
"to",
"the",
"right",
"-",
"handed",
"frame",
"having",
"a",
"given",
"vector",
"as",
"a",
"specified",
"axis",
"and",
"having",
"a",
"second",
"given",
"vector",
"lying",
"in",
"a",
"specified",
"coordinate",
"plane",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14112-L14137
|
14,946
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
txtopn
|
def txtopn(fname):
"""
Internal undocumented command for opening a new text file for
subsequent write access.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Files
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Examples
:param fname: name of the new text file to be opened.
:type fname: str
:return: FORTRAN logical unit of opened file
:rtype: int
"""
fnameP = stypes.stringToCharP(fname)
unit_out = ctypes.c_int()
fname_len = ctypes.c_int(len(fname))
libspice.txtopn_(fnameP, ctypes.byref(unit_out), fname_len)
return unit_out.value
|
python
|
def txtopn(fname):
"""
Internal undocumented command for opening a new text file for
subsequent write access.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Files
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Examples
:param fname: name of the new text file to be opened.
:type fname: str
:return: FORTRAN logical unit of opened file
:rtype: int
"""
fnameP = stypes.stringToCharP(fname)
unit_out = ctypes.c_int()
fname_len = ctypes.c_int(len(fname))
libspice.txtopn_(fnameP, ctypes.byref(unit_out), fname_len)
return unit_out.value
|
[
"def",
"txtopn",
"(",
"fname",
")",
":",
"fnameP",
"=",
"stypes",
".",
"stringToCharP",
"(",
"fname",
")",
"unit_out",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"fname_len",
"=",
"ctypes",
".",
"c_int",
"(",
"len",
"(",
"fname",
")",
")",
"libspice",
".",
"txtopn_",
"(",
"fnameP",
",",
"ctypes",
".",
"byref",
"(",
"unit_out",
")",
",",
"fname_len",
")",
"return",
"unit_out",
".",
"value"
] |
Internal undocumented command for opening a new text file for
subsequent write access.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Files
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ftncls_c.html#Examples
:param fname: name of the new text file to be opened.
:type fname: str
:return: FORTRAN logical unit of opened file
:rtype: int
|
[
"Internal",
"undocumented",
"command",
"for",
"opening",
"a",
"new",
"text",
"file",
"for",
"subsequent",
"write",
"access",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14141-L14158
|
14,947
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ucase
|
def ucase(inchar, lenout=None):
"""
Convert the characters in a string to uppercase.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucase_c.html
:param inchar: Input string.
:type inchar: str
:param lenout: Optional Maximum length of output string.
:type lenout: int
:return: Output string, all uppercase.
:rtype: str
"""
if lenout is None:
lenout = len(inchar) + 1
inchar = stypes.stringToCharP(inchar)
outchar = stypes.stringToCharP(" " * lenout)
lenout = ctypes.c_int(lenout)
libspice.ucase_c(inchar, lenout, outchar)
return stypes.toPythonString(outchar)
|
python
|
def ucase(inchar, lenout=None):
"""
Convert the characters in a string to uppercase.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucase_c.html
:param inchar: Input string.
:type inchar: str
:param lenout: Optional Maximum length of output string.
:type lenout: int
:return: Output string, all uppercase.
:rtype: str
"""
if lenout is None:
lenout = len(inchar) + 1
inchar = stypes.stringToCharP(inchar)
outchar = stypes.stringToCharP(" " * lenout)
lenout = ctypes.c_int(lenout)
libspice.ucase_c(inchar, lenout, outchar)
return stypes.toPythonString(outchar)
|
[
"def",
"ucase",
"(",
"inchar",
",",
"lenout",
"=",
"None",
")",
":",
"if",
"lenout",
"is",
"None",
":",
"lenout",
"=",
"len",
"(",
"inchar",
")",
"+",
"1",
"inchar",
"=",
"stypes",
".",
"stringToCharP",
"(",
"inchar",
")",
"outchar",
"=",
"stypes",
".",
"stringToCharP",
"(",
"\" \"",
"*",
"lenout",
")",
"lenout",
"=",
"ctypes",
".",
"c_int",
"(",
"lenout",
")",
"libspice",
".",
"ucase_c",
"(",
"inchar",
",",
"lenout",
",",
"outchar",
")",
"return",
"stypes",
".",
"toPythonString",
"(",
"outchar",
")"
] |
Convert the characters in a string to uppercase.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucase_c.html
:param inchar: Input string.
:type inchar: str
:param lenout: Optional Maximum length of output string.
:type lenout: int
:return: Output string, all uppercase.
:rtype: str
|
[
"Convert",
"the",
"characters",
"in",
"a",
"string",
"to",
"uppercase",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14178-L14197
|
14,948
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
ucrss
|
def ucrss(v1, v2):
"""
Compute the normalized cross product of two 3-vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucrss_c.html
:param v1: Left vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right vector for cross product.
:type v2: 3-Element Array of floats
:return: Normalized cross product v1xv2 / abs(v1xv2).
:rtype: Array of floats
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
vout = stypes.emptyDoubleVector(3)
libspice.ucrss_c(v1, v2, vout)
return stypes.cVectorToPython(vout)
|
python
|
def ucrss(v1, v2):
"""
Compute the normalized cross product of two 3-vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucrss_c.html
:param v1: Left vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right vector for cross product.
:type v2: 3-Element Array of floats
:return: Normalized cross product v1xv2 / abs(v1xv2).
:rtype: Array of floats
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
vout = stypes.emptyDoubleVector(3)
libspice.ucrss_c(v1, v2, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"ucrss",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"ucrss_c",
"(",
"v1",
",",
"v2",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Compute the normalized cross product of two 3-vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ucrss_c.html
:param v1: Left vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right vector for cross product.
:type v2: 3-Element Array of floats
:return: Normalized cross product v1xv2 / abs(v1xv2).
:rtype: Array of floats
|
[
"Compute",
"the",
"normalized",
"cross",
"product",
"of",
"two",
"3",
"-",
"vectors",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14201-L14218
|
14,949
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
uddc
|
def uddc(udfunc, x, dx):
"""
SPICE private routine intended solely for the support of SPICE
routines. Users should not call this routine directly due to the
volatile nature of this routine.
This routine calculates the derivative of 'udfunc' with respect
to time for 'et', then determines if the derivative has a
negative value.
Use the @spiceypy.utils.callbacks.SpiceUDFUNS dectorator to wrap
a given python function that takes one parameter (float) and
returns a float. For example::
@spiceypy.utils.callbacks.SpiceUDFUNS
def udfunc(et_in):
pos, new_et = spice.spkpos("MERCURY", et_in, "J2000", "LT+S", "MOON")
return new_et
deriv = spice.uddf(udfunc, et, 1.0)
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/uddc_c.html
:param udfunc: Name of the routine that computes the scalar value of interest.
:type udfunc: ctypes.CFunctionType
:param x: Independent variable of 'udfunc'.
:type x: float
:param dx: Interval from 'x' for derivative calculation.
:type dx: float
:return: Boolean indicating if the derivative is negative.
:rtype: bool
"""
x = ctypes.c_double(x)
dx = ctypes.c_double(dx)
isdescr = ctypes.c_int()
libspice.uddc_c(udfunc, x, dx, ctypes.byref(isdescr))
return bool(isdescr.value)
|
python
|
def uddc(udfunc, x, dx):
"""
SPICE private routine intended solely for the support of SPICE
routines. Users should not call this routine directly due to the
volatile nature of this routine.
This routine calculates the derivative of 'udfunc' with respect
to time for 'et', then determines if the derivative has a
negative value.
Use the @spiceypy.utils.callbacks.SpiceUDFUNS dectorator to wrap
a given python function that takes one parameter (float) and
returns a float. For example::
@spiceypy.utils.callbacks.SpiceUDFUNS
def udfunc(et_in):
pos, new_et = spice.spkpos("MERCURY", et_in, "J2000", "LT+S", "MOON")
return new_et
deriv = spice.uddf(udfunc, et, 1.0)
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/uddc_c.html
:param udfunc: Name of the routine that computes the scalar value of interest.
:type udfunc: ctypes.CFunctionType
:param x: Independent variable of 'udfunc'.
:type x: float
:param dx: Interval from 'x' for derivative calculation.
:type dx: float
:return: Boolean indicating if the derivative is negative.
:rtype: bool
"""
x = ctypes.c_double(x)
dx = ctypes.c_double(dx)
isdescr = ctypes.c_int()
libspice.uddc_c(udfunc, x, dx, ctypes.byref(isdescr))
return bool(isdescr.value)
|
[
"def",
"uddc",
"(",
"udfunc",
",",
"x",
",",
"dx",
")",
":",
"x",
"=",
"ctypes",
".",
"c_double",
"(",
"x",
")",
"dx",
"=",
"ctypes",
".",
"c_double",
"(",
"dx",
")",
"isdescr",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"uddc_c",
"(",
"udfunc",
",",
"x",
",",
"dx",
",",
"ctypes",
".",
"byref",
"(",
"isdescr",
")",
")",
"return",
"bool",
"(",
"isdescr",
".",
"value",
")"
] |
SPICE private routine intended solely for the support of SPICE
routines. Users should not call this routine directly due to the
volatile nature of this routine.
This routine calculates the derivative of 'udfunc' with respect
to time for 'et', then determines if the derivative has a
negative value.
Use the @spiceypy.utils.callbacks.SpiceUDFUNS dectorator to wrap
a given python function that takes one parameter (float) and
returns a float. For example::
@spiceypy.utils.callbacks.SpiceUDFUNS
def udfunc(et_in):
pos, new_et = spice.spkpos("MERCURY", et_in, "J2000", "LT+S", "MOON")
return new_et
deriv = spice.uddf(udfunc, et, 1.0)
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/uddc_c.html
:param udfunc: Name of the routine that computes the scalar value of interest.
:type udfunc: ctypes.CFunctionType
:param x: Independent variable of 'udfunc'.
:type x: float
:param dx: Interval from 'x' for derivative calculation.
:type dx: float
:return: Boolean indicating if the derivative is negative.
:rtype: bool
|
[
"SPICE",
"private",
"routine",
"intended",
"solely",
"for",
"the",
"support",
"of",
"SPICE",
"routines",
".",
"Users",
"should",
"not",
"call",
"this",
"routine",
"directly",
"due",
"to",
"the",
"volatile",
"nature",
"of",
"this",
"routine",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14221-L14257
|
14,950
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
uddf
|
def uddf(udfunc, x, dx):
"""
Routine to calculate the first derivative of a caller-specified
function using a three-point estimation.
Use the @spiceypy.utils.callbacks.SpiceUDFUNS dectorator to wrap
a given python function that takes one parameter (float) and
returns a float. For example::
@spiceypy.utils.callbacks.SpiceUDFUNS
def udfunc(et_in):
pos, new_et = spice.spkpos("MERCURY", et_in, "J2000", "LT+S", "MOON")
return new_et
deriv = spice.uddf(udfunc, et, 1.0)
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/uddf_c.html
:param udfunc: Name of the routine that computes the scalar value of interest.
:type udfunc: ctypes.CFunctionType
:param x: Independent variable of 'udfunc'.
:type x: float
:param dx: Interval from 'x' for derivative calculation.
:type dx: float
:return: Approximate derivative of 'udfunc' at 'x'
:rtype: float
"""
x = ctypes.c_double(x)
dx = ctypes.c_double(dx)
deriv = ctypes.c_double()
libspice.uddf_c(udfunc, x, dx, ctypes.byref(deriv))
return deriv.value
|
python
|
def uddf(udfunc, x, dx):
"""
Routine to calculate the first derivative of a caller-specified
function using a three-point estimation.
Use the @spiceypy.utils.callbacks.SpiceUDFUNS dectorator to wrap
a given python function that takes one parameter (float) and
returns a float. For example::
@spiceypy.utils.callbacks.SpiceUDFUNS
def udfunc(et_in):
pos, new_et = spice.spkpos("MERCURY", et_in, "J2000", "LT+S", "MOON")
return new_et
deriv = spice.uddf(udfunc, et, 1.0)
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/uddf_c.html
:param udfunc: Name of the routine that computes the scalar value of interest.
:type udfunc: ctypes.CFunctionType
:param x: Independent variable of 'udfunc'.
:type x: float
:param dx: Interval from 'x' for derivative calculation.
:type dx: float
:return: Approximate derivative of 'udfunc' at 'x'
:rtype: float
"""
x = ctypes.c_double(x)
dx = ctypes.c_double(dx)
deriv = ctypes.c_double()
libspice.uddf_c(udfunc, x, dx, ctypes.byref(deriv))
return deriv.value
|
[
"def",
"uddf",
"(",
"udfunc",
",",
"x",
",",
"dx",
")",
":",
"x",
"=",
"ctypes",
".",
"c_double",
"(",
"x",
")",
"dx",
"=",
"ctypes",
".",
"c_double",
"(",
"dx",
")",
"deriv",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"uddf_c",
"(",
"udfunc",
",",
"x",
",",
"dx",
",",
"ctypes",
".",
"byref",
"(",
"deriv",
")",
")",
"return",
"deriv",
".",
"value"
] |
Routine to calculate the first derivative of a caller-specified
function using a three-point estimation.
Use the @spiceypy.utils.callbacks.SpiceUDFUNS dectorator to wrap
a given python function that takes one parameter (float) and
returns a float. For example::
@spiceypy.utils.callbacks.SpiceUDFUNS
def udfunc(et_in):
pos, new_et = spice.spkpos("MERCURY", et_in, "J2000", "LT+S", "MOON")
return new_et
deriv = spice.uddf(udfunc, et, 1.0)
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/uddf_c.html
:param udfunc: Name of the routine that computes the scalar value of interest.
:type udfunc: ctypes.CFunctionType
:param x: Independent variable of 'udfunc'.
:type x: float
:param dx: Interval from 'x' for derivative calculation.
:type dx: float
:return: Approximate derivative of 'udfunc' at 'x'
:rtype: float
|
[
"Routine",
"to",
"calculate",
"the",
"first",
"derivative",
"of",
"a",
"caller",
"-",
"specified",
"function",
"using",
"a",
"three",
"-",
"point",
"estimation",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14261-L14292
|
14,951
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
udf
|
def udf(x):
"""
No-op routine for with an argument signature matching udfuns.
Allways returns 0.0 .
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/udf_c.html
:param x: Double precision value, unused.
:type x: float
:return: Double precision value, unused.
:rtype: float
"""
x = ctypes.c_double(x)
value = ctypes.c_double()
libspice.udf_c(x, ctypes.byref(value))
return value.value
|
python
|
def udf(x):
"""
No-op routine for with an argument signature matching udfuns.
Allways returns 0.0 .
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/udf_c.html
:param x: Double precision value, unused.
:type x: float
:return: Double precision value, unused.
:rtype: float
"""
x = ctypes.c_double(x)
value = ctypes.c_double()
libspice.udf_c(x, ctypes.byref(value))
return value.value
|
[
"def",
"udf",
"(",
"x",
")",
":",
"x",
"=",
"ctypes",
".",
"c_double",
"(",
"x",
")",
"value",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"udf_c",
"(",
"x",
",",
"ctypes",
".",
"byref",
"(",
"value",
")",
")",
"return",
"value",
".",
"value"
] |
No-op routine for with an argument signature matching udfuns.
Allways returns 0.0 .
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/udf_c.html
:param x: Double precision value, unused.
:type x: float
:return: Double precision value, unused.
:rtype: float
|
[
"No",
"-",
"op",
"routine",
"for",
"with",
"an",
"argument",
"signature",
"matching",
"udfuns",
".",
"Allways",
"returns",
"0",
".",
"0",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14295-L14310
|
14,952
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
unitim
|
def unitim(epoch, insys, outsys):
"""
Transform time from one uniform scale to another. The uniform
time scales are TAI, TDT, TDB, ET, JED, JDTDB, JDTDT.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unitim_c.html
:param epoch: An epoch to be converted.
:type epoch: float
:param insys: The time scale associated with the input epoch.
:type insys: str
:param outsys: The time scale associated with the function value.
:type outsys: str
:return:
The float in outsys that is equivalent
to the epoch on the insys time scale.
:rtype: float
"""
epoch = ctypes.c_double(epoch)
insys = stypes.stringToCharP(insys)
outsys = stypes.stringToCharP(outsys)
return libspice.unitim_c(epoch, insys, outsys)
|
python
|
def unitim(epoch, insys, outsys):
"""
Transform time from one uniform scale to another. The uniform
time scales are TAI, TDT, TDB, ET, JED, JDTDB, JDTDT.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unitim_c.html
:param epoch: An epoch to be converted.
:type epoch: float
:param insys: The time scale associated with the input epoch.
:type insys: str
:param outsys: The time scale associated with the function value.
:type outsys: str
:return:
The float in outsys that is equivalent
to the epoch on the insys time scale.
:rtype: float
"""
epoch = ctypes.c_double(epoch)
insys = stypes.stringToCharP(insys)
outsys = stypes.stringToCharP(outsys)
return libspice.unitim_c(epoch, insys, outsys)
|
[
"def",
"unitim",
"(",
"epoch",
",",
"insys",
",",
"outsys",
")",
":",
"epoch",
"=",
"ctypes",
".",
"c_double",
"(",
"epoch",
")",
"insys",
"=",
"stypes",
".",
"stringToCharP",
"(",
"insys",
")",
"outsys",
"=",
"stypes",
".",
"stringToCharP",
"(",
"outsys",
")",
"return",
"libspice",
".",
"unitim_c",
"(",
"epoch",
",",
"insys",
",",
"outsys",
")"
] |
Transform time from one uniform scale to another. The uniform
time scales are TAI, TDT, TDB, ET, JED, JDTDB, JDTDT.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unitim_c.html
:param epoch: An epoch to be converted.
:type epoch: float
:param insys: The time scale associated with the input epoch.
:type insys: str
:param outsys: The time scale associated with the function value.
:type outsys: str
:return:
The float in outsys that is equivalent
to the epoch on the insys time scale.
:rtype: float
|
[
"Transform",
"time",
"from",
"one",
"uniform",
"scale",
"to",
"another",
".",
"The",
"uniform",
"time",
"scales",
"are",
"TAI",
"TDT",
"TDB",
"ET",
"JED",
"JDTDB",
"JDTDT",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14345-L14366
|
14,953
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
unload
|
def unload(filename):
"""
Unload a SPICE kernel.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unload_c.html
:param filename: The name of a kernel to unload.
:type filename: str
"""
if isinstance(filename, list):
for f in filename:
libspice.unload_c(stypes.stringToCharP(f))
return
filename = stypes.stringToCharP(filename)
libspice.unload_c(filename)
|
python
|
def unload(filename):
"""
Unload a SPICE kernel.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unload_c.html
:param filename: The name of a kernel to unload.
:type filename: str
"""
if isinstance(filename, list):
for f in filename:
libspice.unload_c(stypes.stringToCharP(f))
return
filename = stypes.stringToCharP(filename)
libspice.unload_c(filename)
|
[
"def",
"unload",
"(",
"filename",
")",
":",
"if",
"isinstance",
"(",
"filename",
",",
"list",
")",
":",
"for",
"f",
"in",
"filename",
":",
"libspice",
".",
"unload_c",
"(",
"stypes",
".",
"stringToCharP",
"(",
"f",
")",
")",
"return",
"filename",
"=",
"stypes",
".",
"stringToCharP",
"(",
"filename",
")",
"libspice",
".",
"unload_c",
"(",
"filename",
")"
] |
Unload a SPICE kernel.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unload_c.html
:param filename: The name of a kernel to unload.
:type filename: str
|
[
"Unload",
"a",
"SPICE",
"kernel",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14370-L14384
|
14,954
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
unorm
|
def unorm(v1):
"""
Normalize a double precision 3-vector and return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unorm_c.html
:param v1: Vector to be normalized.
:type v1: 3-Element Array of floats
:return: Unit vector of v1, Magnitude of v1.
:rtype: tuple
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(3)
vmag = ctypes.c_double()
libspice.unorm_c(v1, vout, ctypes.byref(vmag))
return stypes.cVectorToPython(vout), vmag.value
|
python
|
def unorm(v1):
"""
Normalize a double precision 3-vector and return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unorm_c.html
:param v1: Vector to be normalized.
:type v1: 3-Element Array of floats
:return: Unit vector of v1, Magnitude of v1.
:rtype: tuple
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(3)
vmag = ctypes.c_double()
libspice.unorm_c(v1, vout, ctypes.byref(vmag))
return stypes.cVectorToPython(vout), vmag.value
|
[
"def",
"unorm",
"(",
"v1",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"vmag",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"unorm_c",
"(",
"v1",
",",
"vout",
",",
"ctypes",
".",
"byref",
"(",
"vmag",
")",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")",
",",
"vmag",
".",
"value"
] |
Normalize a double precision 3-vector and return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unorm_c.html
:param v1: Vector to be normalized.
:type v1: 3-Element Array of floats
:return: Unit vector of v1, Magnitude of v1.
:rtype: tuple
|
[
"Normalize",
"a",
"double",
"precision",
"3",
"-",
"vector",
"and",
"return",
"its",
"magnitude",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14388-L14403
|
14,955
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
unormg
|
def unormg(v1, ndim):
"""
Normalize a double precision vector of arbitrary dimension and
return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unormg_c.html
:param v1: Vector to be normalized.
:type v1: Array of floats
:param ndim: This is the dimension of v1 and vout.
:type ndim: int
:return: Unit vector of v1, Magnitude of v1.
:rtype: tuple
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(ndim)
vmag = ctypes.c_double()
ndim = ctypes.c_int(ndim)
libspice.unormg_c(v1, ndim, vout, ctypes.byref(vmag))
return stypes.cVectorToPython(vout), vmag.value
|
python
|
def unormg(v1, ndim):
"""
Normalize a double precision vector of arbitrary dimension and
return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unormg_c.html
:param v1: Vector to be normalized.
:type v1: Array of floats
:param ndim: This is the dimension of v1 and vout.
:type ndim: int
:return: Unit vector of v1, Magnitude of v1.
:rtype: tuple
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(ndim)
vmag = ctypes.c_double()
ndim = ctypes.c_int(ndim)
libspice.unormg_c(v1, ndim, vout, ctypes.byref(vmag))
return stypes.cVectorToPython(vout), vmag.value
|
[
"def",
"unormg",
"(",
"v1",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"vmag",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"libspice",
".",
"unormg_c",
"(",
"v1",
",",
"ndim",
",",
"vout",
",",
"ctypes",
".",
"byref",
"(",
"vmag",
")",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")",
",",
"vmag",
".",
"value"
] |
Normalize a double precision vector of arbitrary dimension and
return its magnitude.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unormg_c.html
:param v1: Vector to be normalized.
:type v1: Array of floats
:param ndim: This is the dimension of v1 and vout.
:type ndim: int
:return: Unit vector of v1, Magnitude of v1.
:rtype: tuple
|
[
"Normalize",
"a",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"and",
"return",
"its",
"magnitude",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14407-L14426
|
14,956
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
utc2et
|
def utc2et(utcstr):
"""
Convert an input time from Calendar or Julian Date format, UTC,
to ephemeris seconds past J2000.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/utc2et_c.html
:param utcstr: Input time string, UTC.
:type utcstr: str
:return: Output epoch, ephemeris seconds past J2000.
:rtype: float
"""
utcstr = stypes.stringToCharP(utcstr)
et = ctypes.c_double()
libspice.utc2et_c(utcstr, ctypes.byref(et))
return et.value
|
python
|
def utc2et(utcstr):
"""
Convert an input time from Calendar or Julian Date format, UTC,
to ephemeris seconds past J2000.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/utc2et_c.html
:param utcstr: Input time string, UTC.
:type utcstr: str
:return: Output epoch, ephemeris seconds past J2000.
:rtype: float
"""
utcstr = stypes.stringToCharP(utcstr)
et = ctypes.c_double()
libspice.utc2et_c(utcstr, ctypes.byref(et))
return et.value
|
[
"def",
"utc2et",
"(",
"utcstr",
")",
":",
"utcstr",
"=",
"stypes",
".",
"stringToCharP",
"(",
"utcstr",
")",
"et",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"utc2et_c",
"(",
"utcstr",
",",
"ctypes",
".",
"byref",
"(",
"et",
")",
")",
"return",
"et",
".",
"value"
] |
Convert an input time from Calendar or Julian Date format, UTC,
to ephemeris seconds past J2000.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/utc2et_c.html
:param utcstr: Input time string, UTC.
:type utcstr: str
:return: Output epoch, ephemeris seconds past J2000.
:rtype: float
|
[
"Convert",
"an",
"input",
"time",
"from",
"Calendar",
"or",
"Julian",
"Date",
"format",
"UTC",
"to",
"ephemeris",
"seconds",
"past",
"J2000",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14430-L14445
|
14,957
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
valid
|
def valid(insize, n, inset):
"""
Create a valid CSPICE set from a CSPICE Cell of any data type.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/valid_c.html
:param insize: Size (maximum cardinality) of the set.
:type insize: int
:param n: Initial no. of (possibly non-distinct) elements.
:type n: int
:param inset: Set to be validated.
:return: validated set
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(inset, stypes.SpiceCell)
insize = ctypes.c_int(insize)
n = ctypes.c_int(n)
libspice.valid_c(insize, n, inset)
return inset
|
python
|
def valid(insize, n, inset):
"""
Create a valid CSPICE set from a CSPICE Cell of any data type.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/valid_c.html
:param insize: Size (maximum cardinality) of the set.
:type insize: int
:param n: Initial no. of (possibly non-distinct) elements.
:type n: int
:param inset: Set to be validated.
:return: validated set
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(inset, stypes.SpiceCell)
insize = ctypes.c_int(insize)
n = ctypes.c_int(n)
libspice.valid_c(insize, n, inset)
return inset
|
[
"def",
"valid",
"(",
"insize",
",",
"n",
",",
"inset",
")",
":",
"assert",
"isinstance",
"(",
"inset",
",",
"stypes",
".",
"SpiceCell",
")",
"insize",
"=",
"ctypes",
".",
"c_int",
"(",
"insize",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"libspice",
".",
"valid_c",
"(",
"insize",
",",
"n",
",",
"inset",
")",
"return",
"inset"
] |
Create a valid CSPICE set from a CSPICE Cell of any data type.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/valid_c.html
:param insize: Size (maximum cardinality) of the set.
:type insize: int
:param n: Initial no. of (possibly non-distinct) elements.
:type n: int
:param inset: Set to be validated.
:return: validated set
:rtype: spiceypy.utils.support_types.SpiceCell
|
[
"Create",
"a",
"valid",
"CSPICE",
"set",
"from",
"a",
"CSPICE",
"Cell",
"of",
"any",
"data",
"type",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14494-L14512
|
14,958
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vcrss
|
def vcrss(v1, v2):
"""
Compute the cross product of two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vcrss_c.html
:param v1: Left hand vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right hand vector for cross product.
:type v2: 3-Element Array of floats
:return: Cross product v1 x v2.
:rtype: 3-Element Array of floats
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
vout = stypes.emptyDoubleVector(3)
libspice.vcrss_c(v1, v2, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vcrss(v1, v2):
"""
Compute the cross product of two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vcrss_c.html
:param v1: Left hand vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right hand vector for cross product.
:type v2: 3-Element Array of floats
:return: Cross product v1 x v2.
:rtype: 3-Element Array of floats
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
vout = stypes.emptyDoubleVector(3)
libspice.vcrss_c(v1, v2, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vcrss",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vcrss_c",
"(",
"v1",
",",
"v2",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Compute the cross product of two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vcrss_c.html
:param v1: Left hand vector for cross product.
:type v1: 3-Element Array of floats
:param v2: Right hand vector for cross product.
:type v2: 3-Element Array of floats
:return: Cross product v1 x v2.
:rtype: 3-Element Array of floats
|
[
"Compute",
"the",
"cross",
"product",
"of",
"two",
"3",
"-",
"dimensional",
"vectors",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14516-L14533
|
14,959
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vdist
|
def vdist(v1, v2):
"""
Return the distance between two three-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdist_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:type v2: 3-Element Array of floats
:return: the distance between v1 and v2
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
return libspice.vdist_c(v1, v2)
|
python
|
def vdist(v1, v2):
"""
Return the distance between two three-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdist_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:type v2: 3-Element Array of floats
:return: the distance between v1 and v2
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
return libspice.vdist_c(v1, v2)
|
[
"def",
"vdist",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"return",
"libspice",
".",
"vdist_c",
"(",
"v1",
",",
"v2",
")"
] |
Return the distance between two three-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdist_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:type v2: 3-Element Array of floats
:return: the distance between v1 and v2
:rtype: float
|
[
"Return",
"the",
"distance",
"between",
"two",
"three",
"-",
"dimensional",
"vectors",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14537-L14552
|
14,960
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vdistg
|
def vdistg(v1, v2, ndim):
"""
Return the distance between two vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdistg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param v2: ndim-dimensional double precision vector.
:type v2: list[ndim]
:param ndim: Dimension of v1 and v2.
:type ndim: int
:return: the distance between v1 and v2
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
ndim = ctypes.c_int(ndim)
return libspice.vdistg_c(v1, v2, ndim)
|
python
|
def vdistg(v1, v2, ndim):
"""
Return the distance between two vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdistg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param v2: ndim-dimensional double precision vector.
:type v2: list[ndim]
:param ndim: Dimension of v1 and v2.
:type ndim: int
:return: the distance between v1 and v2
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
ndim = ctypes.c_int(ndim)
return libspice.vdistg_c(v1, v2, ndim)
|
[
"def",
"vdistg",
"(",
"v1",
",",
"v2",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
"libspice",
".",
"vdistg_c",
"(",
"v1",
",",
"v2",
",",
"ndim",
")"
] |
Return the distance between two vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdistg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param v2: ndim-dimensional double precision vector.
:type v2: list[ndim]
:param ndim: Dimension of v1 and v2.
:type ndim: int
:return: the distance between v1 and v2
:rtype: float
|
[
"Return",
"the",
"distance",
"between",
"two",
"vectors",
"of",
"arbitrary",
"dimension",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14556-L14574
|
14,961
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vdot
|
def vdot(v1, v2):
"""
Compute the dot product of two double precision, 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdot_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:type v2: 3-Element Array of floats
:return: dot product of v1 and v2.
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
return libspice.vdot_c(v1, v2)
|
python
|
def vdot(v1, v2):
"""
Compute the dot product of two double precision, 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdot_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:type v2: 3-Element Array of floats
:return: dot product of v1 and v2.
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
return libspice.vdot_c(v1, v2)
|
[
"def",
"vdot",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"return",
"libspice",
".",
"vdot_c",
"(",
"v1",
",",
"v2",
")"
] |
Compute the dot product of two double precision, 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdot_c.html
:param v1: First vector in the dot product.
:type v1: 3-Element Array of floats
:param v2: Second vector in the dot product.
:type v2: 3-Element Array of floats
:return: dot product of v1 and v2.
:rtype: float
|
[
"Compute",
"the",
"dot",
"product",
"of",
"two",
"double",
"precision",
"3",
"-",
"dimensional",
"vectors",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14578-L14593
|
14,962
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vdotg
|
def vdotg(v1, v2, ndim):
"""
Compute the dot product of two double precision vectors of
arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdotg_c.html
:param v1: First vector in the dot product.
:type v1: list[ndim]
:param v2: Second vector in the dot product.
:type v2: list[ndim]
:param ndim: Dimension of v1 and v2.
:type ndim: int
:return: dot product of v1 and v2.
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
ndim = ctypes.c_int(ndim)
return libspice.vdotg_c(v1, v2, ndim)
|
python
|
def vdotg(v1, v2, ndim):
"""
Compute the dot product of two double precision vectors of
arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdotg_c.html
:param v1: First vector in the dot product.
:type v1: list[ndim]
:param v2: Second vector in the dot product.
:type v2: list[ndim]
:param ndim: Dimension of v1 and v2.
:type ndim: int
:return: dot product of v1 and v2.
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
ndim = ctypes.c_int(ndim)
return libspice.vdotg_c(v1, v2, ndim)
|
[
"def",
"vdotg",
"(",
"v1",
",",
"v2",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
"libspice",
".",
"vdotg_c",
"(",
"v1",
",",
"v2",
",",
"ndim",
")"
] |
Compute the dot product of two double precision vectors of
arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vdotg_c.html
:param v1: First vector in the dot product.
:type v1: list[ndim]
:param v2: Second vector in the dot product.
:type v2: list[ndim]
:param ndim: Dimension of v1 and v2.
:type ndim: int
:return: dot product of v1 and v2.
:rtype: float
|
[
"Compute",
"the",
"dot",
"product",
"of",
"two",
"double",
"precision",
"vectors",
"of",
"arbitrary",
"dimension",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14597-L14616
|
14,963
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vequ
|
def vequ(v1):
"""
Make one double precision 3-dimensional vector equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequ_c.html
:param v1: 3-dimensional double precision vector.
:type v1: 3-Element Array of floats
:return: 3-dimensional double precision vector set equal to vin.
:rtype: 3-Element Array of floats
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(3)
libspice.vequ_c(v1, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vequ(v1):
"""
Make one double precision 3-dimensional vector equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequ_c.html
:param v1: 3-dimensional double precision vector.
:type v1: 3-Element Array of floats
:return: 3-dimensional double precision vector set equal to vin.
:rtype: 3-Element Array of floats
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(3)
libspice.vequ_c(v1, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vequ",
"(",
"v1",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vequ_c",
"(",
"v1",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Make one double precision 3-dimensional vector equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequ_c.html
:param v1: 3-dimensional double precision vector.
:type v1: 3-Element Array of floats
:return: 3-dimensional double precision vector set equal to vin.
:rtype: 3-Element Array of floats
|
[
"Make",
"one",
"double",
"precision",
"3",
"-",
"dimensional",
"vector",
"equal",
"to",
"another",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14620-L14634
|
14,964
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vequg
|
def vequg(v1, ndim):
"""
Make one double precision vector of arbitrary dimension equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param ndim: Dimension of vin (and also vout).
:type ndim: int
:return: ndim-dimensional double precision vector set equal to vin.
:rtype: list[ndim]
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(ndim)
ndim = ctypes.c_int(ndim)
libspice.vequg_c(v1, ndim, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vequg(v1, ndim):
"""
Make one double precision vector of arbitrary dimension equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param ndim: Dimension of vin (and also vout).
:type ndim: int
:return: ndim-dimensional double precision vector set equal to vin.
:rtype: list[ndim]
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(ndim)
ndim = ctypes.c_int(ndim)
libspice.vequg_c(v1, ndim, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vequg",
"(",
"v1",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"libspice",
".",
"vequg_c",
"(",
"v1",
",",
"ndim",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Make one double precision vector of arbitrary dimension equal to another.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vequg_c.html
:param v1: ndim-dimensional double precision vector.
:type v1: list[ndim]
:param ndim: Dimension of vin (and also vout).
:type ndim: int
:return: ndim-dimensional double precision vector set equal to vin.
:rtype: list[ndim]
|
[
"Make",
"one",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"equal",
"to",
"another",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14638-L14655
|
14,965
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vhat
|
def vhat(v1):
"""
Find the unit vector along a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhat_c.html
:param v1: Vector to be unitized.
:type v1: 3-Element Array of floats
:return: Unit vector v / abs(v).
:rtype: 3-Element Array of floats
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(3)
libspice.vhat_c(v1, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vhat(v1):
"""
Find the unit vector along a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhat_c.html
:param v1: Vector to be unitized.
:type v1: 3-Element Array of floats
:return: Unit vector v / abs(v).
:rtype: 3-Element Array of floats
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(3)
libspice.vhat_c(v1, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vhat",
"(",
"v1",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vhat_c",
"(",
"v1",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Find the unit vector along a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhat_c.html
:param v1: Vector to be unitized.
:type v1: 3-Element Array of floats
:return: Unit vector v / abs(v).
:rtype: 3-Element Array of floats
|
[
"Find",
"the",
"unit",
"vector",
"along",
"a",
"double",
"precision",
"3",
"-",
"dimensional",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14659-L14673
|
14,966
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vhatg
|
def vhatg(v1, ndim):
"""
Find the unit vector along a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhatg_c.html
:param v1: Vector to be normalized.
:type v1: list[ndim]
:param ndim: Dimension of v1 (and also vout).
:type ndim: int
:return: Unit vector v / abs(v).
:rtype: list[ndim]
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(ndim)
ndim = ctypes.c_int(ndim)
libspice.vhatg_c(v1, ndim, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vhatg(v1, ndim):
"""
Find the unit vector along a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhatg_c.html
:param v1: Vector to be normalized.
:type v1: list[ndim]
:param ndim: Dimension of v1 (and also vout).
:type ndim: int
:return: Unit vector v / abs(v).
:rtype: list[ndim]
"""
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(ndim)
ndim = ctypes.c_int(ndim)
libspice.vhatg_c(v1, ndim, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vhatg",
"(",
"v1",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"libspice",
".",
"vhatg_c",
"(",
"v1",
",",
"ndim",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Find the unit vector along a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vhatg_c.html
:param v1: Vector to be normalized.
:type v1: list[ndim]
:param ndim: Dimension of v1 (and also vout).
:type ndim: int
:return: Unit vector v / abs(v).
:rtype: list[ndim]
|
[
"Find",
"the",
"unit",
"vector",
"along",
"a",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14677-L14694
|
14,967
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vlcom
|
def vlcom(a, v1, b, v2):
"""
Compute a vector linear combination of two double precision,
3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcom_c.html
:param a: Coefficient of v1
:type a: float
:param v1: Vector in 3-space
:type v1: 3-Element Array of floats
:param b: Coefficient of v2
:type b: float
:param v2: Vector in 3-space
:type v2: 3-Element Array of floats
:return: Linear Vector Combination a*v1 + b*v2.
:rtype: 3-Element Array of floats
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
sumv = stypes.emptyDoubleVector(3)
a = ctypes.c_double(a)
b = ctypes.c_double(b)
libspice.vlcom_c(a, v1, b, v2, sumv)
return stypes.cVectorToPython(sumv)
|
python
|
def vlcom(a, v1, b, v2):
"""
Compute a vector linear combination of two double precision,
3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcom_c.html
:param a: Coefficient of v1
:type a: float
:param v1: Vector in 3-space
:type v1: 3-Element Array of floats
:param b: Coefficient of v2
:type b: float
:param v2: Vector in 3-space
:type v2: 3-Element Array of floats
:return: Linear Vector Combination a*v1 + b*v2.
:rtype: 3-Element Array of floats
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
sumv = stypes.emptyDoubleVector(3)
a = ctypes.c_double(a)
b = ctypes.c_double(b)
libspice.vlcom_c(a, v1, b, v2, sumv)
return stypes.cVectorToPython(sumv)
|
[
"def",
"vlcom",
"(",
"a",
",",
"v1",
",",
"b",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"sumv",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"a",
"=",
"ctypes",
".",
"c_double",
"(",
"a",
")",
"b",
"=",
"ctypes",
".",
"c_double",
"(",
"b",
")",
"libspice",
".",
"vlcom_c",
"(",
"a",
",",
"v1",
",",
"b",
",",
"v2",
",",
"sumv",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"sumv",
")"
] |
Compute a vector linear combination of two double precision,
3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcom_c.html
:param a: Coefficient of v1
:type a: float
:param v1: Vector in 3-space
:type v1: 3-Element Array of floats
:param b: Coefficient of v2
:type b: float
:param v2: Vector in 3-space
:type v2: 3-Element Array of floats
:return: Linear Vector Combination a*v1 + b*v2.
:rtype: 3-Element Array of floats
|
[
"Compute",
"a",
"vector",
"linear",
"combination",
"of",
"two",
"double",
"precision",
"3",
"-",
"dimensional",
"vectors",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14698-L14722
|
14,968
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vlcomg
|
def vlcomg(n, a, v1, b, v2):
"""
Compute a vector linear combination of two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcomg_c.html
:param n: Dimension of vector space
:type n: int
:param a: Coefficient of v1
:type a: float
:param v1: Vector in n-space
:type v1: list[n]
:param b: Coefficient of v2
:type b: float
:param v2: Vector in n-space
:type v2: list[n]
:return: Linear Vector Combination a*v1 + b*v2
:rtype: list[n]
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
sumv = stypes.emptyDoubleVector(n)
a = ctypes.c_double(a)
b = ctypes.c_double(b)
n = ctypes.c_int(n)
libspice.vlcomg_c(n, a, v1, b, v2, sumv)
return stypes.cVectorToPython(sumv)
|
python
|
def vlcomg(n, a, v1, b, v2):
"""
Compute a vector linear combination of two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcomg_c.html
:param n: Dimension of vector space
:type n: int
:param a: Coefficient of v1
:type a: float
:param v1: Vector in n-space
:type v1: list[n]
:param b: Coefficient of v2
:type b: float
:param v2: Vector in n-space
:type v2: list[n]
:return: Linear Vector Combination a*v1 + b*v2
:rtype: list[n]
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
sumv = stypes.emptyDoubleVector(n)
a = ctypes.c_double(a)
b = ctypes.c_double(b)
n = ctypes.c_int(n)
libspice.vlcomg_c(n, a, v1, b, v2, sumv)
return stypes.cVectorToPython(sumv)
|
[
"def",
"vlcomg",
"(",
"n",
",",
"a",
",",
"v1",
",",
"b",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"sumv",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"n",
")",
"a",
"=",
"ctypes",
".",
"c_double",
"(",
"a",
")",
"b",
"=",
"ctypes",
".",
"c_double",
"(",
"b",
")",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"libspice",
".",
"vlcomg_c",
"(",
"n",
",",
"a",
",",
"v1",
",",
"b",
",",
"v2",
",",
"sumv",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"sumv",
")"
] |
Compute a vector linear combination of two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vlcomg_c.html
:param n: Dimension of vector space
:type n: int
:param a: Coefficient of v1
:type a: float
:param v1: Vector in n-space
:type v1: list[n]
:param b: Coefficient of v2
:type b: float
:param v2: Vector in n-space
:type v2: list[n]
:return: Linear Vector Combination a*v1 + b*v2
:rtype: list[n]
|
[
"Compute",
"a",
"vector",
"linear",
"combination",
"of",
"two",
"double",
"precision",
"vectors",
"of",
"arbitrary",
"dimension",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14760-L14787
|
14,969
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vminug
|
def vminug(vin, ndim):
"""
Negate a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminug_c.html
:param vin: ndim-dimensional double precision vector to be negated.
:type vin: Array of floats
:param ndim: Dimension of vin.
:type ndim: int
:return: ndim-dimensional double precision vector equal to -vin.
:rtype: list[ndim]
"""
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(ndim)
ndim = ctypes.c_int(ndim)
libspice.vminug_c(vin, ndim, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vminug(vin, ndim):
"""
Negate a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminug_c.html
:param vin: ndim-dimensional double precision vector to be negated.
:type vin: Array of floats
:param ndim: Dimension of vin.
:type ndim: int
:return: ndim-dimensional double precision vector equal to -vin.
:rtype: list[ndim]
"""
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(ndim)
ndim = ctypes.c_int(ndim)
libspice.vminug_c(vin, ndim, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vminug",
"(",
"vin",
",",
"ndim",
")",
":",
"vin",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"vin",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"libspice",
".",
"vminug_c",
"(",
"vin",
",",
"ndim",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Negate a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminug_c.html
:param vin: ndim-dimensional double precision vector to be negated.
:type vin: Array of floats
:param ndim: Dimension of vin.
:type ndim: int
:return: ndim-dimensional double precision vector equal to -vin.
:rtype: list[ndim]
|
[
"Negate",
"a",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14791-L14808
|
14,970
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vminus
|
def vminus(vin):
"""
Negate a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminus_c.html
:param vin: Vector to be negated.
:type vin: 3-Element Array of floats
:return: Negated vector -v1.
:rtype: 3-Element Array of floats
"""
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(3)
libspice.vminus_c(vin, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vminus(vin):
"""
Negate a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminus_c.html
:param vin: Vector to be negated.
:type vin: 3-Element Array of floats
:return: Negated vector -v1.
:rtype: 3-Element Array of floats
"""
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(3)
libspice.vminus_c(vin, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vminus",
"(",
"vin",
")",
":",
"vin",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"vin",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vminus_c",
"(",
"vin",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Negate a double precision 3-dimensional vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vminus_c.html
:param vin: Vector to be negated.
:type vin: 3-Element Array of floats
:return: Negated vector -v1.
:rtype: 3-Element Array of floats
|
[
"Negate",
"a",
"double",
"precision",
"3",
"-",
"dimensional",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14812-L14826
|
14,971
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vnormg
|
def vnormg(v, ndim):
"""
Compute the magnitude of a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vnormg_c.html
:param v: Vector whose magnitude is to be found.
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
:return: magnitude of v calculated in a numerically stable way
:rtype: float
"""
v = stypes.toDoubleVector(v)
ndim = ctypes.c_int(ndim)
return libspice.vnormg_c(v, ndim)
|
python
|
def vnormg(v, ndim):
"""
Compute the magnitude of a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vnormg_c.html
:param v: Vector whose magnitude is to be found.
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
:return: magnitude of v calculated in a numerically stable way
:rtype: float
"""
v = stypes.toDoubleVector(v)
ndim = ctypes.c_int(ndim)
return libspice.vnormg_c(v, ndim)
|
[
"def",
"vnormg",
"(",
"v",
",",
"ndim",
")",
":",
"v",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
"libspice",
".",
"vnormg_c",
"(",
"v",
",",
"ndim",
")"
] |
Compute the magnitude of a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vnormg_c.html
:param v: Vector whose magnitude is to be found.
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
:return: magnitude of v calculated in a numerically stable way
:rtype: float
|
[
"Compute",
"the",
"magnitude",
"of",
"a",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14846-L14861
|
14,972
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vpack
|
def vpack(x, y, z):
"""
Pack three scalar components into a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vpack_c.html
:param x: first scalar component
:type x: float
:param y: second scalar component
:type y: float
:param z: third scalar component
:type z: float
:return: Equivalent 3-vector.
:rtype: 3-Element Array of floats
"""
x = ctypes.c_double(x)
y = ctypes.c_double(y)
z = ctypes.c_double(z)
vout = stypes.emptyDoubleVector(3)
libspice.vpack_c(x, y, z, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vpack(x, y, z):
"""
Pack three scalar components into a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vpack_c.html
:param x: first scalar component
:type x: float
:param y: second scalar component
:type y: float
:param z: third scalar component
:type z: float
:return: Equivalent 3-vector.
:rtype: 3-Element Array of floats
"""
x = ctypes.c_double(x)
y = ctypes.c_double(y)
z = ctypes.c_double(z)
vout = stypes.emptyDoubleVector(3)
libspice.vpack_c(x, y, z, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vpack",
"(",
"x",
",",
"y",
",",
"z",
")",
":",
"x",
"=",
"ctypes",
".",
"c_double",
"(",
"x",
")",
"y",
"=",
"ctypes",
".",
"c_double",
"(",
"y",
")",
"z",
"=",
"ctypes",
".",
"c_double",
"(",
"z",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vpack_c",
"(",
"x",
",",
"y",
",",
"z",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Pack three scalar components into a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vpack_c.html
:param x: first scalar component
:type x: float
:param y: second scalar component
:type y: float
:param z: third scalar component
:type z: float
:return: Equivalent 3-vector.
:rtype: 3-Element Array of floats
|
[
"Pack",
"three",
"scalar",
"components",
"into",
"a",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14865-L14885
|
14,973
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vperp
|
def vperp(a, b):
"""
Find the component of a vector that is perpendicular to a second
vector. All vectors are 3-dimensional.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vperp_c.html
:param a: The vector whose orthogonal component is sought.
:type a: 3-Element Array of floats
:param b: The vector used as the orthogonal reference.
:type b: 3-Element Array of floats
:return: The component of a orthogonal to b.
:rtype: 3-Element Array of floats
"""
a = stypes.toDoubleVector(a)
b = stypes.toDoubleVector(b)
vout = stypes.emptyDoubleVector(3)
libspice.vperp_c(a, b, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vperp(a, b):
"""
Find the component of a vector that is perpendicular to a second
vector. All vectors are 3-dimensional.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vperp_c.html
:param a: The vector whose orthogonal component is sought.
:type a: 3-Element Array of floats
:param b: The vector used as the orthogonal reference.
:type b: 3-Element Array of floats
:return: The component of a orthogonal to b.
:rtype: 3-Element Array of floats
"""
a = stypes.toDoubleVector(a)
b = stypes.toDoubleVector(b)
vout = stypes.emptyDoubleVector(3)
libspice.vperp_c(a, b, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vperp",
"(",
"a",
",",
"b",
")",
":",
"a",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"a",
")",
"b",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"b",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vperp_c",
"(",
"a",
",",
"b",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Find the component of a vector that is perpendicular to a second
vector. All vectors are 3-dimensional.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vperp_c.html
:param a: The vector whose orthogonal component is sought.
:type a: 3-Element Array of floats
:param b: The vector used as the orthogonal reference.
:type b: 3-Element Array of floats
:return: The component of a orthogonal to b.
:rtype: 3-Element Array of floats
|
[
"Find",
"the",
"component",
"of",
"a",
"vector",
"that",
"is",
"perpendicular",
"to",
"a",
"second",
"vector",
".",
"All",
"vectors",
"are",
"3",
"-",
"dimensional",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14889-L14907
|
14,974
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vprjp
|
def vprjp(vin, plane):
"""
Project a vector onto a specified plane, orthogonally.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjp_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
:param plane: Plane containing vin.
:type plane: spiceypy.utils.support_types.Plane
:return: Vector resulting from projection.
:rtype: 3-Element Array of floats
"""
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(3)
libspice.vprjp_c(vin, ctypes.byref(plane), vout)
return stypes.cVectorToPython(vout)
|
python
|
def vprjp(vin, plane):
"""
Project a vector onto a specified plane, orthogonally.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjp_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
:param plane: Plane containing vin.
:type plane: spiceypy.utils.support_types.Plane
:return: Vector resulting from projection.
:rtype: 3-Element Array of floats
"""
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(3)
libspice.vprjp_c(vin, ctypes.byref(plane), vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vprjp",
"(",
"vin",
",",
"plane",
")",
":",
"vin",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"vin",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vprjp_c",
"(",
"vin",
",",
"ctypes",
".",
"byref",
"(",
"plane",
")",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Project a vector onto a specified plane, orthogonally.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjp_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
:param plane: Plane containing vin.
:type plane: spiceypy.utils.support_types.Plane
:return: Vector resulting from projection.
:rtype: 3-Element Array of floats
|
[
"Project",
"a",
"vector",
"onto",
"a",
"specified",
"plane",
"orthogonally",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14911-L14927
|
14,975
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vprjpi
|
def vprjpi(vin, projpl, invpl):
"""
Find the vector in a specified plane that maps to a specified
vector in another plane under orthogonal projection.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjpi_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
:param projpl: Plane containing vin.
:type projpl: spiceypy.utils.support_types.Plane
:param invpl: Plane containing inverse image of vin.
:type invpl: spiceypy.utils.support_types.Plane
:return: Inverse projection of vin.
:rtype: list
"""
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(3)
found = ctypes.c_int()
libspice.vprjpi_c(vin, ctypes.byref(projpl), ctypes.byref(invpl), vout,
ctypes.byref(found))
return stypes.cVectorToPython(vout), bool(found.value)
|
python
|
def vprjpi(vin, projpl, invpl):
"""
Find the vector in a specified plane that maps to a specified
vector in another plane under orthogonal projection.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjpi_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
:param projpl: Plane containing vin.
:type projpl: spiceypy.utils.support_types.Plane
:param invpl: Plane containing inverse image of vin.
:type invpl: spiceypy.utils.support_types.Plane
:return: Inverse projection of vin.
:rtype: list
"""
vin = stypes.toDoubleVector(vin)
vout = stypes.emptyDoubleVector(3)
found = ctypes.c_int()
libspice.vprjpi_c(vin, ctypes.byref(projpl), ctypes.byref(invpl), vout,
ctypes.byref(found))
return stypes.cVectorToPython(vout), bool(found.value)
|
[
"def",
"vprjpi",
"(",
"vin",
",",
"projpl",
",",
"invpl",
")",
":",
"vin",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"vin",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"found",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"libspice",
".",
"vprjpi_c",
"(",
"vin",
",",
"ctypes",
".",
"byref",
"(",
"projpl",
")",
",",
"ctypes",
".",
"byref",
"(",
"invpl",
")",
",",
"vout",
",",
"ctypes",
".",
"byref",
"(",
"found",
")",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")",
",",
"bool",
"(",
"found",
".",
"value",
")"
] |
Find the vector in a specified plane that maps to a specified
vector in another plane under orthogonal projection.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vprjpi_c.html
:param vin: The projected vector.
:type vin: 3-Element Array of floats
:param projpl: Plane containing vin.
:type projpl: spiceypy.utils.support_types.Plane
:param invpl: Plane containing inverse image of vin.
:type invpl: spiceypy.utils.support_types.Plane
:return: Inverse projection of vin.
:rtype: list
|
[
"Find",
"the",
"vector",
"in",
"a",
"specified",
"plane",
"that",
"maps",
"to",
"a",
"specified",
"vector",
"in",
"another",
"plane",
"under",
"orthogonal",
"projection",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14932-L14953
|
14,976
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vproj
|
def vproj(a, b):
"""
Find the projection of one vector onto another vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vproj_c.html
:param a: The vector to be projected.
:type a: 3-Element Array of floats
:param b: The vector onto which a is to be projected.
:type b: 3-Element Array of floats
:return: The projection of a onto b.
:rtype: 3-Element Array of floats
"""
a = stypes.toDoubleVector(a)
b = stypes.toDoubleVector(b)
vout = stypes.emptyDoubleVector(3)
libspice.vproj_c(a, b, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vproj(a, b):
"""
Find the projection of one vector onto another vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vproj_c.html
:param a: The vector to be projected.
:type a: 3-Element Array of floats
:param b: The vector onto which a is to be projected.
:type b: 3-Element Array of floats
:return: The projection of a onto b.
:rtype: 3-Element Array of floats
"""
a = stypes.toDoubleVector(a)
b = stypes.toDoubleVector(b)
vout = stypes.emptyDoubleVector(3)
libspice.vproj_c(a, b, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vproj",
"(",
"a",
",",
"b",
")",
":",
"a",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"a",
")",
"b",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"b",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vproj_c",
"(",
"a",
",",
"b",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Find the projection of one vector onto another vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vproj_c.html
:param a: The vector to be projected.
:type a: 3-Element Array of floats
:param b: The vector onto which a is to be projected.
:type b: 3-Element Array of floats
:return: The projection of a onto b.
:rtype: 3-Element Array of floats
|
[
"Find",
"the",
"projection",
"of",
"one",
"vector",
"onto",
"another",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14957-L14974
|
14,977
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vrel
|
def vrel(v1, v2):
"""
Return the relative difference between two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrel_c.html
:param v1: First vector
:type v1: 3-Element Array of floats
:param v2: Second vector
:type v2: 3-Element Array of floats
:return: the relative difference between v1 and v2.
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
return libspice.vrel_c(v1, v2)
|
python
|
def vrel(v1, v2):
"""
Return the relative difference between two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrel_c.html
:param v1: First vector
:type v1: 3-Element Array of floats
:param v2: Second vector
:type v2: 3-Element Array of floats
:return: the relative difference between v1 and v2.
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
return libspice.vrel_c(v1, v2)
|
[
"def",
"vrel",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"return",
"libspice",
".",
"vrel_c",
"(",
"v1",
",",
"v2",
")"
] |
Return the relative difference between two 3-dimensional vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrel_c.html
:param v1: First vector
:type v1: 3-Element Array of floats
:param v2: Second vector
:type v2: 3-Element Array of floats
:return: the relative difference between v1 and v2.
:rtype: float
|
[
"Return",
"the",
"relative",
"difference",
"between",
"two",
"3",
"-",
"dimensional",
"vectors",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14978-L14993
|
14,978
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vrelg
|
def vrelg(v1, v2, ndim):
"""
Return the relative difference between two vectors of general dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrelg_c.html
:param v1: First vector
:type v1: Array of floats
:param v2: Second vector
:type v2: Array of floats
:param ndim: Dimension of v1 and v2.
:type ndim: int
:return: the relative difference between v1 and v2.
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
ndim = ctypes.c_int(ndim)
return libspice.vrelg_c(v1, v2, ndim)
|
python
|
def vrelg(v1, v2, ndim):
"""
Return the relative difference between two vectors of general dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrelg_c.html
:param v1: First vector
:type v1: Array of floats
:param v2: Second vector
:type v2: Array of floats
:param ndim: Dimension of v1 and v2.
:type ndim: int
:return: the relative difference between v1 and v2.
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
ndim = ctypes.c_int(ndim)
return libspice.vrelg_c(v1, v2, ndim)
|
[
"def",
"vrelg",
"(",
"v1",
",",
"v2",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
"libspice",
".",
"vrelg_c",
"(",
"v1",
",",
"v2",
",",
"ndim",
")"
] |
Return the relative difference between two vectors of general dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrelg_c.html
:param v1: First vector
:type v1: Array of floats
:param v2: Second vector
:type v2: Array of floats
:param ndim: Dimension of v1 and v2.
:type ndim: int
:return: the relative difference between v1 and v2.
:rtype: float
|
[
"Return",
"the",
"relative",
"difference",
"between",
"two",
"vectors",
"of",
"general",
"dimension",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L14997-L15015
|
14,979
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vrotv
|
def vrotv(v, axis, theta):
"""
Rotate a vector about a specified axis vector by a
specified angle and return the rotated vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrotv_c.html
:param v: Vector to be rotated.
:type v: 3-Element Array of floats
:param axis: Axis of the rotation.
:type axis: 3-Element Array of floats
:param theta: Angle of rotation (radians).
:type theta: float
:return: Result of rotating v about axis by theta
:rtype: 3-Element Array of floats
"""
v = stypes.toDoubleVector(v)
axis = stypes.toDoubleVector(axis)
theta = ctypes.c_double(theta)
r = stypes.emptyDoubleVector(3)
libspice.vrotv_c(v, axis, theta, r)
return stypes.cVectorToPython(r)
|
python
|
def vrotv(v, axis, theta):
"""
Rotate a vector about a specified axis vector by a
specified angle and return the rotated vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrotv_c.html
:param v: Vector to be rotated.
:type v: 3-Element Array of floats
:param axis: Axis of the rotation.
:type axis: 3-Element Array of floats
:param theta: Angle of rotation (radians).
:type theta: float
:return: Result of rotating v about axis by theta
:rtype: 3-Element Array of floats
"""
v = stypes.toDoubleVector(v)
axis = stypes.toDoubleVector(axis)
theta = ctypes.c_double(theta)
r = stypes.emptyDoubleVector(3)
libspice.vrotv_c(v, axis, theta, r)
return stypes.cVectorToPython(r)
|
[
"def",
"vrotv",
"(",
"v",
",",
"axis",
",",
"theta",
")",
":",
"v",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v",
")",
"axis",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"axis",
")",
"theta",
"=",
"ctypes",
".",
"c_double",
"(",
"theta",
")",
"r",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vrotv_c",
"(",
"v",
",",
"axis",
",",
"theta",
",",
"r",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"r",
")"
] |
Rotate a vector about a specified axis vector by a
specified angle and return the rotated vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vrotv_c.html
:param v: Vector to be rotated.
:type v: 3-Element Array of floats
:param axis: Axis of the rotation.
:type axis: 3-Element Array of floats
:param theta: Angle of rotation (radians).
:type theta: float
:return: Result of rotating v about axis by theta
:rtype: 3-Element Array of floats
|
[
"Rotate",
"a",
"vector",
"about",
"a",
"specified",
"axis",
"vector",
"by",
"a",
"specified",
"angle",
"and",
"return",
"the",
"rotated",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15019-L15040
|
14,980
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vscl
|
def vscl(s, v1):
"""
Multiply a scalar and a 3-dimensional double precision vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vscl_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: 3-Element Array of floats
:return: Product vector, s*v1.
:rtype: 3-Element Array of floats
"""
s = ctypes.c_double(s)
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(3)
libspice.vscl_c(s, v1, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vscl(s, v1):
"""
Multiply a scalar and a 3-dimensional double precision vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vscl_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: 3-Element Array of floats
:return: Product vector, s*v1.
:rtype: 3-Element Array of floats
"""
s = ctypes.c_double(s)
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(3)
libspice.vscl_c(s, v1, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vscl",
"(",
"s",
",",
"v1",
")",
":",
"s",
"=",
"ctypes",
".",
"c_double",
"(",
"s",
")",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vscl_c",
"(",
"s",
",",
"v1",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Multiply a scalar and a 3-dimensional double precision vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vscl_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: 3-Element Array of floats
:return: Product vector, s*v1.
:rtype: 3-Element Array of floats
|
[
"Multiply",
"a",
"scalar",
"and",
"a",
"3",
"-",
"dimensional",
"double",
"precision",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15044-L15061
|
14,981
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vsclg
|
def vsclg(s, v1, ndim):
"""
Multiply a scalar and a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsclg_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: Array of floats
:param ndim: Dimension of v1
:type ndim: int
:return: Product vector, s*v1.
:rtype: Array of floats
"""
s = ctypes.c_double(s)
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(ndim)
ndim = ctypes.c_int(ndim)
libspice.vsclg_c(s, v1, ndim, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vsclg(s, v1, ndim):
"""
Multiply a scalar and a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsclg_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: Array of floats
:param ndim: Dimension of v1
:type ndim: int
:return: Product vector, s*v1.
:rtype: Array of floats
"""
s = ctypes.c_double(s)
v1 = stypes.toDoubleVector(v1)
vout = stypes.emptyDoubleVector(ndim)
ndim = ctypes.c_int(ndim)
libspice.vsclg_c(s, v1, ndim, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vsclg",
"(",
"s",
",",
"v1",
",",
"ndim",
")",
":",
"s",
"=",
"ctypes",
".",
"c_double",
"(",
"s",
")",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"libspice",
".",
"vsclg_c",
"(",
"s",
",",
"v1",
",",
"ndim",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Multiply a scalar and a double precision vector of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsclg_c.html
:param s: Scalar to multiply a vector
:type s: float
:param v1: Vector to be multiplied
:type v1: Array of floats
:param ndim: Dimension of v1
:type ndim: int
:return: Product vector, s*v1.
:rtype: Array of floats
|
[
"Multiply",
"a",
"scalar",
"and",
"a",
"double",
"precision",
"vector",
"of",
"arbitrary",
"dimension",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15065-L15085
|
14,982
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vsep
|
def vsep(v1, v2):
"""
Find the separation angle in radians between two double
precision, 3-dimensional vectors. This angle is defined as zero
if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsep_c.html
:param v1: First vector
:type v1: 3-Element Array of floats
:param v2: Second vector
:type v2: 3-Element Array of floats
:return: separation angle in radians
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
return libspice.vsep_c(v1, v2)
|
python
|
def vsep(v1, v2):
"""
Find the separation angle in radians between two double
precision, 3-dimensional vectors. This angle is defined as zero
if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsep_c.html
:param v1: First vector
:type v1: 3-Element Array of floats
:param v2: Second vector
:type v2: 3-Element Array of floats
:return: separation angle in radians
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
return libspice.vsep_c(v1, v2)
|
[
"def",
"vsep",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"return",
"libspice",
".",
"vsep_c",
"(",
"v1",
",",
"v2",
")"
] |
Find the separation angle in radians between two double
precision, 3-dimensional vectors. This angle is defined as zero
if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsep_c.html
:param v1: First vector
:type v1: 3-Element Array of floats
:param v2: Second vector
:type v2: 3-Element Array of floats
:return: separation angle in radians
:rtype: float
|
[
"Find",
"the",
"separation",
"angle",
"in",
"radians",
"between",
"two",
"double",
"precision",
"3",
"-",
"dimensional",
"vectors",
".",
"This",
"angle",
"is",
"defined",
"as",
"zero",
"if",
"either",
"vector",
"is",
"zero",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15089-L15106
|
14,983
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vsepg
|
def vsepg(v1, v2, ndim):
"""
Find the separation angle in radians between two double
precision vectors of arbitrary dimension. This angle is defined
as zero if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsepg_c.html
:param v1: First vector
:type v1: Array of floats
:param v2: Second vector
:type v2: Array of floats
:param ndim: The number of elements in v1 and v2.
:type ndim: int
:return: separation angle in radians
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
ndim = ctypes.c_int(ndim)
return libspice.vsepg_c(v1, v2, ndim)
|
python
|
def vsepg(v1, v2, ndim):
"""
Find the separation angle in radians between two double
precision vectors of arbitrary dimension. This angle is defined
as zero if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsepg_c.html
:param v1: First vector
:type v1: Array of floats
:param v2: Second vector
:type v2: Array of floats
:param ndim: The number of elements in v1 and v2.
:type ndim: int
:return: separation angle in radians
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
ndim = ctypes.c_int(ndim)
return libspice.vsepg_c(v1, v2, ndim)
|
[
"def",
"vsepg",
"(",
"v1",
",",
"v2",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
"libspice",
".",
"vsepg_c",
"(",
"v1",
",",
"v2",
",",
"ndim",
")"
] |
Find the separation angle in radians between two double
precision vectors of arbitrary dimension. This angle is defined
as zero if either vector is zero.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsepg_c.html
:param v1: First vector
:type v1: Array of floats
:param v2: Second vector
:type v2: Array of floats
:param ndim: The number of elements in v1 and v2.
:type ndim: int
:return: separation angle in radians
:rtype: float
|
[
"Find",
"the",
"separation",
"angle",
"in",
"radians",
"between",
"two",
"double",
"precision",
"vectors",
"of",
"arbitrary",
"dimension",
".",
"This",
"angle",
"is",
"defined",
"as",
"zero",
"if",
"either",
"vector",
"is",
"zero",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15110-L15130
|
14,984
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vsub
|
def vsub(v1, v2):
"""
Compute the difference between two 3-dimensional,
double precision vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsub_c.html
:param v1: First vector (minuend).
:type v1: 3-Element Array of floats
:param v2: Second vector (subtrahend).
:type v2: 3-Element Array of floats
:return: Difference vector, v1 - v2.
:rtype: 3-Element Array of floats
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
vout = stypes.emptyDoubleVector(3)
libspice.vsub_c(v1, v2, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vsub(v1, v2):
"""
Compute the difference between two 3-dimensional,
double precision vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsub_c.html
:param v1: First vector (minuend).
:type v1: 3-Element Array of floats
:param v2: Second vector (subtrahend).
:type v2: 3-Element Array of floats
:return: Difference vector, v1 - v2.
:rtype: 3-Element Array of floats
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
vout = stypes.emptyDoubleVector(3)
libspice.vsub_c(v1, v2, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vsub",
"(",
"v1",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"3",
")",
"libspice",
".",
"vsub_c",
"(",
"v1",
",",
"v2",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Compute the difference between two 3-dimensional,
double precision vectors.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsub_c.html
:param v1: First vector (minuend).
:type v1: 3-Element Array of floats
:param v2: Second vector (subtrahend).
:type v2: 3-Element Array of floats
:return: Difference vector, v1 - v2.
:rtype: 3-Element Array of floats
|
[
"Compute",
"the",
"difference",
"between",
"two",
"3",
"-",
"dimensional",
"double",
"precision",
"vectors",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15134-L15152
|
14,985
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vsubg
|
def vsubg(v1, v2, ndim):
"""
Compute the difference between two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsubg_c.html
:param v1: First vector (minuend).
:type v1: Array of floats
:param v2: Second vector (subtrahend).
:type v2: Array of floats
:param ndim: Dimension of v1, v2, and vout.
:type ndim: int
:return: Difference vector, v1 - v2.
:rtype: Array of floats
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
vout = stypes.emptyDoubleVector(ndim)
ndim = ctypes.c_int(ndim)
libspice.vsubg_c(v1, v2, ndim, vout)
return stypes.cVectorToPython(vout)
|
python
|
def vsubg(v1, v2, ndim):
"""
Compute the difference between two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsubg_c.html
:param v1: First vector (minuend).
:type v1: Array of floats
:param v2: Second vector (subtrahend).
:type v2: Array of floats
:param ndim: Dimension of v1, v2, and vout.
:type ndim: int
:return: Difference vector, v1 - v2.
:rtype: Array of floats
"""
v1 = stypes.toDoubleVector(v1)
v2 = stypes.toDoubleVector(v2)
vout = stypes.emptyDoubleVector(ndim)
ndim = ctypes.c_int(ndim)
libspice.vsubg_c(v1, v2, ndim, vout)
return stypes.cVectorToPython(vout)
|
[
"def",
"vsubg",
"(",
"v1",
",",
"v2",
",",
"ndim",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"vout",
"=",
"stypes",
".",
"emptyDoubleVector",
"(",
"ndim",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"libspice",
".",
"vsubg_c",
"(",
"v1",
",",
"v2",
",",
"ndim",
",",
"vout",
")",
"return",
"stypes",
".",
"cVectorToPython",
"(",
"vout",
")"
] |
Compute the difference between two double precision
vectors of arbitrary dimension.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vsubg_c.html
:param v1: First vector (minuend).
:type v1: Array of floats
:param v2: Second vector (subtrahend).
:type v2: Array of floats
:param ndim: Dimension of v1, v2, and vout.
:type ndim: int
:return: Difference vector, v1 - v2.
:rtype: Array of floats
|
[
"Compute",
"the",
"difference",
"between",
"two",
"double",
"precision",
"vectors",
"of",
"arbitrary",
"dimension",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15156-L15177
|
14,986
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vtmv
|
def vtmv(v1, matrix, v2):
"""
Multiply the transpose of a 3-dimensional column vector
a 3x3 matrix, and a 3-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmv_c.html
:param v1: 3 dimensional double precision column vector.
:type v1: 3-Element Array of floats
:param matrix: 3x3 double precision matrix.
:type matrix: 3x3-Element Array of floats
:param v2: 3 dimensional double precision column vector.
:type v2: 3-Element Array of floats
:return: the result of (v1**t * matrix * v2 ).
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
matrix = stypes.toDoubleMatrix(matrix)
v2 = stypes.toDoubleVector(v2)
return libspice.vtmv_c(v1, matrix, v2)
|
python
|
def vtmv(v1, matrix, v2):
"""
Multiply the transpose of a 3-dimensional column vector
a 3x3 matrix, and a 3-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmv_c.html
:param v1: 3 dimensional double precision column vector.
:type v1: 3-Element Array of floats
:param matrix: 3x3 double precision matrix.
:type matrix: 3x3-Element Array of floats
:param v2: 3 dimensional double precision column vector.
:type v2: 3-Element Array of floats
:return: the result of (v1**t * matrix * v2 ).
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
matrix = stypes.toDoubleMatrix(matrix)
v2 = stypes.toDoubleVector(v2)
return libspice.vtmv_c(v1, matrix, v2)
|
[
"def",
"vtmv",
"(",
"v1",
",",
"matrix",
",",
"v2",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"matrix",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"matrix",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"return",
"libspice",
".",
"vtmv_c",
"(",
"v1",
",",
"matrix",
",",
"v2",
")"
] |
Multiply the transpose of a 3-dimensional column vector
a 3x3 matrix, and a 3-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmv_c.html
:param v1: 3 dimensional double precision column vector.
:type v1: 3-Element Array of floats
:param matrix: 3x3 double precision matrix.
:type matrix: 3x3-Element Array of floats
:param v2: 3 dimensional double precision column vector.
:type v2: 3-Element Array of floats
:return: the result of (v1**t * matrix * v2 ).
:rtype: float
|
[
"Multiply",
"the",
"transpose",
"of",
"a",
"3",
"-",
"dimensional",
"column",
"vector",
"a",
"3x3",
"matrix",
"and",
"a",
"3",
"-",
"dimensional",
"column",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15181-L15200
|
14,987
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vtmvg
|
def vtmvg(v1, matrix, v2, nrow, ncol):
"""
Multiply the transpose of a n-dimensional
column vector a nxm matrix,
and a m-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmvg_c.html
:param v1: n-dimensional double precision column vector.
:type v1: Array of floats
:param matrix: nxm double precision matrix.
:type matrix: NxM-Element Array of floats
:param v2: m-dimensional double porecision column vector.
:type v2: Array of floats
:param nrow: Number of rows in matrix (number of rows in v1.)
:type nrow: int
:param ncol: Number of columns in matrix (number of rows in v2.)
:type ncol: int
:return: the result of (v1**t * matrix * v2 )
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
matrix = stypes.toDoubleMatrix(matrix)
v2 = stypes.toDoubleVector(v2)
nrow = ctypes.c_int(nrow)
ncol = ctypes.c_int(ncol)
return libspice.vtmvg_c(v1, matrix, v2, nrow, ncol)
|
python
|
def vtmvg(v1, matrix, v2, nrow, ncol):
"""
Multiply the transpose of a n-dimensional
column vector a nxm matrix,
and a m-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmvg_c.html
:param v1: n-dimensional double precision column vector.
:type v1: Array of floats
:param matrix: nxm double precision matrix.
:type matrix: NxM-Element Array of floats
:param v2: m-dimensional double porecision column vector.
:type v2: Array of floats
:param nrow: Number of rows in matrix (number of rows in v1.)
:type nrow: int
:param ncol: Number of columns in matrix (number of rows in v2.)
:type ncol: int
:return: the result of (v1**t * matrix * v2 )
:rtype: float
"""
v1 = stypes.toDoubleVector(v1)
matrix = stypes.toDoubleMatrix(matrix)
v2 = stypes.toDoubleVector(v2)
nrow = ctypes.c_int(nrow)
ncol = ctypes.c_int(ncol)
return libspice.vtmvg_c(v1, matrix, v2, nrow, ncol)
|
[
"def",
"vtmvg",
"(",
"v1",
",",
"matrix",
",",
"v2",
",",
"nrow",
",",
"ncol",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v1",
")",
"matrix",
"=",
"stypes",
".",
"toDoubleMatrix",
"(",
"matrix",
")",
"v2",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v2",
")",
"nrow",
"=",
"ctypes",
".",
"c_int",
"(",
"nrow",
")",
"ncol",
"=",
"ctypes",
".",
"c_int",
"(",
"ncol",
")",
"return",
"libspice",
".",
"vtmvg_c",
"(",
"v1",
",",
"matrix",
",",
"v2",
",",
"nrow",
",",
"ncol",
")"
] |
Multiply the transpose of a n-dimensional
column vector a nxm matrix,
and a m-dimensional column vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vtmvg_c.html
:param v1: n-dimensional double precision column vector.
:type v1: Array of floats
:param matrix: nxm double precision matrix.
:type matrix: NxM-Element Array of floats
:param v2: m-dimensional double porecision column vector.
:type v2: Array of floats
:param nrow: Number of rows in matrix (number of rows in v1.)
:type nrow: int
:param ncol: Number of columns in matrix (number of rows in v2.)
:type ncol: int
:return: the result of (v1**t * matrix * v2 )
:rtype: float
|
[
"Multiply",
"the",
"transpose",
"of",
"a",
"n",
"-",
"dimensional",
"column",
"vector",
"a",
"nxm",
"matrix",
"and",
"a",
"m",
"-",
"dimensional",
"column",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15204-L15230
|
14,988
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vupack
|
def vupack(v):
"""
Unpack three scalar components from a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vupack_c.html
:param v: Vector
:type v: 3-Element Array of floats
:return: (x, y, z)
:rtype: tuple
"""
v1 = stypes.toDoubleVector(v)
x = ctypes.c_double()
y = ctypes.c_double()
z = ctypes.c_double()
libspice.vupack_c(v1, ctypes.byref(x), ctypes.byref(y), ctypes.byref(z))
return x.value, y.value, z.value
|
python
|
def vupack(v):
"""
Unpack three scalar components from a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vupack_c.html
:param v: Vector
:type v: 3-Element Array of floats
:return: (x, y, z)
:rtype: tuple
"""
v1 = stypes.toDoubleVector(v)
x = ctypes.c_double()
y = ctypes.c_double()
z = ctypes.c_double()
libspice.vupack_c(v1, ctypes.byref(x), ctypes.byref(y), ctypes.byref(z))
return x.value, y.value, z.value
|
[
"def",
"vupack",
"(",
"v",
")",
":",
"v1",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v",
")",
"x",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"y",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"z",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"vupack_c",
"(",
"v1",
",",
"ctypes",
".",
"byref",
"(",
"x",
")",
",",
"ctypes",
".",
"byref",
"(",
"y",
")",
",",
"ctypes",
".",
"byref",
"(",
"z",
")",
")",
"return",
"x",
".",
"value",
",",
"y",
".",
"value",
",",
"z",
".",
"value"
] |
Unpack three scalar components from a vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vupack_c.html
:param v: Vector
:type v: 3-Element Array of floats
:return: (x, y, z)
:rtype: tuple
|
[
"Unpack",
"three",
"scalar",
"components",
"from",
"a",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15234-L15250
|
14,989
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vzero
|
def vzero(v):
"""
Indicate whether a 3-vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzero_c.html
:param v: Vector to be tested
:type v: 3-Element Array of floats
:return: true if and only if v is the zero vector
:rtype: bool
"""
v = stypes.toDoubleVector(v)
return bool(libspice.vzero_c(v))
|
python
|
def vzero(v):
"""
Indicate whether a 3-vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzero_c.html
:param v: Vector to be tested
:type v: 3-Element Array of floats
:return: true if and only if v is the zero vector
:rtype: bool
"""
v = stypes.toDoubleVector(v)
return bool(libspice.vzero_c(v))
|
[
"def",
"vzero",
"(",
"v",
")",
":",
"v",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v",
")",
"return",
"bool",
"(",
"libspice",
".",
"vzero_c",
"(",
"v",
")",
")"
] |
Indicate whether a 3-vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzero_c.html
:param v: Vector to be tested
:type v: 3-Element Array of floats
:return: true if and only if v is the zero vector
:rtype: bool
|
[
"Indicate",
"whether",
"a",
"3",
"-",
"vector",
"is",
"the",
"zero",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15254-L15266
|
14,990
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
vzerog
|
def vzerog(v, ndim):
"""
Indicate whether a general-dimensional vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzerog_c.html
:param v: Vector to be tested
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
:return: true if and only if v is the zero vector
:rtype: bool
"""
v = stypes.toDoubleVector(v)
ndim = ctypes.c_int(ndim)
return bool(libspice.vzerog_c(v, ndim))
|
python
|
def vzerog(v, ndim):
"""
Indicate whether a general-dimensional vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzerog_c.html
:param v: Vector to be tested
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
:return: true if and only if v is the zero vector
:rtype: bool
"""
v = stypes.toDoubleVector(v)
ndim = ctypes.c_int(ndim)
return bool(libspice.vzerog_c(v, ndim))
|
[
"def",
"vzerog",
"(",
"v",
",",
"ndim",
")",
":",
"v",
"=",
"stypes",
".",
"toDoubleVector",
"(",
"v",
")",
"ndim",
"=",
"ctypes",
".",
"c_int",
"(",
"ndim",
")",
"return",
"bool",
"(",
"libspice",
".",
"vzerog_c",
"(",
"v",
",",
"ndim",
")",
")"
] |
Indicate whether a general-dimensional vector is the zero vector.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vzerog_c.html
:param v: Vector to be tested
:type v: Array of floats
:param ndim: Dimension of v
:type ndim: int
:return: true if and only if v is the zero vector
:rtype: bool
|
[
"Indicate",
"whether",
"a",
"general",
"-",
"dimensional",
"vector",
"is",
"the",
"zero",
"vector",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15270-L15285
|
14,991
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
wncomd
|
def wncomd(left, right, window):
"""
Determine the complement of a double precision window with
respect to a specified interval.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncomd_c.html
:param left: left endpoints of complement interval.
:type left: float
:param right: right endpoints of complement interval.
:type right: float
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:return: Complement of window with respect to left and right.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
left = ctypes.c_double(left)
right = ctypes.c_double(right)
result = stypes.SpiceCell.double(window.size)
libspice.wncomd_c(left, right, ctypes.byref(window), result)
return result
|
python
|
def wncomd(left, right, window):
"""
Determine the complement of a double precision window with
respect to a specified interval.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncomd_c.html
:param left: left endpoints of complement interval.
:type left: float
:param right: right endpoints of complement interval.
:type right: float
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:return: Complement of window with respect to left and right.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
left = ctypes.c_double(left)
right = ctypes.c_double(right)
result = stypes.SpiceCell.double(window.size)
libspice.wncomd_c(left, right, ctypes.byref(window), result)
return result
|
[
"def",
"wncomd",
"(",
"left",
",",
"right",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"left",
"=",
"ctypes",
".",
"c_double",
"(",
"left",
")",
"right",
"=",
"ctypes",
".",
"c_double",
"(",
"right",
")",
"result",
"=",
"stypes",
".",
"SpiceCell",
".",
"double",
"(",
"window",
".",
"size",
")",
"libspice",
".",
"wncomd_c",
"(",
"left",
",",
"right",
",",
"ctypes",
".",
"byref",
"(",
"window",
")",
",",
"result",
")",
"return",
"result"
] |
Determine the complement of a double precision window with
respect to a specified interval.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncomd_c.html
:param left: left endpoints of complement interval.
:type left: float
:param right: right endpoints of complement interval.
:type right: float
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:return: Complement of window with respect to left and right.
:rtype: spiceypy.utils.support_types.SpiceCell
|
[
"Determine",
"the",
"complement",
"of",
"a",
"double",
"precision",
"window",
"with",
"respect",
"to",
"a",
"specified",
"interval",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15310-L15332
|
14,992
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
wncond
|
def wncond(left, right, window):
"""
Contract each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncond_c.html
:param left: Amount added to each left endpoint.
:type left: float
:param right: Amount subtracted from each right endpoint.
:type right: float
:param window: Window to be contracted
:type window: spiceypy.utils.support_types.SpiceCell
:return: Contracted Window.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
left = ctypes.c_double(left)
right = ctypes.c_double(right)
libspice.wncond_c(left, right, ctypes.byref(window))
return window
|
python
|
def wncond(left, right, window):
"""
Contract each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncond_c.html
:param left: Amount added to each left endpoint.
:type left: float
:param right: Amount subtracted from each right endpoint.
:type right: float
:param window: Window to be contracted
:type window: spiceypy.utils.support_types.SpiceCell
:return: Contracted Window.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
left = ctypes.c_double(left)
right = ctypes.c_double(right)
libspice.wncond_c(left, right, ctypes.byref(window))
return window
|
[
"def",
"wncond",
"(",
"left",
",",
"right",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"left",
"=",
"ctypes",
".",
"c_double",
"(",
"left",
")",
"right",
"=",
"ctypes",
".",
"c_double",
"(",
"right",
")",
"libspice",
".",
"wncond_c",
"(",
"left",
",",
"right",
",",
"ctypes",
".",
"byref",
"(",
"window",
")",
")",
"return",
"window"
] |
Contract each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wncond_c.html
:param left: Amount added to each left endpoint.
:type left: float
:param right: Amount subtracted from each right endpoint.
:type right: float
:param window: Window to be contracted
:type window: spiceypy.utils.support_types.SpiceCell
:return: Contracted Window.
:rtype: spiceypy.utils.support_types.SpiceCell
|
[
"Contract",
"each",
"of",
"the",
"intervals",
"of",
"a",
"double",
"precision",
"window",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15336-L15356
|
14,993
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
wndifd
|
def wndifd(a, b):
"""
Place the difference of two double precision windows into
a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wndifd_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spiceypy.utils.support_types.SpiceCell
:return: Difference of a and b.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(a, stypes.SpiceCell)
assert isinstance(b, stypes.SpiceCell)
assert a.dtype == 1
assert b.dtype == 1
c = stypes.SpiceCell.double(a.size + b.size)
libspice.wndifd_c(ctypes.byref(a), ctypes.byref(b), ctypes.byref(c))
return c
|
python
|
def wndifd(a, b):
"""
Place the difference of two double precision windows into
a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wndifd_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spiceypy.utils.support_types.SpiceCell
:return: Difference of a and b.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(a, stypes.SpiceCell)
assert isinstance(b, stypes.SpiceCell)
assert a.dtype == 1
assert b.dtype == 1
c = stypes.SpiceCell.double(a.size + b.size)
libspice.wndifd_c(ctypes.byref(a), ctypes.byref(b), ctypes.byref(c))
return c
|
[
"def",
"wndifd",
"(",
"a",
",",
"b",
")",
":",
"assert",
"isinstance",
"(",
"a",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"isinstance",
"(",
"b",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"a",
".",
"dtype",
"==",
"1",
"assert",
"b",
".",
"dtype",
"==",
"1",
"c",
"=",
"stypes",
".",
"SpiceCell",
".",
"double",
"(",
"a",
".",
"size",
"+",
"b",
".",
"size",
")",
"libspice",
".",
"wndifd_c",
"(",
"ctypes",
".",
"byref",
"(",
"a",
")",
",",
"ctypes",
".",
"byref",
"(",
"b",
")",
",",
"ctypes",
".",
"byref",
"(",
"c",
")",
")",
"return",
"c"
] |
Place the difference of two double precision windows into
a third window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wndifd_c.html
:param a: Input window A.
:type a: spiceypy.utils.support_types.SpiceCell
:param b: Input window B.
:type b: spiceypy.utils.support_types.SpiceCell
:return: Difference of a and b.
:rtype: spiceypy.utils.support_types.SpiceCell
|
[
"Place",
"the",
"difference",
"of",
"two",
"double",
"precision",
"windows",
"into",
"a",
"third",
"window",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15360-L15380
|
14,994
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
wnelmd
|
def wnelmd(point, window):
"""
Determine whether a point is an element of a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnelmd_c.html
:param point: Input point.
:type point: float
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:return: returns True if point is an element of window.
:rtype: bool
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
point = ctypes.c_double(point)
return bool(libspice.wnelmd_c(point, ctypes.byref(window)))
|
python
|
def wnelmd(point, window):
"""
Determine whether a point is an element of a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnelmd_c.html
:param point: Input point.
:type point: float
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:return: returns True if point is an element of window.
:rtype: bool
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
point = ctypes.c_double(point)
return bool(libspice.wnelmd_c(point, ctypes.byref(window)))
|
[
"def",
"wnelmd",
"(",
"point",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"point",
"=",
"ctypes",
".",
"c_double",
"(",
"point",
")",
"return",
"bool",
"(",
"libspice",
".",
"wnelmd_c",
"(",
"point",
",",
"ctypes",
".",
"byref",
"(",
"window",
")",
")",
")"
] |
Determine whether a point is an element of a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnelmd_c.html
:param point: Input point.
:type point: float
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:return: returns True if point is an element of window.
:rtype: bool
|
[
"Determine",
"whether",
"a",
"point",
"is",
"an",
"element",
"of",
"a",
"double",
"precision",
"window",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15384-L15401
|
14,995
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
wnexpd
|
def wnexpd(left, right, window):
"""
Expand each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnexpd_c.html
:param left: Amount subtracted from each left endpoint.
:type left: float
:param right: Amount added to each right endpoint.
:type right: float
:param window: Window to be expanded.
:type window: spiceypy.utils.support_types.SpiceCell
:return: Expanded Window.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
left = ctypes.c_double(left)
right = ctypes.c_double(right)
libspice.wnexpd_c(left, right, ctypes.byref(window))
return window
|
python
|
def wnexpd(left, right, window):
"""
Expand each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnexpd_c.html
:param left: Amount subtracted from each left endpoint.
:type left: float
:param right: Amount added to each right endpoint.
:type right: float
:param window: Window to be expanded.
:type window: spiceypy.utils.support_types.SpiceCell
:return: Expanded Window.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
left = ctypes.c_double(left)
right = ctypes.c_double(right)
libspice.wnexpd_c(left, right, ctypes.byref(window))
return window
|
[
"def",
"wnexpd",
"(",
"left",
",",
"right",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"left",
"=",
"ctypes",
".",
"c_double",
"(",
"left",
")",
"right",
"=",
"ctypes",
".",
"c_double",
"(",
"right",
")",
"libspice",
".",
"wnexpd_c",
"(",
"left",
",",
"right",
",",
"ctypes",
".",
"byref",
"(",
"window",
")",
")",
"return",
"window"
] |
Expand each of the intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnexpd_c.html
:param left: Amount subtracted from each left endpoint.
:type left: float
:param right: Amount added to each right endpoint.
:type right: float
:param window: Window to be expanded.
:type window: spiceypy.utils.support_types.SpiceCell
:return: Expanded Window.
:rtype: spiceypy.utils.support_types.SpiceCell
|
[
"Expand",
"each",
"of",
"the",
"intervals",
"of",
"a",
"double",
"precision",
"window",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15405-L15425
|
14,996
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
wnextd
|
def wnextd(side, window):
"""
Extract the left or right endpoints from a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnextd_c.html
:param side: Extract left "L" or right "R" endpoints.
:type side: str
:param window: Window to be extracted.
:type window: spiceypy.utils.support_types.SpiceCell
:return: Extracted Window.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
assert side == 'L' or side == 'R'
side = ctypes.c_char(side.encode(encoding='UTF-8'))
libspice.wnextd_c(side, ctypes.byref(window))
return window
|
python
|
def wnextd(side, window):
"""
Extract the left or right endpoints from a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnextd_c.html
:param side: Extract left "L" or right "R" endpoints.
:type side: str
:param window: Window to be extracted.
:type window: spiceypy.utils.support_types.SpiceCell
:return: Extracted Window.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
assert side == 'L' or side == 'R'
side = ctypes.c_char(side.encode(encoding='UTF-8'))
libspice.wnextd_c(side, ctypes.byref(window))
return window
|
[
"def",
"wnextd",
"(",
"side",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"assert",
"side",
"==",
"'L'",
"or",
"side",
"==",
"'R'",
"side",
"=",
"ctypes",
".",
"c_char",
"(",
"side",
".",
"encode",
"(",
"encoding",
"=",
"'UTF-8'",
")",
")",
"libspice",
".",
"wnextd_c",
"(",
"side",
",",
"ctypes",
".",
"byref",
"(",
"window",
")",
")",
"return",
"window"
] |
Extract the left or right endpoints from a double precision
window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnextd_c.html
:param side: Extract left "L" or right "R" endpoints.
:type side: str
:param window: Window to be extracted.
:type window: spiceypy.utils.support_types.SpiceCell
:return: Extracted Window.
:rtype: spiceypy.utils.support_types.SpiceCell
|
[
"Extract",
"the",
"left",
"or",
"right",
"endpoints",
"from",
"a",
"double",
"precision",
"window",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15429-L15448
|
14,997
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
wnfetd
|
def wnfetd(window, n):
"""
Fetch a particular interval from a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfetd_c.html
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:param n: Index of interval to be fetched.
:type n: int
:return: Left, right endpoints of the nth interval.
:rtype: tuple
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
n = ctypes.c_int(n)
left = ctypes.c_double()
right = ctypes.c_double()
libspice.wnfetd_c(ctypes.byref(window), n, ctypes.byref(left),
ctypes.byref(right))
return left.value, right.value
|
python
|
def wnfetd(window, n):
"""
Fetch a particular interval from a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfetd_c.html
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:param n: Index of interval to be fetched.
:type n: int
:return: Left, right endpoints of the nth interval.
:rtype: tuple
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
n = ctypes.c_int(n)
left = ctypes.c_double()
right = ctypes.c_double()
libspice.wnfetd_c(ctypes.byref(window), n, ctypes.byref(left),
ctypes.byref(right))
return left.value, right.value
|
[
"def",
"wnfetd",
"(",
"window",
",",
"n",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"n",
"=",
"ctypes",
".",
"c_int",
"(",
"n",
")",
"left",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"right",
"=",
"ctypes",
".",
"c_double",
"(",
")",
"libspice",
".",
"wnfetd_c",
"(",
"ctypes",
".",
"byref",
"(",
"window",
")",
",",
"n",
",",
"ctypes",
".",
"byref",
"(",
"left",
")",
",",
"ctypes",
".",
"byref",
"(",
"right",
")",
")",
"return",
"left",
".",
"value",
",",
"right",
".",
"value"
] |
Fetch a particular interval from a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfetd_c.html
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:param n: Index of interval to be fetched.
:type n: int
:return: Left, right endpoints of the nth interval.
:rtype: tuple
|
[
"Fetch",
"a",
"particular",
"interval",
"from",
"a",
"double",
"precision",
"window",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15452-L15472
|
14,998
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
wnfild
|
def wnfild(small, window):
"""
Fill small gaps between adjacent intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfild_c.html
:param small: Limiting measure of small gaps.
:type small: float
:param window: Window to be filled
:type window: spiceypy.utils.support_types.SpiceCell
:return: Filled Window.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
small = ctypes.c_double(small)
libspice.wnfild_c(small, ctypes.byref(window))
return window
|
python
|
def wnfild(small, window):
"""
Fill small gaps between adjacent intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfild_c.html
:param small: Limiting measure of small gaps.
:type small: float
:param window: Window to be filled
:type window: spiceypy.utils.support_types.SpiceCell
:return: Filled Window.
:rtype: spiceypy.utils.support_types.SpiceCell
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
small = ctypes.c_double(small)
libspice.wnfild_c(small, ctypes.byref(window))
return window
|
[
"def",
"wnfild",
"(",
"small",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"small",
"=",
"ctypes",
".",
"c_double",
"(",
"small",
")",
"libspice",
".",
"wnfild_c",
"(",
"small",
",",
"ctypes",
".",
"byref",
"(",
"window",
")",
")",
"return",
"window"
] |
Fill small gaps between adjacent intervals of a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnfild_c.html
:param small: Limiting measure of small gaps.
:type small: float
:param window: Window to be filled
:type window: spiceypy.utils.support_types.SpiceCell
:return: Filled Window.
:rtype: spiceypy.utils.support_types.SpiceCell
|
[
"Fill",
"small",
"gaps",
"between",
"adjacent",
"intervals",
"of",
"a",
"double",
"precision",
"window",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15476-L15493
|
14,999
|
AndrewAnnex/SpiceyPy
|
spiceypy/spiceypy.py
|
wnincd
|
def wnincd(left, right, window):
"""
Determine whether an interval is included in a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnincd_c.html
:param left: Left interval
:type left: float
:param right: Right interval
:type right: float
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:return: Returns True if the input interval is included in window.
:rtype: bool
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
left = ctypes.c_double(left)
right = ctypes.c_double(right)
return bool(libspice.wnincd_c(left, right, ctypes.byref(window)))
|
python
|
def wnincd(left, right, window):
"""
Determine whether an interval is included in a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnincd_c.html
:param left: Left interval
:type left: float
:param right: Right interval
:type right: float
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:return: Returns True if the input interval is included in window.
:rtype: bool
"""
assert isinstance(window, stypes.SpiceCell)
assert window.dtype == 1
left = ctypes.c_double(left)
right = ctypes.c_double(right)
return bool(libspice.wnincd_c(left, right, ctypes.byref(window)))
|
[
"def",
"wnincd",
"(",
"left",
",",
"right",
",",
"window",
")",
":",
"assert",
"isinstance",
"(",
"window",
",",
"stypes",
".",
"SpiceCell",
")",
"assert",
"window",
".",
"dtype",
"==",
"1",
"left",
"=",
"ctypes",
".",
"c_double",
"(",
"left",
")",
"right",
"=",
"ctypes",
".",
"c_double",
"(",
"right",
")",
"return",
"bool",
"(",
"libspice",
".",
"wnincd_c",
"(",
"left",
",",
"right",
",",
"ctypes",
".",
"byref",
"(",
"window",
")",
")",
")"
] |
Determine whether an interval is included in a double precision window.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/wnincd_c.html
:param left: Left interval
:type left: float
:param right: Right interval
:type right: float
:param window: Input window
:type window: spiceypy.utils.support_types.SpiceCell
:return: Returns True if the input interval is included in window.
:rtype: bool
|
[
"Determine",
"whether",
"an",
"interval",
"is",
"included",
"in",
"a",
"double",
"precision",
"window",
"."
] |
fc20a9b9de68b58eed5b332f0c051fb343a6e335
|
https://github.com/AndrewAnnex/SpiceyPy/blob/fc20a9b9de68b58eed5b332f0c051fb343a6e335/spiceypy/spiceypy.py#L15518-L15537
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.