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

Magnet driver #660

Merged
merged 8 commits into from Aug 30, 2017
Merged

Conversation

CJvanDiepen
Copy link
Contributor

Add instrument driver for magnet IPS120.

Changes proposed in this pull request:

  • Add instrument driver

@jenshnielsen

@jenshnielsen
Copy link
Collaborator

Sorry this lingered so long. I left a few comments inline but otherwise this looks good to me. I don't have a IPS120 to test on so this review is only based on reading the code

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a particular reason for GPL licence. QCoDeS is licensed under the MIT licence and we cannot directly include code that is GPL licensed in QCoDeS as far as I understand it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jenshnielsen Would it be an option to include the driver in qcodes with an explicit mention of the GPL in the driver directory? We have another driver that is GPL, and I do not think it is possible to relicense to MIT.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I will ask around about the policy on this and get back to you

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jenshnielsen @eendebakpt After searching for 'GNU' in the repository I saw that there already are some instrument drivers in qcodes which are GPL licensed. I actually think that some other instrument drivers which don't have a GPL license statement in the source code are also ported from qtlab instrument drivers, which had a GPL license statement in the source code. Probably the original authors won't bother anymore, but a general guideline on how to work with GPL licensed instrument drivers in the qcodes framework would be good.

# if mes[1] != 0:
# # see protocol descriptor for error codes
# raise Exception('IVVI rack exception "%s"' % mes[1])
return mes
Copy link
Collaborator

Choose a reason for hiding this comment

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

should the commented out code stay?

2: "Off magnet at field (switch closed)",
5: "Heater fault (heater is on but current is low)",
8: "No switch fitted"}
print(status[int(result[8])])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this print statement

Copy link
Collaborator

Choose a reason for hiding this comment

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

And similar below

"Outside positive current limit"
"""
result = self._execute('X')
logging.info(__name__ + ' : Getting system status')
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be worth replacing the logger with a pattern like

log = logging.getLogger(__name__)

once and then after that

log.warning('this is a warning`)

such as in

https://github.com/QCoDeS/Qcodes/blob/master/qcodes/instrument_drivers/tektronix/AWG5014.py#L15

@CJvanDiepen
Copy link
Contributor Author

@jenshnielsen I made adjustments based on your suggestions. We have been in touch with the authors of the code this driver is based and have received permission to change the license to MIT.

@jenshnielsen jenshnielsen merged commit acb3b6e into microsoft:master Aug 30, 2017
giulioungaretti pushed a commit that referenced this pull request Aug 30, 2017
Author: CJvanDiepen <CJvanDiepen@users.noreply.github.com>

    Magnet driver (#660)
@peendebak peendebak deleted the magnet_driver branch March 22, 2019 22: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