aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-14 00:58:44 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-14 00:59:08 -0400
commit5179ee552c89fc808fd3cfcb4a2911146e6acb09 (patch)
treeefa3cae28f5a8aa31864c9daedf56242cf6658a6
parentea4cd29815e134f2c7a07bbd83546a9f23d3f8ef (diff)
downloadqolab-5179ee552c89fc808fd3cfcb4a2911146e6acb09.tar.gz
qolab-5179ee552c89fc808fd3cfcb4a2911146e6acb09.zip
impoved doc string
-rw-r--r--qolab/hardware/multimeter/hp_34401.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/qolab/hardware/multimeter/hp_34401.py b/qolab/hardware/multimeter/hp_34401.py
index ef9c647..36d862c 100644
--- a/qolab/hardware/multimeter/hp_34401.py
+++ b/qolab/hardware/multimeter/hp_34401.py
@@ -6,11 +6,18 @@ import time
class HP_34401(MultimeterSCPI):
- """HP 34401 multimeter (same as Agilent)"""
-
- """
- rm = pyvisa.ResourceManager()
- instr=rm.open_resource('ASRL/dev/ttyUSB0::INSTR')
+ r"""HP 34401 multimeter (same as Agilent 34401)
+
+ Example
+ -------
+
+ >>> from qolab.hardware.multimeter.hp_34401 import HP_34401
+ >>> rm = pyvisa.ResourceManager()
+ >>> instr=rm.open_resource('ASRL/dev/ttyUSB0::INSTR')
+ >>> multimeter = HP_34401(instr)
+ >>> print("------ Header start -------------")
+ >>> print(str.join("\n", multimeter.getHeader()))
+ >>> print("------ Header ends -------------")
"""
def __init__(self, resource, *args, **kwds):
@@ -97,9 +104,11 @@ class HP_34401(MultimeterSCPI):
self, desired_function_string, function_internal_name
):
"""
- Get the reading but first check if we are set to do specific function/measurement.
- If the instrument set to do different function, set to desired one
- Note: the function name should be in quotes, i.e. '"Volt"'
+ Get the required reading.
+
+ But first check if the multimeter is set to do specific function/measurement.
+ If the instrument set to do different function, set to the desired one.
+ Note: the function name should be in quotes, i.e. "Volt".
"""
if not self.isSensing(function_internal_name):
self.rawFunction = desired_function_string