Acoular 24.03 documentation

MetricEvaluator

«  tools   ::   tools   ::   acoular.tools.return_result  »

MetricEvaluator

class acoular.tools.MetricEvaluator

Bases: HasPrivateTraits

Evaluate the reconstruction performance of source mapping methods.

This class can be used to calculate the following performance metrics according to Herold and Sarradj (2017): * Specific level error * Overall level error * Inverse level error

data = CArray(shape=(None,None),

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 = CArray(shape=(None,None),

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 = Instance(ac.Grid,

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

target_grid = Instance(ac.Grid,

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

sector = Instance(ac.CircSector, default=ac.CircSector(),)

sector type. Currently only circular sectors are supported.

adaptive_sector_size = Bool(True,

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 = Bool(True,

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 = Property()

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)

«  tools   ::   tools   ::   acoular.tools.return_result  »