voxcity.simulator_gpu.visibility.view.ViewCalculator ==================================================== .. py:class:: voxcity.simulator_gpu.visibility.view.ViewCalculator(domain, n_azimuth: int = 120, n_elevation: int = 20, ray_sampling: str = 'grid', n_rays: int = None) GPU-accelerated View Index calculator. Computes view indices (green view, sky view, custom targets) by tracing rays from observer positions through the voxel domain. .. py:attribute:: domain .. py:attribute:: nx .. py:attribute:: ny .. py:attribute:: nz .. py:attribute:: dx .. py:attribute:: dy .. py:attribute:: dz .. py:attribute:: n_azimuth :value: 120 .. py:attribute:: n_elevation :value: 20 .. py:attribute:: ray_sampling :value: 'grid' .. py:attribute:: n_rays .. py:attribute:: max_dist .. py:method:: compute_view_index(voxel_data: numpy.ndarray = None, mode: str = None, hit_values: Tuple[int, Ellipsis] = None, inclusion_mode: bool = True, view_point_height: float = 1.5, elevation_min_degrees: float = -30.0, elevation_max_degrees: float = 30.0, tree_k: float = 0.5, tree_lad: float = 1.0, workspace=None, computation_mask: numpy.ndarray = None) -> numpy.ndarray Compute View Index map. :param voxel_data: 3D voxel class array (optional if domain has voxel data) :param mode: Predefined mode ('green', 'sky', or None for custom) :param hit_values: Target voxel values to count as visible :param inclusion_mode: If True, count hits on targets; if False, count non-blocked rays :param view_point_height: Observer height above ground (meters) :param elevation_min_degrees: Minimum viewing angle :param elevation_max_degrees: Maximum viewing angle :param tree_k: Tree extinction coefficient :param tree_lad: Leaf area density for trees :param workspace: Optional pre-allocated ViewWorkspace whose Taichi fields are reused instead of allocating new ones on every call. :returns: 2D array of view index values (nx, ny) .. py:method:: compute_sky_view_factor(voxel_data: numpy.ndarray = None, view_point_height: float = 1.5, n_azimuth: int = 120, n_elevation: int = 20, tree_k: float = 0.6, tree_lad: float = 1.0) -> numpy.ndarray Compute Sky View Factor map. :param voxel_data: 3D voxel class array (optional) :param view_point_height: Observer height above ground (meters) :param n_azimuth: Number of azimuthal divisions :param n_elevation: Number of elevation divisions :param tree_k: Tree extinction coefficient :param tree_lad: Leaf area density :returns: 2D array of SVF values (nx, ny)