-
Notifications
You must be signed in to change notification settings - Fork 86
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
@@ -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', | ||
|
@@ -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())) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this change (from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No reason, fixed it. |
||
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 | ||
|
||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks partially complete? Should this return the value from ask or is it really meant to discard that and return None There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leftover from debugging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the import from the current official location to a deprecated legacy location. Could you change this back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.