According to the API, ProcessingSetXdt.query returns "A new Processing Set DataTree instance containing only the Measurement Sets that match the selection criteria". I expected that the original ps opened from zarr could be used to make a new data group selection, but the query results in a KeyError as shown below. Am I supposed to open_processing_set again?
from xradio.measurement_set.open_processing_set import open_processing_set
# Open processing set with data groups 'base', 'corrected', 'model'
ps_xdt = open_processing_set('IRC10216.ps.zarr')
selected_ps_xdt = ps_xdt.xr_ps.query(data_group_name='corrected')
selected_ps_xdt = ps_xdt.xr_ps.query(data_group_name='model')
Traceback (most recent call last):
File "test_data_group_sel.py", line 6, in <module>
model_ps_xdt = ps.xr_ps.query(data_group_name='model')
File "xradio/measurement_set/processing_set_xdt.py", line 375, in query
sub_ps_xdt[key] = val.xr_ms.sel(data_group_name=data_group_name)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "xradio/measurement_set/measurement_set_xdt.py", line 96, in sel
self._xdt.attrs["data_groups"][data_group_name].values()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'model'
According to the API, ProcessingSetXdt.query returns "A new Processing Set DataTree instance containing only the Measurement Sets that match the selection criteria". I expected that the original ps opened from zarr could be used to make a new data group selection, but the query results in a KeyError as shown below. Am I supposed to
open_processing_setagain?