Estoy intentando identificar la temperatura en mi proceso cuando comienza la densificación de la pieza. La marqué en el gráfico a continuación con una línea naranja. También quiero identificar la temperatura cuando se detiene la densificación, como se indica con la línea verde. ¿Alguien podría ayudarme a crear un script para esto?

Estoy abierto a sugerencias. Básicamente, el inicio de la densificación es el punto en el que el recorrido del ariete cambia mucho en unos pocos puntos de datos. La densificación se detiene cuando no hay un cambio en el recorrido del ariete para un número determinado de puntos (no estoy seguro de un número específico). Pensé que podría modificar las fórmulas sugeridas para abordar los detalles finales. ¿Esto ayuda?
Esa definición suena como un buen comienzo. ¿Cómo obtengo entonces el valor de temperatura que corresponde al punto de inicio en el recorrido del ariete?
Si pudiera adjuntar una tabla de datos de muestra, podría armar un script de inicio para calcular el Punto de inicio.
He adjuntado un subconjunto de mis datos. Avíseme si no está claro.
Aquí está mi primer paso de un posible método para encontrar el punto de inicio. El script calculó el gráfico siguiente

Names Default To Here( 1 );
dt = Current Data Table();
dt << clear select;
// Set the number of places to look ahead for calculations
lookAhead = 6;
// Loop across all rows, finding possible Onset Points
// temp[x] < temp[x+1] & temp[x] < Mean of the next 6 values of temp - 1.5 STD of those points
// When found, select those rows
For( i = 1, i <= N Rows( dt ) - lookAhead, i++,
If(
:Temperature Actual[i] < :Temperature Actual[i + 1] & :Temperature Actual[i] >
Mean( :Temperature Actual[Index( i + 1, i + 1 + lookAhead )] )
-Std Dev( :Temperature Actual[Index( i + 1, i + 1 + lookAhead )] ) * 1.5,
Row State( i ) = Selected State( 1 )
)
);
// Get the list of the selected rows
suspectRows = dt << get selected rows();
// The target criteria for the Onset is where the max temp values for the suspect rows
maxTemp = Max( :temperature Actual[suspectRows] );
// Get the time value for the selected suspect Row
timeval = :"time (s)"n[suspectRows[Loc( :temperature Actual[suspectRows], maxTemp )[1]]];
// Clear all selected rows
dt << clear select;
// Generate the Graph Builder Chart
gb = Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables(
X( :"Time (s)"n ),
Y( :Temperature Actual ),
Y( :Ram Travel Actual, Position( 1 ), Side( "Right" ) )
),
Elements( Points( X, Y( 1 ), Legend( 5 ) ), Points( X, Y( 2 ), Legend( 9 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 5, Properties( 0, {Line Color( 21 )}, Item ID( "Temperature Actual", 1 ) ) )}
)
)
);
// Add a verticle reference line at the calculated Onset Point
Report( gb )[AxisBox( 1 )] << add ref line( timeval, solid, green, "", 3 );
// Select the row in the data table that is the calculated Onset Point
Row State( suspectRows[Loc( :temperature Actual[suspectRows], maxTemp )[1]] ) = Selected State( 1 );