# On a Novel Approach to Correcting Temperature Dependencies in Magnetic Observatory Data
## 5 Discussion  
In the previous sections, we demonstrated applications of the temperature correction algorithm using the most typical examples revealed in February, June, November, and December 2021. The first and second examples demonstrated the algorithm capabilities under significant temperature variations, which one may observe regularly. The third and fourth examples demonstrated the difficulties of data correction under increased geomagnetic activity conditions and sharp extreme temperature fluctuations. In total, a temperature correction procedure was performed in 10 out of 12 months in 2021, all except August and October. The algorithm execution was comprised of the following stages:  
1. Calculation of the linear regression coefficients for the temperature recordings to fit the G plot and markup of the raw data within the user-defined interval;  
2. Specification of the data segment and mode for data correction by the user based on the markup results (stage 1);  
3. Correction of the data according to the temperature coefficients (stage 1) and mode (stage 2), which guaranteed a smooth merging of the corrected data with the previously processed data segments. The application of the described algorithm in the course of preparation of quasi-definitive data of the Saint Petersburg Observatory enabled the prompt elimination of temperature driven distortions of the full EMF vector components. Such distortions included both local temperature drifts and jumps at daily boundaries associated with abrupt changes in temperature. It should be noted that the described approach was based on the principle of minimal interference with the original data. Thus, temperature corrections affected less than 25% of the variation data in 2021, which entailed recalculation of only 10 observed baseline values out of 47. Figure 14 shows a comparative plot of the original baseline values marked by the blue dots and those corrected using the described algorithm (red triangles). The isolated points of the original baseline values are outliers due to measurement errors or instrumental effects. As seen from Figure 14, substantial corrections have mostly affected only the data intervals discussed in the article. The corrected data from the Saint Petersburg Observatory, together with data from the Klimovskaya Observatory [30,31], were used in [32] for detection of the most recent geomagnetic jerk, which indicated the efficiency of the proposed method and high reliability of the obtained data. Figure 13: Plots \(G\) for December 2021 after correction. Notations are the same as in Figure 7.  
Correction of temperature-driven distortions in geomagnetic measurements is crucial in observatory practice, and the geomagnetic community makes efforts to tackle this problem [18; 19]. However, a method proposed in [18] implied the correction of the yearly data set at the stage of definitive data production. Our approach was capable to correct data on a monthly basis, which makes quasi-definitive data available promptly. An approach reported in [19] was based on the comparison with other observatory data and required a dense enough network of observatories. Our method did not involve data from other observatories in any way, so it only crunched data from a single observatory under consideration. Many other environmental observation instruments are subjected to temperature drifts, so it is a common problem in data quality control (e.g., [33; 34]). However, the proposed method for the measurement correction was adapted to the combination of two sensors (fluxgate and Overhauser proton) specifically designed for magnetic observations and based on different physical principles. This combination enabled revealing distortions in each other's data. Therefore, the method was barely applicable to correcting measurements from other type of sensors. Conceptualization, A.S.; Methodology, D.K. and M.M. ; Software, M.M. ; Writing--original draft, D.K. and M.M. ; Writing--review & editing, A.S. and O.S. ; Visualization, M.M. and O.S.