parse_ants behavior does not conform with documentation
Opened this issue · 0 comments
The help message for the ant option in scripting.py says it would include 1_2 for "(-0,1)_(2,-3)":
Select ant_pol/baselines to include. Examples: all (all baselines) auto (of active baselines, only i=j) cross (only i!=j) 0,1,2 (any baseline involving listed ants) 0_2,0_3 (only listed baselines) "(0,1)(2,3)" (same as 0_2,0_3,1_2,2_3. Quotes help bash deal with parentheses) "(-0,1)(2,-3)" (exclude 0_2,0_3,1_3 include 1_2). Default is "cross". Select pol by adding appropriate x or y eg 5x_6y.
But function parse_ant gives the wrong result (515, 0, -1):
import aipy as ap
ap.scripting.parse_ants("(-0,1)_(2,-3)", 4)
[(259, 0, -1), (260, 0, -1), (515, 0, -1), (516, 0, -1)]
ap.miriad.bl2ij(259)
(0, 2)
ap.miriad.bl2ij(260)
(0, 3)
ap.miriad.bl2ij(515)
(1, 2)
ap.miriad.bl2ij(516)
(1, 3)