JLBLine / WODEN

CUDA code designed to simulate interferometric data using point, Gaussian, and shapelet sky models
https://woden.readthedocs.io/en/latest/
Mozilla Public License 2.0
5 stars 0 forks source link

Implement antenna (tile) flagging #50

Closed JLBLine closed 2 months ago

JLBLine commented 2 months ago

I'm not signing up for this just yet (depends on how much time I have) but there is a simple enough path to flagging tiles based on the Flag column in the metafits. In wodenpy.wodenpy_setup.run_setup.check_args, you could read in the Flag column. Easiest thing to do would be to read it at the end of the check_args, and apply the flags to args.east, args.north, args.height, args.dipamps, args.dipflags, args.num_antennas. As the array layout object is defined after check_args, I think that'd all you'd have to do.

This is of course talking about using flags from metafits. If you wanted to add arbitrary flags via command line, a concrete way to get mapping would be via the name Tilename as defined in the metafits. If you want to supply an index as a flag, i.e. flag_ant=1,6,121, you'd have to be careful given the re-ordering that happens during wodenpy.wodenpy_setup.run_setup.check_args. Would need careful documentation so the user knows what is being flagged and why.

JLBLine commented 2 months ago

If you were getting fancy, you could also link this to --use_dipflags and flag any tiles that have more than two dipoles flagged.

JLBLine commented 2 months ago

This now works as of b59ba8f3e6af7617103d7ad67fadfdc6b18fec94, and has been compared to hyperdrive simulate