normalisation package

Submodules

normalisation.measure module

measure

Module that contains functions to normalise GeometryParameters with measures (angles, metres, millimetres, etc.).

Author: Javier Chiyah, Heriot-Watt University, 2019

datavalidation.normalisation.measure.normalise_measure(parameter: datavalidation.core.geometryparameter.GeometryParameter)[source]

NOT IMPLEMENTED Normalises a number parameter that is a metric of some sort

Parameters:parameter – GeometryParameter to normalise
Returns:None
datavalidation.normalisation.measure.normalise_range_measure(parameter: datavalidation.core.geometryparameter.GeometryParameter)[source]

Normalises range parameters that may be the same value in different metrics.

This checks for things like [1, 25.4], where the first is the second one in millimetres or vice-versa. Note that this only works with lists of length 2.

Parameters:parameter – GeometryParameter to normalise
Returns:None

normalisation.normalise module

normalise

Module that contains functions to normalise GeometryParameters. It is the main file of the normalisation module.

Author: Javier Chiyah, Heriot-Watt University, 2019

datavalidation.normalisation.normalise.normalise_bike_geometry(bike_geometry: datavalidation.core.bikegeometry.BikeGeometry)[source]

Normalises the GeometryParameters inside a BikeGeometry. It modifies the BikeGeometry in place!

Parameters:bike_geometry – BikeGeometry
Returns:None
datavalidation.normalisation.normalise.normalise_parameter(parameter: datavalidation.core.geometryparameter.GeometryParameter)[source]

Normalises a GeometryParameter, eliminating additional characters or recognising a range of values. It modifies the GeometryParameter in place.

Parameters:parameter – GeometryParameter
Returns:None

normalisation.number module

number

Module with functions that normalise GeometryParameter that are numbers (integers, floats, ranges, etc.).

Author: Mario Vasilev and Javier Chiyah, Heriot-Watt University, 2019

datavalidation.normalisation.number.is_range_parameter(parameter: datavalidation.core.geometryparameter.GeometryParameter) → bool[source]

Checks if the GeometryParameter is a range (e.g. “170/180” or “170 - 180”).

Parameters:parameter – GeometryParameter to check
Returns:bool, True if the parameter has a value that is a range
datavalidation.normalisation.number.normalise_float(parameter: datavalidation.core.geometryparameter.GeometryParameter)[source]

Normalises a GeometryParameter that is a float.

Author: Mario Vasilev

Parameters:parameter – GeometryParameter to normalise
Returns:None
datavalidation.normalisation.number.normalise_number(parameter: datavalidation.core.geometryparameter.GeometryParameter)[source]

Normalises a GeometryParameters which is a number

Parameters:parameter – GeometryParameter to normalise
Returns:None
datavalidation.normalisation.number.normalise_range(parameter: datavalidation.core.geometryparameter.GeometryParameter)[source]

Normalises a GeometryParameter that is a range, possibly composed of 1 or more floats.

Author: Mario Vasilev

Parameters:parameter – GeometryParameter to normalise
Returns:None