WSRT polarisation self-calibration

Is MIRIAD being a pain? Let us know your experience.

Moderator: Mark.Wieringa

Post Reply
Bjoern
Posts: 3
Joined: Sat Nov 24, 2012 12:06 am

WSRT polarisation self-calibration

Post by Bjoern »

Hi!

I am trying to do self-calibration in full polarisation with the gpscal task in MIRIAD for some WSRT HALOGAS datasets. I did that with other datasets and it worked without any problem, but the HALOGAS datasets produce the following error, when execute the gpscal task:

gpscal% inp
Task: gpscal
vis = IF4.uv
select =
model = test.imodel,test.qmodel,test.umodel,test.vmodel
clip =
flux =
offset =
interval = 20
options = mfs
minants =
refant = 1
line =
gpscal% go
GpsCal: version 1.0 12-feb-02
Calculating the model for test.imodel
### Fatal Error: No visibility data selected, in Model(map)

I do not understand this error since I can invert and clean each individual stokes image without any problem, but gpscal tells me that there are no visibilities selected. Using prthd on the dataset shows me that all four Stokes parameters are there. Otherwise I would not have been able to image them right?

Prthd: version 03-Jan-05
****************************************************************
Filename: IF4.uv
Telescope: WSRT
Object: ngc4414 Observer: ProcessD
First time: 10APR15:16:25:40.0
Number of antennae: 14
Polarisations Present: XX,YY,XY,YX
Type of correlations present: crosscorrelation
----------------------------------------------------------------
Spectral Correlations:
Spectrum Channels Freq(chan=1) Increment Restfreq
1 64 1.44744 -0.000312 1.40713 GHz
Total number of correlations: 14253568
Correlations are stored in 32-bit form
----------------------------------------------------------------
J2000 Source RA: -11:33:32.80 Dec: 31:13:23.999
Apparent Source RA: -11:32:59.71 Dec: 31:09:49.734

Antenna gains table is present
History item is present

So if someone could give me a hint why this does not work for these datasets let me know.

Thanks in advance.

Björn
Mark.Wieringa
ATCA Expert
Posts: 297
Joined: Mon Feb 08, 2010 1:37 pm

Re: WSRT polarisation self-calibration

Post by Mark.Wieringa »

Hi Björn,

I must admit I haven't tried this myself, but judging from the docs it sounds like it should work.
Could you post the prthd output for two of the model images?
The obvious things to look for are mismatches in source/position and frequency.

If there's nothing obvious wrong put a tar file with (a subset of) the data online somewhere and I'll see if I can diagnose it further.

Cheers,

Mark
Bjoern
Posts: 3
Joined: Sat Nov 24, 2012 12:06 am

Re: WSRT polarisation self-calibration

Post by Bjoern »

Hi Mark!

First thanks for the quick reply and my late answer.

Here are the headers of the models in Stokes I and Q:

Prthd: version 03-Jan-05
****************************************************************
Filename: test.imodel
Telescope: WSRT
Object: ngc4414 Observer: ProcessD
Image type: intensity
Map flux units: JY/PIXEL
This image has 4 axes.
----------------------------------------------------------------
Type Pixels Coord Value at Pixel Coord Incr Units
RA---NCP 1024 -11:33:32.8 514.00 -3.000000E+00 arcsec
DEC--NCP 1024 31:13:23.999 514.00 3.000000E+00 arcsec
FREQ-OBS 1 1.393295E+00 1.00 3.125000E-04 GHz
STOKES 1 I
----------------------------------------------------------------
Average Time of observation: 10APR15:22:21:11.4
Equinox: J2000.00
Rest frequency: 1.407126 GHz
Observatory radial velocity: 0.00 km/s
Number of iterations: 100
History item is present
prthd% in = test.qmodel
prthd% go
Prthd: version 03-Jan-05
****************************************************************
Filename: test.qmodel
Telescope: WSRT
Object: ngc4414 Observer: ProcessD
Image type: intensity
Map flux units: JY/PIXEL
This image has 4 axes.
----------------------------------------------------------------
Type Pixels Coord Value at Pixel Coord Incr Units
RA---NCP 1024 -11:33:32.8 514.00 -3.000000E+00 arcsec
DEC--NCP 1024 31:13:23.999 514.00 3.000000E+00 arcsec
FREQ-OBS 1 1.393295E+00 1.00 3.125000E-04 GHz
STOKES 1 Q
----------------------------------------------------------------
Average Time of observation: 10APR15:22:21:11.4
Equinox: J2000.00
Rest frequency: 1.407126 GHz
Observatory radial velocity: 0.00 km/s
Number of iterations: 100

So position, frequency and such are the same. So its really strange that the calibration does not work. I uploaded all the files to our server, so you can download them and try around yourself. Will sent you the details per private message.
Mark.Wieringa
ATCA Expert
Posts: 297
Joined: Mon Feb 08, 2010 1:37 pm

Re: WSRT polarisation self-calibration

Post by Mark.Wieringa »

Hi Björn,

well it turned out to be simpler to fix than I expected - and we could have guessed the problem from the header.
The model selection code uses the pointing centre of the model images to select the matching visibility data.
In your case you appear to have a negative Right Ascension (-11h) in the uv data and your images, which should not really be possible since RA runs from 0-24h
Most tasks work ok, but the pointing centre was stored internally in the correct range 0-2pi radians, and the match with the visibility data gave nothing, as reported.
When I fixed the ra variable in the uv data, gpscal started working, see below.

Cheers,

Mark

Code: Select all

uvputhd% inp
  Task:   uvputhd
  vis      = IF4.uv
  hdvar    = ra
  type     =  
  length   =  
  varval   = 3.2570170893958652
  table    =  
  time0    =  
  out      = IF4.uv2

uvputhd% go

uvputhd: Revision 1.3, 2012/04/04 01:26:27 UTC

 DEBUG: TIME0=                                 JD0 =    0.0000000000000000     
 Reading data from file: IF4.uv
 Altering value of ra in data
 Expecting array of  1 values
 Writing data out to file: IF4.uv2
No Wideband data
 DEBUG: Variable modified            1  times.
uvputhd% tget gpscal
  Task:   gpscal
  vis      = IF4.uv
  select   =  
  model    = test.imodel,test.qmodel,test.umodel,test.vmodel
  clip     =  
  flux     =  
  offset   =  
  interval = 20
  options  = mfs
  minants  =  
  refant   = 1
  line     =  
gpscal% er vis
vis=IF4.uv2
gpscal% go
GpsCal: version 1.0 12-feb-02
Calculating the model for test.imodel
Calculating the model for test.qmodel
Calculating the model for test.umodel
Calculating the model for test.vmodel
Accumulating statistics ...
Number of solution intervals: 37
Finding gain solutions ...
Iter= 1, Amplit/Phase Solution Error:   0.228
Iter= 1, XY Phase Solution Error:       0.005
Iter= 2, Amplit/Phase Solution Error:   0.003
Iter= 2, XY Phase Solution Error:       0.001
Iter= 3, Amplit/Phase Solution Error:   0.002
Iter= 3, XY Phase Solution Error:       0.000
Iter= 4, Amplit/Phase Solution Error:   0.001
Iter= 4, XY Phase Solution Error:       0.000
Fiddling and saving the gains ...
Bjoern
Posts: 3
Joined: Sat Nov 24, 2012 12:06 am

Re: WSRT polarisation self-calibration

Post by Bjoern »

Hi Mark!

Yes, that was really obvious. Could have come to the same result earlier! I think CASA messed up the data-header somehow when converting it from the UV-FITS format earlier in the reduction process. I will now change the position to the original coordinates and it will hopefully work.

Thanks again.

- Björn
Post Reply