casangi / xradio

Xarray Radio Astronomy Data IO
https://xradio.readthedocs.io/en/latest/
Other
9 stars 5 forks source link

Generic to Schema Refactor #231

Closed Jan-Willem closed 3 days ago

Jan-Willem commented 2 weeks ago

The file src/xradio/_utils/schema.py has utility functions that convert 'generic' xds's to the new schema. The function schema.py::convert_generic_xds_to_xradio_schema is now used in src/xradio/vis/_vis_utils/_ms/create_antenna_xds.py.

The following functions should be updated to make use of convert_generic_xds_to_xradio_schema

FedeMPouzols commented 3 days ago

This branch has now the refactored versions of create_weather_xds()/create_pointing_xds()/extract_field_info_and_check_ephemeris()/extract_field_info_and_check_ephemeris()/extract_source_info()/extract_ephemeris_info(). In conversion.py I didn't see much potential for convert_generic_xds_to_xradio_schema() as the main table is treated in a very specific way whereby most columns are handled individually.

This also reorganizes a few more related places in the code: