  Velocity map imaging inside an electrostatic quadrupole guide is
demonstrated. By switching the voltages that are applied to the rods, the
quadrupole can be used for guiding Stark decelerated molecules and for
extracting the ions. The extraction field is homogeneous along the axis of the
quadrupole while it defocuses the ions in the direction perpendicular to both
the axis of the quadrupole and the axis of the ion optics. To compensate for
this astigmatism, a series of planar electrodes with horizontal and vertical
slits is used. A velocity resolution of 35 m/s is obtained. It is shown that
signal due to thermal background can be eliminated, resulting in the detection
of slow molecules with an increased signal-to-noise ratio. As an illustration
of the resolving power, we have used the velocity map imaging system to
characterize the phase-space distribution of a Stark decelerated ammonia beam.
