Understanding File Formats
Real, complex, and string array data can be used with component parameters of type real array, complex array, or string array, respectively. Real array data can be used as input with the ReadFile component. Real, complex, floating-point (real) matrix, fixed matrix, complex matrix, and integer matrix can be used as output from the Printer component.
The following file format examples (real array data through complex matrix data), are drawn from the code and include the comment line # symbol.
Real Array Data
# Template for ADS Ptolemy real data # Each number separated by new lines 1 0 0
Complex Array Data
# Template for ADS Ptolemy complex data # Each complex value, (real, imag), separated by new lines (1.0, 0.0) (0.0, 0.0) (0.0, 0.0)
String Array Data
# Template for ADS Ptolemy string data # Each string value enclosed with double-quote marks "" and separated by new lines "text 1" "text 2" "text 3"
Real Matrix Data
# Template for ADS Ptolemy real matrix data # Each matrix data set separately listed with brackets around each row and matrix # Each matrix row separated by new lines [[ 1.2, -2, 2 ] [ -2, 2.25, -2 ]] [[ 2.5, -2.1, 3.2 ] [ -3.5, 2.4, -1.3 ]] [[ 2.2, -2.4, 3.8 ] [ -2.5, 2, -2.6 ]]
Fixed-Point Matrix Data
# Template for ADS Ptolemy fixed-point matrix data # Each matrix data set separately listed with brackets around each row and matrix # Each matrix row separated by new lines [[ 1.2, -2, 2 ] [ -2, 2.25, -2 ]] [[ 2.5, -2.1, 3.2 ] [ -3.5, 2.25, -1.25 ]] [[ 2.2, -2.5, 3.5 ] [ -2.5, 2, -2.5 ]]
Integer Matrix Data
# Template for ADS Ptolemy integer matrix data # Each matrix data set separately listed with brackets around each row and matrix # Each matrix row separated by new lines [[ 1 -2, 2 ] [ -2, 2, -2 ]] [[ 2, -2, 3 ] [ -3, 2, -1 ]] [[ 2, -2, 3 ] [ -2, 2, -2 ]]
Complex Matrix Data
# Template for ADS Ptolemy complex matrix data # Each matrix data set separately listed with brackets around each row and matrix # Each matrix row separated by new lines [[ 11.0+0.0j, 12.0+0.0j, 13.0+0.0j ] [ 21.0+0.0j, 22.0+0.0j, 23.0+0.0j ]]
SPW (.ascsig and .sig) File Formats
SPW format data files can be read by the system simulator by specifying them as input files in a TimedDataRead component. They can be written by the simulator by specifying them as output files in a TimedDataWrite component. The binary format .sig file has the same ASCII header information as the .ascsig file but data is stored as a pointer in binary format.
- The SPW version 3.0 data file format must be used.
- Comments can only be included on the one line following the $USER_COMMENT statement.
- The TimedDataRead source can read a real double-format or complex double-format SPW data file. To read an SPW format file, the appropriate .ascsig or .sig extension must be specified with the filename.
Real Double Data Format Example .ascsig File
$SIGNAL_FILE 9 $USER_COMMENT $COMMON_INFO SPW Version = 3.0 Sampling Frequency = 1 Starting Time = 0 $DATA_INFO Number of points = 6 Signal Type = Double $DATA 1.000000000000000000000 1.000000000000000000000 -1.000000000000000000000 -1.000000000000000000000 1.000000000000000000000 1.000000000000000000000 END
Complex double data format example .ascsig file
$SIGNAL_FILE 9 $USER_COMMENT $COMMON_INFO SPW Version = 3.0 Sampling Frequency = 1 Starting Time = 0 $DATA_INFO Number of points = 10 Signal Type = Double Complex Format = Real_Imag $DATA 1.000000000000000000000+j1.000000000000000000000 1.000000000000000000000+j1.000000000000000000000 -1.000000000000000000000+j1.000000000000000000000 -1.000000000000000000000+j1.000000000000000000000 1.000000000000000000000+j1.000000000000000000000 1.000000000000000000000+j1.000000000000000000000 -1.000000000000000000000+j1.000000000000000000000 -1.000000000000000000000+j1.000000000000000000000 -1.000000000000000000000+j1.000000000000000000000 -1.000000000000000000000+j1.000000000000000000000 END
Time-Domain Waveform Data (.tim) File, MDIF ASCII Format
The general . tim file format is:
BEGIN TIMEDATA # T ( SEC V R xx ) % t voltage <data line> . . . <data line> END
BINTIM Format
The BINTIM format (. bintim ) is for binary time-domain waveform data files. In .bintim files, the format is the same as .tim files, except the BEGIN line is preceded by a line indicating the number of data points, n:
NUMBER OF DATA n
The <data line> in a .bintim file is just a binary dump of all the waveform (time, voltage) data. Also, there is no END line.
| Note The .bintim format is not supported in the Data File Tool. However, certain signal processing components can read .bintim files. |
Guidelines for .tim files
An exclamation point ! at the beginning of a line signifies a comment line; characters that follow ! are ignored by the program.
TIMEDATA data block is required.
When the file reader reads a file, it renames the independent and dependent variable names regardless of the names specified in the file. The file reader reads the independent variable name as time, and the dependent variable name as voltage.
- The BEGIN statement:
BEGIN TIMEDATA ! Begin time-domain waveform data
- Option line:
# T ( time_unit data_unit R xx )
where
# = delimiter tells the program you are specifying these parameters.
T = time
time_unit = sets time units. Options are SEC, MSEC, USEC, NSEC, PSEC.
data_unit = Set the units for the voltage values. Options are:
V = volts
MV = millivolts
R xx = sets resistance, where xx = reference resistance. (default is 50.0) - Format line:
% time voltage
where
% = delimiter that tells the program you are specifying these parameters
In ADS, the syntax time and voltage in the Format line are arbitrary. These values can be whatever you prefer. For example, an option line such as:
% t mV
can be used. However, these values are converted to time and voltage by the file reader when the .tim file is imported, and these will be the variables appearing in a dataset (.ds) file.
- TIMEDATA data requirements are:
- A value for time=0 is not required.
- The signal is assumed to be time periodic with time period equal to maximum time minus minimum time.
Example .tim Files
BEGIN TIMEDATA
# T ( USEC V R 50 )
% time voltage
0.0 -1.0
2.0 1.0
4.0 2.0
8.0 3.0
10.0 3.0
14.0 0.0
18.0 -1.0
24.0 -2.0
28.0 0.0
32.0 -1.0
END
This example file results in a time periodic voltage versus time with time period 32 µsec, interpreted as a piece-wise linear voltage description.

The following example shows how to handle independent and dependent variable names when using a DataAccessComponent. This is useful since the file reader reads the independent variable name as time, and the dependent variable name as voltage, regardless of the names specified in the file. The following example data files shows the variable names specified as t and v:
BEGIN TIMEDATA
% t v
0 0
1e-011 0.00995017
2e-011 0.0198013
5e-011 0.0487706
1.4e-010 0.130642
4.1e-010 0.33635
1e-009 0.632121
END
Though the variable names are t and v, the file reader changes the names to time and voltage, requiring the following syntax for the DataAccessComponent:
DataAccessComponent Type=Time Domain Waveform (TIM MDIF) iVar1="time" iVal1=time VAR X=file{DAC1,"voltage"}
Agilent Standard Data Format (.dat) Files
The .dat file is a signal file form used with the 89400 and 89600 series of test instruments (vector modulation generators/analyzers). Refer to the Agilent Standard Data Format Utilities User's Guide, Agilent Part No. 5061-8056.
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()