  With the continuing advances in scientific instrumentation, scanning
microscopes are now able to image physical systems with up to sub-atomic-level
spatial resolutions and sub-picosecond time resolutions. Commensurately, they
are generating ever-increasing volumes of data, storing and analysis of which
is becoming an increasingly difficult prospect. One approach to address this
challenge is through self-driving experimentation techniques that can actively
analyze the data being collected and use this information to make on-the-fly
measurement choices, such that the data collected is sparse but representative
of the sample and sufficiently informative. Here, we report the Fast Autonomous
Scanning Toolkit (FAST) that combines a trained neural network, a route
optimization technique, and efficient hardware control methods to enable a
self-driving scanning microscopy experiment. The key features of our method are
that: it does not require any prior information about the sample, it has a very
low computational cost, and that it uses generic hardware controls with minimal
experiment-specific wrapping. We test this toolkit in numerical experiments and
a scanning dark-field x-ray microscopy experiment of a $WSe_2$ thin film, where
our experiments show that a FAST scan of <25% of the sample is sufficient to
produce both a high-fidelity image and a quantitative analysis of the surface
distortions in the sample. We show that FAST can autonomously identify all
features of interest in the sample while significantly reducing the scan time,
the volume of data acquired, and dose on the sample. The FAST toolkit is easy
to apply for any scanning microscopy modalities and we anticipate adoption of
this technique will empower broader multi-level studies of the evolution of
physical phenomena with respect to time, temperature, or other experimental
parameters.
