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

Fix keithley 2600 formatting #1301

Merged

Conversation

jenshnielsen
Copy link
Collaborator

Fix formatting of set commands with more than 4 significant digits after the comma. The instrument supports exponential notation so there is no need for specific formatting.

Also took the chance to add some validators, docstrings and typehints

Correct formating to allow setting of low curr limits, add docstrings and validators to paramters
@codecov
Copy link

codecov bot commented Oct 8, 2018

Codecov Report

Merging #1301 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1301   +/-   ##
=======================================
  Coverage   72.56%   72.56%           
=======================================
  Files          74       74           
  Lines        8456     8456           
=======================================
  Hits         6136     6136           
  Misses       2320     2320

Copy link
Contributor

@astafan8 astafan8 left a comment

Choose a reason for hiding this comment

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

Great!

@@ -156,13 +157,22 @@ def __init__(self, parent: Instrument, name: str, channel: str) -> None:
set_cmd='{}.source.rangev={}'.format(channel,
'{:.4f}'),
unit='V',
docstring='The range used when sourcing voltage'
Copy link
Contributor

Choose a reason for hiding this comment

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

. (dot and space) needed after this line?

get_parser=float,
docstring='Number of power line cyclesm, used'
Copy link
Contributor

Choose a reason for hiding this comment

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

is the space needed after "used"?

@@ -173,37 +183,53 @@ def __init__(self, parent: Instrument, name: str, channel: str) -> None:
set_cmd='{}.source.rangei={}'.format(channel,
'{:.4f}'),
unit='A',
docstring='The range used when sourcing current'
Copy link
Contributor

Choose a reason for hiding this comment

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

missing space?

unit='A',
docstring='The range to perform current measurements'
Copy link
Contributor

Choose a reason for hiding this comment

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

missing space?

'in. This affects the range and the '
'precision of the measurement. '
'Note that if you both measure and source '
'current this will have no effect set '
Copy link
Contributor

Choose a reason for hiding this comment

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

missing comma before "set"?

@WilliamHPNielsen WilliamHPNielsen merged commit 8d9c687 into microsoft:master Oct 8, 2018
giulioungaretti pushed a commit that referenced this pull request Oct 8, 2018
Merge: 8979f3b 5d7f738
Author: William H.P. Nielsen <whpn@mailbox.org>

    Merge pull request #1301 from jenshnielsen/fix_keithley_2600_formatting
@jenshnielsen jenshnielsen deleted the fix_keithley_2600_formatting branch October 9, 2018 08:28
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.

None yet

3 participants