Commits
Kazuhiko Shimada authored 7561e5e358c Merge
92 92 | |
93 93 | baselines = [] |
94 94 | for (ant1, ant2) in itertools.combinations(self.antennas, 2): |
95 95 | raw_length = math.sqrt(diff(ant1, ant2, 'longitude offset')**2 + |
96 96 | diff(ant1, ant2, 'latitude offset')**2 + |
97 97 | diff(ant1, ant2, 'elevation offset')**2) |
98 98 | domain_length = measures.Distance(raw_length, |
99 99 | measures.DistanceUnits.METRE) |
100 100 | baselines.append(Baseline(ant1, ant2, domain_length)) |
101 101 | |
102 - | if len(baselines) is 0: |
102 + | if len(baselines) == 0: |
103 103 | zero_length = measures.Distance(0.0, |
104 104 | measures.DistanceUnits.METRE) |
105 105 | baselines.append(Baseline(self.antennas[0], self.antennas[0], zero_length)) |
106 106 | |
107 107 | return baselines |
108 108 | |
109 109 | def get_offset(self, antenna): |
110 110 | """ |
111 111 | Get the offset of the given antenna from the centre of the array. |
112 112 | """ |