  The growth of a planetary core by pebble accretion stops at the so called
pebble isolation mass, when the core generates a pressure bump that traps
drifting pebbles outside its orbit. If the isolation mass is very small, then
gas accretion is protracted and the planet remains at a few Earth masses with a
mainly solid composition. For larger values of the pebble isolation mass, the
planet might be able to accrete gas from the protoplanetary disc and grow into
a gas giant. Previous works have determined a scaling of the pebble isolation
mass with cube of the disc aspect ratio. Here we expand on previous
measurements and explore the dependency of the pebble isolation mass on all
relevant parameters of the protoplanetary disc. We use 3D hydrodynamical
simulations to measure the pebble isolation mass and derive a simple scaling
law that captures the dependence on the local disc structure and the turbulent
viscosity parameter $\alpha$. We find that small pebbles, coupled to the gas,
with Stokes number $\tau_{\rm f}<0.005$ can drift through the partial gap at
pebble isolation mass. However, as the planetary mass increases, particles must
be decreasingly smaller to penetrate through the pressure bump. Turbulent
diffusion of particles, however, can lead to an increase of the pebble
isolation mass by a factor of two, depending on the strength of the background
viscosity and on the pebble size. We finally explore the implications of the
new scaling law of the pebble isolation mass on the formation of planetary
systems by numerically integrating the growth and migration pathways of planets
in evolving protoplanetary discs. Compared to models neglecting the dependence
of the pebble isolation mass on the $\alpha$-viscosity, our models including
this effect result in larger core masses for giant planets. These larger core
masses are more akin to the core masses of the giant planets in the Solar
System.
