Hello, I would like some suggestions on how to create a 3-D plot from mulitple data files. In my setup I measure a receive antenna using an HP 8510. The transmitter is stationary but the receive antenna is able to be positioned at different angles. For each angle we sweep the receive antenna in the azimuth axis. So for each azimuth sweep I generate a data file, and each new sweep I roll the antenna in the phi direction. I would like some suggestions on how I would write an application where the user could select the multiple data files and then plot the data in a 3-D plot generating an antenna pattern or some call a volumetric plot.
Let me know if I understand this correctly. After some acquisition you will be left with few files, let’s say file 1, file 2, file 3 and file 4.
Then you would like your user to select data from few of these files and plot them on 3D Plot? For example, get data from file 1, 2,4 and plot it on 3D graph…
Yes that is exactly what I must do. At the very beginning of the data file there is some header information that has details of the sweep, such as file name and the starting angle and the stop angle of the sweep and then the measured data follows. I thought if I knew how to open up a directory and then select multiple files and click OK the program would then open each file and read the antenna measurement data into an 3-D array and then plot the data in a 3-D plot.If anyone had some examples that would fantastic.
Attached are three vi's to get started with. AzElAntennaPattern generates a dipole antenna pattern (r = sin(theta)) in radius, elevation (theta), azimuth (phi) coordinates. It transforms the coordinates to Cartesian and puts every azimuth sweep into a new row in an array. This creates 3x 2D arrays, one for X, Y and Z, each row an azimuth sweep. These can then be plotted in a 3D parametric graph. Technically the parametric graph accepts spherical coordinates, but it won't draw axes or grids in spherical as far as I can tell. I'm sure it uses the normal spherical coordinates anyway, so best to transform to Cartesian yourself. DipoleWrite, generates azimuth sweep files and puts them into a folder you choose. Choose the folder by pressing the small folder icon before running it. AzElAntennaPatternFromFolder, shows how to read these files back in and plot them. If you post one of your files, I can help with a file reader.
Hi, thanks for the suggestions and example code it has helped tremendously. I have createad a large file that has three columns, phi, azimuth, and magnitude. Is it possible to generate a 3-D graph from this data file? I will attach the file.
Hello all, I wanted to follow up with my solution. The main vi that you need to run is volumetric_plot.vi. I have also included the data files in a zip file. The other vi's are supporting files. This may help someone in the future. joe