On determining fluxgate magnetometer spin axis offsets from mirror mode observations

In-flight calibration of fluxgate magnetometers that are mounted on spacecraft involves finding their outputs in vanishing ambient fields, the so-called magnetometer offsets. If the spacecraft is spin-stabilized, then the spin plane components of these offsets can be relatively easily determined, as they modify the spin tone content in the de-spun magnetic field data. The spin axis offset, however, is more difficult to determine. Therefore, usually Alfvénic fluctuations in the solar wind are used. We propose a novel method to determine the spin axis offset: the mirror mode method. The method is based on the assumption that mirror mode fluctuations are nearly compressible such that the maximum variance direction is aligned to the mean magnetic field. Mirror mode fluctuations are typically found in the Earth’s magnetosheath region. We introduce the method and provide a first estimate of its accuracy based on magnetosheath observations by the THEMIS-C spacecraft. We find that 20 h of magnetosheath measurements may already be sufficient to obtain high-accuracy spin axis offsets with uncertainties on the order of a few tenths of a nanotesla, if offset stability can be assumed.


Introduction
In situ magnetic field measurements in space are a key observational element in space plasma and planetary physics: magnetic fields of planetary, interplanetary, or solar origin impose structure on space plasmas.The behavior of waves in these plasmas, characterized by propagation speed and direction, is governed by the ambient magnetic field, e.g., due to the Alfvén velocity being proportional to its strength.Fluxgate magnetometers have so far been most widely used for direct measurements of magnetic fields in space.They can be miniaturized and only require small amounts of electric power.If well calibrated, they are able to accurately determine three components of the DC and lowfrequency magnetic fields (e.g., Acuña, 2002;Balogh et al., 2001;Auster et al., 2008).Calibration activities need to be performed on ground (pre-launch) and routinely in space (post-launch); they imply finding the components of a calibration matrix M and an offset vector O that convert raw instrument output B raw into magnetic field vectors B in meaningful units (e.g., Kepko et al., 1996;Plaschke et al., 2014): (1) M is composed by three gain values and six angles that define the magnetometer sensor directions.The 3-D offset vector O is the magnetometer output in vanishing ambient fields.Changes in offsets reflect not only drifts in the magnetometer sensors or electronics but also changes in spacecraft generated fields over time.Long-term offset drifts with rates of up to several tenths of a nanotesla per year and medium-term (seasonal) variations with peak-to-peak amplitudes of up to a few tenths of a nanotesla have been reported by Alconcel et al. (2014), for instance.These offset changes occur on timescales of years and months, respectively.Furthermore, there are short-term offset variations with timescales on the order of an hour, triggered by temperature changes at terrestrial/planetary periapsis passes or in eclipse phases.These variations vanish on timescales of hours as temperatures revert to equilibrium values.Clearly, there is a need to monitor the offsets continuously and update them more frequently than the other parameters.
In total, M and O are composed by 12 independent parameters.In space, 8 of those parameters can be relatively F. Plaschke and Y. Narita: Spin axis offsets from mirror modes easily determined if the respective magnetometer is mounted on a spinning spacecraft, as their choice will influence the content of spin tone and harmonics in the de-spun magnetic field data.The two spin plane offsets belong to this set.
The spin axis offset, instead, has to be determined by other means.Classically, nearly incompressible (Alfvénic) fluctuations of the interplanetary magnetic field are used to estimate spin axis offsets (Belcher, 1973;Hedgecock, 1975).Therefore, the spacecraft are required to take measurements in the pristine solar wind.Furthermore, independent measurements in magnetic field magnitude and/or direction by other instruments may be used for spin axis offset determination: the calibration process of the fluxgate magnetometers of the recently launched Magnetospheric Multiscale (MMS) mission (Burch et al., 2016) involves, for the first time, routine cross-calibration with observations by the electron drift instruments (Russell et al., 2016;Torbert et al., 2016).These instruments yield electron gyro-times and, hence, absolute measurements of the ambient magnetic field magnitude that can be used to estimate spin axis offsets, as detailed in Nakamura et al. (2014) and Plaschke et al. (2014).Unfortunately, magnetospheric spacecraft rarely feature electron drift or other instruments that yield measurements suitable for crosscalibration with fluxgate magnetometers.
Here we introduce a new method to determine magnetometer spin axis offsets.It is based on the idea that the mirror mode exhibits mostly compressible fluctuations: the fluctuating fields appear to be nearly parallel to the local mean magnetic field (e.g., Price et al., 1986;Tsurutani et al., 2011).Hence, it is possible to approximately determine the mean magnetic field direction only from the fluctuation sense of the mirror mode.
Mirror modes and ion-cyclotron waves appear to be the two most important wave modes in the (Earth's) magnetosheath (e.g., Schwartz et al., 1996), which is confined between the bow shock and the magnetopause.Both wave modes are fed from the temperature anisotropy that is characteristic to the magnetosheath: higher temperature in the plane perpendicular to the magnetic field.Lower and higher plasma-β conditions favor the growth of the ion-cyclotron and mirror mode, respectively.Typical high plasma-β conditions in the (middle) magnetosheath make the mirror mode dominant there, although it may often be superposed and, therefore, masked by other coexisting waves.
Using magnetosheath observations by a Time History of Events and Macroscale Interactions during Substorms (THEMIS) spacecraft (Angelopoulos, 2008), we lastly address the question of how accurate spin axis offsets can be determined routinely by the mirror mode method.

Mirror mode method
A time series of magnetosheath magnetic field observations (including mirror modes) shall be available in a spin axis aligned and de-spun (inertial) coordinate system.The spin axis should point in the z direction.The magnetic field measurements should be calibrated (B in Eq. 1) but for the spin axis offset O z .
Within mirror modes, the mean spin axis offset-corrected magnetic field vector B c , given by where An uncertainty O z of O z may be estimated by Plaschke et al., 2014).Here B n is a constant uncertainty related to noise and also to errors in the offsets other than O z ; g denotes a relative uncertainty associated with the magnetometer gain values and with the angles that define the magnetometer sensor directions.Deviations in these quantities produce errors in the components of the calibrated magnetic field measurements that are proportional to the magnetic field strength.The uncertainty θ B is computed via and θ D = arctan( √ λ 2 /λ 1 ) results from the ratio of intermediate to largest eigenvalues (λ 2 /λ 1 ) pertaining to the maximum variance analysis.
As can be seen in Eqs. ( 3) and ( 4), it is favorable for the O z determination if B and D are located near the spin plane so that the effect of a non-vanishing O z is largest on θ B and, hence, on the difference tan θ B − tan θ D .Consequently, we are interested in finding mirror mode intervals with small D z within a given time series of magnetosheath magnetic field observations.Therefore, the entire time series is divided into small (overlapping) subintervals of length t int .The aforementioned quantities are computed for each of the subintervals, from which we select a subset based on the threshold values C xy , C φ , C B , and C D , as defined in the following paragraphs.
Mirror modes are characterized by large amplitude fluctuations in magnetic field magnitude δB c /B c (Lucek et al., 1999a, b;Schmid et al., 2014).We can only ascertain the spin plane part of that expression and, hence, require Furthermore, mirror modes are identified by the angle between D and B that should stay below a certain value (Lucek et al., 1999a, b;Schmid et al., 2014).That angle, however, is directly dependent on O z and, hence, should not be directly constrained.Instead, we require for the angle φ between D and B in the spin plane (see Fig. 1) that is independent of O z : We then simply restrict θ B and θ D individually by so that B and D are both closer to the spin plane than to the spin axis but relatively unrestricted in pointing direction along z with respect to each other.By setting C xy , C φ , C B and C D , we select a subset of the O z and O z estimates.
A final spin axis offset O zf value may then be computed from the selected O z estimates by finding the maximum of the probability density distribution P of those estimates.Therefore, the kernel density estimator (KDE) method may be applied.Using a Gaussian kernel, P is computed by the KDE method via Here N is the number of selected O z estimates and h is the bandwidth or smoothing width.The final offset O zf shall then be given by O z for which P maximizes.
It should be noted that it is beneficial if the spin axis offset stays constant over the entire magnetosheath observation time, from which O z estimates are computed.Otherwise, P will be broadened and the final offset O zf will represent an average spin axis offset.

Application and accuracy
We apply the mirror mode method to magnetosheath observations of one month (July 2008) of THEMIS-C (THC) fluxgate magnetometer (FGM) data (Auster et al., 2008) in the despun sun-sensor L-vector (DSL) coordinate system that is inertial (de-spun) and aligned with the spin axis (z direction).The FGM data are continuously available in spin resolution (spin period: ∼ 3 s).In July 2008, THC's orbit around Earth was nearly equatorial and highly elliptical.The orbit period was almost 2 days long and the apogee was located in the dayside afternoon sector, upstream of the bow shock.Hence, THC crossed the dayside magnetosheath twice per orbit and once per day.The THC calibration tables reveal that the solar wind intervals were used to routinely update the spin axis offset, on a monthly basis, to correct for the long-and mediumterm offset variations (Leinweber et al., 2008).Hence, we expect the remaining O z to nearly vanish.It should be noted that THC's spin axis offset drift was only about 0.2 nT over the month of July 2008, which is comparable to or even less than the uncertainty thereof.Thus, we do not expect the correction of that spin axis offset drift to affect/facilitate the application and/or enhance the accuracy of the mirror mode method in any significant manner.Furthermore, we would like to point out that the short-term offset variations occurring after perigee passes and eclipse intervals are unimportant to this study, as sufficient time (roughly 6 h) passed after these events before THC entered the magnetosheath on the outbound orbit legs.
The entire month is divided into overlapping t int = 3 min long subintervals, shifted by 10 s.We determine whether THC was in the sheath by checking whether the mean ion density of each subinterval as measured by THC's electrostatic analyzer (McFadden et al., 2008) is larger than twice the mean solar wind density as provided by NASA's OMNI high-resolution data set (King and Papitashvili, 2005) for the same subinterval.This criterion proved to work remarkably well for the identification of subsolar sheath intervals in Plaschke et al. (2013).Note that the particle data are just used to automate the magnetosheath interval selection/identification but are not at all required for the mirror mode method as the turbulent sheath intervals may also be easily manually/visually identified from magnetic field measurements only.In total, THC was approximately 154 h in the magnetosheath in July 2008.
For each subinterval, we compute the quantities introduced in the previous section, in particular O z and O z .As in Plaschke et al. ( 2014 Figure 2 shows a common example interval from 2 July 2008, which contributes a larger number of 535 O z estimates.At the beginning of the interval, THC was in the magnetosphere; at the end it senses the solar wind upstream of the bow shock.The magnetosheath observations are clearly identified using the density criterion outlined above, as apparent from panel b.For large parts of these observations, the criteria on φ, θ B , θ D and B xy are fulfilled (see panels eh).Where this is the case, O z and O z estimates are shown (panels c and d).It is also apparent that the fluctuation level in B (black trace in panel a) is significant throughout the entire magnetosheath observation time.This is a typical characteristic of the magnetosheath that we are making use of here.When zooming in, e.g., to the time around 14:30 UT, it can be seen that the THC-measured magnetic field strength and the ion density are anti-correlated, which is expected only for clear mirror mode signatures that are not masked by other superposed fluctuations.
All  2011), for instance, reported changes in magnetic field direction across magnetosheath mirror mode structures to be < 10 • .More recently, Enríquez-Rivera et al. (2013) presented cases of mirror mode storms in the solar wind and found angular deviations as large as 18 • .Erdős and Balogh (1996) investigated properties of mirror mode structures ob- served in the Jovian magnetosheath.They found deviations < 10 • "during the intervals of large-amplitude field fluctuations".Schmid et al. (2014) use 20 • as threshold for the angle between B and D for the selection of mirror mode intervals.
As |O z | ≤ O z mostly holds (crosses mostly confined between red lines in Fig. 3), O z may be regarded as a suitable estimate for the accuracy of the individual O z estimates.The average values of the three terms that contribute to O z in Eq. ( 4) are It is apparent that the error in O z corresponds to the uncertainty in θ D that stems from the accuracy of the D determination by the principal component analysis.Although the spread in O z is large, O zf = 0.21 nT as of Eq. ( 10) using h = 1 nT is found to be remarkably close to the expected value of 0 nT and certainly within the limits of the spin axis offset accuracy of the THC FGM calibration.The probability density distribution P is shown in the bottom panel of Fig. 3.It is highly symmetric around ∼ 0 nT.The mean and median values of the O z distribution are 0.08 and 0.20 nT, respectively.Hence, they come even closer to 0 nT than O zf .
We check whether a change to B z by adding a fixed magnetic field value of 5 nT is correctly recovered by the mirror mode method.This is indeed the case, as we obtain O zf = 5.17 nT.The resulting distributions of O z versus O z and P are shown in Fig. 4. As can be seen in the top panel, the distribution of O z shifts to larger values while the spread approximately remains.In the lower panel of Fig. 4, P is shown, which exhibits a large skewness.This may stem from the fact that a positive non-vanishing O z leads to θ B being systematically higher than θ D .As we need to restrict θ B and θ D by C B and C D to ensure selecting compressional signals with variations close to the spin plane, the distribution of θ B − θ D and, hence, O z ∼ tan θ B − tan θ D cannot be symmetric any more.Furthermore, a secondary, minority population of O z estimates centered on 0 nT seems to be appar- ent in the top panel of Fig. 4. We speculate that this population originates from other (than mirror mode) waves that feature a combination of compressional and transverse magnetic field fluctuations.If we assume their maximum variance directions to be approximately uniformly distributed, then the corresponding distribution of the θ B − θ D and O z values should be symmetric around 0 • and 0 nT, respectively.That secondary O z population contributes to the asymmetry in the total distribution of O z estimates, resulting in mean and median values of 3.71 and 4.47 nT, respectively.Both values deviate more substantially from the added offset of 5 nT than O zf , justifying the evaluation of P for its determination.Note that the offsets are independent of the other calibration parameters (matrix M in Eq. 1).Hence, adding an artificial, constant spin axis offset value to fully calibrated data yields a data set that is equivalent to one which has been calibrated except for the spin axis offset, if that offset can be assumed to be constant.
So far, the final spin axis offset results pertain to one month of THC data.We can check how the uncertainty/spread in O zf increases with the cadence, i.e., by decreasing the sample size available for the determination of P .Therefore, we F. Plaschke and Y. Narita: Spin axis offsets from mirror modes The figure shows O zf , the standard deviations σ of contributing O z , their numbers N, and the quotients σ/ √ N, determined from daily THC FGM data in black and from B z shifted data (by 5 nT) in red.Apparently, daily O zf values scatter very significantly around 0 and 5 nT, respectively; the standard deviations of the O zf values shown in Fig. 5a are 2.2 and 2.8 nT, respectively.However, it can also be seen that deviations from the expected offset values tend to be larger for larger σ and/or lower N, as expected.Indeed, σ/

√
N seems to be a good proxy for the uncertainty associated with O zf .This can be seen in Fig. 6  It should be noted, however, that this latter statement is based on the analysis of a particular set of THC magnetic field observations in the magnetosheath, which feature only a small offset drift.Larger offset drift rates may require the computation of less accurate O zf values on a higher cadence.If, instead, the direction of the magnetic field in the magnetosheath in not suitable for spin axis offset determination over longer time spans (|θ B | > C B ), then much more than 20 h of magnetosheath measurements may be needed to obtain accurate O zf values.Hence, the stated minimum time length of 20 h can only be regarded as a rough estimate.

Summary and conclusions
Making use of the compressible nature of the mirror mode opens the door to determine and correct for the spin axis offset O z in fluxgate magnetometer data.We have introduced the mirror mode method, by which spin axis offset estimates can be routinely obtained from magnetic field measurements in the magnetosheath region, where mirror modes are dominant.Furthermore, we have provided a first test of the accuracy of this method using one month (July 2008) of THC FGM data.
From the entire month of data, we obtain an overall spin axis offset value of O zf = 0.21 nT.This value is quite close to 0 nT, which is the expected value, as the THEMIS data have already been spin axis offset-corrected by making use of Alfvénic fluctuations in the solar wind (Belcher, 1973;Hedgecock, 1975;Leinweber et al., 2008).The uncertainty of that correction is on the order of a few tenths of a nanotesla.Hence, our monthly value of O zf is in excellent agreement therewith and we can expect the uncertainty in O zf to be on the order of a few tenths of a nanotesla, as well.
Daily O zf values, however, exhibit a significantly larger spread; deviations on the order of several nT are found.We find, though, that these deviations/uncertainties are related to the quotient σ/ √ N of the standard deviation σ of contributing O z estimates and their number N. Hence, it is possible to either select accurate daily O zf or to combine data from several days in order to push σ/

√
N to acceptable levels.In essence, rather accurate spin axis offset determinations with the mirror mode method are possible on cadences of a few days or above for spacecraft with similar daily magnetosheath dwell times as THC in July 2008, if offset stability can be assumed.That corresponds to a minimum of approximately 20 h of magnetosheath observations.
Finally, we would like to point out that it should be possible to extend the mirror mode method so that it becomes able to determine all three offset components of magnetometers that are mounted on three-axis stabilized spacecraft.As stated in Sect.2, the offset determination is based on the analysis of systematic differences in direction between B and D during mirror mode intervals.If B and D are approximately pointing in the x direction, for instance, then the offset components pertaining to the directions perpendicular to x, O y and O z , may be obtained with high accuracy, while O x has to be assumed constant.Different mirror mode intervals with B and D pointing in different directions will yield estimates for all offset components O x , O y , and O z .Furthermore, mirror modes are not restricted to the Earth's magnetosheath but have also been observed in other solar system environments (e.g., Russell et al., 1989;Glassmeier et al., 1993;Violante et al., 1995;Schmid et al., 2014).Hence, magnetic field measurements in distant regions of the solar system may benefit from offset determinations by the mirror mode method, as well.

Data availability
Data from the THEMIS mission, including THC level 2 FGM and ESA data, are publicly available from the University of California Berkeley and can obtained from http: //themis.ssl.berkeley.edu/data/themis.The solar wind data from NASA's OMNI high resolution data set (1 min cadence) are also publicly available and can be obtained from ftp://spdf.gsfc.nasa.gov/pub/data/omni.

Figure 1 .
Figure 1.Sketch illustrating the magnetic field and maximum variance directions B and D, their projections onto the spin plane B xy and D xy , and the angles θ B , θ D , and φ.
should ideally point in the same direction as the maximum variance direction D determined by principal component analysis.By assuming that this is the case, O z can be obtained by equating the elevation angles θ B c = arctan((B z − O z )/B xy ) and θ D = arctan(D z /D xy ), yielding Figure 1 illustrates the directions of the magnetic field B and of the maximum variance D, their projections onto the spin plane B xy and D xy , and the angles between them θ B and θ D .
xy , B min xy , and B mean xy denote the maximum, minimum, and mean magnetic field magnitudes in the spin plane within a subinterval.
), we choose g = 10 −4 and B n = 10 pT for the computation of B. Magnetic field measurements involved in computing φ, θ B , θ D and B xy are averaged component-wise over each subinterval.Following Price et al. (1986) and Schmid et al. (2014), we select O z estimates by setting the following threshold values: C xy = 0.3, C B = C D = 30 • , and C φ = 20 • .Therewith, we obtain 7831 O z estimates and associated uncertainties O z from as many subintervals.
selected 7831 O z over O z estimates are depicted in the top panel of Fig. 3.It is apparent that the amount of spread of O z around 0 nT of the individual O z estimates is considerable: the standard deviation of O z is 4.09 nT.Hence, individual O z values are generally rather poor estimates of the spin axis offset.The large spread in O z values comes from the expected statistical deviation of vectors B and D. In the z direction, that deviation is expressed by the difference θ B − θ D .The average value of |θ B − θ D | pertaining to all selected O z values is 11.7 • , which is rather typical.Tsurutani et al. (

Figure 2 .
Figure 2. Example interval of THC data of 2 July 2008.Panels from top to bottom: (a) THC FGM magnetic field components in DSL coordinates, (b) THC ESA ion density and twice the OMNI ion density (red line), (c) O z , (d) O z , (e) φ and C φ in red, (f) θ D and C D in red, (g) θ B and C B in red, and (h) δB xy /B xy and C xy in red.

Figure 3 .
Figure 3. Top panel: O z over O z estimates obtained from magnetosheath magnetic field observations by THC in July 2008.The red lines depict O z = ± O z .Bottom panel: corresponding probability density distribution P determined by the KDE method using a Gaussian kernel and a bandwidth of h = 1 nT.

Figure 4 .
Figure 4. Same as Fig. 3 but determined from THC FGM measurements to which 5 nT were added in the B z component.Red lines in the top panel depict O z = ± O z + 5 nT.

Figure 5 .
Figure 5. Daily spin axis offsets O zf (a), standard deviation σ of contributing O z estimates (b), number N of contributing O z estimates (c), and σ/ √ N (d).Red crosses pertain to THC data with B z component shifted by 5 nT.

Figure 6 .
Figure 6.Daily spin axis offsets O zf as a function of σ/ √ N. Red crosses pertain to THC data with B z component shifted by 5 nT.The black and red dotted lines depict O zf = 0 and 5 nT, respectively For this day, we find highly accurate O zf of −0.01 and 4.97 nT respectively.As stated above, THC spent approximately 154 h in the magnetosheath in July 2008, from which we obtained 7831 O z estimates.That is ∼ 51 estimates per hour.If we regard N > 1000 as a sufficient number to accurately determine P and, consequently, O zf , then about 20 h of