Coordinate Systems¶
There are a number of coordinate systems that will be used within the radcube project. However, note that this project generally follows the standard IceCube Coordinate System. That is, while the various other systems may be useful for performing specific calculations, only data that is in the IC coordinate system should be stored in frames.
For the systems described below, the systems will be explicity given as {\(\hat x\), \(\hat y\), \(\hat z\)} triplets will always be given with a subscript corresponding to its coordinate system.
These conversion functions can be found in $I3_SRC/radcube/private/util/CoordinateSystem.cxx
and an example script can be found in $I3_BUILD/radcube/resources/examples/ExampleScript_CoordinateSystem.py
.
IceCube: This system is related to the latitude and longitude lines,
{coordinate-east, coordinate-north, local zenith}
. For more, see the IceCube Coordinate System wiki page.CORSIKA/CoREAS Coordinates: The CORSIKA air shower simulation program, uses a coordinate system that is based on the direction of the magnetic field such that the local B-Field is in the x-z plane,
{Magnetic north, magnetic west, \(\hat z_\text{IC}\)}.
As of 2019.11.18, the magnetic field at the south pole is
{-8.5566, 14.3986, 51.9612}
[ \(\mu\text{T}\)] in IC coordinates. Thus, north and magnetic north differ by 30.7° and that switching from CORSIKA to IC involves a rotation of 120.7° around the vertical. Note that this coordinate system is never really “used” in this project. Rather, a conversion is immediately done when reading in simulated showers to convert to the IC system.Shower Plane Coordinates: This system looks “down the barrel” of the shower axis. That is, for a shower center of mass with velocity \(\vec v\), then the directions are given by
{\(\hat v \times \hat z_\text{IC}\), \(\hat v \times \hat v \times \hat z_\text{IC}\), \(\hat v\)}.
To put this intuitively, if you are looking down the axis of the shower at the shower core with your feet on the ground, \(\hat x_\text{SP}\) is to your right and \(\hat y_\text{SP}\) is pointing towards the ground. So given that the velocity unit vector can be described by \(\hat v = {v_x, v_y, v_z}\), the rotation matrix to convert into the shower plane coordinate system is given by:
\(R_\text{IC-to-SP}(\hat v) = \begin{pmatrix} \frac{v_y}{N_1} & -\frac{v_x}{N_1} & 0 \\ \frac{v_x v_z}{N_2} & \frac{v_y v_z}{N_2} & -\frac{{v_x}^2 + {v_y}^2}{N_2} \\ v_x & v_y & v_z \end{pmatrix} \text{ where } N_1 = \sqrt{v_x^2 + v_y^2}, \text{ and } N_2 = \sqrt{N_1^4 + (v_x v_z)^2 + (v_y v_z)^2}\)
Also note that for this coordinate system, \(\hat x_\text{SP} = \hat \phi\) and \(\hat y_\text{SP} = \hat \theta\), for any spherical coordinate system where \(\hat z\) points towards the zenith (such at the IceCube and CORSIKA systems).
Magnetic/Lorentz Coordinates: This system is also known as the \(\vec v\times \vec B\) system.
Given that one of the dominant emissions of radio waves from air showers is the deflection of electrons in the geomagnetic field, this coordinate system is one in which one of the few radio emission symmetries can be seen. The coordinate system is
{\(\vec v\times \vec B\), \(\vec v\times \vec v\times \vec B\), \(\hat v\)}.
So this coordinate system is related to the Shower Plane coordinate system via a rotation around \(\hat v\). In this system, the geomagnetic emission is constrained to the \(x_{\vec v\times \vec B}\) direction and the Askarian emission is radial in the \(x_{\vec v\times \vec B}\) - \(y_{\vec v\times \vec B}\) plane.
Antenna Channel: This is the coordinate system of one of the porlarizations of the antennas. It is defined as
{\(\vec L\), \(\hat z_\text{Ant} \times \vec L\), \(\hat z_\text{Ant}\)}
where \(\hat z_\text{Ant}\) points upward along the central axis of the antenna and \(\vec L\) points along the arm.
Note
In the ideal case, the installed antennas should follow \(\hat z_\text{Ant} = \hat z_\text{IC}\), but in general, this may not be true.
For this, we need a definition of in which direction along the (symmetric) arm is positive and which is negative. But since the antenna response is symmetric under \(\phi \longrightarrow -\phi\), we need not worry about this as long as we are consistent (by say, ensuring a pulsed measure by the arms of two antennas has the same sign).
Within radcube, these rotation matrices are made by simply performing the respective cross products and then normalizing the vectors. The analytical solutions are not currently used.
There are pre-built functions to convert to/from the standard IC coordinate system. However, the rotations to convert between non-IC systems are not implemented (since you should always be beginning with data in the IC system).
Example¶
# This is a non-functional code snippet to show you the principles of the coordinate conversions
# see the example in radcube/examples for a working code
# Get a particle from the frame
particle = frame["I3CoREASPrimary"] # or "I3MCPrimary", or "MyReconstruciton", ....
# Get some location of interest
myPos = dataclasses.I3Position(1, 2, 3)
# Convert to the core-centered system (so that the shower axis will be though the new origin)
# and then perform the rotation
locationInVxB = radcube.GetMagneticFromIC(myPos - particle.pos, particle.dir)
locationInShowerCoords = radcube.GetShowerFromIC(myPos - particle.pos, particle.dir)