process_sidecar_data

astro_metadata_translator.indexing.process_sidecar_data(content: MutableMapping[str, Any]) ObservationInfo | MutableMapping[str, Any]
astro_metadata_translator.indexing.process_sidecar_data(content: MutableMapping[str, Any], force_metadata: Literal[True]) MutableMapping[str, Any]
astro_metadata_translator.indexing.process_sidecar_data(content: MutableMapping[str, Any], force_metadata: Literal[False]) ObservationInfo | MutableMapping[str, Any]

Process the content read from a JSON sidecar file.

Parameters:
contentdict

Data structure stored in JSON sidecar file converted to simple python form.

force_metadatabool, optional

By default the content returned will match the original form that was used for the sidecar. If this parameter is True a sidecar of ObservationInfo will be returned as if it was simple dict content.

Returns:
infoObservationInfo or dict of [str, Any]

If the sidecar file referred to ObservationInfo this will return an ObservationInfo, otherwise a dict will be returned. This can be overridden using the force_metadata parameter in which case a dict will always be returned.