The specified datfile must be a valid AVG format data file. Old versions (pre-15.0) are allowed. The specified newrun is the name of the run that will be created to store the converted data. The file name suffix .frm is appended to newrun, if not already present. If newrun is not specified, the name is taken from datfile, with the file name suffix .dat removed, and replaced by .frm. Note that the program does not check to see if a run of that name already exists - it will be silently overwritten.
The conversion involves writing a new run header, based on the data in the AVG file header, and writing out one frame, which has one trace for each of the channels stored in the AVG file. The sweep count from the AVG file header is recorded in the frame header. The calibration information is not set, as it cannot be obtained from the datfile.
The average's description text line, as well as the acquisition time and mode, are taken from the datfile's header, and are written out as the run description for the newrun (with the .txt suffix).