ratt-ru / pyxis

Python Extensions for Interferometry Scripting
3 stars 5 forks source link

Generating Primary beam model for the KAT7 #54

Closed Ermiasabebe closed 9 years ago

Ermiasabebe commented 9 years ago

The command to produce the primary beam model for the KAT7 from ASCII beam patterns to FITS files is:

for t in ampl real imag; do emss2fits.py --freqs=1440,1442,1445,1447,1450,1452,1455,1457,1460 --labels=a,b,c,d,e,f,g --$t -n 26 --scale=1.125 -d 0.78125 ../Patterns_origin/K7s_originh@freq_@label.pat KAT7_H-chan-21-default-scale-1.125-delfreq-0.78125-$t; done

The images produced are: kat7-xx-ampl kat7-xx-imag kat7-xx-real

These images seem for the XY or YX polarization. The ASCII file for the KAT7 only contains for horizontal polarization (i.e /Patterns_origin/K7s_originh@freq_@label.pat; where h refers to horizontal). I assume that these files will produce the XX polarization, but it produces the above images.

In the "emss2fits.py -h", there is no option to produce XX or YY polarizations. It only gives ampl, real, and imag that can be produced based on the given ASCII file.

Any suggestion how XX and YY polarizations (i.e ampl, real, imag) based on the given "K7s_originh@freq_@label.pat"

o-smirnov commented 9 years ago

Yeah OK I see what's going on. The *.pat files indeed contain the X and Y response to H polarization. Which one is extracted is determined by the -x (default) or -y option. Note that H=Y on the sky (confusing but true). The default therefore is to extract the X response to the H(Y) component, i.e. the XY pattern, as we suspected.

You do realize a beam consists of four complex patterns, i.e. the E-Jones matrix, ordered as [[XX,XY],[YX,YY]], right? So you need to generate all four, using the following combinations of options:

for XX: --rotate 90 -y

for XY: -x

for YX: --rotate 90

for YY: -y

I reserve the right to have something the wrong way 'round here, so do that and post the four amplitude beams here, we'll see if they make sense.

Ermiasabebe commented 9 years ago

The four amplitude beams are (i.e., XX,YY,YX,XY)

kat7-xx-ampl-1 44ghz kat7-yy-ampl-1 44ghz kat7-yx-ampl-1 44ghz kat7-xy-ampl-1 44ghz

o-smirnov commented 9 years ago

Yep, looks correct now! (I reserve the right to discover we have the polarisations the wrong way 'round... maybe Sandeep can comment? But for now let's assume this is correct).

o-smirnov commented 9 years ago

This also should have been filed in https://github.com/ratt-ru/calibration-pipelines