Setting A Custom Scaling of a Channel in DIAdem

Updated Oct 19, 2022

Environment

Software

  • DIAdem

The Scale function in DIAdem helps to scale a channel range using a required factor and offset values. However, there are some cases where a custom scaling of channel may be required in DIAdem. This article shows how to create custom scaling of a channel in DIAdem.
The steps here applies some mathematical concept to get the desired interval to be mapped from minimum and maximum range of the scaling required channel in DIAdem.

To perform the custom scaling of a channel in DIAdem, a mathematical formula that scale down a range of numbers with known minimum and maximum value range would be used to calculate the factor and offset in the Scale dialog box. This example will show how to scale down a channel that contains interval points of 0.01 to 0.5. 

Assuming you want to scale a range [min, max] to [a, b] and this is a continuous function that satisfies f(min) = a and f(max) = b. 
By mapping [min, max] using a simpler range of a = 0 and b = 1, we would get;

Min.PNG
Max.png
If we use arbitrary values of a and b and resolve to a linear equation formula, we would get the following equation below. 
LinearFormula.PNG
The gradient part of the equation can be used for input Factor and the constant part is used for Offset in the Scale dialog box.
FurtherResolved.PNG

Hence, 4 input from the channel is required.
  • Minimum value of the channel range, min
  • Maximum value of the channel range, max
  • Current interval, a
  • Desired interval, b

 

DIAdem Configuration

  1. Load the file that contains the channel that requires custom scaling. Make sure the groups and its channel are visible in Data Portal.
  2. Navigate to the ANALYSIS panel >> Basic Mathematics >> Scale.                                                                  Select Scale.png
  3. In the Scale dialog box, drag the channel that is required for scaling from the Data Portal into the Channel field.                   DragChannelToScale.png                         DragChannelToScale2.png 
  4. The values for minimum and maximum of the channel can be obtained from the Base Properties in Data Portal. Obtain the values to be input into Factor and Offset field from the formula into the Scale dialog box and press Calculate.                                                                                                                                         Values.png 
  5. A new linear scaled channel will be added into the Analysis view and in the Data Portal.   Added.png

The expected result can be verified on the VIEW panel by dragging the linear scaled channel and create a 2D axis system with a scaled range between 0 to 0.5.
Result.png