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

Various IPS120 driver improvements #1402

Merged
merged 7 commits into from
Feb 18, 2019
Merged

Conversation

spxtr
Copy link
Contributor

@spxtr spxtr commented Nov 28, 2018

First I make it support both GPIB and serial. Next, fix some bugs in the driver. I haven't yet tested this on my own machine, will do so soon.

@jenshnielsen

@spxtr spxtr force-pushed the ips120gpib branch 2 times, most recently from 6363043 to 0b13aa9 Compare November 29, 2018 01:49
@codecov
Copy link

codecov bot commented Nov 29, 2018

Codecov Report

Merging #1402 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1402      +/-   ##
==========================================
- Coverage   73.88%   73.86%   -0.03%     
==========================================
  Files          92       92              
  Lines       10420    10411       -9     
==========================================
- Hits         7699     7690       -9     
  Misses       2721     2721

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.

This looks good.

But I am tempting to ask you to go through the whole driver, and perform the same refactoring for other parameters: extracting the number<->string dictionaries out of the methods into class attributes as you did for _STATUS_MODE2 and _STATUS_SWITCH_HEATER :)

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.

Agreed with @astafan8, It would be great if you have the time to perform all these conversions. I suggested inline to use self.log I realize that the driver does not do that in general. We are in the middle of converting the drivers to that pattern to make it simpler to get log messages from a specific driver only. It would be great if you are willing to do this conversion over the driver.
Otherwise this looks great

qcodes/instrument_drivers/oxford/IPS120.py Show resolved Hide resolved
mode,
"Unknown"))
if mode in status:
log.info('Setting remote control status to %s' % status[mode])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@spxtr
Copy link
Contributor Author

spxtr commented Dec 11, 2018

OK, I made the driver use self.log instead of log, pulled status dictionaries out, and tidied some random things up. Please let me know how else I can improve it.

I have tested something very similar to this on a real machine, but not this exact change, so please let me test it again before merging.

@jenshnielsen
Copy link
Collaborator

It looks like there are a few small syntax errors. Other than than I think this is ready to merge once you confirm that it has been tested on a real device

Also bring the driver up to date in terms of style.
@jenshnielsen
Copy link
Collaborator

@spxtr Did you ever test this on a real device

@spxtr
Copy link
Contributor Author

spxtr commented Jan 16, 2019

We've warmed up the system for maintenance, once we cool it back down I'll test this. Should be in a week or two.

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.

I left some comments, it would be very nice to finalize the great refactoring that you did! :)

But mostly the "request changes" part is for us to know that we can merge only after the tests on actual instruments are done.

qcodes/instrument_drivers/oxford/IPS120.py Outdated Show resolved Hide resolved
qcodes/instrument_drivers/oxford/IPS120.py Outdated Show resolved Hide resolved
0: "Amps, Magnet sweep: fast",
1: "Tesla, Magnet sweep: fast",
4: "Amps, Magnet sweep: slow",
5: "Tesla, Magnet sweep: slow"}
Copy link
Contributor

Choose a reason for hiding this comment

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

qcodes/instrument_drivers/oxford/IPS120.py Outdated Show resolved Hide resolved
qcodes/instrument_drivers/oxford/IPS120.py Outdated Show resolved Hide resolved
qcodes/instrument_drivers/oxford/IPS120.py Outdated Show resolved Hide resolved
qcodes/instrument_drivers/oxford/IPS120.py Outdated Show resolved Hide resolved
qcodes/instrument_drivers/oxford/IPS120.py Outdated Show resolved Hide resolved
qcodes/instrument_drivers/oxford/IPS120.py Show resolved Hide resolved
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.

Thanks for the changes! The commit message says that the driver has been tested, right? Could you confirm it, and then I'll merge? Thanks :)

I did leave some minor comments, but they are related to my understanding of the driver, not to the PR.

qcodes/instrument_drivers/oxford/IPS120.py Show resolved Hide resolved
qcodes/instrument_drivers/oxford/IPS120.py Show resolved Hide resolved
@spxtr
Copy link
Contributor Author

spxtr commented Feb 17, 2019

Yes, I tested this on a real machine. At least the basic functions like manipulating the switch heater, running to fields, and entering/leaving persistent mode worked.

@codecov
Copy link

codecov bot commented Feb 18, 2019

Codecov Report

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

@@           Coverage Diff           @@
##           master    #1402   +/-   ##
=======================================
  Coverage   73.88%   73.88%           
=======================================
  Files          92       92           
  Lines       10420    10420           
=======================================
  Hits         7699     7699           
  Misses       2721     2721

@astafan8 astafan8 merged commit 46661dc into microsoft:master Feb 18, 2019
giulioungaretti pushed a commit that referenced this pull request Feb 18, 2019
Merge: 18054f5 36f4d99
Author: Mikhail Astafev <astafan8@gmail.com>

    Merge pull request #1402 from spxtr/ips120gpib
@spxtr spxtr deleted the ips120gpib branch February 18, 2019 21:57
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