determine_vector_and_meta_columns
- jwst.datamodels.utils.flat_multispec.determine_vector_and_meta_columns(input_datatype, output_datatype)[source]
Figure out which columns are vector-like and which are metadata.
The vector-like columns are the ones defined in the input schema, and the metadata columns are the ones defined only in the output schema. The input and output datatypes are typically read from the schema as e.g.:
datatype = schema["properties"]["spec_table"]["datatype"].
- Parameters:
- input_datatypelist[dict]
The datatype of the input model as read from the schema. Each inner dict should have at least the keys “name” and “datatype”.
- output_datatypelist[dict]
The datatype of the output model as read from the schema. Each inner dict should have at least the keys “name” and “datatype”.
- Returns:
- columnsndarray[tuple]
Array of tuples containing the column names and their dtypes.
- is_vectorndarray[bool]
Array of booleans indicating whether each column is vector-like, same length as
columns.