Command: ChnStatisticsChannelCalc
- Updated2024-09-12
- 5 minute(s) read
Command: ChnStatisticsChannelCalc
Command: ChnStatisticsChannelCalc
Calculates characteristic statistical values channelwise.
Input Parameters
ChnList1 |
Specifies one or more channels. |
StatsSelection |
Specifies which statistical characteristic values to calculate. |
[StatsStartIndex] |
Specifies the start row of the channel to be evaluated. The default value is NoValue which means that DIAdem starts from the first row. |
[StatsEndIndex] |
Specifies the end row of the channel to be evaluated. The default value is NoValue, which specifies that DIAdem uses the channel length. |
[StatsUsePopulationFormula] |
Specifies whether DIAdem calculates the characteristic values based on the population or on the sample. If the value is False, DIAdem calculates the characteristic values based on samples. The default value is False. |
[StatsResultChn] |
Specifies whether DIAdem stores the statistics results in data channels. The default value is False. |
[StatsResultChnNames] |
Specifies whether DIAdem stores the input channel names of the descriptive statistics in a text channel. The default value is False. |
[StatsResultChnNameFormat] |
Specifies how DIAdem stores the input channel names of the descriptive statistics in a text channel. The default value is False. |
Return Parameters
| ChnResult | Contains the result channel or the result channels with the characteristic values. ElementList <Data> type return value. |
If you execute the evaluation over all rows of the selected channels, DIAdem saves the results in the following custom properties of the input channel: Result~Statistics~AverageAbsDeviation~FromMean, Result~Statistics~AverageAbsDeviation~FromMedian, Result~Statistics~Dispersion~QuartileDistance, Result~Statistics~Dispersion~Range, Result~Statistics~Dispersion~RelativeVariationCoefficient, Result~Statistics~Dispersion~StandardDeviation, Result~Statistics~Dispersion~StandardError, Result~Statistics~Dispersion~Variance, Result~Statistics~Dispersion~VariationCoefficient, Result~Statistics~ExtremeValues~Maximum, Result~Statistics~ExtremeValues~Minimum, Result~Statistics~Form~ExcessKurtosis, Result~Statistics~Form~Kurtosis, Result~Statistics~Form~Skewness, Result~Statistics~MeanValues~ArithmeticMean, Result~Statistics~MeanValues~GeometricMean, Result~Statistics~MeanValues~HarmonicMean, Result~Statistics~MeanValues~SquareMean, Result~Statistics~Quantiles~LowerQuartile, Result~Statistics~Quantiles~Median, Result~Statistics~Quantiles~UpperQuartile, Result~Statistics~Sums~Sum, Result~Statistics~Sums~SumOfSquares, Result~Statistics~Dispersion~ThreeSigma, and Result~Statistics~Dispersion~SixSigma. For the Anderson-Darling test, DIAdem saves the results also in the following custom properties of the input channel: Result~Statistics~NormalDistribution~AndersonDarling~IsNormalDistributed and Result~Statistics~NormalDistribution~AndersonDarling~p.
If you execute evaluation only on specific lines of the selected channels, DIAdem does not store the results in custom properties because the assignment to the input channel is not unique.
In addition, DIAdem stores the names and values of the custom properties in the StatsPropertyName and StatsResult variables after the calculation.
![]() | Refer to the help page Statistical Characteristic Values in DIAdem for mathematical details. |
The following example calculates the statistical characteristic values minimum, maximum, and geometric mean for the first channel of the first channel group and displays the values. DIAdem saves the results as custom properties of the input channel.
| VBScript | Python |
Set ChnResult = ChnStatisticsChannelCalc("[1]/[1]", eStatsMinimum + eStatsMaximum + eStatsGeometricMean) Call MsgBox(StatsPropertyName(eStatsMinimum) & " : " & StatsResult(eStatsMinimum) & VBCrLf & _ StatsPropertyName(eStatsMaximum) & " : " & StatsResult(eStatsMaximum) & VBCrLf & _ StatsPropertyName(eStatsGeometricMean) & " : " & StatsResult(eStatsGeometricMean))
Dialog Box Call
Call SUDDlgShow("Main", ResourceDrv & "AnaChnStatisticsChannel_BlockCalc")


