Measurement of arbitrary strain profiles within fibre gratings