How do add multiple comment lines to a touchstone

9 views
Skip to first unread message

Nathan Baltz

unread,
Sep 13, 2021, 4:35:16 PMSep 13
to scikit-rf
Hi,
Does anyone know how to add multiple comment lines to a touchsonte?
In the API it shows this syntax to include comments into a network object ... 

So, something like this ... 

myRFnetwork = skrf.network(f=freq, s=S2p,comments=comment_list)
myRFnetwork.write_touchstone(fpath) 

This works to put the list into the network object, however, when I look at the
file it does not include the multiple lines of comments. 

Thanks, 
Nathan

Julien Hillairet

unread,
Sep 14, 2021, 2:17:51 AMSep 14
to scik...@googlegroups.com
Dear Nathan

Assuming ntwk is a Network, setting the comments as a multi-line string will work as you expect :

ntwk.comments = '''these are
comments in
multiple lines'''

ntwk.write_touchstone('test')

leads to the following header in the Touchstone test.s2p file :

!these are
!comments in
!multiple lines
!Created with skrf (http://scikit-rf.org).

Julien


--
You received this message because you are subscribed to the Google Groups "scikit-rf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-rf+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scikit-rf/b3023055-9284-4c8f-a33b-2627b1510f13n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages