  We report on an instrument for applying ac and dc magnetic fields by
capturing the flux from a rotating permanent magnet and projecting it between
two adjustable pole pieces. This can be an alternative to standard
electromagnets for experiments with small samples or in probe stations in which
an applied magnetic field is needed locally, with advantages that include a
compact form-factor, very low power requirements and dissipation as well as
fast field sweep rates. This flux capture instrument (FLUXCAP) can produce
fields from -400 to +400 mT, with field resolution less than 1 mT. It generates
static magnetic fields as well as ramped fields, with ramping rates as high as
10 T/s. We demonstrate the use of this apparatus for studying the
magnetotransport properties of spin-valve nanopillars, a nanoscale device that
exhibits giant magnetoresistance.
