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

Dev #2

Merged
merged 5 commits into from
Apr 6, 2013
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion python/doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
exclude_patterns = []

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
default_role = 'obj'

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
Expand Down
21 changes: 21 additions & 0 deletions python/doc/source/intro.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
..
TODO: put documentation license header here.

============
Introduction
============

Installing
==========

Dependencies
------------

- NumPy
- `PySerial`_
- `quantities`_
- `flufl.enum`_

.. _PySerial: http://pyserial.sourceforge.net/
.. _quantities: http://pythonhosted.org/quantities/
.. _flufl.enum: http://pythonhosted.org/flufl.enum/
29 changes: 14 additions & 15 deletions python/src/instruments/agilent/agilent33220a.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,20 @@ def __init__(self, port, address,timeout_length):
super(Agilent33220a, self).__init__(self,port,address,timeout_length)

# Output
def setOutput(self,func,freq=None,amplitude=None,offset=None):
def setOutput(self, func, freq=None, amplitude=None, offset=None):
'''
Set the output of the function generator. Only argument "func" is required.

func: Output function type.
func = {SINusoid|SQUare|RAMP|PULSe|NOISe|DC|USER},string
:param str func: Output function type, one of ``{SINusoid|SQUare|RAMP|PULSe|NOISe|DC|USER}``.

freq: Output frequency. Ignored for noise and dc mode. Specified in Hz.
freq = <frequency>,float/integer
:param freq: Output frequency. Ignored for noise and dc mode.
:type freq: `int` or `float` [Hz]

amplitude: Peak to peak amplitude of the output. Ignored for dc mode.
amplitude = <voltage>
:param amplitude: Peak to peak amplitude of the output. Ignored for dc mode.
:type amplitude: `int` or `float` [V]

offset: DC offset in volts
offset = <voltage>
:param offset: DC offset.
:type offset: `int` or `float` [V]
'''
if not isinstance(func,str):
raise Exception('Output function (func) must be a string.')
Expand Down Expand Up @@ -83,8 +82,7 @@ def function(self,func = None):

If argument "func" is omitted, the instrument is queried for its current output setting. Return type is a string.

func: Output function type.
func = {SINusoid|SQUare|RAMP|PULSe|NOISe|DC|USER},string
:param str func: Output function type, one of ``{SINusoid|SQUare|RAMP|PULSe|NOISe|DC|USER}``.
'''
if func == None: # If func not specified, perform query for current function
return self.query('FUNC?')
Expand Down Expand Up @@ -132,7 +130,7 @@ def frequency(self,freq = None):

self.write( 'FREQ ' + str(freq) )

def voltage(self,amplitude = None):
def voltage(self, amplitude=None):
'''
Set the output voltage amplitude of the function generator.
Units are defined by the voltageUnits method.
Expand Down Expand Up @@ -299,9 +297,10 @@ def outputLoad(self,load=None):
'''
Desired output termination load (ie, the impedance of the load attached to the front panel output connector).
When specified as a string, they equate to:
1) MINimum: 1ohm
2) MAXimum: 10kohm
3) INFinity: High-impedance mode (>10kohm)

#. MINimum: 1ohm
#. MAXimum: 10kohm
#. INFinity: High-impedance mode (>10kohm)

The instrument has a fixed series output impedance of 50ohms. This function allows the instrument to compensate of the voltage divider and accurately report the voltage across the attached load.

Expand Down
Loading