demcompare.metric.metric

Mainly contains the Metric class. A metric defines a way to compute a statistic on an input data such as an altitude difference map

Module Contents

Classes

Metric

Metric factory:

class demcompare.metric.metric.Metric[source]

Metric factory: A class designed for registered all available metric methods and instantiate them when needed.

available_metrics: Dict[str, Any][source]
classmethod create_metric(metric_method: str, parameters: Dict = None)[source]

Factory command to create the metric from method_name Return a MetricTemplate child instance associated with the name given in the configuration

Parameters:
  • metric_method (str) – metric method

  • parameters (Dict) – optional input parameters

classmethod print_metric_methods()[source]

Print all registered metric methods

classmethod register(metric_method: str)[source]

Allows to register the MetricTemplate subclass in the factory with its metric type through decorator

Parameters:

metric_method (string) – the subclass type to be registered