We demonstrate an accurate method for identifying both systematic and random errors in a fiber Bragg grating (FBG) writing system and show its application to calibration of the writing process. We first measure the FBG impulse response using low-coherence interferometry, and then we calculate the refractive index profile using layer peeling. This yields the complex longitudinal refractive index profile, which includes both the index modulation amplitude and the effective index as a function of position along the FBG. We demonstrate how this measurement can be applied to the calibration of a scanning-beam dithered phase mask FBG writing system. We demonstrate the ability to identify errors in the writing process that would not likely be found from a measurement of the FBG reflection spectrum alone.