MetricEvaluator#

class acoular.tools.metrics.MetricEvaluator

Bases: HasStrictTraits

Evaluate the reconstruction performance of source mapping methods.

This class can be used to calculate the following performance metrics according [23]: * Specific level error * Overall level error * Inverse level error

data

an array of shape=(nf,ng) containing the squared sound pressure data of the source mapping. (nf: number of frequencies, ng: number of grid points)

target_data

an array of shape=(nf,ns) containing the squared sound pressure data of the ground-truth sources. (nf: number of frequencies, ns: number of sources)

grid

Grid-derived object that provides the grid locations for the calculated source mapping data.

target_grid

Grid-derived object that provides the grid locations for the ground-truth data.

sector

sector type. Currently only circular sectors are supported.

adaptive_sector_size

if set True: use shrink integration area if two sources are closer than 2*r. The radius of the integration area is then set to half the distance between the two sources.

multi_assignment

if set True, the same amplitude can be assigned to multiple targets if the integration area overlaps. If set False, the amplitude is assigned to the first target and the other targets are ignored.

sectors

returns the determined sector sizes for each ground-truth source position

get_overall_level_error()

Returns the overall level error (Herold and Sarradj, 2017).

Returns:
numpy.array

overall level error of shape=(nf,)

get_specific_level_error()

Returns the specific level error (Herold and Sarradj, 2017).

Returns:
numpy.array

specific level error of shape=(nf,ns). nf: number of frequencies, ns: number of sources

get_inverse_level_error()

Returns the inverse level error (Herold and Sarradj, 2017).

Returns:
numpy.array

inverse level error of shape=(nf,1)