Compensation of instrumental imperfections by deconvolution using an internal reference signal