Examples (Functions)

Examples (Functions)

Here, is the list of all the functions built in StellarAi

Sr. No.
Computation Function
Syntax
Description
Example
1
Get count of expression 
@countExpr(parameter_name>3000)
This function counts the data points in the column for the given condition.
@countExpr(time>3000)
2
Get percentage
@percentage(parameter_name>1000)
This function computes the percentage of existing data points for the given condition.
@percentage (RPM>1000)
3
Get number of events
@count(parameter_name)
This function counts the data points of parameters in the column.
@count(parameter_name)
4
Get minimum value
@min(parameter_name)
This function computes the minimum value of the parameter
@min(RPM)
5
Get maximum value
@max(parameter_name)
This function computes the max value of the parameter 
@max(RPM)
6
Get total value
@sum(parameter_name)
This function computes the summation of the parameter.
@sum(RPM)
7
Get average
@avg(parameter_name)
This function computes the average value of the parameter
@avg(RPM)
8
Get minimum value for expression
@minExpr(parameter_name>3000)
This function computes the minimum value from the column satisfying the given conditions.
@minExpr(RPM>3000)
9
Get maximum value for expression
@maxExpr(parameter_name>3000)
This function computes the maximum value from the column satisfying the conditions in the expression.
@maxExpr(RPM>3000)
10
Get total value for expression
@sumExp(parameter_name>3000)
This function computes the sum of total values from the column satisfying the conditions in the expression.
@sumExpr(RPM>3000)
11
Get average of expression
@avgExp(parameter_name>3000)
This function computes the average value of the parameter satisfying the condition in the expression.
@avgIfExpr(ENG_TEP>3000,RPM)
12
Get minimum value of specific parameter for expression
@minIfExpr(parameter_name>3000,parameter_name)
This function computes the minimum value of the parameter after satisfying the expression
@minIfExpr(ENG_TEP>3000,RPM)
13
Get maximum value of specific parameter for expression
@maxIfExpr(parameter_name>3000,parameter_name)
This function computes the maximum value of the parameter after satisfying the expression
@maxIfExpr(ENG_TEP>3000,RPM)
14
Get total value of specific parameter for expression
@sumIfExpr(parameter_name>3000,parameter_name)
This function computes the sum value of the parameter after satisfying the expression
@sumIfExpr(ENG_TEP>3000,RPM)
15
Get average of specific parameter for expression
@avgIfExpr(parameter_name>3000,parameter_name)
This function computes the average value of the parameter after satisfying the expression
@avgIfExpr(ENG_TEP>3000,RPM)
16
Get total time of specific parameter for expression
@timeIfExpr(parameter_name>3000,parameter_name)
This function computes the total time value of the parameter after satisfying the expression
@timeIfExpr(ENG_TEP>3000,RPM)
17
Get expression event apart
@getExprEventCountApart( parameter_name  > 20, difftime= 6)
This function counts the number of occurrences where parameter is greater than 20, ensuring that each event is separated by at least 6 sec. This measures how frequently parameter exceeds 1 with the specified time interval between events.
getExprEventCountApart( `turn_signal` > 1, difftime= 1)
18
Get exp event count
@getExprEventCount( parameter_name  > 20, minimumtime= 6)
This function counts the number of events where parameter_name exceeds 20 and the duration of each event is at least 6 sec.
@getExprEventCount( `Horn` > 1)
19
Get Expression duration
@exprDuration( parameter_name >3000)
This function calculates the total duration, in minutes, that parameter is greater than 3000.
exprDuration( turn_signal > 0.5 )/60
20
Get total distance covered
@getTotalDistanceCovered(speed_parameter_name)
This function  calculates the total distance  using vehicle speed parameter
@getTotalDistanceCovered(IN_VEHICLE_SPEED)
21
Get test duration
@getTestDuration(parameter_name)
This function is used to calculate the duration of a test based on the given parameter.
@getTestDuration(IN_VEHICLE_RPM)
22
Get Expression Custom Event Count
@getExprCustomEventCount( parameter_name_1 > 20, start=10 , end=50 , parameter =parameter_name_2 , minimumtime= 6)
This function counts the number of times parameter_2 increases from 10 to 50, while parameter_1 is greater than 20 considering only events that last at least 6 sec.
@getExprCustomEventCount( Vehicle_speed  > 20, start=10 , end=50 , parameter = `IN_Coolant, minimumtime= 1)

















    • Related Articles

    • Supported Functions

      Supported functions The next are the current supported set: where(bool, number1, number2): number – number1 if the bool condition is true, number2 otherwise. {sin,cos,tan}(float|complex): float|complex – trigonometric sine, cosine or tangent. ...
    • Examples (Computations)

      Examples Computations: The example below is a very simple use of computations. In this example the @max () and @min () function fetches the maximum and minimum value of the parameter ‘ENG_Temp_Out’ respectively. In this example, the function ...
    • Computed Function (Examples)

      Here, is the list of all the computed functions in StellarAi Sr. No. Computation Function Syntax Description Example 1 diff idiff = @diff( `parameter_name` ) This function adds a new column to the data, storing the difference between consecutive data ...
    • Adding Computations to Analysis Group

      Adding Computations to Analysis Group: Computations are essentially simple / complex mathematical expressions, logical operators, trigonometric functions whose results are shown in an information tile. Computations involve creating mathematical ...
    • Adding 'Computed Parameters' to data

      Adding 'Computed Parameters' to data: A computed parameter is a StellarAi-generated data column, derived by applying mathematical expressions, logical operators, or trigonometric functions on data columns from the test files. Example: Calculation of ...