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

Add station names

parent f2c9eb72
No related branches found
No related tags found
1 merge request!27Devel
Pipeline #109363 passed
...@@ -503,6 +503,15 @@ class Observation(BaseObservation): ...@@ -503,6 +503,15 @@ class Observation(BaseObservation):
return self._auxiliary_tables["FIELD"]["NAME"][0] return self._auxiliary_tables["FIELD"]["NAME"][0]
raise NotImplementedError("FIELD subtable not available.") raise NotImplementedError("FIELD subtable not available.")
@property
def station_names(self):
"""The index of the resulting list is the same as in self.ant1 or self.ant2."""
if "ANTENNA" in self._auxiliary_tables:
tab = self._auxiliary_tables["ANTENNA"]
return [f"{a} {b}" for a, b in zip(tab["NAME"], tab["STATION"])]
raise NotImplementedError("ANTENNA subtable not available.")
def effective_uvw(self): def effective_uvw(self):
out = np.einsum("ij,k->jik", self.uvw, self._freq / SPEEDOFLIGHT) out = np.einsum("ij,k->jik", self.uvw, self._freq / SPEEDOFLIGHT)
my_asserteq(out.shape, (3, self.nrow, self.nfreq)) my_asserteq(out.shape, (3, self.nrow, self.nfreq))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment