Convert vdatb to sdatb to use analyzedrift?

66 views
Skip to first unread message

Michael Smith

unread,
Oct 11, 2022, 6:44:54 PM10/11/22
to VNA Tools
Hey there!

My error-corrected ECU Drift test data is being saved as vdatb which isn't compatible file format with analyzedrift.  How can I either a) save the data as sdatb from the error correction function in VNA Tools or batch convert the vdatb to sdatb or modify analyzedrift to use vdatb? Why did it save in this format when other times error corrected data is stored in sdatb?

Thanks!

Michael Smith

Michael Wollensack METAS

unread,
Nov 7, 2022, 7:57:25 AM11/7/22
to VNA Tools
Hi,

> batch convert the vdatb to sdatb

You could use the following IronPython script inside VNA Tools:

# Michael Wollensack METAS - 07.11.2022

import clr
clr.AddReference('System.Windows.Forms')
clr.AddReference('Metas.Vna.Tools')
from System.IO import Directory
from System.IO import DirectoryInfo
from System.IO import File
from System.IO import FileInfo
from System.IO import SearchOption
from System.Threading import Thread
from System.Windows.Forms import MessageBox
from Metas.Vna.Tools import Script

s = Script(RootPath)

inputdir  = RootPath + '\\SOLT_01_out'
outputdir = RootPath + '\\SOLT_01_out_sdatb'

di = DirectoryInfo(inputdir)
fis = di.GetFiles('*.vdatb', SearchOption.AllDirectories)
for fi in fis:
    print fi.FullName.replace(inputdir + '\\', '')
    fi2 = FileInfo(fi.FullName.replace(inputdir, outputdir).replace('.vdatb','.sdatb'))
    # Load Data (vdatb)
    d = s.LoadSParamData(fi.FullName)
    # Save Data (sdatb)
    fi2.Directory.Create()
    s.SaveSParamData(fi2.FullName, d)


> modify analyzedrift to use vdatb

modify the following line 

%% Load data d = dir([datadir '\*.sdatb']);

to

%% Load data d = dir([datadir '\*.vdatb']);

> Why did it save in this format when other times error corrected data is stored in sdatb?

I guess that you collected S-parameters and the switch terms at once. Then the raw data will be stored as vdatb.

Regards
Michael

Michael Smith

unread,
Nov 8, 2022, 10:18:15 AM11/8/22
to VNA Tools
thank you. modifying the analyzedrift script worked great!
Reply all
Reply to author
Forward
0 new messages