Updated script does the following:
1) Gets the highest 2 peaks
2) Puts a marker on the peaks. Now it looks very similar to the spectrum analyzer display.
3) The refresh rate is still 3 seconds. It might become better if the analyzer was hooked up to a wired martian LAN port rather than the wireless module I am using now.
PFA a sample pdf