This is python code to accompany a paper submitted to optics express. The code calculates a time domain phase to imprint on an optical carrier, given a set of required sideband amplitudes and phases. The resulting time domain phase can be imprinted using an electro-optic modulator.