wrwin file [ window_name ] [ new_name ] [ filehandle ]
wrwin does all of the real work for saving spectral windows. As such, it is called with the appropriate arguments by wrall, wrw and save. Although there is nothing wrong with using wrwin, one of the above should handle most people's window saving needs.
The files written by wrwin may be read back in by rdwin.
The one required argument, file, tells wrwin the name of the file to save. It will be put in the first directory in the WINDIR variable.
By default window_name is the empty string (""), which tells wrwin to save the active window. If window_name is the full name of a window (e.g. .hnca.2), only that spectrum is saved. However, if window_name is the name of a parent window (e.g. .hnca, all of the spectral windows inside the frame will be saved.
The parameter new_name also defaults to the empty string. This is indicates that the name of the window in the save file should be the same as the one in the NMRView session. If new_name is specified, all occurences of the name of the parent window are replaced with new_name in the file. NOTE: This means that new_name should not have a "." in it. See the Examples section for proper usage.
filehandle is not intended for general use. If it is not the empty string, it must specify the name of a file descriptor that is open for writing. The information is written to that descriptor, instead of file. This was implemented to avoid duplication of the window writing code in the save was the only program making use of this feature.The filehandle should have been assigned by a call to open .... This is intended as a feature for allowing subsequent calls to wrwin to append to an existing file without having to close and re-open the file. If you don't know what this all means, don't use this feature.
wrwin hnca.win --> write the currently active window to hnca.win
wrwin hnca.win .hnca --> write all of the spectra inside the window .hnca to hnca.win
wrwin strip2.win .hnca strip --> write all of the spectra inside the window .hnca to strip2.win, renaming the parent window to .strip and all of the spectra to .strip.*
wrwin temp2.win "" temp2 --> write the currently active window to hnca.win
while renaming .hnca to .temp2wrwin doesnt_matter.win "" "" $handle --> write the currently active window to whatever filehandle is stored in the handle variable.
/hhmi/nv3/hhmi/wrwin.tcl