Dynamic time warping of palaeomagnetic secular variation data