Which card are you using for your acquisition, and how is it set up (differential, single-ended)? I'm wondering about the ground signal not being hooked up properly.....
As mentioned before, your code for obtaining the signal and displaying it are correct. The signals should pretty much be synched (offset only by the interchannel delay, which is extremely small--on the order of nanoseconds).
The only other thing I can think of is that the input impedance of these cards is very high, and you will get crosstalk between channels if there is not sufficient impedance on the input line. In looking at your data, however, I don't believe this is the case, because your spike "sine wave" is out of phase with your first channel, which would no
t be indicative of this crosstalk. Now that I think about it, not connecting the ground correctly should have about the same effect....
Can you verify on an oscilloscope that your spike signal indeed is not imposed on a sine wave?
Mark