Show me the code:)
const rows, cols = 2, 1
plots := make([][]*plot.Plot, rows)
for j := 0; j < rows; j++ {
plots[j] = make([]*plot.Plot, cols)
for i := 0; i < cols; i++ {
pl := plot.New()
pl.Add(plotter.NewGrid())
pl.Title.Text = fmt.Sprintf("RSSI (%v-%v)", ant, symb)
pl.Y.Label.Text = "RSSI(dBm)"
pl.Y.Min = -130
pl.Y.Max = -60
pl.Legend.Top = true
if i == 0 && j == 0 {
pl.X.Label.Text = "FFT Bin"
pl.X.Min = 0
pl.X.Max = float64(len(m2.([]float64)) - 1)
plotutil.AddLines(pl, "RSSI_per_RE", pts)
}
if i == 0 && j == 1 {
pl.X.Label.Text = "PRB"
pl.X.Min = 0
pl.X.Max = float64(nbrPrb - 1)
plotutil.AddLines(pl, "RSSI_per_PRB", pts2)
}
plots[j][i] = pl
}
}
img := vgimg.New(8*vg.Inch, 8*vg.Inch)
dc := draw.New(img)
t := draw.Tiles{
Rows: rows,
Cols: cols,
PadX: vg.Millimeter,
PadY: vg.Millimeter,
PadTop: vg.Points(2),
PadBottom: vg.Points(2),
PadLeft: vg.Points(2),
PadRight: vg.Points(2),
}
canvases := plot.Align(plots, t, dc)
for j := 0; j < rows; j++ {
for i := 0; i < cols; i++ {
if plots[j][i] != nil {
plots[j][i].Draw(canvases[j][i])
}
}
}
w, err := os.Create(path.Join(outPath, fmt.Sprintf("rssi_%v_%v.png", ant, symb)))
if err != nil {
p.writeLog(zapcore.ErrorLevel, err.Error())
}
defer w.Close()
png := vgimg.PngCanvas{Canvas: img}
if _, err := png.WriteTo(w); err != nil {
p.writeLog(zapcore.ErrorLevel, err.Error())
}
Per RE RSSI and Per PRB RSSI will be shown in the same plot.
We can generally come to a conclusion that there is 8M DS interference to PRB 80~123.
Note: Estimating power from I/Q samples can be tricky somehow.