pyuvdata icon indicating copy to clipboard operation
pyuvdata copied to clipboard

Add option in UVData to exclude set of antennas

Open dstorer opened this issue 4 years ago • 5 comments

Currently, the UVData object has the functionality to select a set of antennas to keep, but often we have a set of antennas that are flagged and that we want to exclude. This is easy to work around with a few lines of code, but it would be simple and more efficient to have that as an option within UVData, either within the select method or as a separate method.

It would also be useful to have this functionality for UVCal.

dstorer avatar Feb 01 '21 19:02 dstorer

@dstorer it looks like there's a branch allow_exclude_ants that works toward this issue. Should that be made into a PR?

plaplant avatar Apr 14 '21 15:04 plaplant

@dstorer apparently this is already possible with the ant_str option, using the minus sign. Also, did you start working on this already?

bhazelton avatar Feb 13 '24 16:02 bhazelton

@bhazelton I didn't know you could do it with a minus sign, that would solve the problem! I had started working on it a long time ago on the allow_exclude_ants branch but wound up letting it drop - if there's already functionality for it then we can probably just close this issue and delete that branch

dstorer avatar Feb 13 '24 17:02 dstorer

The docs do not make this obvious, we should minimally update the docstring. There is a section on it in the tutorial but existing users may not look there.

bhazelton avatar Feb 13 '24 18:02 bhazelton

Just a note on this: I tried using ant_str and negative values to select out a set of antennas from a uvdata object, but it seems like doing it that way is incredibly slow. For context, trying to remove about 30 antennas from a uvdata object with ~2 minutes of data took almost 30 minutes. In comparison using antenna_nums to specify which antennas to keep only takes a few seconds.

This isn't a big problem for me, but worth noting.

dstorer avatar Feb 21 '24 17:02 dstorer