Skip to content
Snippets Groups Projects
Commit 58ad3ba8 authored by Philipp Arras's avatar Philipp Arras
Browse files

Observation: Add flag_baseline()

parent b44daa9f
Branches
Tags
1 merge request!29Allow frequency domain to be defined on log scale
Pipeline #110107 passed
......@@ -441,6 +441,16 @@ class Observation(BaseObservation):
self._direction,
)
def flag_baseline(self, ant1_index, ant2_index):
ant1 = self.antenna_positions.ant1
ant2 = self.antenna_positions.ant2
assert ant1 < ant2
ind = np.logical_and(ant1 == ant1_index, ant2 == ant2_index)
wgt = self._weight.copy()
wgt[:, ind] = 0.
print("INFO: Flag baseline {ant1_index}-{ant2_index}, {np.sum(ind)}/{obs.nrows} rows flagged.")
return Observation(self._antpos, self._vis, wgt, self._polarization, self._freq, self._direction)
@property
def uvw(self):
return self._antpos.uvw
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment