Graphical User Interface for Linear Array Simulations using FOCUS

Download the GUI

LinearArrayGUI.zip

FOCUS GUI

The purpose of this GUI is to introduce users of FOCUS to some of the capabilities of the software with rectangular linear array simulations.

To run the GUI, download the files above and add them to your MATLAB Current Directory. Once complete, simply type LinearArrayGUI into the MATLAB command line and a window that looks like Figure 1 will appear. Please note that the FOCUS software must be downloaded from the download page and included in the MATLAB path for the GUI to run.

Figure 1: Linear Array GUI

Once the GUI opens, choose a plot type from the Plot popup menu in the Options box and press the RUN button. A new window will open with your plot. The sections below will explain more about each plot type and the input parameters. Once you get a feel for the different plots types, feel free to adjust the various parameters as descried and view the results.

The CLOSE button will close the GUI and any open plot window.

Transducer Parameters

The first area for user defined inputs is the Transducer Parameters section in the upper left corner of the GUI. The value of the y coordinate for the focal point cannot be changed because it will always be zero for a linear array. To view the array defined by these parameters, choose the Linear Array option from the Plot popup menu. This plot option is only dependent on the values in the Transducer Parameters section of the GUI.

For more information on how the Linear Array is created please refer to create_rect_planar_array in the functions list.

The linear array created with the GUI default values is shown below in Figure 2.

Figure 2: Linear Array

Excitation Pulse

The inputs from the Excitation Pulse section are used in all the transient plot calculations. There are three excitation pulse options: type 1 - tone burst, type 2 - hanning weighted pulse, and type 3 - t cubed pulse. You have the option of viewing each pulse by choosing Excitation pulse from the Plot popup menu in the Options box.

Type 1 - Tone Burst is defined by the following equation:

A0*sin(2*pi*f0*t)

where A0 is the amplitude, which the GUI sets to 1, f0 is the center frequency, and t is the is time from the start of the pulse until the number of cycles specified has been completed. An example of the tone burst excitation pulse plotted with the default values can be seen in Figure 3.

Figure 3: Tone Burst Excitation Pulse

Pulse type 2 - The hanning weighted pulse is defined by the following equation:

A0*[1-cos(2*pi*t/w)]sin(2*pi*f0*t)

Here, f0 is the center frequency, w is the pulse width (number of cycles divided by the center frequency) A0 is the amplitude (set to 1) and finally, t is the time from the start of the pulse until the number of cycles specified has been completed. An example of the hanning weighted pulse plotted with the default values can be found in Figure 4.

Figure 4: Hanning Weighted Excitation Pulse

Pulse type 3 - The t cubed (t^3) pulse type is defined by the equation

A0*t^3*exp(-beta*t)sin(2*pi*f0*t)

Again A0 is the amplitude, f0 is the center frequency and t is time. This is the only excitation pulse to use beta. Figure 5 shows the t cubed excitation pulse plotted with the default values.

Figure 5: T Cubed Excitation Pulse

General Settings

The next area for user defined inputs is the General Settings section in the upper right corner of the GUI. This field only takes two inputs: the sampling frequency and speed of sound. The sampling frequency is only used in transient plot calculations. The speed of sound is used for all plot calculations to define the speed of sound that is traveling through a lossless medium.

for more information on the medium please refer to define_media in the functions list.

Calculation Position

The Calculation Position section of the GUI is crucial for all transient and continuous wave plot types. These input values are used to set up the coordinate grid to be passed to the main calculation function. In every plot calculation the Distance from Focus is used to set up the coordinate grid, while the x and z region of interest (ROI) range and increment use will vary from plot to plot. There is no option to adjust the y ROI range or increment because the y focal point can never change due to the array geometry.

For more information on the coordinate grids please refer to set_temporal_coordinate_grid and set_coordinate_grid in the functions list.

Options

Calculation

Currently the only option under the Calculate popup menu is for the Transmitted Pressure Field. This is calculated using the Fast Nearfield Method (FNM).

The Abscissas input is the precision of each space time coordinate and must be a positive integer value.

Plot Types

Figure 6 shows the different plot options that are available in the Plot popup menu. The Linear Array and Excitation Pulse options were already discussed in previous sections. Below is a brief description of the remaining plot types and the input variables used to calculate them.

Figure 6: Plot Options from Plot Popup Menu

Figure 7 shows the result of the Transient Field Image plot option using the default inputs. This option plots the image of the time on the vertical axis versus x on the horizontal axis. This plot utilizes the x ROI and increment, while the z ROI and increment are unused here.

Figure 7: Transient Field Image

Figure 8 shows the result of the CW Field Image plot option using the default inputs. This is a plot of the field image with z displayed on the vertical axis and x displayed on the horizontal axis. As expected, this plot type uses both the x and z ROI inputs and the x and z increments inputs.

Figure 8: CW Field Image

Figure 9 shows the result of the Transient Pressure Waveform plot option using the default inputs. This is a plot of the normalized pressure on the vertical scale versus time on the horizontal scale. For this plot both the x and z ROI inputs and the x and z increments are not used. This plot shows that pressure as a function of time at a particular point in space (as defined by the offset from the focal point).

Figure 9: Transient Pressure Waveform

Figure 10 shows the result of the CW Axial Waveform plot option using the default inputs. This is a plot of the normalized pressure on the vertical scale versus z on the horizontal scale. Therefore, the z ROI and the z increment are used while the x ROI is held to zero. A more detailed axial CW pressure plot is observed when the z ROI is set to the focal distance or even twice the focal distance. If you then calculate the CW field image with these new parameters, expect to wait a few minutes or so. Also, note that FOCUS has no difficulty computing the pressures adjacent to the array face.

Figure 10: CW Axial Waveform

Figure 11 shows the result of the Transient Lateral Beamplot (dB) plot option using the default inputs. Figure 12 shows the result of the Transient Lateral Beamplot (Linear) plot option using the default values. The only difference between the plots is the scale. Figure 11 plotted is on a dB scale, therefore, it is the same result as shown in Figure 12. This is a plot of the normalized intensity, or pressure squared, on the vertical scale versus x on the horizontal scale. Therefore, only the x ROI and the x increment are used in this plot.

Figure 11: Transient Lateral Beamplot - dB

Figure 12: Transient Lateral Beamplot - Linear

Figure 13 shows the result of the CW Lateral Beamplot (dB) plot option using the default inputs. Figure 14 shows the result of the CW Lateral Beamplot (Linear) plot option using the default values. The only difference between the plots is the scale. Figure 13 is on a dB scale, therefore, it is the same result as shown in Figure 14. This is a plot of the normalized intensity or pressure squared, on the vertical scale versus x on the horizontal scale. Therefore, only the x ROI and the x increment are used in this plot.

Figure 13: CW Lateral Beamplot - dB

Figure 14: CW Lateral Beamplot - Linear

Additional Information

If an input field is left blank or does not contain a valid numerical entry, the GUI will display the warning message shown below in Figure 15. In the GUI the input field with the invalid entry will be highlighted and changed to the default value. The GUI will continue to run without error using this default value.

Figure 15: Warning Message for Invalid Input

The HELP button will link back to this webpage. If you're questions aren't answered here please contact us.

Acknowledgements

This GUI was inspired by a similar GUI constructed by Kathy Nightingale at Duke University. With her permission (Thanks Kathy!), we have adapted many features of this GUI, which was originally designed for Field II, to work with FOCUS. Certain options were added and others were eliminated according to the corresponding features that are presently available in FOCUS. More features are added to FOCUS every month, so stay tuned.

The original Field II GUI is located here: http://www.duke.edu/web/ultrasnd/field_ii/field_ii_gui.html