  Topological magnetic textures are of great interest in various scientific and
technological fields. To allow for precise control of nanoscale magnetism, it
is of great importance to understand the role of intrinsic defects in the host
material. Here, we use conventional and time-resolved Lorentz microscopy to
study the effect of grain size in polycrystalline permalloy films on the
pinning and gyration orbits of vortex cores inside magnetic nanoislands. To
assess static pinning, we use in-plane magnetic fields to shift the core across
the island while recording its position. This enables us to produce highly
accurate two-dimensional maps of pinning sites. Based on this technique, we can
generate a quantitative map of the pinning potential for the core, which we
identify as being governed by grain boundaries. Furthermore, we investigate the
effects of pinning on the dynamic behavior of the vortex core using
stroboscopic Lorentz microscopy, harnessing a new photoemission source that
accelerates image acquisition by about two orders of magnitude. We find
characteristic changes to the vortex gyration in the form of increased
dissipation and enhanced bistability in samples with larger grains.
