Page 1 of 1

UVSPLIT produces inconsistent bandpass and gain tables

Posted: Wed Jun 13, 2012 4:05 pm
by cpurcell
Hi,

When calibrating ATCA data I initially use UVSPLIT to split my datasets into single-frequency multi-source files. I split out individual calibrators using UVCAT select='source(srcname)', perform the calibration and copy the solutions back to the multi-source file. After calibration, if I use UVSPLIT to split out the individual sources for imaging I get the following error when attempting to apply the tables to the data:

### Fatal Error: Bandpass table size is incorrect. This happens when the inputs for mfcal and gpcal are inconsistent

I'm absolutely sure that the MFCAL and GPCAL inputs are consistent. If I instead split out the sources using a UVCAT command this problem does not occur.
Not an urgent issue, just thought it should be documented.

Cheers,
Cormac

Re: UVSPLIT produces inconsistent bandpass and gain tables

Posted: Wed Jun 13, 2012 6:44 pm
by ste616
Hi Cormac,

When you split a dataset, the calibration tables get copied across to each of the output datasets. Contrast this to something like uvaver, which applies the calibration and writes out a new dataset that has no calibration tables.

I suspect that what you are doing here is splitting the dataset into smaller bandwidth chunks. The calibration tables that get copied to these chunks applies to the whole bandwidth, and so when another Miriad task goes to apply it to the data, it finds that the calibration table size does not match the data.

Since this is the desired behaviour, the only solution to this problem is to apply the calibration to the whole dataset before splitting into smaller chunks, using uvaver.

We'll look into making the error message more helpful for such situations.

Re: UVSPLIT produces inconsistent bandpass and gain tables

Posted: Thu Jun 14, 2012 11:05 am
by Mark.Wieringa
Hi Cormac,

I reproduced your problem and found a bug in uvsplit - I forgot to copy the nbpsols header item, thus getting the size of the bandpass table wrong by 8 bytes.
I've now fixed this.

Jamie's solution of applying the calibration would avoid the problem, as did your uvcat trick.

Thanks for letting me know and if you run into this error message again elsewhere please let me know.

Cheers,

Mark