Evaluate a metric on multiple PhysicalMeasurementSeries

#1

Hi,

I have a ServicePoint with multiple PhysicalMeasurementSeries. I wish to evaluate the same metric (say, NormalizedData) for all the PhysicalMeasurementSeries of a given ServicePoint.
Since PhysicalMeasurementSeries is not metric-evaluatable I am unable to do:
PhysicalMeasurementSeries.evalMetrics({ids: PMS_ids, expressions: ["NormalizedData"], ...})

Yet I do not want to define one metric per PhysicalMeasurementSeries as those could change (and it would not be DRY to have 10+ metrics doing the same thing).

What approach would you recommend?

Thanks

0 Likes

#2

You can remix PhysicalMeasurementSeries to make it MetricEvaluatable:

remix type PhysicalMeasurementSeries mixes MetricEvaluatable

and then your evalMetrics should work, as long as you have defined the NormalizedData metric for PhysicalMeasurementSeries

0 Likes

#3

Simple, and working. Thanks :slight_smile:

0 Likes