HERA-Team / aipy

Astronomical Interferometry in PYthon (AIPY)
http://pypi.python.org/pypi/aipy
Other
43 stars 29 forks source link

parse_ants behavior does not conform with documentation #20

Open AaronParsons opened 7 years ago

AaronParsons commented 7 years ago

The help message for the ant option in scripting.py says it would include 12 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.parseants("(-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)