pyuvdata icon indicating copy to clipboard operation
pyuvdata copied to clipboard

Antenna table does not reflect actual data for FHD sav conversions

Open nicholebarry opened this issue 4 years ago • 3 comments

Antenna table describes the hypothetical, fully-working MWA array for FHD sav->uvfits conversions. However, the actual data may have non-reporting antennas, and thus the recorded uvfits is smaller (i.e. cross-correlations for 127 antennas instead of 128 antennas).

This may hinder measurement set conversion, or any software which takes the antenna table literally.

nicholebarry avatar Sep 28 '21 04:09 nicholebarry

That's by design and the uvfits antenna table is designed the same way, to contain metadata for all the antennas not just the ones with data in any given file (actually the antenna table in FHD files is basically just a copy of the input uvfits antenna table). This is very useful because then this metadata is stable across files. On UVData the details are:

  • Nants_telescope gives the number of antennas that have position information (this would be all the antennas in the antenna table)
  • Nants_data gives the number of antennas with data associated with them (this is counting the number of antennas that have any visibility data associated with them)
  • antenna_numbers is length Nants_telescope
  • antenna_names is length Nants_telescope
  • antenna_positions is shape (3, Nants_telescope)
  • ant_1_array and ant_2_array are length Nblts (number of baseline-times) and give the first and second antenna number for each baseline-time. Counting the unique numbers that appear in the union of these arrays is how we derive Nants_data.

bhazelton avatar Sep 28 '21 15:09 bhazelton

I just read your comment more carefully and saw the concern about measurement set conversion. We are actually just about to merge in a measurement set writer. We do have to worry about and handle this issue there but there are semi-standard ways to handle that without changing the antenna numbers (essentially having extra rows in some tables).

If you'd like to play with the ms_writer now, it's in the write_ms branch, otherwise we hope to have a new version out with it included in a week or two.

bhazelton avatar Sep 28 '21 15:09 bhazelton

@nicholebarry There's now an MS writer in pyuvdata (as of version 2.2.2). Does that alleviate your concern about this or do you think we need to add some documentation somewhere?

bhazelton avatar Oct 04 '21 17:10 bhazelton

@nicholebarry checking back in on this, should it still be open?

bhazelton avatar Feb 27 '23 01:02 bhazelton

@nicholebarry I'm going to close this because I think it's properly handled in our MS writer. Feel free to re-open if I'm missing something.

bhazelton avatar Jul 13 '23 18:07 bhazelton