Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Jones Matrices #9

Open
johnsmorgan opened this issue Dec 3, 2019 · 1 comment
Open

Incorrect Jones Matrices #9

johnsmorgan opened this issue Dec 3, 2019 · 1 comment

Comments

@johnsmorgan
Copy link
Collaborator

johnsmorgan commented Dec 3, 2019

The Jones matrices as currently generated are for Az/El beams, in the sense that the polarisation angle is defined relative to the zenith. In order that observations taken at different Hour Angles can be combined together with coherent polarisation angles, it is necessary that these are rotated into a coordinate system which is constant with time (e.g. equatorial J2000).

I have corrected this issue in my own code:
https://github.com/johnsmorgan/mwa_pb_lookup

and the relevant commit is here:
johnsmorgan/mwa_pb_lookup@b011ef6

Note that in applying this correction and checking for consistency with the RTS, we also discovered a sign error in the Jones matrices. So in summary, if J is the current Jones matrix, the correct Jones matrix, J' is given by:

J' = -P*-J

where P is the rotation matrix:
[[cos(phi), -sin(phi)], [sin(phi), cos(phi)]]

where phi is the Parallactic Angle:
https://en.wikipedia.org/wiki/Parallactic_angle

Most conveniently given by

def azalt_to_pa(az, alt, lat=np.radians(LAT)):
    """
    calculate parallactic angle from arbitrary azimuth and elevation
    """
    return -np.arctan2(np.sin(az)*np.cos(lat),
              np.cos(alt)*np.sin(lat) - np.sin(alt)*np.cos(lat)*np.cos(az))

where az is the azimuth, alt is the elevation angle above the horizon, and lat is the geographical latitude of the observer.

See the commit referenced above for one python implementation

@johnsmorgan
Copy link
Collaborator Author

johnsmorgan commented Dec 3, 2019

Note that an additional advantage of fixing this bug is that the Az/El Jones matrices have a discontinuity at zenith. For example, this is the real part of the the first element of the Jones Matrix across the field of view for a near-zenith pointing.

xxr

This causes issues if the Az/El Jones matrices are later interpolated (unless the grid has very high resolution in the azimuth direction close to the Zenith). After the PA correction is applied, this discontinuity goes away (or is at least replaced by a discontinuity at the South Celestial Pole, which will generally be less of an issue). So for best results, this correction should be applied before interpolation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant