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

add slope threshold parameter #384

Merged
merged 3 commits into from
Jan 29, 2025
Merged
Changes from 1 commit
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
35 changes: 25 additions & 10 deletions src/qcodes_contrib_drivers/drivers/Tektronix/FCA3100.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Any, Tuple
from qcodes.instrument import VisaInstrument
from qcodes.parameters import MultiParameter, Parameter, ParameterWithSetpoints
from qcodes.validators import Arrays, Ints
from qcodes.utils.validators import Arrays, Ints
jenshnielsen marked this conversation as resolved.
Show resolved Hide resolved

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -63,13 +63,6 @@ def __init__(self,
instrument:"FCA3100",
**kwargs: Any
) -> None:
"""
Parameter for a complete time statistics containing all measured switching times.

Args:
name: name of the complete time statistics
instrument: Instrument to which the complete time statistic is bound to.
"""
super().__init__(name=name,
instrument=instrument,
label='Times till switching',
Expand All @@ -86,8 +79,8 @@ def get_raw(self) -> np.ndarray:
"""
assert isinstance(self.instrument, FCA3100)
self.instrument.write('CALCulate:AVERage:STATe 0')
self.instrument.write('ARM:COUN {}'.format(self.instrument.samples_number.get_latest()))
data_str=self.instrument.ask("READ:ARRay? {}".format(self.instrument.samples_number.get_latest()))
self._instrument.write('ARM:COUN {}'.format(self._instrument.samples_number.get_latest()))
jenshnielsen marked this conversation as resolved.
Show resolved Hide resolved
data_str=self.root_instrument.ask("READ:ARRay? {}".format(self.root_instrument.samples_number.get_latest()))
data = np.array(data_str.rstrip().split(",")).astype("float64")
return data

Expand Down Expand Up @@ -179,4 +172,26 @@ def __init__(self,
vals=Arrays(shape=(self.samples_number.get_latest,))
)

self.add_parameter(name='threshold_slope_A',
label='threshold_slope_A',
get_cmd='INPut1:SLOPe?',
set_cmd='INPut1:SLOPe {}',
get_parser=str,
unit='',
docstring='trigger slope @ threshold channel A'
)

self.add_parameter(name='threshold_slope_B',
label='threshold_slope_B',
get_cmd='INPut2:SLOPe?',
set_cmd='INPut2:SLOPe {}',
get_parser=str,
unit='',
docstring='trigger slope @ threshold channel B'
)

self.connect_message()

def startread(self):
self.ask("Read?")
return
jenshnielsen marked this conversation as resolved.
Show resolved Hide resolved
Loading