AaronParsons/aipy — pull request #1 by damoupenn (2012-07-16 19:44:24+00:00)
Title: Pol dev

I spent the morning updating your use of pol in the AntennaArray objects. Here are the changes:
-- each Antenna object allows for 1 or 2 polarizations. There is a kwarg (dp=False), which if set to True, looks for two gains/delays, etc. If Antenna.dp=True, you pass a list of two cal parameters (amp,whatever).
-- set_active_pol and get_active_pol are set at the phs.AntennaArray level, and allow for anything using Antenna._phsoff to have single- or dual-pol capability.
-- get_params in aa.fit reads AntennaArray.active_pol to decide which cal params to choose -- this is not as flexible as it could be. You have to give it either 'xx' or 'yy', cross pols will break this. (you also need not specify -P='(1x)=(...)' in fitmdl.py, eg.,. just -p xx -P='1=(...)').
-- I've removed the redundant pol functions from src/pol.py, and replaced them with a framework to start thinking about a Jones' matrix formalism.
-- (maybe most important) all of this is totally backwards compatible. I ran it through the tests (for the modules i changed + script_battery.sh), and made sure everything jives with the way things used to be. I've also added tests/ex_cal_2p.py and tests/script_battery_2p.py to incorporate and test the dual-pol functions.