lsst.sims.ocs.sal.topic_utilities module

lsst.sims.ocs.sal.topic_utilities.topic_strdict(topic, float_format='{:.3f}')[source]

Return a dictionary of stringified attribute values.

This function takes a Scheduler DDS topic instance and creates a dictionary from the instance attributes. The attribute names are string and their associated values are also turned into strings.

Parameters:
  • topic (SALPY_scheduler.<topic>) – A Scheduler DDS topic instance
  • float_format (str) – A format style precision limit for float values.
Returns:

dict – A dictionary of instance attributes (keys) and values both as strings.