Link Search Menu Expand Document

Logarithmic Scaling

Jul 19 2024 at 12:00 AM

  1. Overview
  2. Installation
  3. Example Options File
  4. Property Details

Overview

This function performs a logarithmic scaling on the value.

If Base is set to 0:

\[V_{current} = \ln(V_{raw})\]

If Base is set to any other value:

\[V_{current} = \log_{base}(V_{raw})\]

Installation

The required NuGet Package for this function is: IoTnxt.Raptor.TransformManager

    .AddRaptorTransformManager("TransformSets", (services, configuration, builder) =>
    {
        builder.AddDefaultTransformationFunctions(services);
    })

Example Options File

{
  "TransformSets": {
    "Scale": {
      "F1":  {
        "Enabled": true,
        "FunctionType": "LogarithmicScaling",
        "Base": 10
      }
    }
  } 
}

Property Details

Property NameDescription
FunctionTypeThe value for this function is “LogarithmicScaling”.
EnabledSets whether this Transform Function is enabled. Defaults to true.
BaseThe base of the logarithm. If set to zero (default) then it will use natural logarithm (e = 2.718281828459).