%%Help data Load R ------- This loads the reflection coefficient. The file should be either a .mat file or a text file with two or three columns. Alternatively, the file may be a one column .mat file created by the "Save R" command. The file should be named basename.* where * is mat or dat or something like that. A text file should contain a list of frequencies in the first column along with values of the complex reflection coefficient at that frequency in the second column. Alternatively, the second and third columns can contain the real and imaginary parts of the reflection coefficient, respectively. A corresponding .mat file should load a single variable into the workspace. The variable's name should be the same as the basename of the file. The variable should be a matrix with two or three columns,with the same format as in the description of the text file above. If the list of frequencies are all positive, the negative frequencies are added along with the complex conjugates of the reflection coefficients. The missing lowbands and highbands are filled in with zero reflection coefficients. The step takes a while because the reflection coefficient is interpolated to a special grid for use in the program. Save R ------- This saves the current reflection coefficient as a .mat file. If you then load the file you get a single column vector which represents the complex values of the reflection coefficient at the frequencies generated by the command w= makefrequencies(length(R)); (assuming the file was named R.mat). You may reload this file using the Load command. Load A ------- Load a vector which contains the values of alpha on intervals of length "Stepsize". Make sure you set the "Input Formula for Alpha" box to "screen" in order to use this alpha. Save A ------- Save the values of alpha which appear in the alpha plot as a vector. The stepsize doesn't get saved. Stop ----- Abort layerstripping calculation. fill in alpha =0 for the remaining depth. Grid ---- Impose a grid on the two plots. Hold A ------- Hold current plot of alpha. Next plot of alpha doesn't erase the previous one. Useful if you want to see how well an alpha is reconstructed from its scattering data. Hold R ------- Hold current plot of R. Next plot of R doesn't erase the previous one. Doesn't work so well but can be useful if you want to check a test case. Alpha2R --------- Compute R from the alpha which appears in the Alpha plot. R2Alpha ------- Compute Alpha from the R which appears in the Reflection Coefficient plot via layer stripping. Energy0 ------- This box shows the energy = \int_-\infty^\infty\log(1-\vert r\vert^2)dw of the reflection coefficient. As soon as layerstripping starts, it is replaced by the energy of the causal part of r. Energy ------- This box shows the energy of the reflection coefficient r(x,w) at depth x, where x is the current depth of the layerstripping calcualtion. Stepsize -------- How big a discreet layerstripping step to take. Don't take it too small without using enough DFT points or you will get spurious oscillations. Depth ----- How far down to go before quitting layerstripping DFT points ----------- The layer stripping algorithm is based on a nonlinear hilbert transform which is based on a linear hilbert transform which uses a DFT. More points is better but slower. For refletion coefficients which get pretty close to one over a broad band, you may need to use more DFT points. w scale factor -------------- This changes r(w) to r(w/scale). You may find that adjusting it before loading a reflection coefficient gives a better looking interpolation for r and hence a better reconstruction of alpha. As in a fourier transform, the reconstructed alpha will change from alpha(x) to alpha(x*scale)*scale Input Formula for R -------------------- Enter a formula for R. You must use the letter w for the frequency. Hit return while in this box to make the change in R effective and replot. It is sometimes (system dependent) necessary to make a change in the formula to make it effective, i.e you may have to delete something and then type it back in before hitting return to make the chage effective . Input Formula for Alpha ------------------------ Enter a formula for Alpha. When you hit return or click outside the box, this formula is plotted in the Alpha plot and hence becomes the new Alpha for subsequent commands. The R-Plot popup ---------------- Choose between viewing the modulus of R or its real and imaginary parts. Viewing the real and imaginary parts is frequently more revealing. The Linear/Nonlinear Popup --------------------------- If linear is selected, both Alpha2R and R2Alpha implement linear scattering and inverse scattering, i.e. the Born approximation, which is just the Fourier transform between L^2(R^+) and H^2(C^+). Nonlinear implements the full nonlinear layerstripping algortihms. The Payley-Weiner Popup ----------------------- According to the nonlinear P-W theorem in [S-W 2], the width and depth of alpha are equal to the depths of the inverse fourier transforms of r/(1-r^2) and 1/(1-r^2), respectively. Choosing one of the alternatives in the popup plots that function instead of r. The function in the plot is always the input to the next Alpha2R instruction. If you select nonlinear, then Alpha2R, then linear, r/(1-r^2), and R2alpha,you will be checking one of the nonlinear payley weiner theorems. The Bandwidth Button -------------------- If you want to test how the reconstruction degrades when you lose high or low frequencies, click the button. The cursor becomes a crosshair. Move the crosshair over the reflection coefficient plot and select the frequency range to keep. Only the horizontal coordinate of the crosshairs matters. Select positive frequencies. First the low and then the high. Clicking the Bandwidth button and hitting the Return key will reset the bandwidth. Clicking the Bandwidth button, then clicking once and hitting return truncates high frequencies. The Smoothing Popup --- excluded, but still in the program ---- ------------------ When off, it does nothing, when on, it smooths R during the layerstripping by averaging with the nearest neighbors. This usually degrades the reconstruction, but can be useful when R is very close to one on a set of appreciable measure. Without smoothing, noise can drive R over one and this must lead to blow up.