Maintain selections in lt --> Options window

59 views
Skip to first unread message

Romeo Cosimo Arrigo Dubini

unread,
Jan 20, 2021, 8:12:26 AM1/20/21
to NMR SPARKY USER GROUP
Dear Sparky community,

My issue concerns exporting a number of .list files using the lt dialog.

Let's assume I have 100 spectra (a relaxation series). All are in .ucsf format and correctly displayed in sparky. The first thing I'd do is assign one of the spectra:
Fig1Sparky.PNG
Once the spectra is assigned, I open the lt dialog and the following is displayed:
Fig2Sparky.PNG
This information per se is not sufficient: I'd like to have other info about the peaks, so I click on "Options" and in addition to the default selection, I manually select "Frequency (Hz)", "Data Height" and "Signal / Noise", as below:
Fig3Sparky.PNG
I click apply, and the new information is correctly displayed, containing 3 new columns reporting on the selection. Now, I wish to obtain the same exact information for all other 99 spectra. So, I do "pa" (select all peaks and ornaments) on the first (manually assigned) spectrum, I click on the second spectrum and I do "op" (ornament paste) and "pc" to center all the peaks. At this point, ideally, when opening "lt" I would like to have the 5 entries already selected (as in the figure above), but instead I find:
Fig5Sparky.PNG
which forces me to manually re-select the additional "Frequency (Hz)", "Data Height" and "Signal / Noise" entries.

Is there any way to force sparky to have those entries always pre-selected, so that when copy-pasting assignment and ornaments one could save the .list files straight away once opening "lt"?

Thank you in advance and long live Sparky!

Lee, Woonghee

unread,
Jan 20, 2021, 8:59:55 AM1/20/21
to Romeo Cosimo Arrigo Dubini, NMR SPARKY USER GROUP

Dear Romeo,

 

You are placing peaks at the same position on different spectra and the peak list setting is different thing. If that changes the peak list setting when copy and paste over different spectra is performed, it will confuse the user. While you have so many spectra, it will be a lot easier to just use a simple script.

 

If you have a version that has “Load Module” button in the python shell (py), it is a lot easier to load and run the script.

I have written some script for you that you can just load and run.

 

1 Check the attached file. Download somewhere in your computer.

2. In NMRFAM-SPARKY, type “py” and see you have “Load Module”. If not, upgrade.

3. Click “Load Module” and select the “tga.py”

4. Check your source spectrum is currently selected (with – selected mark on the window top border)

5. Type in the python shell.

      >>> tga.tga(s)

 

You should have .list files in the spectrum directory.

 

Best,

Woonghee

 

--

Woonghee Lee, I.E.I.P., M.S., Ph.D.

 

Assistant Professor

Department of Chemistry

University of Colorado Denver

1151 Arapahoe St. (Science Bldg.) Rm 4128A

Denver, CO 80217-3364, USA

woongh...@ucdenver.edu

https://sites.google.com/view/wlee-group 

https://clas.ucdenver.edu/chemistry/woonghee-lee

 

Shipping/Mailing Address:

Woonghee Lee

1201 5th St. UCD CHEM-194

P.O. Box 173364 (USPS)

Denver, CO 80204, USA

 

From: <nmr-s...@googlegroups.com> on behalf of Romeo Cosimo Arrigo Dubini <romeod...@gmail.com>
Date: Wednesday, January 20, 2021 at 6:12 AM
To: NMR SPARKY USER GROUP <nmr-s...@googlegroups.com>
Subject: [NMR-SPARKY] Maintain selections in lt --> Options window

 

Dear Sparky community,

My issue concerns exporting a number of .list files using the lt dialog.

 

Let's assume I have 100 spectra (a relaxation series). All are in .ucsf format and correctly displayed in sparky. The first thing I'd do is assign one of the spectra:

Once the spectra is assigned, I open the lt dialog and the following is displayed:

This information per se is not sufficient: I'd like to have other info about the peaks, so I click on "Options" and in addition to the default selection, I manually select "Frequency (Hz)", "Data Height" and "Signal / Noise", as below:

I click apply, and the new information is correctly displayed, containing 3 new columns reporting on the selection. Now, I wish to obtain the same exact information for all other 99 spectra. So, I do "pa" (select all peaks and ornaments) on the first (manually assigned) spectrum, I click on the second spectrum and I do "op" (ornament paste) and "pc" to center all the peaks. At this point, ideally, when opening "lt" I would like to have the 5 entries already selected (as in the figure above), but instead I find:

which forces me to manually re-select the additional "Frequency (Hz)", "Data Height" and "Signal / Noise" entries.

 

Is there any way to force sparky to have those entries always pre-selected, so that when copy-pasting assignment and ornaments one could save the .list files straight away once opening "lt"?

 

Thank you in advance and long live Sparky!

--
You received this message because you are subscribed to the Google Groups "NMR SPARKY USER GROUP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nmr-sparky+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nmr-sparky/aff7bfb5-e2b9-4c90-a639-1c7b6e401c6fn%40googlegroups.com.

Lee, Woonghee

unread,
Jan 20, 2021, 9:01:07 AM1/20/21
to Romeo Cosimo Arrigo Dubini, NMR SPARKY USER GROUP

Here is the script.

 

--

Woonghee Lee, I.E.I.P., M.S., Ph.D.

 

Assistant Professor

Department of Chemistry

University of Colorado Denver

1151 Arapahoe St. (Science Bldg.) Rm 4128A

Denver, CO 80217-3364, USA

woongh...@ucdenver.edu

https://sites.google.com/view/wlee-group 

https://clas.ucdenver.edu/chemistry/woonghee-lee

 

Shipping/Mailing Address:

Woonghee Lee

1201 5th St. UCD CHEM-194

P.O. Box 173364 (USPS)

Denver, CO 80204, USA

 

tga.py

Lee, Woonghee

unread,
Jan 20, 2021, 9:17:21 AM1/20/21
to Romeo Cosimo Arrigo Dubini, NMR SPARKY USER GROUP

It is my bad.

You should type:

 

>>> tga.tpa(s)

 

It is very early morning here.

 

Woonghee

 

--

Woonghee Lee, I.E.I.P., M.S., Ph.D.

 

Assistant Professor

Department of Chemistry

University of Colorado Denver

1151 Arapahoe St. (Science Bldg.) Rm 4128A

Denver, CO 80217-3364, USA

woongh...@ucdenver.edu

https://sites.google.com/view/wlee-group 

https://clas.ucdenver.edu/chemistry/woonghee-lee

 

Shipping/Mailing Address:

Woonghee Lee

1201 5th St. UCD CHEM-194

P.O. Box 173364 (USPS)

Denver, CO 80204, USA

 

Romeo Cosimo Arrigo Dubini

unread,
Jan 20, 2021, 9:22:20 AM1/20/21
to NMR SPARKY USER GROUP
Dear Woonghee,

It worked like a charm! Many thanks for your help and the prompt response, it is very much appreciated!

Romeo

Lee, Woonghee

unread,
Jan 20, 2021, 9:25:26 AM1/20/21
to Romeo Cosimo Arrigo Dubini, NMR SPARKY USER GROUP
Glad to hear that.
I will put out the POKY suite that will be an ultimate tool in this year and this kind of works will be a lot easier. Please stay tuned.

Woonghee


From: nmr-s...@googlegroups.com <nmr-s...@googlegroups.com> on behalf of Romeo Cosimo Arrigo Dubini <romeod...@gmail.com>
Sent: Wednesday, January 20, 2021 7:22:20 AM

To: NMR SPARKY USER GROUP <nmr-s...@googlegroups.com>

Romeo Cosimo Arrigo Dubini

unread,
Feb 13, 2021, 10:41:27 AM2/13/21
to NMR POKY/SPARKY USER GROUP
Dear Woonghee,

It looks like I'm running into a problem, but I am not really sure what I'm doing wrong!

The script seems to only work with the first spectrum and outputs the following:
 >>> tga.tpa(s)
Traceback (most recent call last):
  File "C:\Users\Romeo C. A. Dubini\Sparky_new\nmrfam-sparky-win32\nmrfam-sparky-win32\python\sparky\pythonshell.py", line 186, in execute_command
    result = eval(c, dict, dict)
  File "<stdin>", line 1, in <module>
  File "C:/Users/Romeo C. A. Dubini/Downloads\tga.py", line 39, in tpa
    peak2.assign(0, tasn[0][0], tasn[0][1])
TypeError: 'NoneType' object has no attribute '__getitem__'

I tried to open and close sparky and re-upload the spectra, but I couldn't get it to work. Any idea of what could be going wrong?

As always, thanks a lot!

Romeo

Lee, Woonghee

unread,
Feb 13, 2021, 10:44:56 AM2/13/21
to Romeo Cosimo Arrigo Dubini, NMR POKY/SPARKY USER GROUP

Dear Romeo,

 

Your assignment of that peak is not in the recognizable format.

It must be,

 

[Single-letter-a.a.][Number][Atom] for all dimensions.

 

Check if you have something different in that spectrum.

Image removed by sender.

Once the spectra is assigned, I open the lt dialog and the following is displayed:

Image removed by sender.

This information per se is not sufficient: I'd like to have other info about the peaks, so I click on "Options" and in addition to the default selection, I manually select "Frequency (Hz)", "Data Height" and "Signal / Noise", as below:

Image removed by sender.

I click apply, and the new information is correctly displayed, containing 3 new columns reporting on the selection. Now, I wish to obtain the same exact information for all other 99 spectra. So, I do "pa" (select all peaks and ornaments) on the first (manually assigned) spectrum, I click on the second spectrum and I do "op" (ornament paste) and "pc" to center all the peaks. At this point, ideally, when opening "lt" I would like to have the 5 entries already selected (as in the figure above), but instead I find:

Image removed by sender.

which forces me to manually re-select the additional "Frequency (Hz)", "Data Height" and "Signal / Noise" entries.

 

Is there any way to force sparky to have those entries always pre-selected, so that when copy-pasting assignment and ornaments one could save the .list files straight away once opening "lt"?

 

Thank you in advance and long live Sparky!

--
You received this message because you are subscribed to the Google Groups "NMR SPARKY USER GROUP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nmr-sparky+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nmr-sparky/aff7bfb5-e2b9-4c90-a639-1c7b6e401c6fn%40googlegroups.com.


--
You received this message because you are subscribed to the Google Groups "NMR SPARKY USER GROUP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nmr-sparky+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "NMR SPARKY USER GROUP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nmr-sparky+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "NMR POKY/SPARKY USER GROUP" group.


To unsubscribe from this group and stop receiving emails from it, send an email to nmr-sparky+...@googlegroups.com.

Romeo Cosimo Arrigo Dubini

unread,
Feb 13, 2021, 11:09:12 AM2/13/21
to NMR POKY/SPARKY USER GROUP
Thank you, it indeed solved the issue! 

Romeo
Reply all
Reply to author
Forward
0 new messages