Initial code for the pulse train simulator