Skip to content

Keysight B2962A: Add remote sensing parameter#7925

Open
neildick wants to merge 3 commits intomicrosoft:mainfrom
neildick:driver/b2962a_add_rems
Open

Keysight B2962A: Add remote sensing parameter#7925
neildick wants to merge 3 commits intomicrosoft:mainfrom
neildick:driver/b2962a_add_rems

Conversation

@neildick
Copy link

Add the 'remote sensing' parameter to enable or disable the 4-wire output mode on a B2962A channel.

@neildick neildick requested a review from a team as a code owner March 13, 2026 00:56
"remote_sensing",
get_cmd=f":SENS{chan:d}:REM?",
set_cmd=f":SENS{chan:d}:REM {{:d}}",
val_mapping={"on": 1, "off": 0},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps use qcodes.parameters.create_on_off_val_mapping(1,0) This will ensure consistency with similar bools in other instruments

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jenshnielsen! Long time no see, hope you're well. I just copied one of the other parameters, should I make these two changes to the rest of the driver as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that'd be great :)

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 15.38462% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.15%. Comparing base (af746ec) to head (e88636c).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...des/instrument_drivers/Keysight/Keysight_B2962A.py 15.38% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7925      +/-   ##
==========================================
- Coverage   60.15%   60.15%   -0.01%     
==========================================
  Files         352      352              
  Lines       32260    32263       +3     
==========================================
+ Hits        19407    19408       +1     
- Misses      12853    12855       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

)
"""Parameter source_mode"""

self.remote_sensing: Parameter = self.add_parameter(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.remote_sensing: Parameter = self.add_parameter(
self.remote_sensing: Parameter[bool, Self] = self.add_parameter(

(add from typing import Self) to the top of the file.

Qcodes parameters now supports generic arguments for the parameter get/set value such that a
param.get()/set() now has known types and param.instrument will resolve to the correct type. I have not updated everything but we can add it to new parameters

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above

Add the 'remote sensing' parameter to enable or disable the 4-wire
output mode on a B2962A channel.
Add type hints to the parameters within the b2962a channel so
that param.instrument can resolve the correct type.
Use the on_off_val_mapping function to be consistent with
other instruments
@neildick neildick force-pushed the driver/b2962a_add_rems branch from 49813c8 to e88636c Compare March 15, 2026 22:08
@neildick
Copy link
Author

@microsoft-github-policy-service agree

Copy link
Collaborator

@jenshnielsen jenshnielsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @neildick, The docs build error should be fixed if you merge or rebase main into this branch. The precommit that enforces linting and formatting needs to be run. Personally I would recommend to install prek https://prek.j178.dev/ and enable precommit hooks on the repo using that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants