extract_calibration_data function

Internal function to extract calibration data.