1. A method for generating parameters for software dispersion compensation in optical coherence tomography (OCT) systems, comprising: acquiring raw spectral interferogram data for a given lateral position on a sample and a given reference reflection; postulating a trial spectral phase corresponding to each wavenumber sample of the acquired spectral interferogram data; assembling the acquired raw spectral data and the postulated trial spectral phase data into trial complex spectrum data; and computing trial A-scan data by performing an inverse Fourier transform on the trial complex spectrum data and determining the magnitude of a result.