ratt-ru / meqtrees

A library for implementing radio astronomical Measurement Equations
http://meqtrees.net
10 stars 2 forks source link

Rotation measures calculations have a (mostly) invalid assumption #792

Closed gijzelaerr closed 10 years ago

gijzelaerr commented 10 years ago
at 2011-01-18 21:05:23 Tony Willis reported:

Rotation measures calculations have a (mostly) invalid assumption

gijzelaerr commented 10 years ago

Original comment thread migrated from bugzilla

at 2011-01-18 21:05:23 Tony Willis replied:

In Meow/PointSource.py, you calculate rotation measure in the assumption that Stokes Q and U are provided at a wavelength of 0. This, of course is extremely unlikely - usually they will be given at the same reference frequency as that of the Stokes I supplied for spectral index calculation. So one first has to de-rotate the supplied Q and U values back to zero lambda before calculating predicted Q and U as a function of frequency. Unfortunately, at present there is also an assumption that the reference frequency is only useful when a spectral index is non-zero. I'm modified Meow/PointSource.py and Meow/LSM.py to do things properly(IMHO). I won't check them in in case I'm disrupting things somewhere else in the system, but I'll add them to this bug report so you can see what I've done.

I've marked this bug as critical as one can't do proper polarization simulations till its fixed!

at 2011-01-18 21:12:04 Tony Willis replied:

Created an attachment (id=69) version of PointSource.py which calculates Q and U properly

This version of Meow/PointSource.py rotates a given Q and U to zero lambda before calculating Q and U at a given frequency on the basis of a specified rotation measure.

at 2011-01-18 21:14:16 Tony Willis replied:

Created an attachment (id=70) slight modification to LSM to pass freq0 to PointSource.py when RM is needed

This version of Meow/LSM.py passes a reference frequency to PointSource.py when a Rotation Measure is given, even if the spectral index of the source is zero.

at 2011-01-19 20:24:07 Tony Willis replied:

Created an attachment (id=71) yet another improvement Meow/LSM.py

I've now modified Meow/LSM.py so that polarized Gaussian sources can be handled.

at 2011-01-20 23:16:55 Tony Willis replied:

Created an attachment (id=72) modified to fix a bug in frequency calculations

I was creating a node conflict by assigning something to the ns0 tree when it should have been assigned to the ns tree as its specific to individual sources

at 2011-01-28 22:46:08 Tony Willis replied:

You've been quiet and I think everything is working properly so I've checked in my fixes and I'm marking this bug as fixed.

at 2011-01-28 23:34:28 Oleg Smirnov replied:

I've been meaning to look at it next thing, but it's just as well that you've checked it in. If there's anything wrong with the code, we'll see it soon enough -- especially since I want to calibrate some WSRT data with a polarized sky model shortly!