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

Add TUG multiline TRL and a method to compute switch terms indirectly #929

Merged
merged 6 commits into from
Jul 18, 2023

Conversation

ZiadHatab
Copy link
Contributor

Hi!

I have included my multiline TRL method. In the attached file, you will find test code using both measurements and synthetic data I copied from this example. The plots below show the Monte Carlo test I performed with additive noise.

I did not adopt the structure of the NISTMultilineTRL with regard to inputs. In my case, you pass the line measurements and reflect measurements in different variables. Also, in my case, you can run the code without reflect measurements if only the propagation constant and S21 and S12 of the calibrated DUT are relevant. The mathematical details of the calibration procedure can be found here.

Also, I have included a method to compute the switch terms using reciprocal devices without prior calibration of the VNA. Tests are included in attached file. You can read more about the math behind this here.

error_terms_multiplicative_noise

dut_white_noise

PR_tests.zip

@Ttl
Copy link
Collaborator

Ttl commented Jul 4, 2023

Code looks good but it needs tests (for both TRL and switch term solving). See here for NISTMultilineTRL tests. A notebook similar to NISTMultilineTRL that would show how it's used and its advantages would be also welcome though not absolutely necessary.

@ZiadHatab
Copy link
Contributor Author

I didn't know about the test. I will adapt the ones made for NISTMultilineTRL.

Regarding the notebook, do you think I should rewrite the current notebook to include both multiline TRLs with comparison, or add a new notebook?

@jhillairet
Copy link
Member

Regarding the notebook, do you think I should rewrite the current notebook to include both multiline TRLs with comparison, or add a new notebook?

If your can use the same data from the multiline TRLs, I would suggest to add a new section in the same notebook explaining your method and showing the results. If you can't use the same data for any reason, I would suggest to create a dedicated notebook.

@ZiadHatab
Copy link
Contributor Author

yes, I can use the same data. I already was using the same data in the test files I attached when I opened this PR.

@github-actions github-actions bot added the Documentation Request/Improvement of the documentation label Jul 6, 2023
skrf/calibration/calibration.py Outdated Show resolved Hide resolved
doc/source/examples/metrology/Multiline TRL.ipynb Outdated Show resolved Hide resolved
skrf/calibration/calibration.py Outdated Show resolved Hide resolved
skrf/calibration/calibration.py Outdated Show resolved Hide resolved
Copy link
Member

@jhillairet jhillairet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition, thanks. I've just added some details in the docs.

skrf/calibration/calibration.py Show resolved Hide resolved
skrf/calibration/calibration.py Show resolved Hide resolved
@jhillairet jhillairet merged commit bb1c7b2 into scikit-rf:master Jul 18, 2023
11 checks passed
@jhillairet
Copy link
Member

Thank you @ZiadHatab .

I found your blog posts also very good, nice work. If you want, you could eventually consider adding some advanced tutorials on the scikit-rf doc ;) Open-access litterature on calibration maths and switch terms are rare.

@jhillairet jhillairet mentioned this pull request Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Calibration Documentation Request/Improvement of the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants