interferometer demod routines