OK, I managed to do it, it was not that complex at the end. (thanks to a previous post from @martin_mueller)
1) Join your X-Y pairs on streamstats count
2) make continuous your count to the increment of X required (called disp here)
3) join the reference X-Y pairs on disp
4) use streamstats and reverse to get your last X, last Y, next X, next Y
5) Calculate your interpolated Y and merge Yvalues and Y interpolated
6) Create your outlier plot
index=source source=source | head 1 | dedup PartId1 | rex field=_raw "<FloatPoints(?P<FP_Values>.*)<\/FloatPoints>" | rex mode=sed field=FP_Values "s/>/|/" | rex field=FP_Values "\|(?<XWert>\d+.\d+)" max_match=5000 | table PartId1 XWert | mvexpand XWert | streamstats count | join type=OUTER count [ search index=atmo_pc* source=mysql* | head 1 | rex field=_raw "<FloatPoints(?P<FP_Values>.*)<\/FloatPoints>" | rex field=FP_Values ";(?<YWert>\-*\d\.\d+)" max_match=5000 | table YWert | mvexpand YWert | streamstats count ] | makecontinuous XWert span=0.005 | eval disp=round(XWert,3) | join disp [|inputlookup ref_curve.csv |rename Displacement as disp] | eval value_disp = case(isnotnull(YWert), disp) | streamstats last(YWert) as last_force last(value_disp) as last_disp | reverse | streamstats last(YWert) as next_force last(value_disp) as next_disp | reverse | eval interpolated_force_val = if(last_force + ((disp - last_disp) / (next_disp - last_disp)) * (next_force - last_force)=0,last_force, last_force + ((disp - last_disp) / (next_disp - last_disp)) * (next_force - last_force))| eval interpolated_force=if(isnotnull(YWert), YWert,interpolated_force_val) | eval F_pstdev=Force+2*stdev | eval F_mstdev=Force-2*stdev | table disp, interpolated_force, F_mstdev, F_pstdev
I hope it can help people in the future.
AdrienS
... View more