Skip to content

Commit 8df295d

Browse files
authored
hotfix remove mightee-sky from Karabo 👾 (#548)
* hotfix remove mightee-sky from Karabo 👾
1 parent 201e938 commit 8df295d

2 files changed

Lines changed: 29 additions & 23 deletions

File tree

karabo/simulation/sky_model.py

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@
3939
from typing_extensions import assert_never
4040
from xarray.core.coordinates import DataArrayCoordinates
4141

42-
from karabo.data.external_data import (
42+
from karabo.data.external_data import ( # MIGHTEESurveyDownloadObject,
4343
GLEAMSurveyDownloadObject,
4444
HISourcesSmallCatalogDownloadObject,
45-
MIGHTEESurveyDownloadObject,
4645
)
4746
from karabo.error import KaraboSkyModelError
4847
from karabo.simulation.line_emission_helpers import (
@@ -1468,27 +1467,32 @@ def get_MIGHTEE_Sky() -> SkyModel:
14681467
from the "IM_MAJ", "IM_MIN", "IM_PA", and "NAME" columns of the catalog,
14691468
respectively.
14701469
"""
1471-
survey = MIGHTEESurveyDownloadObject()
1472-
path = survey.get()
1473-
prefix_mapping = SkyPrefixMapping(
1474-
ra="RA",
1475-
dec="DEC",
1476-
stokes_i="NU_EFF",
1477-
major="IM_MAJ",
1478-
minor="IM_MIN",
1479-
pa="IM_PA",
1480-
id="NAME",
1481-
)
1482-
1483-
return SkyModel.get_sky_model_from_fits(
1484-
path=path,
1485-
frequencies=[76],
1486-
prefix_mapping=prefix_mapping,
1487-
concat_freq_with_prefix=False,
1488-
filter_data_by_stokes_i=False,
1489-
frequency_to_mhz_multiplier=1e6,
1490-
memmap=False,
1470+
raise NotImplementedError(
1471+
"The current version of Karabo doesn't support the mightee-sky. "
1472+
+ "The progress regarding this issue can be tracked at "
1473+
+ "https://github.com/i4Ds/Karabo-Pipeline/issues/547"
14911474
)
1475+
# survey = MIGHTEESurveyDownloadObject()
1476+
# path = survey.get()
1477+
# prefix_mapping = SkyPrefixMapping(
1478+
# ra="RA",
1479+
# dec="DEC",
1480+
# stokes_i="NU_EFF",
1481+
# major="IM_MAJ",
1482+
# minor="IM_MIN",
1483+
# pa="IM_PA",
1484+
# id="NAME",
1485+
# )
1486+
1487+
# return SkyModel.get_sky_model_from_fits(
1488+
# path=path,
1489+
# frequencies=[76],
1490+
# prefix_mapping=prefix_mapping,
1491+
# concat_freq_with_prefix=False,
1492+
# filter_data_by_stokes_i=False,
1493+
# frequency_to_mhz_multiplier=1e6,
1494+
# memmap=False,
1495+
# )
14921496

14931497
@staticmethod
14941498
def get_random_poisson_disk_sky(

karabo/test/test_mock_mightee.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import matplotlib.pyplot as plt
77
import numpy as np
8+
import pytest
89
from astropy.io import fits
910
from reproject import reproject_interp
1011

@@ -16,14 +17,15 @@
1617
from karabo.simulation.telescope import Telescope
1718

1819

19-
# Test cases
20+
@pytest.mark.skip(reason="See issue 547")
2021
def test_mightee_download():
2122
_ = SkyModel.get_MIGHTEE_Sky()
2223
survey = MIGHTEESurveyDownloadObject()
2324
path = survey.get()
2425
_ = SkyModel.get_fits_catalog(path)
2526

2627

28+
@pytest.mark.skip(reason="See issue 547")
2729
def test_mock_mightee():
2830
sky = SkyModel()
2931
mightee1 = SkyModel.get_MIGHTEE_Sky()

0 commit comments

Comments
 (0)