User Calibration File Format
When RF Radio Frequency: A generic term for radio-based technologies, operating between the Low Frequency range (30k Hz) and the Extra High Frequency range (300 GHz). Filter or IF Filter is selected in User Correction, the VSA reads an ASCII file to determine how to correct the measurement data. This file is typically generated based on measurements of an external device to compensate. The accepted file formats are .cal and .s2p for RF Filter files, and .cal for IF Filter files.
.cal file format (RF Filter and IF Filter)
The .cal file format consists of headers and data. The headers are shown in the example below and are case sensitive. Most are required; optional headers are discussed below.
The Y data represents insertion gain at specified frequencies. The Y array, by default, represents the real magnitude of the frequency response. The interpretation of the Y data can be changed by including one or both of the following headers after the line Trace Data:
- YComplex 1
- YFormat <format> where <format> may be RI, MA, or DB.
YComplex with a value of 1 indicates that the Y array is complex. In this case there should be two numbers on each line, separated by spaces or tabs (not commas). If there is no YComplex specification, or its value is 0, then the Y array is real and consists of one number to a line.
For cases where the data is complex the YFormat is interpreted as follows:
- YFormat RI (or no YFormat specification): Y data are real/imaginary pairs.
- YFormat MA: each pair represents absolute magnitude and angle in degrees.
- YFormat DB: each pair represents magnitude in decibels and angle in degrees.
For non-complex data, YFormat DB means each datum represents magnitude in decibels; any other format implies absolute magnitude. The frequencies are specified in one of two ways, described below. Correction factors between tabulated frequencies are derived by interpolation of the real (and possibly imaginary) equivalent. For frequencies outside the tabulated domain, the gain at the nearest frequency is used.
One way of specifying frequencies is by including a line containing only the character X , then listing frequencies (Hz) in ascending numerical order on succeeding lines. The list must have the same number of entries as the following Y data list.
Here is an excerpt from a file using this format. (In this example the Y data is interpreted as real magnitude in decibels.) This information cannot be cut and pasted, but a sample file can be found at "<Install Directory>\Help\Signals\calibration1.cal".
|
FileFormat UserCal-1.0 Trace Data |
Note that the X list need not contain equally spaced frequencies. If the frequencies are equally spaced, a more compact specification may be used. This format is illustrated below. The number after XDelta is the frequency spacing in Hz and the number after XStart specifies the frequency corresponding to the first gain listed under Y. The XDelta value must be positive. (In this example the Y data is complex, in real/imaginary format. The YFormat line could have been omitted).This information cannot be cut or pasted, but sample files can be found at "<Install Directory>\Help\Signals\calibration2.cal" and "<Install Directory>\Help\Signals\calibration3.cal". The data in file "calibration2" is in real and imaginary format. The data in file "calibration3" is in magnitude (dB) and phase (degrees) format.
|
FileFormat UserCal-1.0 |
Data and headers are delimited by tabs or spaces. Each line must end in <LF> or <CR><LF>. Header strings other than those specified above are ignored. Lines beginning with // are ignored, allowing comments to be inserted in the file. Numbers in the X and Y lists as well as the XDelta and XStart parameters must be in the following format:
[sign] [digits] [decimal point] [.digits] [ {d | D | e | E }[sign]digits]
Sign is either plus (+) or minus (-) and digits are one or more decimal digits. If no digits appear before the decimal point, at least one must appear after the decimal point. The decimal digits may be followed by an exponent, which consists of an introductory letter ( d, D, e, or E) and an optionally signed decimal integer. The decimal point should follow the Windows regional settings. In the US it is a period, in Europe it is typically a comma.
Some network analyzers, such as the Keysight 8753, can save data in ASCII form. Edit this file using an ASCII text editor such as Notepad to change it to one of the above formats.
.s2p file format (RF Filter only)
The .s2p file format is consistent with the SnP (Touchstone) file format specification. An example is shown below. See the Keysight SnP File Format page for more information.
See Also