diff --git a/quartical/apps/summary.py b/quartical/apps/summary.py index 36e5e180..7956a00d 100644 --- a/quartical/apps/summary.py +++ b/quartical/apps/summary.py @@ -99,7 +99,7 @@ def feed_info(path): for i, arrs in enumerate(zipper): for vals in zip(*arrs): msg += f" {i:<4} {vals[0]:<8} {' '.join(vals[1]):<8} " \ - f"{'{:.4f} {:.4f}'.format(*vals[2]):<16}\n" + f"{' '.join([f'{x:.4f}' for x in vals[2]]):<16}\n" logger.info(msg) diff --git a/quartical/data_handling/angles.py b/quartical/data_handling/angles.py index 343ab466..76105d4d 100644 --- a/quartical/data_handling/angles.py +++ b/quartical/data_handling/angles.py @@ -75,7 +75,7 @@ def make_parangle_xds_list(ms_path, data_xds_list): coords={ "utime": np.arange(sum(xds.UTIME_CHUNKS)), "ant": xds.ant, - "receptor": np.arange(2) + "receptor": np.arange(feedtab.dims['receptors']) }, attrs={ "FEED_TYPE": feed_type, diff --git a/quartical/data_handling/ms_handler.py b/quartical/data_handling/ms_handler.py index e43d2963..fd0e77dd 100644 --- a/quartical/data_handling/ms_handler.py +++ b/quartical/data_handling/ms_handler.py @@ -93,19 +93,23 @@ def read_xds_list(model_columns, ms_opts): if ms_opts.data_column not in known_data_cols: schema[ms_opts.data_column] = {'dims': ('chan', 'corr')} - try: - data_xds_list = xds_from_storage_ms( - ms_opts.path, - columns=columns, - index_cols=("TIME",), - group_cols=ms_opts.group_by, - chunks=chunking_per_data_xds, - table_schema=["MS", {**schema}] + data_xds_list = xds_from_storage_ms( + ms_opts.path, + columns=columns, + index_cols=("TIME",), + group_cols=ms_opts.group_by, + chunks=chunking_per_data_xds, + table_schema=["MS", {**schema}] + ) + + missing_columns = set().union( + *[set(columns) - set(xds.data_vars.keys()) for xds in data_xds_list] + ) + + if missing_columns: + raise ValueError( + f"Invalid/missing column specified as input: {missing_columns}." ) - except RuntimeError as e: - raise RuntimeError( - f"Invalid/missing column specified. Underlying error: {e}." - ) from e spw_xds_list = xds_from_storage_table( ms_opts.path + "::SPECTRAL_WINDOW",