Skip to content

Commit

Permalink
updated doc strings for the two new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewAnnex committed Oct 4, 2017
1 parent 893b2f1 commit 9dfd838
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions spiceypy/spiceypy.py
Expand Up @@ -6168,38 +6168,57 @@ def gftfov(inst, target, tshape, tframe, abcorr, obsrvr, step, cnfine):
return result


@spiceErrorCheck
def gfudb(udfuns, udfunb, step, cnfine, result):
"""
Perform a GF search on a user defined boolean quantity.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfudb_c.html
:param udfuns: Name of the routine that computes a scalar quantity of interest corresponding to an `et'.
:type udfuns: ctypes.CFunctionType
:param udfunb: Name of the routine returning the boolean value corresponding to an `et'.
:type udfunb: ctypes.CFunctionType
:param step: Step size used for locating extrema and roots.
:type step: float
:param cnfine: SPICE window to which the search is restricted.
:type cnfine: spiceypy.utils.support_types.SpiceCell
:param result: SPICE window containing results.
:type result: spiceypy.utils.support_types.SpiceCell
:return: result
:rtype: spiceypy.utils.support_types.SpiceCell
"""
step = ctypes.c_double(step)
libspice.gfudb_c(udfuns, udfunb, step, ctypes.byref(cnfine), ctypes.byref(result))


@spiceErrorCheck
def gfuds(udfuns, udqdec, relate, refval, adjust, step, nintvls, cnfine, result):
"""
Perform a GF search on a user defined scalar quantity.
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/gfuds_c.html
:param udfuns:
:param udqdec:
:param relate:
:param refval:
:param adjust:
:param step:
:param nintvls:
:param cnfine:
:param result:
:return:
:param udfuns: Name of the routine that computes the scalar quantity of interest at some time.
:type udfuns: ctypes.CFunctionType
:param udqdec: Name of the routine that computes whether the scalar quantity is decreasing.
:type udqdec: ctypes.CFunctionType
:param relate: Operator that either looks for an extreme value (max, min, local, absolute) or compares the geometric quantity value and a number.
:type relate: str
:param refval: Value used as reference for scalar quantity condition.
:type refval: float
:param adjust: Allowed variation for absolute extremal geometric conditions.
:type adjust: float
:param step: Step size used for locating extrema and roots.
:type step: float
:param nintvls: Workspace window interval count.
:type nintvls: int
:param cnfine: SPICE window to which the search is restricted.
:type cnfine: spiceypy.utils.support_types.SpiceCell
:param result: SPICE window containing results.
:type result: spiceypy.utils.support_types.SpiceCell
:return: result
:rtype: spiceypy.utils.support_types.SpiceCell
"""
relate = stypes.stringToCharP(relate)
refval = ctypes.c_double(refval)
Expand All @@ -6210,7 +6229,6 @@ def gfuds(udfuns, udqdec, relate, refval, adjust, step, nintvls, cnfine, result)
return result



@spiceErrorCheck
@spiceFoundExceptionThrower
def gipool(name, start, room):
Expand Down

0 comments on commit 9dfd838

Please sign in to comment.