raytraverse.lightpoint¶
LightPointKD¶
-
class
raytraverse.lightpoint.
LightPointKD
(scene, vec=None, lum=None, vm=None, pt=0, 0, 0, posidx=0, src='sky', srcn=1, calcomega=True, write=True)[source]¶ Bases:
object
light field with KDtree structures for spatial query
-
vm
= None¶ raytraverse.mapper.ViewMapper
-
scene
= None¶ raytraverse.scene.Scene
-
posidx
= None¶ index for point
- Type
int
-
pt
= None¶ point location
- Type
np.array
-
src
= None¶ source key
- Type
str
-
file
= None¶ relative path to disk storage
- Type
str
-
property
vec
¶ direction vector (N,3)
-
property
lum
¶ luminance (N,srcn)
-
property
d_kd
¶ kd tree for spatial query
- Getter
Returns kd tree structure
- Type
scipy.spatial.cKDTree
-
property
omega
¶ solid angle (N)
- Getter
Returns array of solid angles
- Setter
sets soolid angles with viewmapper
- Type
np.array
-
calc_omega
(write=True)[source]¶ calculate solid angle
- Parameters
write (bool, optional) – update/write kdtree data to file
-
add_to_img
(img, vecs, mask=None, coefs=1, interp=False, omega=False, vm=None)[source]¶ add luminance contributions to image array (updates in place)
- Parameters
img (np.array) – 2D image array to add to (either zeros or with other source)
vecs (np.array) – vectors corresponding to img pixels shape (N, 3)
mask (np.array) – indices to img that correspond to vec (in case where whole image is not being updated, such as corners of fisheye)
coefs (int, float, np.array) – source coefficients, shape is (1,) or (srcn,)
interp (bool, optional) – for linear interpolation (falls back to nearest outside of convexhull
omega (bool) – if true, add value of ray solid angle instead of luminance
vm (raytraverse.mapper.ViewMapper, optional) –
- Returns
- Return type
None
-
SunPointKD¶
SunViewPoint¶
-
class
raytraverse.lightpoint.
SunViewPoint
(scene, vecs, lum, pt=0, 0, 0, posidx=0, src='sunview', res=64, blursun=1.0)[source]¶ Bases:
object
interface for sun view data
-
solar_omega
= 6.796702357283834e-05¶
-
scene
= None¶ raytraverse.scene.Scene
-
posidx
= None¶ index for point
- Type
int
-
pt
= None¶ point location
- Type
np.array
-
src
= None¶ source key
- Type
str
-
property
vm
¶
-