In order to improve the accuracy of the fiber bragg grating (FBG) demodulation system and the spectral flatness of the tunable laser, a calibration scheme and flatness optimization method for effectively calibrating the etalon error are proposed. The scheme utilizes the higher temperature stability of the acetylene gas cell and The position of the standard sensor in the etalon is known, enables calculation accuracy of the etalon spectral nonlinearity error. The paper analyzes and optimizes the problem of the flatness of the tunable laser, verifies the data processing effect of the correlation filtering and calibration algorithms. The experimental results show that this paper has certain significance for the study of tunable laser flatness and related data processing schemes. The final demodulation system has an accuracy of 1 pm, the difference between the maximum optical power and the minimum optical power is less than 4dB and the flatness of tunable laser is improved by nearly 10dB compared with optimization. Related research solutions can provide reference for performance optimization of FBG demodulation systems.