integratorspatial¶
- class pyvale.integratorspatial.IIntegratorSpatial[source]¶
Bases:
ABC
Interface (abstract base class) for spatial integrators. Used for averaging sensor values over a given space.
- abstractmethod calc_averages(sens_data: SensorData) ndarray [source]¶
Abstract method. Calculates the spatial average for each sensor using the specified sensor dimensions and integration method. This is done by interpolating the sensor values at each sensors integration points.
- Parameters:
sens_data (SensorData) -- Contains the parameters of the sensor array including: positions, sample times, spatial averaging and orientations.
- Returns:
np.ndarray -- Array of simulated sensor measurements. shape=(num_sensors, num_field_components,num_time_steps).
- abstractmethod get_averages() ndarray [source]¶
Abstract method. Returns the previously calculated spatial averages for each sensor. If these have not been calculated then calc_averages is called and the result is returned.
- Returns:
np.ndarray -- Array of simulated sensor measurements. shape=(num_sensors, num_field_components,num_time_steps).
- pyvale.integratorspatial.create_int_pt_array(sens_data: SensorData, int_pt_offsets: ndarray) ndarray [source]¶
Creates the integration point locations in local coordinates based on the specified offsets from the local origin.
- Parameters:
sens_data (SensorData) -- Contains the parameters of the sensor array including: positions, sample times and orientations. If specified the sensor orientations are used to rotate the positions of the integration points.
int_pt_offsets (np.ndarray) -- Offsets of the intergation points in non-rotated local coordinates.
- Returns:
np.ndarray -- The integration point locations in world (simulation) coordinates. The rows of the array are all the integration points for all sensors and the columns are the X,Y,Z coordinates. shape=(num_sensors*num_int_points,3).