Skip to content

Wrong time axis when DATa:STOP is higher than the selected record length #21

@rbansemer

Description

@rbansemer

The construction of the time axis in PyTektronixScope is implemented as self.x_0 + np.arange(self.data_start-1, self.data_stop)*self.delta_x. This approach is correct in principle - x0 is the result of WFMO:XZE? (time coordinate of the first point in the outgoing waveform), data_start and data_stop are determined as DATa:STARt? and DATa:STOP?, and delta_x is the result of WFMO:XIN?, the sampling interval.

When choosing a record length below the maximum record length supported by the scope, this however can lead to an incorrect time axis. The value returned by DATa:STOP? cannot be higher than the maximum record length, but it can be higher than the record length that is currently set. In such a case, when the value of DATa:STOP is between the record length set in the oscilloscope and maximum record length, the returned time axis has more data points than the voltage waveform.

I will suggest a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions