First of all, I would like to thank Cryptic for incorporating this mini-game, it's a lot of fun and makes scanning more interesting than just pressing 'F'.
~ The Basics of the Game ~
The scanning game is simple; it's initiated any time you scan an anomaly either in space or on the ground. It begins once your scanning bar has completed, giving you plenty of time to prepare yourself. The objective of the mini-game is to align the Red waveform with the Blue waveform before time runs out. You can move the Red waveform by either pressing the four buttons to the right of the waveform scan, or by using the arrow keys on your keyboard. If you succeed, you will harvest an extra amount of data samples with a chance of a rare sample. These rare samples will be usable at a later date.
If you do not wish to play the mini-game, just hit 'F', the Quit button in the bottom right, the X button at the top right, or press 'Escape'. You lose nothing by not playing the mini-game and will harvest the default amount of data samples.
~ Winning the Game ~
I've discovered a relatively foolproof and simple way to always win at the mini-game. The key to this is first aligning the height of the Red waveform with the Blue waveform. Once that's done, you should either quickly scroll left or right (make the waves shorter or wider). When they line up, a match will be made!
I use this method every time and never run into a problem, and find it's a lot quicker and more successful than trying to align the width of the Red waveform before the height.
~ Miscellaneous Tips ~
1) I find using the keyboard arrow keys to be quicker and more precise than the buttons on the game panel. Whenever I begin to scan an anomaly, I ready myself to use the arrow keys instead of waiting once the waveform screen has popped up.
2) If a dialogue box pops up while you're scanning an anomaly, you won't be able to alter the Red waveform with your arrow keys -- this always happens at the end of Data Sample Explore missions (where you are to collect 5 samples). The solution I've found to this problem is to click on the Waveform panel (with the mouse cursor) after the dialogue box has popped up... this allows you to use your arrow keys again. Once you've gotten used to the method described above, the lost time in doing so shouldn't be much of an issue.