Optimisation and control of sampling rate in localisation microscopy