diff options
Diffstat (limited to 'qolab')
-rw-r--r-- | qolab/hardware/power_supply/psw25045.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/qolab/hardware/power_supply/psw25045.py b/qolab/hardware/power_supply/psw25045.py index d0fc1c2..bb2357f 100644 --- a/qolab/hardware/power_supply/psw25045.py +++ b/qolab/hardware/power_supply/psw25045.py @@ -6,11 +6,14 @@ Description: This module provides a class to interface with the GW INSTEK GPP250 Author: Mykhailo Vorobiov Email: mvorobiov@wm.edu Date: 2024-10-02 -Update: 2024-11-05 +Update: 2024-11-06 """ from qolab.hardware.power_supply._basic import PowerSupplySCPI +from qolab.hardware.basic import BasicInstrument + import pyvisa +import numpy as np class PSW25045(PowerSupplySCPI): """ @@ -44,9 +47,8 @@ class PSW25045(PowerSupplySCPI): except pyvisa.VisaIOError as e: print(f'[ERROR!] Error retrieving identification: {e}') return None - - - def get_current_meas(self): + @BasicInstrument.tsdb_append + def get_out_current(self): """ Query the current reading of the instrument. @@ -57,9 +59,10 @@ class PSW25045(PowerSupplySCPI): return float(self.query('MEAS:CURR?')) except pyvisa.VisaIOError as e: print(f"[ERROR!] Error querying the current reading: {e}") - return None - - def get_voltage_meas(self): + return np.nan() + + @BasicInstrument.tsdb_append + def get_out_voltage(self): """ Query the voltage reading of the instrument. @@ -70,9 +73,9 @@ class PSW25045(PowerSupplySCPI): return float(self.query('MEAS:VOLT?')) except pyvisa.VisaIOError as e: print(f"[ERROR!] Error querying the voltage reading: {e}") - return None + return np.nan() - def get_power_meas(self): + def get_out_power(self): """ Query the power reading of the instrument. @@ -83,7 +86,7 @@ class PSW25045(PowerSupplySCPI): return float(self.query('MEAS:POWE?')) except pyvisa.VisaIOError as e: print(f"[ERROR!] Error querying the power reading: {e}") - return None + return np.nan() |