Updated atomwavtoatm to make two passes over each file

Change-Id: Ibd0da95728c9227216a792d6ddbd7f67295c58e1