process_sidecar_data#

astro_metadata_translator.indexing.process_sidecar_data(content, force_metadata=False)#

Process the content read from a JSON sidecar file.

Parameters:
  • content (dict) – Data structure stored in JSON sidecar file converted to simple python form.

  • force_metadata (bool, 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:

info – 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.

Return type:

ObservationInfo or dict of [str, Any]