Calculate splitting (sparky script)

From NMR Wiki

Revision as of 04:43, 27 April 2008 by Evgeny Fadeev (Talk | contribs)
Jump to: navigation, search

Contents

Usage

Open some 2D or 3D data file in sparky, select two peaks, type 'pd'. Splittings in Hz will be shown in a pop up window.

Installation

  • install code below into <path_to_sparky>/python/sparky/coupling.py
  • register script with 'pd' hotkeys in the sparky_site.py file by adding line shown below to the peak_menu array
('pd', 'Calculate coupling',        ('coupling','show_dialog')),

Macintosh

On Mac's sparky's default installation directory is

/Applications/Sparky.app/Contents/Resources/

so the script should go to directory

/Applications/Sparky.app/Contents/Resources/python/sparky

Bugs

Looks like this macro does not account for splitting sign correctly, this is most likely sparky issue - not something that can be fixed in this script.

Info window won't go away when "ok" button is clicked.

Code

Invalid language.

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, basic4gl, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp, cpp-qt, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml, ocaml-brief, oobas, oracle8, pascal, per, perl, php, php-brief, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80