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 NetworkSet.write_mdif() method to export NetworkSet to a generalized MDIF file #680

Merged
merged 8 commits into from
Jun 17, 2022
Merged

Conversation

jrmagers
Copy link
Contributor

Also created an example:

scikit-rf/doc/source/examples/networksets/Export Network Set as MDIF File.ipynb

@github-actions github-actions bot added the Documentation Request/Improvement of the documentation label May 28, 2022
@jrmagers
Copy link
Contributor Author

jrmagers commented May 28, 2022

Is there a better location for __optionstring()? Also, I think my code formatter (black) automatically formatted the entire NetworkSet class. Not sure if that is an issue.

@jhillairet jhillairet added Improvements Improvements of existing feature NetworkSet labels May 29, 2022
@arsenovic
Copy link
Member

great addition! maybe the code formating can be split out somehow, or maybe it doesnt matter.
julien what do you think ?

@jhillairet
Copy link
Member

jhillairet commented May 29, 2022

great addition! maybe the code formating can be split out somehow, or maybe it doesnt matter. julien what do you think ?

Well, if it is possible, that would be easier to review.

@jrmagers
Copy link
Contributor Author

I will turn off black and resubmit the changes today.

@jrmagers jrmagers changed the title Add NetworkSet.write_mdif() method to export NetworkSet to a generalized zed MDIF file Add NetworkSet.write_mdif() method to export NetworkSet to a generalized MDIF file May 31, 2022
@jhillairet jhillairet added this to the v0.23.0 milestone Jun 4, 2022
- moved the writing logic into io.Mdif 
- added test writing/rereading MDIF files
- add the .params_values and .params_types convenient properties to NetworkSet
@github-actions github-actions bot added the IO label Jun 7, 2022
@jhillairet
Copy link
Member

oups sorry @jrmagers, I wished to push to my repo, but I pushed to yours instead, didn't know I could do that...

What I did is that I:

  • moved the writing logic into io.Mdif
  • added test writing/rereading MDIF files
  • auto guess the data type
  • values and data_types as optional arguments
  • add the .params_values and .params_types convenient properties to NetworkSet

- renamed from_networkset to write (more meaningfull)
- add timeout on notebook
- fix npy/np 
- fix swapping S21 and S12 when necessary
@jhillairet
Copy link
Member

  • renamed Mdif.from_networkset to Mdif.write (more meaningful I think)
  • add timeout on notebook
  • fix npy/np
  • fix swapping S21 and S12 when necessary. Yeah, fun fact, MDIF files can also swap those two!

@jhillairet jhillairet marked this pull request as ready for review June 7, 2022 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Request/Improvement of the documentation Improvements Improvements of existing feature IO NetworkSet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NetworkSet.from_mdif() fails if a comment appears after BEGIN ACDATA line in an MDIF file
3 participants