shredx.utils.sensors.extract_static_sensors#
- shredx.utils.sensors.extract_static_sensors(tensor: Float[Tensor, 'time rows cols dim'], sensor_locations: list[tuple[int, int]] | list[tuple[int, int, int]]) Float[Tensor, 'time n_sensors dim']#
Extract sensor readings from a tensor at the given locations for each time step.
- Parameters:
- tensorFloat[torch.Tensor, “time rows cols dim”]
The tensor to extract sensors from (time, rows, cols, channels).
- sensor_locationslist of tuples of (row, col)
The locations of the sensors (row, col coordinates).
- Returns:
- Float[torch.Tensor, “time n_sensors dim”]
The extracted sensor values at each time step.