HeaderMapper¶
- class pyvo.mivot.writer.HeaderMapper(votable)[source]¶
- Bases: - object- This utility class generates dictionaries from header elements of a VOTable. These dictionaries are used as input parameters by - pyvo.mivot.writer.InstancesFromModelsto create MIVOT instances that are placed in the GLOBALS block or in the TEMPLATES. In the current implementation, the following elements can be extracted:- COOSYS -> coords:SpaceSys 
- TIMESYS - coords:TimeSys 
- INFO -> mango:QueryOrigin 
- FIELD -> mango:EpochPosition 
 - Constructor parameters: - Parameters:
- votableastropy.io.votable.tree.VOTableFile
- parsed votable from which INFO element are processed 
 
 - Methods Summary - Create a mapping dictionary for each - COOSYSelement found in the first VOTable resource.- Analyze the FIELD UCD-s to infer a data mapping to the EpochPosition class. - Create a mapping dictionary from all VOTable - INFOelements.- Create a mapping dictionary for each - TIMESYSelement found in the first VOTable resource.- Methods Documentation - extract_coosys_mapping()[source]¶
- Create a mapping dictionary for each - COOSYSelement found in the first VOTable resource.- Returns:
- [dict]
- Array of dictionaries which items can be used as input parameter for - pyvo.mivot.writer.InstancesFromModels.add_simple_space_frame()
 
 
 - extract_epochposition_mapping()[source]¶
- Analyze the FIELD UCD-s to infer a data mapping to the EpochPosition class. This mapping covers the 6 parameters with the Epoch and their errors. The correlation part is not covered since there is no specific UCD for this. The UCD-s accepted for each parameter are defined in - pyvo.mivot.glossary.- The error classes are hard-coded as the most likely types. - PErrorSym2D for 2D parameters 
- PErrorSym1D for 1D parameters 
 - Returns:
- (dict, dict)
- A mapping proposal for the EpochPosiion + errors that can be used as input parameter by - pyvo.mivot.writer.InstancesFromModels.add_mango_epoch_position().
 
 
 - extract_origin_mapping()[source]¶
- Create a mapping dictionary from all VOTable - INFOelements. This dictionary is used to build a- mango:QueryOriginINSTANCE- INFO elements located in the VOTable header are used to build the - mango:QueryOriginpart which scope is the whole VOtable by construction (one query -> one VOTable)
- INFO elements located in the resource header are used to build the - mango:DataOriginpart which scope is the data located in this resource.
 - Returns:
- dict
- Dictionary that can be used as input parameter for - pyvo.mivot.writer.InstancesFromModels.add_query_origin()
 
 
 - extract_timesys_mapping()[source]¶
- Create a mapping dictionary for each - TIMESYSelement found in the first VOTable resource.- Note - the - originattribute is not supported yet- Returns:
- [dict]
- Array of dictionaries which items can be used as input parameter for - pyvo.mivot.writer.InstancesFromModels.add_simple_time_frame()