A non-transitory computer-readable medium comprising computer-executable instructions for operating a controller of a scanning probe microscopy system, where the scanning probe microscopy system comprises a sample carrier for supporting a sample, and a probe with a probe tip, the system being configured for positioning the probe tip relative to the sample, a transducer, a sensor for sensing probe tip vibrations, and the controller, such that when provided to the controller, execution of such instructions enables the controller to perform a method of tuning parameter settings of the scanning probe microscopy system for performing acoustic scanning probe microscopy for subsurface imaging the method comprising:
- a) applying, by the transducer to the sample, an acoustic vibration signal comprising a first frequency and a second frequency;
- b) controlling, at a first position of the probe tip relative to the sample, the transducer to carry out a sweeping of the first frequency of the acoustic vibration signal across a first frequency range, and obtaining a first probe tip sensor signal using the sensor during the sweeping of the first frequency;
- c) controlling, at a second position of the probe tip relative to the sample, the transducer to carry out a sweeping of the first frequency of the acoustic vibration signal across at least said first frequency range, and obtaining a second probe tip sensor signal using the sensor during the sweeping of the first frequency;
- d) analyzing, by the controller, the first probe tip sensor signal and the second probe tip sensor signal to obtain a difference characteristic dependent on the first frequency, and selecting a first frequency value for which the difference characteristic exceeds a threshold for tuning the first frequency;
- wherein the first position and the second position of the probe tip are selected such that a subsurface structure of the sample at the second position differs from a subsurface structure of the sample at the first position.