File IO
Reading Touchstone Files
One of the easiest ways to get measured data into Marconi is with Touchstone files.
These files follow the standard enumerated here - a typical output format from simulation software and network analyzers.
Marconi currently doesn't support port impedance mapping (different port impedances) or noise parameters.
Reading these files into a Network object is straightforward
readTouchstone("BPF.s2p")2-Port Network
Z0 = 50.0
Frequency = 10.0 MHz to 5.0 GHz
Points = 236
Writing Touchstone Files
To save your work from Marconi, one can either work directly with the frequency and s_params from a DataNetwork or save directly to a Touchstone file with writeTouchstone
amp = readTouchstone("Amp.s2p")
bpf = readTouchstone("BPF.s2p")
system = cascade(bpf,amp)
writeTouchstone(system,"Cascade.s2p")As of this version, Marconi will write the touchstone file in Hz with S-Parameters in Real/Imaginary format as every software should in theory support all versions of the format. Format specifiers could come in a future release.