sensortools¶
- pyvale.sensortools.create_sensor_pos_array(num_sensors: tuple[int, int, int], x_lims: tuple[float, float], y_lims: tuple[float, float], z_lims: tuple[float, float]) ndarray [source]¶
Function or creating a uniform grid of sensors inside the specified bounds and returning the positions in format that can be used to build a SensorData object.
To create a line of sensors along the X axis set the number of sensors to 1 for all the Y and Z axes and then set the upper and lower limits of the Y and Z axis to be the same value.
To create a plane of sensors in the X-Y plane set the number of sensors in Z to 1 and set the upper and lower coordinates of the Z limit to the desired Z location of the plane. Then set the number of sensors in X and Y as desired along with the associated limits.
- Parameters:
n_sens (tuple[int,int,int]) -- Number of sensors to create in the X, Y and Z directions.
x_lims (tuple[float, float]) -- Limits of the X axis sensor locations.
y_lims (tuple[float, float]) -- Limits of the Y axis sensor locations.
z_lims (tuple[float, float]) -- Limits of the Z axis sensor locations.
- Returns:
np.ndarray -- Array of sensor positions with shape=(num_sensors,3) where num_sensors is the product of integers in the num_sensors tuple. The columns are the X, Y and Z locations of the sensors.
- pyvale.sensortools.print_dimensions(sim_data: SimData) None [source]¶
Diagnostic function for quickly finding the coordinate limits for from a given simulation.
- Parameters:
sim_data (mh.SimData) -- Simulation data objects containing the nodal coordinates.
- pyvale.sensortools.print_measurements(sens_array: ISensorArray, sensors: int | slice, components: int | slice, time_steps: int | slice) None [source]¶
Diagnostic function to print sensor measurements to the console. Also prints the ground truth, the random and the systematic errors for the specified sensor array. The sensors, components and time steps are specified as slices of the measurement array.
- Parameters:
sens_array (ISensorArray) -- Sensor array to print measurements for.
sensors (int | slice) -- Index for the sensor or slice of range of sensors to be printed to the console.
components (int | slice) -- Index for the field component or slice of range of field components to be printed to the console
time_steps (int | slice) -- Index for the time step or slice of time steps to be printed to the console.