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

driver for HP 83650A #516

Merged
merged 11 commits into from
Mar 21, 2017
Merged

Conversation

brunobuijtendorp
Copy link
Contributor


"""
self.verbose = verbose
logging.debug(__name__ + ' : Initializing instrument')
Copy link
Contributor

@giulioungaretti giulioungaretti Mar 9, 2017

Choose a reason for hiding this comment

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

We use the convention of having:

log = logging.getLogger(__name__) 

self.getall()

def getall(self):
logging.info(__name__ + ' : reading all settings from instrument')
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe debug instead of info? I'd also call the method print_all

': %e' % self.frequency.get(), self.frequency.units)
print(self.freqmode.label + ':', self.freqmode.get())
self.getmodstatus()
# self.get_modstatus()
Copy link
Contributor

Choose a reason for hiding this comment

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

If it's commented out either comment on why, or ⚡️ ! :D

# self.get_FM()

def getmodstatus(self):
print(self.fmstatus.label + ':', self.fmstatus.get())
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, I'd change name to print_modstatus

@peendebak
Copy link
Contributor

@giulioungaretti Fixed some of the comments. @brunobuijtendorp Can you look at the other ones (in particular related to renaming functions)?

@brunobuijtendorp
Copy link
Contributor Author

@peendebak will do tomorrow when in Delft :)

@peendebak
Copy link
Contributor

@brunobuijtendorp PR was blocked because the formatting was not right. I did an autopep8 to fix it.

@giulioungaretti PR is ready for inclusion

@giulioungaretti
Copy link
Contributor

@peendebak looks like something went wrong with the last commit ? It reverted some changes (e1d9ece)

@peendebak
Copy link
Contributor

@giulioungaretti Thanks. It was not in the last commit, but the one before. I reverted the reverted changes.
@brunobuijtendorp Can you test the latest commit and give a green light when it is ready?

@brunobuijtendorp
Copy link
Contributor Author

@peendebak Yes I will check it out tomorrow at qutech! Looks like in commit 'f9e2dabdab3fedfcdf9fe7cbd7a3e1fd94f99f04' I must have accidentally edited an old commit, thereby reverting the changes. Thanks for fixing that :)

@brunobuijtendorp
Copy link
Contributor Author

@eendebakpt, @giulioungaretti Changed units to unit in two more lines. Driver is tested and ready now.

Copy link
Contributor

@giulioungaretti giulioungaretti left a comment

Choose a reason for hiding this comment

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

One last fix !


"""
self.verbose = verbose
log.debug(__name__ + ' : Initializing instrument')
Copy link
Contributor

Choose a reason for hiding this comment

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

you can remove name here 🎇

Copy link
Contributor

Choose a reason for hiding this comment

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

log.debug('Initializing instrument')

docstring='Pulse source, ....')

def reset(self):
log.debug(__name__ + ' : Resetting instrument')
Copy link
Contributor

Choose a reason for hiding this comment

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

same here :D

self.print_all()

def print_all(self):
log.debug(__name__ + ' : reading all settings from instrument')
Copy link
Contributor

Choose a reason for hiding this comment

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

and here !

@giulioungaretti
Copy link
Contributor

@brunobuijtendorp see review! then ready to merge!

@brunobuijtendorp
Copy link
Contributor Author

@giulioungaretti Requested changes have been committed. :)

@giulioungaretti
Copy link
Contributor

@brunobuijtendorp @eendebakpt thanks for the contribution! mergin' 💖

@giulioungaretti giulioungaretti merged commit e0b0fa7 into microsoft:master Mar 21, 2017
giulioungaretti pushed a commit that referenced this pull request Mar 21, 2017
Author: Bruno <brunobuijtendorp@gmail.com>

    driver: HP 83650A (#516)
@peendebak peendebak deleted the driver/HP branch July 11, 2017 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants