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

P Jones rotating the wrong way around #96

Open
bennahugo opened this issue Mar 4, 2019 · 2 comments
Open

P Jones rotating the wrong way around #96

bennahugo opened this issue Mar 4, 2019 · 2 comments
Labels

Comments

@bennahugo
Copy link
Contributor

See https://github.com/ska-sa/meqtrees-cattery/blob/master/Cattery/Siamese/OMS/feed_angle.py#L140

As per @bmerry's comment this is the wrong way around @sjperkins please note

After doing some experiments I'm tentatively asserting that Meqtrees
is doing it wrong. The experiment involved simulating a single point
source at phase centre, with I=3Jy Q=1Jy U=V=0, at dec -85° (close to
the SCP so that parallactic angle is mostly dominated by sky rotation
while az/el are relatively constant), as seen from MeerKAT, and using
just the PJones term. I then plotted the observed XX, YY and XY
visibilities and the parallactic angle (as provided by
addDerivedMSCal) over time. I then
- worked out how these should rise and fall relative to each other
based on some diagrams of the sky rotating
- worked it out again based on the equations in Ben's calibration report
- computed what the visibilities should be based on the formula for P
in Hales 2017 (which I also verified).
and all of the above seem to indicate that Meqtrees is rotating in the
wrong direction.

Looking at the source, I notice the following in turbo-sim.py, which
suggests that the implementation was changed at some point (git blame
describes the commit as "added P that is consistent with
calico-stefcal":

meqmaker.add_uv_jones('P','feed orientation',[feed_angle]);
# meqmaker.add_uv_jones('P','feed angle',Rotation('P'));

and feed_angle seems to implement the inverse operation to Rotation:
it uses "Meq.Matrix22(cos,-sin,sin,cos);" whereas Rotation uses
"Meq.Matrix22(cos,sin,-sin,cos);".
@bennahugo bennahugo added the bug label Mar 4, 2019
@bennahugo
Copy link
Contributor Author

I can confirm this is a bug - the other way around is implemented in cubical
https://github.com/ratt-ru/CubiCal/blob/pol-cal/cubical/machines/parallactic_machine.py#L135
and gives consistent results with CASA

@bennahugo
Copy link
Contributor Author

@o-smirnov lets get a sign fix for this in before making a release that officially supports polcal

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

No branches or pull requests

1 participant