Skip to content
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 docs/source/instruments/2231A.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To initialize a controller you can execute the following directives on any Pytho

from qtics import Keithley2231A

power_supply = Keithley2231A(name = "my_power_supply", address = "/dev/ttyACM0")
power_supply = Keithley2231A(address = "/dev/ttyACM0")
power_supply.connect()


Expand Down
2 changes: 1 addition & 1 deletion docs/source/instruments/3494_64.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To initialize a controller you can execute the following directives on any Pytho

from qtics import Kratos_349464

attenuator = Kratos_349464(name = "my_attenuator", address = "/dev/ttyACM0")
attenuator = Kratos_349464(address = "/dev/ttyACM0")
attenuator.connect()

To execute commands:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/instruments/6514.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To initialize a controller you can execute the following directives on any Pytho

from qtics import Keithley6514

electrometer = Keithley6514(name = "my_electrometer", address = "/dev/ttyACM0")
electrometer = Keithley6514(address = "/dev/ttyACM0")
electrometer.connect()


Expand Down
4 changes: 2 additions & 2 deletions docs/source/instruments/N9916A.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Example of operation

from qtics import VNAN9916A

VNA = VNAN9916A(name = "myVNA", address = "192.168.40.10")
VNA = VNAN9916A(address = "192.168.40.10")
VNA.connect()


Expand Down Expand Up @@ -99,7 +99,7 @@ Example of operation

from qtics import SAN9916A

SA = SAN9916A(name = "mySA", address = "192.168.40.10")
SA = SAN9916A(address = "192.168.40.10")
SA.connect()


Expand Down
2 changes: 1 addition & 1 deletion docs/source/instruments/QUICKSYNTH.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Example of operation

from qtics import FSL0010 # also FSL0020, FSW0010, FSW0020

synth = FSL0010(name = "mySynth", address = "/dev/ttyUSB0")
synth = FSL0010(address = "/dev/ttyUSB0")
synth.connect()
synth.freq = 5.3e9
synth.output_on = True
Expand Down
2 changes: 1 addition & 1 deletion docs/source/instruments/R591722600.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To initialize a controller you can execute the following directives on any Pytho

from qtics import Radiall_R591722600

switch = Radiall_R591722600(name = "my_switch", address = "/dev/ttyACM0")
switch = Radiall_R591722600(address = "/dev/ttyACM0")
switch.connect()


Expand Down
7 changes: 5 additions & 2 deletions docs/source/instruments/SIM928.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Example of operations

from qtics import SRS_SIM928

source = SRS_SIM928(name = "source", address = "/dev/ttyACM0")
source = SRS_SIM928(address = "/dev/ttyACM0")
source.connect()


Expand All @@ -41,8 +41,11 @@ Functions

- connect_port(port)
- reset()
- output_on
- output_on()
- output_off()
- on()
- off()
- is_on()
- battery_charger_override()
- battery_state()
- battery_spec(option)
Expand Down
5 changes: 4 additions & 1 deletion docs/source/instruments/SMA100B.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Example of operations

from qtics import SMA100B

sg = SMA_100B(name = "mySignalGenerator", address = "192.168.40.15")
sg = SMA_100B(address = "192.168.40.15")
sg.connect()

Set the frequency and the RF level applied to the DUT at 1 GHz and 1 V respectively.
Expand Down Expand Up @@ -53,6 +53,9 @@ Functions
- screen_saver_mode(state)
- set_phase_ref()
- sweep()
- on()
- off()
- is_on()

Properties
------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/instruments/VALON519.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Example of operations

from qtics import VALON5019

fs = VALON5019(name = "myvalon", address = "/dev/ttyUSB0")
fs = VALON5019(address = "/dev/ttyUSB0")
fs.connect()

Commands
Expand Down
6 changes: 3 additions & 3 deletions docs/source/instruments/proteox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Pressures
Flows
^^^^^

* ``get_3He_F()`` – :sup:`3`He flowmeter
* ``get_3He_F()`` – :sup:`3` He flowmeter

Magnetic Field Control
^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -170,7 +170,7 @@ Example
Temperature values are expected in **kelvin**.

Temperature and Heater Control
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
------------------------------

* ``set_MC_T(value)`` – Set mixing chamber temperature setpoint
* ``set_MC_H(value)`` – Set mixing chamber heater power
Expand All @@ -179,7 +179,7 @@ Temperature and Heater Control
* ``set_STILL_H_OFF(value=0)`` – Turn off still heater

Magnet Control
^^^^^^^^^^^^^^
--------------

* ``set_MAG_TARGET(value)`` – Set magnetic field target (vector or scalar depending on mode)
* ``set_MAG_STATE(value)`` – Set magnet controller state
Expand Down
2 changes: 1 addition & 1 deletion docs/source/instruments/triton.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Example of opertations

from qtics import Triton

controller = Triton("name", "address")
controller = Triton(address="192.288.1919.11")
controller.connect()

print(f"Mixing chamber temp: {controller.get_mixing_chamber_temp() * 1000} mK")
Expand Down
4 changes: 2 additions & 2 deletions src/qtics/instruments/network/NA_N9916A.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ class N9916A(NetworkInst, ABC):

def __init__(
self,
name: str,
address: str,
port: int = 5025,
timeout: int = 8000,
sleep: float = 0.1,
no_delay: bool = True,
max_points: int = 10001,
name: str = "N9916A",
):
"""Initialize instrument."""
super().__init__(name, address, port, timeout, sleep, no_delay)
super().__init__(address, port, timeout, sleep, no_delay, name)
self._max_points = max_points

def write_and_hold(self, cmd: str):
Expand Down
12 changes: 12 additions & 0 deletions src/qtics/instruments/network/RS_FSV3030.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
class FSV3030(NetworkInst):
"""R&S FSV3030 Spectrum Analyzer by Rohde & Schwarz."""

def __init__(
self,
address: str,
port: int = 5025,
timeout: int = 8000,
sleep: float = 0.1,
no_delay: bool = True,
name: str = "FSV3030",
):
"""Initialize instrument."""
super().__init__(address, port, timeout, sleep, no_delay, name)

def clear(self):
"""Clear the error queue and status registers."""
self.write("*CLS")
Expand Down
26 changes: 25 additions & 1 deletion src/qtics/instruments/network/RS_SMA100B.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
class SMA100B(NetworkInst):
"""R&S SMA100B RF and microwave signal generator by Rohde & Schwarz."""

def __init__(
self,
address: str,
port: int = 5025,
timeout: int = 8000,
sleep: float = 0.1,
no_delay: bool = True,
name: str = "SMA100B",
):
"""Initialize instrument."""
super().__init__(address, port, timeout, sleep, no_delay, name)

def clear(self):
"""Clear the output buffer."""
self.write("*CLS")
Expand Down Expand Up @@ -70,10 +82,22 @@ def screen_saver_mode(self, state: str = "OFF"):
self.validate_opt(state, ("ON", "OFF"))
self.write(f"DISP:PSAV:STAT {state}")

def on(self):
"""Rename to standard name function."""
self.rf_status = "ON"

def off(self):
"""Rename to standard name function."""
self.rf_status = "OFF"

def is_on(self):
"""Return true if rf output is on."""
return self.rf_status == "1"

@property
def rf_status(self) -> str:
"""Activate the RF output signal."""
return self.write("OUTP:STAT?")
return self.query("OUTP:STAT?")

@rf_status.setter
def rf_status(self, state: str):
Expand Down
4 changes: 2 additions & 2 deletions src/qtics/instruments/network/RS_ZNB.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ class RSZNB(NetworkInst):

def __init__(
self,
name: str,
address: str,
port: int = 5025,
timeout: int = 8000,
sleep: float = 0.1,
no_delay: bool = True,
max_points: int = 100001,
channel: int = 1,
name: str = "RSZNB",
):
"""Initialize instrument."""
super().__init__(name, address, port, timeout, sleep, no_delay)
super().__init__(address, port, timeout, sleep, no_delay, name)
self._max_points = max_points
self._channel = channel
self._active_trace = "Trc1"
Expand Down
4 changes: 2 additions & 2 deletions src/qtics/instruments/network/triton_ctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class Triton(NetworkInst):

def __init__(
self,
name: str,
address: str = "212.189.204.22",
port: int = 33576,
timeout: int = 10,
sleep: float = 0.1,
no_delay: bool = True,
name: str = "Triton",
):
"""Initialize."""
super().__init__(name, address, port, timeout, sleep, no_delay)
super().__init__(address, port, timeout, sleep, no_delay, name)

def query(self, cmd: str) -> str:
"""Send a message, then read from the serial port."""
Expand Down
2 changes: 1 addition & 1 deletion src/qtics/instruments/network_inst.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ class NetworkInst(Instrument):

def __init__(
self,
name: str,
address: str,
port: int = 5025, # Keysight instruments standard port
timeout: int = 10,
sleep: float = 0.1,
no_delay: bool = True,
name: str = "GenericNetworkInst",
):
"""Initialize."""
super().__init__(name, address)
Expand Down
21 changes: 20 additions & 1 deletion src/qtics/instruments/serial/keithley2231a.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,35 @@
Controller of the Keithley2231A DC Power Supply.

.. module:: keithley2231a.py
.. moduleauthor:: Marco Gobbo <marco.gobbo@mib.infn.it>
"""

from typing import Literal

import serial

from qtics import log
from qtics.instruments import SerialInst


class Keithley2231A(SerialInst):
"""Keithley Model 2231A-30-3 Triple Channel DC Power Supply by Keithley Instruments."""

def __init__(
self,
address: str,
baudrate: int = 9600,
bytesize: int = serial.EIGHTBITS,
parity: Literal["N"] = serial.PARITY_NONE,
stopbits: int = serial.STOPBITS_ONE,
timeout: int = 10,
sleep: float = 0.3,
name: str = "Keithley2231A",
):
"""Initialize."""
super().__init__(
address, baudrate, bytesize, parity, stopbits, timeout, sleep, name=name
)

def connect(self):
"""Put Keithley 2231A DC Power Supply in remote."""
self.serial.open()
Expand Down
21 changes: 20 additions & 1 deletion src/qtics/instruments/serial/keithley6514.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,35 @@
Controller of the Keithley6514 Electrometer.

.. module:: keithley6514.py
.. moduleauthor:: Marco Gobbo <marco.gobbo@mib.infn.it>
"""

from typing import Literal

import serial

from qtics import log
from qtics.instruments import SerialInst


class Keithley6514(SerialInst):
"""Keithley 6514 Programmable Electrometer by Keithley Instruments."""

def __init__(
self,
address: str,
baudrate: int = 9600,
bytesize: int = serial.EIGHTBITS,
parity: Literal["N"] = serial.PARITY_NONE,
stopbits: int = serial.STOPBITS_ONE,
timeout: int = 10,
sleep: float = 0.3,
name: str = "Keithley6514",
):
"""Initialize."""
super().__init__(
address, baudrate, bytesize, parity, stopbits, timeout, sleep, name=name
)

def connect(self):
"""Put Keithley 6514 Electrometer in remote."""
self.serial.open()
Expand Down
5 changes: 2 additions & 3 deletions src/qtics/instruments/serial/quick_synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
QuickSyn microwave synthesizers by National Instruments.

.. module:: synth_FSL0010.py
.. moduleauthor:: Pietro Campana <campana.pietro@campus.unimib.it>
"""

from typing import Literal
Expand All @@ -19,18 +18,18 @@ class FSQS(SerialInst):

def __init__(
self,
name: str,
address: str,
baudrate: int = 115200,
bytesize: int = serial.EIGHTBITS,
parity: Literal["N"] = serial.PARITY_NONE,
stopbits: int = serial.STOPBITS_ONE,
timeout: int = 10,
sleep: float = 0.1,
name: str = "FSQS",
):
"""Initialize."""
super().__init__(
name, address, baudrate, bytesize, parity, stopbits, timeout, sleep
address, baudrate, bytesize, parity, stopbits, timeout, sleep, name=name
)

self.min_freq = 0.5e9
Expand Down
Loading
Loading