# s_wavelet_from_spectrum # On startup, the left subplot of the figure window shows the spectrum of the input data and a smoothed version of it. The right subplot shows a zero-phase wavelet with this smoothed spectrum. The left subplot can now be used to define a new wavelet spectrum by picking points --- with the left mouse button --- to outline the desired shape of the spectrum. A picked point can be deleted by clicking it with the right mouse button. With the default input arguments, zero spectral amplitudes at zero frequency and the Nyquist frequency are pre-selected. A wavelet with the spectrum so chosen can be computed by clicking the "Apply" menu button. The new wavelet is plotted in red on top of the existing one in the right subplot. Its actual spectrum is plotted as a solid red line in the left subplot. In general, the spectrum of the wavelet will not pass through the picked points. To improve the match one can increase the wavelet length by typing in a larger number in the text window in the lower right corner. To preserve symmetry the new wavelet length should be an even multiple of the sample interval. If it is not, the program will increase it automatically. The spectrum can also be improved by selectively adding new points and deleting existing ones in the left subplot and clicking on the "Apply" menu button again. When done either delete the figure window by clicking the "X" in its upper right corner or click on the "Done" menu button.