The procedure for requesting AWR support has changed. Please read all about the new AWR product support process.
Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

When you get a measurement object there is a lot of information packed into it including the data source, the name of the measurement, the plot dimensions, the type of the axes, etc.  Here is a utility class that gets and decodes all this information from a measurement.

class AwrMeasurement():
    def __init__(self, measurement: mwo.CMeasurement):
        (source, name, simulator) = self.parse_meas_string(measurement.Name) = name
        self.source = source  # schematic name for example
        self.simulator = simulator
        self.data_type = mwo.mwMeasDataType(measurement.DataType)._name_
        self.plot_dim = measurement.PlotDimension
        self.x_units = mwo.mwUnitType(measurement.UnitType(1))._name_
        self.y_units = mwo.mwUnitType(measurement.UnitType(2))._name_

    def parse_meas_string(cls, s: str) -> Tuple[str, str, str]:
        (source, name) = s.split(':')
        if '.' in source:
            (source, simulator) = source.split('.')
            simulator = ''
        return (source, name, simulator)

  • No labels