improving performance for interpolate_caldata