This functionality has been incorporated into nmrview v5.0.x and later --- please contact me if you need scripts for earlier versions.

A nice feature of NMRView 4 is support for drawing overlays of multiple spectra within a single window.  By modifying some standard standard NMRView scripts and writing others, I've extended these capabilities to include:

  • independent modification of the appearance (lvl,clm,nlvl,color) of each spectra being shown in a spectral overlay; parameters can be saved and recalled for future use
  • easy propagation of (lvl,clm,nlvl,color) parameters throughout all cells of a multi-row/column window
  • plotting all overlaid spectra in a spectral window into one file

Use:

  • open several datasets and one spectral display window, as usual
  • open the Attributes window for the spectral display window, and add several of the datasets:


  • access the Overlay2D control window from the Misc menu in the Spectral Attributes window:


  • controls on the new window are fairly self-explanatory:


    • checkbuttons left of dataset name control whether dataset is drawn or not
    • lvl, clm, nlvl are as usual. Positive and negative control the color of positive and negative peaks, respectively.
    • "Change all levels by" allows one to simultaneously increase/decrease the lvl of all spectra by clicking with the up/down arrows to multiply/divide the lvls by the listed factor
    • "Redraw" redraws the current window (current cell of multi-row/column windows)
    • "Apply to all" applies the current drawing parameters to all cells of a multi-row/column window
    • File submenu allows the saving & retrieving of parameters for this window.  Note: parameters are read from/written to the file overlay_nmrview.parms in the current directory.  The parameters are also dependent on the name of the Spectral Display window --- be sure to call this window the same name on future invocations!
  • spectral overlays can be plotted as usual (Misc/Plot from the menu generated by pressing/releasing the right button over a spectrum).
Notes:
  • for redrawing/refreshing spectra, do not use nv_win -draw.  Instead call the procedure NvSpectrumDraw, potentially by using the hotkey d listed in user.tcl available from this site.

    current problems:
  • support for displaying multiple peaklists is in place, but not yet documented or easily accessible
  • zooming/moving around a spectrum using the nice "blue box" approach is currently disabled; however, the expand/previous view commands are fully functional, as are the numeric keypad hotkeys
  • currently, users can only change the colors of positive peaks through the window interface; it'll be easy to add the ability to change the color of negative peaks if I hear that this is of interest
  • something for the future: adding the ability to refocus the spectral window controlled by this interface by using mouse clicks, as with the standard NMRView spectral controls window.  Currently, the overlay control window must be manually invoked for each window with overlays in it.
  •