i4Ds / Karabo-Pipeline

The Karabo Pipeline can be used as Digital Twin for SKA
https://i4ds.github.io/Karabo-Pipeline/
MIT License
11 stars 5 forks source link

`HISourcesSmallCatalog` returns SkyModel instead of path #605

Open sfiruch opened 1 month ago

sfiruch commented 1 month ago

When one wants to use the "HISourcesSmallCatalog", you have to parse the results manually, as seen in https://github.com/i4Ds/Karabo-Pipeline/blob/main/karabo/examples/LineEmissionBackendsComparison.ipynb:

catalog_path = HISourcesSmallCatalogDownloadObject().get()
print(catalog_path)
sky = SkyModel.get_sky_model_from_h5_to_xarray(
    path=catalog_path,
)

Instead of a path, the function should return the parsed results directly, i.e. a SkyModel.

(And the LineEmissionBackendsComparison.ipynb example should be changed accordingly)

Lukas113 commented 1 month ago

I agree. Actually, I'm also thinking about reducing the number of functions from the SkyModel.get_* area (like get_MALS_DR1V3_Sky, get_MIGHTEE_Sky, get_GLEAM_Sky, etc... to get it from: