Process and plot the supposed data

23 Views Asked by At

Build a Plot

Suppose it's given us experimental data is the array of pairs:

first number L = PO2 - partial pressure

and second Y = SatHb - Oxygen saturation

The Array is NOT monotonic

We need to processing the experimental data:

  1. Building Hill plot [x, y] by redefining axis:
    float32  x,y;
    x=log(L);  
    y=log(Y/(100-Y))/100; # Y represented like percentage value 0..100
  1. Linear transformation of both axis: Specifically vertical (Y) shift till the data are extrapolating to zero And therefore [x.y] is straight line for x<1.
  2. Fitting 2 parts of the data points in Hill plot [x.y] with 3 lines (Green, Red, Blue) Boundaries are adjustable with 2 double sliders and rarely changed once set. Slopes of the lines are shown and reported Intercept of the left (green) line should be close to zero, slope should be close to 1. Blue line is built automatically: slope is the same as green, intercept is the intercept of green plus 1. If data are good data should asymptotically go to blue line
  3. All 3 lines drawn on the original [L, Y] plot according to reverse Hill transformation:
float32 Y, L, T;  
L=pow(10, x); 
T=pow(10, y);
Y=1/((1/T)+1);
  1. Threshold are calculated for 20, 50 80% of the SatHb Namely at what PO2 the SatHb is 20, 50 and 80 %. For this purpose use a polynomial fit of 7th order then function "threshold" to find the corresponding fractional indexes for the Y array. Then Interpolation of the polynomial fit to find 3 corresponding L values

(3 corresponding L values reported to be output)

I need to code this but i`d would like to know at first how it looks like or be more explained