Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made changes to enable waveform reading. #7

Merged
merged 1 commit into from
Apr 12, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions python/src/instruments/tektronix/tekdpo4104.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
class TekDPO4104Coupling(Enum):
ac = "AC"
dc = "DC"
ground = "GROUND"
ground = "GND"

## CLASSES #####################################################################

Expand Down Expand Up @@ -112,17 +112,17 @@ def read_waveform(self, bin_format=False):

# FIXME: the following has not yet been converted.
# Needs to be fixed before it will even run.
yoffs = self._tek.query( 'WFMP:{}:YOF?'.format(ch_id) ) # Retrieve Y offset
ymult = self._tek.query( 'WFMP:{}:YMU?'.format(ch_id) ) # Retrieve Y multiplier
yzero = self._tek.query( 'WFMP:{}:YZE?'.format(ch_id) ) # Retrieve Y zero
yoffs = self._tek.query( 'WFMP:YOF?' ) # Retrieve Y offset
ymult = self._tek.query( 'WFMP:YMU?' ) # Retrieve Y multiplier
yzero = self._tek.query( 'WFMP:YZE?' ) # Retrieve Y zero

y = ( (raw - float(yoffs) ) * float(ymult) ) + float(yzero)

xzero = self._tek.query( 'WFMP:XZE?' ) # Retrieve X zero
xincr = self._tek.query( 'WFMP:XIN?' ) # Retrieve X incr
ptcnt = self._tek.query( 'WFMP:{}:NR_P?'.format(ch_id) ) # Retrieve number of data points
ptcnt = self._tek.query( 'WFMP:NR_P?') # Retrieve number of data points

x = arange( float(ptcnt) ) * float(xincr) + float(xzero)
x = np.arange( float(ptcnt) ) * float(xincr) + float(xzero)

return [x,y]

Expand Down