Skip to content

MWA python wrapper

Jack Line requested to merge mwa_python_wrapper into master

Hi all, I've added in bindings to add the MWA beam to the Python wrappers. I've translated the test from src/cpp/tmwa.c into python/test/test_mwa.py, which passes with rtol=1e-5, atol=1e-5 set. I'm not sure if that lies within your expected tolerances, but it seems to be working fine.

I've done this work as I'm trying to add EveryBeam into my simulation package WODEN. We want to make it easier for future students to do work with the package, so prefer to have Python bindings. WODEN however needs a parallactic angle rotation to be applied. I have successfully done that myself using the non-rotated outputs from EveryBeam (if anyone is interested, full write up is here: https://woden.readthedocs.io/en/everybeam/testing/test_MWA.html#parallactic-rotation). I did try and copy the methods internal to EveryBeam to apply this rotation inside the bindings, but it didn't do what I expected. I've left that code commented out in py::class_<MWA, Telescope> inside python/wrappers/pytelescope.cc. Just in case someone wants to implement it, it might give them a heads start.

Happy to make any edits suggested to get this merged in.

Merge request reports