First, note the curve of the experimental data. While it should oscillate among power readings, the average tends to bend near the measurement extremes (e.g. 1500 and 1600). This occurs due to the insertion loss of the grating coupler among other things (loss due to the bend or Y-branch can also occur and affect the graph/readings). To fix this, we approximate the curve with a 4th order polynomial and rectify/correct the baseline. The first figure below does this.