raytraverse helper functions written in c++

`raytraverse.craytraverse.` `from_pdf`(pdf: numpy.ndarray[numpy.float64], threshold: float, lb: float = 0.5, ub: float = 4.0) → tuple

  helper function for draw.from_pdf

  Parameters

    - pdf (np.array) – array of doubles with weights to check against threshold

    - threshold (float) – value used to determine the number of indices to return

    - lb (float, optional) – values below threshold * lb will be excluded from candidates (lb must be in (0,1)

    - ub (float, optional) – values above threshold * ub will have indices written to bidx

  Returns

    - candidates (np.array) – array of candidate indices

    - bidx (np.array) – array of definitely included indices

    - nsampc (int) – the number of draws that should be selected from the candidates

`raytraverse.craytraverse.` `interpolate_kdquery`(destvec: numpy.ndarray[numpy.float64], errs: numpy.ndarray[numpy.float64], idxs: numpy.ndarray[numpy.int32], srcvec: numpy.ndarray[numpy.float64], srclum: numpy.ndarray[numpy.float64], err: float = 0.00436) → numpy.ndarray[numpy.float64]

  interpolate luminance values associated with query results from scipy.cKDTree.query. Finds closest point and then locates vertices of enclosing triangle from this point. returns 0 in cases where the query provides no results, so the distance_upper_bound must be set appropriately.

  Parameters

    - dest_vec (np.array) – destination vectors to interpolate to, shape (N, 3)

    - errs (np.array) – distances between src and destination (row matches dest_vec, column is sorted ascending), shape (N, # of queries)

    - idxs (np.array) – query result, index row in src_vec close to dest_vec, shape (N, # of queries)

    - src_vec (np.array) – vectors of src_kd, shape (N, 3)

    - src_lum (np.array) – luminance values for src_kd, shape (src_vec.shape[0], srcn)

    - err (float, optional) – distance below which closest sample is used directly

  Returns

    arrout – destination luminances shape (N, srcn)

  Return type

    np.array

# cRtrace

class `raytraverse.crenderer.` `cRtrace`

  Bases: `pybind11_builtins.pybind11_object`

  `call`(self: raytraverse.crenderer.rtrace_c.cRtrace, arg0: str) → None
  `get_instance`() → raytraverse.crenderer.rtrace_c.cRtrace
  `initialize`(self: raytraverse.crenderer.rtrace_c.cRtrace, arg0: object) → None

    pyargv11 (a sequence of strings) must be a member of calling instance and persist for duration of program

  `load_scene`(self: raytraverse.crenderer.rtrace_c.cRtrace, arg0: str) → None
  `load_source`(self: raytraverse.crenderer.rtrace_c.cRtrace, srcname: str, freesrc: int = - 1) → None
  `reset`(*args) → None
  `reset_instance`(*args) → None
  `update_ospec`(self: raytraverse.crenderer.rtrace_c.cRtrace, vs: str, of: str = 'z') → None
  `version` = 'RADIANCE 5.4a 2020-10-08 LBNL (..)'

# cRcontrib

class `raytraverse.crenderer.` `cRcontrib`

  Bases: `pybind11_builtins.pybind11_object`

  `call`(self: raytraverse.crenderer.rcontrib_c.cRcontrib, arg0: str) → None
  `get_instance`() → raytraverse.crenderer.rcontrib_c.cRcontrib
  `initialize`(self: raytraverse.crenderer.rcontrib_c.cRcontrib, arg0: object) → None
  `load_scene`(self: raytraverse.crenderer.rcontrib_c.cRcontrib, arg0: str) → None
  `reset`(*args) → None
  `reset_instance`(*args) → None
  `version` = 'RADIANCE 5.4a 2020-10-08 LBNL (..)'