@@ -370,7 +370,7 @@ def trace_rays(
370370 self ,
371371 incident_ray_directions : torch .Tensor ,
372372 active_heliostats_mask : torch .Tensor ,
373- target_area_mask : torch .Tensor ,
373+ target_area_indices : torch .Tensor ,
374374 ray_extinction_factor : float = 0.0 ,
375375 device : torch .device | None = None ,
376376 ) -> torch .Tensor :
@@ -392,7 +392,7 @@ def trace_rays(
392392 A mask where 0 indicates a deactivated heliostat and 1 an activated one.
393393 An integer greater than 1 indicates that this heliostat is regarded multiple times.
394394 Tensor of shape [number_of_heliostats].
395- target_area_mask : torch.Tensor
395+ target_area_indices : torch.Tensor
396396 The indices of the target areas for each active heliostat.
397397 Tensor of shape [number_of_active_heliostats].
398398 ray_extinction_factor : float
@@ -467,7 +467,9 @@ def trace_rays(
467467 active_heliostats_mask_batch
468468 ],
469469 target_areas = self .scenario .target_areas ,
470- target_area_mask = target_area_mask [active_heliostats_mask_batch ],
470+ target_area_indices = target_area_indices [
471+ active_heliostats_mask_batch
472+ ],
471473 device = device ,
472474 )
473475 )
@@ -534,7 +536,7 @@ def trace_rays(
534536 intersections = intersections ,
535537 absolute_intensities = intensities ,
536538 active_heliostats_mask = active_heliostats_mask_batch ,
537- target_area_mask = target_area_mask [active_heliostats_mask_batch ],
539+ target_area_indices = target_area_indices [active_heliostats_mask_batch ],
538540 device = device ,
539541 )
540542
@@ -602,7 +604,7 @@ def sample_bitmaps(
602604 intersections : torch .Tensor ,
603605 absolute_intensities : torch .Tensor ,
604606 active_heliostats_mask : torch .Tensor ,
605- target_area_mask : torch .Tensor ,
607+ target_area_indices : torch .Tensor ,
606608 device : torch .device | None = None ,
607609 ) -> torch .Tensor :
608610 """
@@ -621,8 +623,8 @@ def sample_bitmaps(
621623 active_heliostats_mask : torch.Tensor
622624 Used to map bitmaps per heliostat to correct index.
623625 Tensor of shape [number_of_heliostats].
624- target_area_mask : torch.Tensor
625- The indices of target areas on which each heliostat is raytraced .
626+ target_area_indices : torch.Tensor
627+ The indices of target areas on which each heliostat is ray-traced .
626628 Tensor of shape [number_of_active_heliostats].
627629 device : torch.device | None
628630 The device on which to perform computations or load tensors and models (default is None).
@@ -644,28 +646,28 @@ def sample_bitmaps(
644646
645647 # Extract widths and heights of target planes, along with corresponding centers in E and U direction.
646648 plane_widths = (
647- self .scenario .target_areas .dimensions [target_area_mask ][
649+ self .scenario .target_areas .dimensions [target_area_indices ][
648650 :, index_mapping .target_area_width
649651 ]
650652 .unsqueeze (index_mapping .number_rays_per_point )
651653 .unsqueeze (index_mapping .points_dimension )
652654 )
653655 plane_heights = (
654- self .scenario .target_areas .dimensions [target_area_mask ][
656+ self .scenario .target_areas .dimensions [target_area_indices ][
655657 :, index_mapping .target_area_height
656658 ]
657659 .unsqueeze (index_mapping .number_rays_per_point )
658660 .unsqueeze (index_mapping .points_dimension )
659661 )
660662 plane_centers_e = (
661- self .scenario .target_areas .centers [target_area_mask ][
663+ self .scenario .target_areas .centers [target_area_indices ][
662664 :, index_mapping .target_area_center_e
663665 ]
664666 .unsqueeze (index_mapping .number_rays_per_point )
665667 .unsqueeze (index_mapping .points_dimension )
666668 )
667669 plane_centers_u = (
668- self .scenario .target_areas .centers [target_area_mask ][
670+ self .scenario .target_areas .centers [target_area_indices ][
669671 :, index_mapping .target_area_center_u
670672 ]
671673 .unsqueeze (index_mapping .number_rays_per_point )
@@ -856,7 +858,7 @@ def sample_bitmaps(
856858 def get_bitmaps_per_target (
857859 self ,
858860 bitmaps_per_heliostat : torch .Tensor ,
859- target_area_mask : torch .Tensor ,
861+ target_area_indices : torch .Tensor ,
860862 device : torch .device | None = None ,
861863 ) -> torch .Tensor :
862864 """
@@ -867,7 +869,7 @@ def get_bitmaps_per_target(
867869 bitmaps_per_heliostat : torch.Tensor
868870 Bitmaps per heliostat.
869871 Tensor of shape [number_of_active_heliostats, bitmap_resolution_e, bitmap_resolution_u].
870- target_area_mask : torch.Tensor
872+ target_area_indices : torch.Tensor
871873 The mapping from heliostat to target area.
872874 Tensor of shape [number_of_active_heliostats].
873875 device : torch.device | None
@@ -892,7 +894,7 @@ def get_bitmaps_per_target(
892894 device = device ,
893895 )
894896 for index in range (self .scenario .target_areas .number_of_target_areas ):
895- mask = target_area_mask == index
897+ mask = target_area_indices == index
896898 if mask .any ():
897899 group_bitmaps_per_target [index ] = bitmaps_per_heliostat [mask ].sum (
898900 dim = index_mapping .heliostat_dimension
0 commit comments