Added extra getReferemenceMeasurements() method to MeasurementSet. Bumped therefore to v1.6.0
This commit is contained in:
parent
da023273d8
commit
3005f17400
@ -5,7 +5,7 @@ requires-python = ">=3.10"
|
|||||||
description = "Library for Acoustic Signal Processing"
|
description = "Library for Acoustic Signal Processing"
|
||||||
license = { "file" = "LICENSE" }
|
license = { "file" = "LICENSE" }
|
||||||
authors = [{ "name" = "J.A. de Jong", "email" = "j.a.dejong@ascee.nl" }]
|
authors = [{ "name" = "J.A. de Jong", "email" = "j.a.dejong@ascee.nl" }]
|
||||||
version = "1.5.1"
|
version = "1.6.0"
|
||||||
|
|
||||||
keywords = ["DSP", "DAQ", "Signal processing"]
|
keywords = ["DSP", "DAQ", "Signal processing"]
|
||||||
|
|
||||||
|
@ -44,6 +44,17 @@ class MeasurementSet(list):
|
|||||||
if mnewest.time < m.time:
|
if mnewest.time < m.time:
|
||||||
mnewest = m
|
mnewest = m
|
||||||
return mnewest
|
return mnewest
|
||||||
|
|
||||||
|
def getReferenceMeasurements(self, mtype: MeasurementType):
|
||||||
|
"""Get all reference measurements of a certain type
|
||||||
|
|
||||||
|
Args:
|
||||||
|
mtype (MeasurementType): The type of which to list
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
a new measurement set including all measurements of a certain type
|
||||||
|
"""
|
||||||
|
return [m for m in self if m.measurementType() == mtype]
|
||||||
|
|
||||||
def getNewestReferenceMeasurements(self):
|
def getNewestReferenceMeasurements(self):
|
||||||
"""Returns a dictionary with newest measurement of each type that is not specific returns None in case no measurement is found."""
|
"""Returns a dictionary with newest measurement of each type that is not specific returns None in case no measurement is found."""
|
||||||
|
Loading…
Reference in New Issue
Block a user