Import ASCII

Prev Next

In addition to its own reference file formats (.srf, .trf, and .ref), Smaart can import frequency-Domain data from ASCII text files stored in comma-delimited (.csv) or tab-delimited table formats. This is a handy feature for importing Spectrum or frequency response data from other programs, or creating target curves for Transfer Function or narrowband spectrum measurements (to create target curves for banded spectrum measurements see Target Curves). To import trace data from an ASCII text file, select Import ASCII from the data bar menu or File > Import > Import ASCII from the File menu. This opens the ASCII Import dialog.

The ASCII Import dialog.

You will be creating a regular spectrum or transfer function stored data trace and so you will need to specify FFT Size and Sample Rate. Together, these two things determine frequency spacing. The current active graph type determines the Trace Type.

The frequency spacing of data in the imported text file does not need to match the precise FFT bin frequencies for the FFT Size and Sample Rate that you select. Smaart will automatically interpolate the frequency points that it needs from whatever set of coordinates you supply, using Linear or cubic spline (B-Spline) interpolation. B-Spline is usually the better choice for real signals and smooth functions. Linear interpolation may work better for arbitrary curves with sharp corners. The Name field sets the name of the trace to be created.

To select an ASCII text file for import, click the Browse button to bring up the Load File dialog and then navigate to your source file and open it. At minimum, the text file to be imported needs to have at least two sets of frequency and Magnitude coordinates. Each set of coordinates occupies a line by itself with the frequency in Hertz in the first position, followed by a column separator character (a comma or tab) and a magnitude value in decibels. For transfer function traces, you can optionally add columns for Phase in degrees and coherence as a fractional value between 0 and 1. Smaart will ignore any line in the file beginning with an asterisk (*) or semicolon (;) so these may be used to add headings or comments to the file.

Once all parameters are set, click the Import button to import the data from the file. The ASCII Import dialog will close, a new data file is created in your session folder on the Data Bar, and your newly imported trace should appear on the active graph in the graph area.

Importing Meyer SIM® Data

To import transfer function data from Meyer SIM® data files using the Import ASCII function, first make sure the SIM binary (.bin) and .xml files that you want to import are in the same folder. Open the ASCII Import dialog, select SIM.bin in the FFT Size drop-list, then click the Browse button. Navigate to the folder containing the files and open the .bin file then click the Import button in the ASCII Import dialog.

Smaart will analyze each measurement group within the .bin file and extract room, processor, and resultant traces for each group as Smaart .trf files. For consistency with native Smaart transfer function data, coherence data extracted from SIM data files is square-rooted on import. To display coherence data in Smaart as magnitude-squared coherence, enable the squared coherence (Squared Coh) setting in Transfer Function measurement settings.