casangi / xradio

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

read_generic_table: make lower/upper case match between var names and columns in the 'ctds_attrs' #190

Closed FedeMPouzols closed 3 months ago

FedeMPouzols commented 3 months ago

Currently read_generic_table returns Xarray xdss that have lowercase variable names, while the column names in the attributes ['other']['msv2']['ctds_attrs']['column_descriptions'] use the uppercase version ("as is" from the MSv2 keywords). Make them match and simplify the code that uses those column description attributes. This mismatch is a leftover from the cngi-io times when we were using lowercase var names in the xdss.

Also consider simplifying the layers of .lower() .upper() conversions that have creeped into the code (read/write read_main_table/load_main_table, etc.), but perphaps/probably leave this for another branch if it gets more complicated.