cngi._utils._mxds_ops

get_subtable_primary_key_names(xds: xarray.Dataset, subtable_name: str)List[str][source]

Finds the coordinates that are probably primary keys in the given subtable

get_subtables(mxds: xarray.Dataset)List[str][source]

Finds the attributes that are probably subtables in the given mxds.

assign_dimensions_for_primary_coordinates(sub0: xarray.Dataset, sub1: xarray.Dataset, subtable_name: str)Tuple[xarray.Dataset, xarray.Dataset][source]

Assigns the primary key coordinates as dimensions for those that don’t have dimension coordinates.

check_mxds_subtable_ref_ids(mxds: xarray.Dataset, onerror='print_warning')[source]

!!!COMPUTES!!! verifies that the references to primary keys between subtables exist.

Parameters
  • mxds (xarray.Dataset) – The multi-visibility dataset containing subtables to check.

  • onerror (str) – What to do when bad values are found. Options are “print_warning”, “raise”, or any other value to do nothing but return the subtable in the returned list.

Returns

The list of subtables with bad reference values. Empty if no bad values are found.

Return type

list[str]