  V407 Vul (RXJ1914.4+2456) and HM Cnc (RXJ0806.3+1527) are X-ray emitting
stars with X-ray light curves that are 100% modulated on periods of 569 and 321
seconds respectively. These periods are thought possibly to represent the
orbital periods of close pairs of white dwarfs. In this paper we present
optical light curves taken with the high-speed CCD camera ULTRACAM on the 4.2m
WHT in May 2003 and August 2005 and with the VLT in November 2005. The optical
and X-ray light curves of HM Cnc have been reported as being in anti-phase, but
we find that in fact the X-rays peak around 0.2 cycles after the maximum of the
optical light, as seen also in V407 Vul. The X-ray/optical phase shifts are
well explained under the accreting models of the systems if most of the optical
modulation comes from the heated faces of the mass donors and if the X-ray
emitting spots are positioned in advance of the mass donors, as is expected
given the angular momentum of the accreting material. Some optical emission may
also come from the vicinity of the X-ray spot, and we further show that this
can explain the non-sinusoidal lightcurves of HM Cnc. The only significant
difference between the two stars is that V407 Vul is observed to have the
spectrum of a G star. The variation in position on the sky of a blend of a
variable and a constant star can be used as a measure of their separation, and
is sensitive to values well below the limit set by seeing. We apply "pulsation
astrometry" to deduce that the G star is separated from the variable by about
0.027'' and hence plays no role in the variability of V407 Vul. We show that
light travel time variations could influence the period change in V407 Vul if
it forms a triple system with the G star.
