process_index_data¶
- astro_metadata_translator.indexing.process_index_data(content: MutableMapping[str, Any], *, force_metadata: Literal[True], force_dict: Literal[False]) MutableMapping[str, Any]¶
 - astro_metadata_translator.indexing.process_index_data(content: MutableMapping[str, Any], *, force_metadata: Literal[False], force_dict: Literal[True]) MutableMapping[str, MutableMapping[str, Any] | ObservationInfo]
 - astro_metadata_translator.indexing.process_index_data(content: MutableMapping[str, Any], *, force_metadata: bool = False, force_dict: bool = False) ObservationGroup | MutableMapping[str, MutableMapping[str, Any] | ObservationInfo]
 Process the content read from a JSON index file.
- Parameters:
 - content
dict Data structure stored in JSON index 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 index. If this parameter is
Truean index ofObservationInfowill be returned as if it was simple dict content.- force_dict
bool, optional If
Truethe structure returned will always be a dict keyed by filename.
- content
 - Returns:
 - index
ObservationGroupordictof [str,dict] If the index file referred to
ObservationInfothis will return anObservationGroup, otherwise adictwill be returned with the keys being paths to files and the values being the keys and values stored in the index (with common information merged in). This can be overridden using theforce_metadataparameter. Ifforce_dictisTrueadictwill be returned with filename keys even if the index file refers toObservationInfo(the values will beObservationInfounlessforce_metadataisTrue).
- index
 
Notes
File keys will be relative to the location of the index file.