Acoular 24.07 documentation

MetricEvaluator

«  metrics   ::   metrics   ::   tprocess  »

MetricEvaluator

class acoular.tools.metrics.MetricEvaluator

Bases: HasPrivateTraits

Evaluate the reconstruction performance of source mapping methods.

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

data = CArray(shape=(None, None), desc='Contains the calculated squared sound pressure values in Pa**2.')

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), desc='Contains the ground-truth squared sound pressure values in Pa**2.')

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(Grid, desc='Grid instance that belongs to the calculated data')

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

target_grid = Instance(Grid, desc='Grid instance that belongs to the ground-truth data')

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

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

sector type. Currently only circular sectors are supported.

adaptive_sector_size = Bool(True, desc='adaptive integration area')

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(

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)

«  metrics   ::   metrics   ::   tprocess  »