jjhelmus / nmrglue

A module for working with NMR data in Python
BSD 3-Clause "New" or "Revised" License
209 stars 86 forks source link

manual_ps syntax? #79

Closed bryanhanson closed 6 years ago

bryanhanson commented 6 years ago

Newbie here (to python and nmrglue). I'm trying to do manual, interactive phasing. I have a jupyter notebook running python3 and working. I have ipywidgets installed. If I do:

ng.process.proc_autophase.manual_ps(data)

I get an error stack ending in AttributeError: Unknown property axisbg but I do get a static plot. When I try:

ng.process.proc_autophase.manual_ps(data[,notebook = True])

based on https://nmrglue.readthedocs.io/en/latest/reference/proc_autophase.html, I get

    ng.process.proc_autophase.manual_ps(data[,notebook = True])
                                             ^
SyntaxError: invalid syntax

I've tried several variations, none of which satisfy the beast. As a newbie I'm not sure what else to document or attach, please be gentle. Any guidance appreciated.

EDIT: The code for the function on the master branch appears to use this syntax:

ng.process.proc_autophase.manual_ps(data,notebook = True)

but this gives the following complaint:

----> 1 ng.process.proc_autophase.manual_ps(data,notebook = True)

TypeError: manual_ps() got an unexpected keyword argument 'notebook'

I'm sure I must be doing something wrong, but I'm stuck. Thanks.

jjhelmus commented 6 years ago

@bryanhanson The correct syntax is ng.process.proc_autophase.manual_ps(data, notebook=True). To use this, you will need to install nmrglue from source as this functionality has not yet made it into a release.

bryanhanson commented 6 years ago

Thank you, that clarifies things. I will install from sources later and try again.