Ciao,
Ho uno script jmp che compensa i risultati del test in base ai valori della tabella dei dati di riferimento.
Lo farà:
1. Leggere la tabella dei dati e la tabella dei dati di riferimento
2. Genera una nuova finestra per selezionare il numero del sito,
3. In base all'input dell'utente (sito numero 1 o 2), allineare quei dati ai valori della tabella dei dati di riferimento
Prendi la media per ID wafer, applica l'offset alla tabella dati principale
Ecco lo script: non produce l'output previsto
Names Default To Here( 1 );
dt1 = Data Table( "Reference data table" );
dt2 = Current Data Table();
For( i = 1, i <= N Rows( dt1 ), i++,
theTest = dt1:Tests[i];
Try( Column( dt2, theTest ) << set property( "TheMean", dt1:mean[i] ) );
);
New window( "", modal,
ct = checkbox({"1","2"}),
Buttonbox ("Ok",
get = ct << Get Selected ();
)
);
sitenum = Transform Each({str}, get, Num(str));
Col_List1 = dt2 << Get Column Names( "String" );
For( c = 1, c <= N Col( dt2 ) - 1, c++,
theMatrix = [];
name = Column( Col_List1[c] ) << Get name;
If( Contains( Col_List1[c], "IL" ),
mean = .;
Try( mean = Column( dt2, col_list1[c] ) << get property( "theMean" ) );
// Don't process if a value for theMean does not exist
If( Is Missing( mean ) == 0,
For Each Row(
If( Contains(sitenum, dt2:SiteNumber), // Something needs to be changed here *****
r = Row();
//mean = dt1:Mean[dt1 << Get Rows Where( :Tests == name )];
//measure = mean - Col Mean( If( dt2:Strips == dt2:Strips[r], Column( dt2, c ), . ) );
measure = mean - Col Mean( As Column( dt2, c ), :Wafer ID );
theMatrix = theMatrix || Column( dt2, c )[r] + measure;
);
);
Column( dt2, c ) << Set Values( theMatrix );
);
);
);