# Open-Source Magnetometer for Characterizing Magnetic Fields in Ultracold Experiments
## 4 Measurement of Magnetic Fields
Here, the range of adjustment is set by the dimensions of the coil holder. This procedure is straightforward, with the real-time mode accessible via GUI. The data shown in Figure 3b,d have been obtained after the aforementioned alignment procedure and show significantly smaller variation along \(x\) and \(z\) than for the original assembly. The apparent wobbling of the \(x\) component of the field is caused by wear of the 3D printed slider, most likely caused by a slightly bent threaded rod. This issue has been fixed by tightening the screw that attaches the slider to the aluminum profile. The wobbling has been, however, repeatable such that the standard deviation of data for each measurement location differs from the average by less than 5 mG.  
We have investigated the influence of moving the sensor a little off the center of the coils by rotating the assembly first by \(1^{\circ}\) around the \(z\) axis, which caused an increase in the magnetic field variation along the \(x\) axis (Figure 3e), and then by additionally rotating it by \(1.5^{\circ}\) around the \(x\) axis, also introducing increased variation along the \(z\) axis (Figure 3e). Under these rotations, the magnetic field gradient along the \(y\) direction, a figure of merit for most ultracold experiments, changed by no more than 1%. It is worth noting that the alignment of the coils that minimized the \(x\) and \(y\) components caused the decrease in the gradient produced by the coils by about 3% with respect to the original assembly characterized in Figure 3a,c. In the coil mode, similar to the permanent mode, the measurements are performed at equally spaced locations for two polarizations of the sensor. At each point, the MOSFET-based power switch is initially turned off to block the current flowing through the coils. The stray magnetic field and the sensor's offset for that location are extracted with Equations (4b) and (4c). Subsequently, the power switch is turned on and the current is let to flow through the coils. To minimize the magnetic field readout disturbances induced by the sudden turn on of the current, a wait time of 0.2 s is introduced. The exact length of the wait depends on the characteristics of the coils of interest and needs to be determined by the user as this is highly coil-dependent (it can be facilitated by the real-time mode of the magnetometer; see Section 3.3). After this brief waiting period, the total magnetic field is measured and the field from coils is calculated with Equation (4a). The coil mode is expected to provide better results in environments where the stray magnetic field varies over time since the time between the stray field and the magnetic field measurements is shorter than in the permanent mode. In order to assess the reproducibility of the measurement of the field created by the coils, we have determined it as a function of different stray fields (Figure 5a) and as a function of time for the ambient laboratory stray field (Figure 5b). For these measurements, the sensor head has been parked in the center of one of the coils. Stray fields have been controlled by placing a small neodymium magnet in different locations in the vicinity of the coil, and, for each value, 30 data readouts of the coil field have been performed. Figure 5a shows all the acquired data, resulting in apparent elongation of the symbols in the vertical direction. For fields on the order of Earth's magnetic field, the variation in the coil field along each axis is \(\sim\)10 mG. The field created by coils has not changed noticeably within 500 s interrogation time, as can be seen in Figure 5b. We have observed that the offset of the Hall sensor changes during data acquisition, as can be seen in Figure 4b. This is most likely caused by the exposure of the sensor to the magnetic field, including spatially changing stray fields.