Skip to content

Commit 4219554

Browse files
author
Christoph Vögele
committed
add function for mwa telescope
1 parent 1c1ef29 commit 4219554

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

karabo/simulation/telescope.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from karabo.simulation.east_north_coordinate import EastNorthCoordinate
1212
from karabo.simulation.station import Station
1313
from karabo.simulation.telescope_versions import ALMAVersions, ATCAVersions, CARMAVersions, NGVLAVersions, PDBIVersions, \
14-
SMAVersions, VLAVersions, ACAVersions
14+
SMAVersions, VLAVersions, ACAVersions, MWAVersion
1515
from karabo.util.FileHandle import FileHandle
1616
from karabo.util.data_util import __get_module_absolute_path
1717

@@ -239,6 +239,11 @@ def get_OSKAR_Example_Telescope():
239239
return read_OSKAR_tm_file(path)
240240

241241

242+
def get_MWA_Telescope(version: MWAVersion):
243+
path = f"{__get_module_absolute_path()}/data/mwa.phase{version}.tm"
244+
return read_OSKAR_tm_file(path)
245+
246+
242247
def read_OSKAR_tm_file(path: str) -> Telescope:
243248
abs_station_dir_paths = []
244249
station_position_file = None

karabo/simulation/telescope_versions.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import enum
22

3+
34
# when adding new versions make sure the string for the enum value is the string used in the telescope file name
45

56
class ALMAVersions(enum.Enum):
@@ -110,7 +111,6 @@ class ALMAVersions(enum.Enum):
110111

111112

112113
class ACAVersions(enum.Enum):
113-
114114
ALL = "all"
115115
CYCLE_1 = "cycle1"
116116
CYCLE_2_i = "cycle2.i"
@@ -184,15 +184,13 @@ class NGVLAVersions(enum.Enum):
184184

185185

186186
class PDBIVersions(enum.Enum):
187-
188187
A = "a"
189188
B = "b"
190189
C = "c"
191190
D = "d"
192191

193192

194193
class SMAVersions(enum.Enum):
195-
196194
COMPACT_N = "compact.n"
197195
COMPACT = "compact"
198196
EXTENDED = "extended"
@@ -201,7 +199,6 @@ class SMAVersions(enum.Enum):
201199

202200

203201
class VLAVersions(enum.Enum):
204-
205202
A = "a"
206203
B = "b"
207204
C = "c"
@@ -210,4 +207,10 @@ class VLAVersions(enum.Enum):
210207
C_n_b = "cnb"
211208
D_n_c = "dnc"
212209

210+
211+
class MWAVersion(enum.Enum):
212+
ONE = "1"
213+
TWO_COMPACT = "2compact"
214+
TWO_EXTENDED = "2ext"
215+
213216
# ska low revision 02 2016-05-31

0 commit comments

Comments
 (0)