-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Add noise data to write_touchstone #906
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LFTM.
Eventually if you could add associated tests?
Yep, good idea, I'd be happy to add some tests. That made me notice it works fine with the file I used that had equal length scattering and noise parameters, but not with the noisy networks in the test folder that have different lengths. It looks to me that the original noise information is not stored in the network, only the interpolated data. Do we want write_touchstone() to use the interpolated data or find a way to maintain the original? Probably a separate issue, but noise interpolation in Network.n fails on skrf/tests/ntwk4_n.s2p because the lowest noise frequency is less than the lowest s frequency, even though this is allowed in the touchstone specification. It's probably good practice to avoid extrapolating outside of provided data, but could make some valid touchstone files more difficult to work with. |
I have no advice on this. Anyone? |
I decided it was best to only write the original data for now. That way measured data doesn't get mixed with interpolated data for example. Also added a test. |
Thanks ! |
Quick addition to write noise data to touchstone files as raised in #379. This follows the touchstone 1.1 specification. Tested by reading in the following transistor touchstone and writing out the test file.
LN300.s2p.txt
test.s2p.txt