I would like to add a new column 'Vth' in my table with the following calculation:-
First I need to find the index i of column 'IDS' where the 'IDS' is nearest to 1e-9 (or Log10[IDS] = -9); and then Vth = VGS(i). It should be grouped by Site, Measurement, SWP, Wafer columns as well. That is, each unique combination of Site, Measurement, SWP, Wafer will have one Vth value.
If the IDS is not exactly 1e-9. Please do interpolate in this fashion. That is; Log10[IDS] vs. VGS.
Exact VTH = Interpolate( Log10( 1e-9 ), [Log10[IDS](i)) Log10[IDS](i-1)] , [VGS (i) VGS (i-1) ] );
Note the SWP column is sweep of VGS in forward (0) and reverse (1) direction; therefore the interpolation direction need to be taken care of in proper manner.