# How to compute the direction/bearing of a vector time series in the frequency domain (i.e. as a function of frequency)?

I have a time-domain magnetic field, $$\mathbf{b}(t)$$, with components $$b_x(t)$$ and $$b_y(t)$$ where $$x$$ and $$y$$ denote orthogonal coordinate directions (i.e north and east, respectively). At each time, I can compute the direction (or bearing) that the magnetic field vector points:

$$\gamma(t) = \textrm{atan2}\left (\frac{b_y(t)}{b_x(t)}\right )$$

If I perform a Fourier transform of the time series, then I get complex-valued Fourier coefficients for each component, $$B_x(\omega)$$ and $$B_y(\omega)$$.

Now, I want to compute the direction (or bearing) of the magnetic field vector as a function of frequency. My naïve assumption is that I can compute it similar to the above equation like this:

$$\gamma(\omega) = \textrm{atan2}\left (\frac{|B_y(\omega)|}{|B_x(\omega)|}\right )$$

Would this be correct? It seems that by doing so, I lose some of the phase spectra information. My thinking is that discounting the phase information will lead to an incorrect answer but not sure how to proceed.

Any help is appreciated.

You can certainly do the calculation but the physical interpretation would be difficult. In the time domain you can define an "instantaneous" direction, i.e. the direction is well defined and different at any point in time.

The Fourier Transform requires integration from $$-\infty$$ to $$+\infty$$. So any direction you define this way is now a function of frequency, but it's NOT a function time any more which I find different to interpret.

Let's look at a simple example. Let's say the magnetic field rotates radially as a circle

$$b_x(t) = A\cos(\omega_0 t), b_y(t) = A\sin(\omega_0 t)$$

This is well defined in the time domain but applying your method would yield

$$\gamma(\omega) = \begin{cases} 45 ^\circ & \omega = \omega_0 \\ \text{undefined} & \text{elsewhere} \\ \end{cases}$$

That doesn't feel like a useful result.

• Thanks for the answer. I agree that the physical interpretation is tricky. Is there any phase information that is relevant in the Fourier domain? For example, is there a way in the Fourier domain to distinguish your above scenario from the following: $b_x(t) = A\mathrm{sin}(\omega_0 t), \;\;b_y(t) = A\mathrm{sin}(\omega_0 t)$ Sep 14 at 17:04