Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reading/writing HFSS Touchstone files using the 'power' S-param definition #869

Merged
merged 3 commits into from
Apr 1, 2023

Conversation

jhillairet
Copy link
Member

Fixes #804

  • If the s_def parameter is not explicitly passed (ie s_def=None), the assumption of power is delayed after have read the touchstone data.
  • If HFSS-generated, s_def is set to the default HFSS setting only if s_def has not been passed explicitly. Otherwise if uses the passed s_def

The following will work:

ntwk_orig = rf.Network('hfss_file.s1p') # HFSS generated file
self.assertEqual(ntwk_orig.s_def, S_DEF_HFSS_DEFAULT)
        
ntwk_orig = rf.Network('hfss_file.s1p', s_def='power') 
self.assertEqual(ntwk_orig.s_def, 'power')

where S_DEF_HFSS_DEFAULT is a new constant, currently defined as 'traveling' (while i'm still not sure about the real meaning of "Generalized" in HFSS...)

  • For writing a Touchstone file, it now assumes the user knows what he is doing and i've removed the s_def check/warning before writing a file. So now, importing a 'power' Touchstone file (passing s_def='power' when reading) and writing the Touchstone file should lead to same results.

@jhillairet jhillairet added fix Bug Fix IO Touchstone concerning Touchstone formats reading/writing HFSS labels Mar 30, 2023
@github-actions github-actions bot added Network and removed IO labels Mar 30, 2023
@jhillairet jhillairet requested a review from Ttl March 31, 2023 13:20
@jhillairet jhillairet merged commit 8ddc778 into scikit-rf:master Apr 1, 2023
@jhillairet jhillairet deleted the hfss_touchstone_pw branch April 1, 2023 18:04
@jhillairet jhillairet mentioned this pull request Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug Fix HFSS Network Touchstone concerning Touchstone formats reading/writing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

touchstone exported from hfss has power wave definition not only traveling wave.
3 participants