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

update forked #4

Merged
merged 64 commits into from
Apr 7, 2020
Merged

update forked #4

merged 64 commits into from
Apr 7, 2020

Conversation

JAnderson419
Copy link
Owner

No description provided.

jhillairet and others added 30 commits January 3, 2020 19:50
gives same results than ANSYS, but one test is failing. Need to correct doc equation as well.
but still same problem z <-> y
add the keyword argument rcond=None to np.linalg.lstsq function in order to suppress the FutureWarning occuring since numpy version 1.14.0
uses numpy asser_allclose method instead of pure == and set a absolute tolerance of 1e-3. This decrease in float values precision is due to the correction of power waves for complex char impedance.
Modified the z/y/s transformation function to deal with either power-waves (default) or pseudo-waves definition of the scattering parameter. A new parameter 's_definition' has also been added to the Network class to define the chosen definition. To be tested.
replaced @ operators with npy.matmul
Fixed file encoding for Python 2 compatibility
replaced @ with npy.matmul
…3.6 (?)

So I've increase a little bit the absolute tolerance from 1e-3 to 1.1e-3.
- renamed s_definition to s_def
- propagate s_def in Network.copy
- propagate s_def in Network.renormalize and rf.renormalize_s
- suppressed rf.renormalize_s_pw
- propagate s_def in calibration EightTerm.renormalize
- decrease absolute tolerance in calibration test (lower than before all these modifications)
-
- Modified `connect` to allow networks with frequency subsets
- Changed the `__getitem__` to avoid interpolation with explicit frequency indices.
- Updated the `__getitem__` to allow slicing using Frequency objects.
- Updated the subset slice to use a copy_subset function
The command did not set the name for the frequency extender without the
single quotation mark. Works now:

```
In [1]: from skrf.vi.vna import ZVA
In [2]: vna = ZVA(address='192.168.1.83', visa_library='@py', interface='SOCKET')
In [3]: vna.echo = 1
In [4]: vna.scpi.query_converter_name()
:SENS1:FREQ:CONV:DEV:NAME?
Out[4]: 'ZC220'
In [5]: vna.scpi.set_converter_name(1, 'ZC330')
:SENS1:FREQ:CONV:DEV:NAME 'ZC330'
In [6]: vna.scpi.query_converter_name()
:SENS1:FREQ:CONV:DEV:NAME?
Out[6]: 'ZC330'
```
- keep previous implementation (as s_def = 'traveling')
- add some test in s_def to raise ValueError is s_def is not set correctly
- add S_DEFINITIONS and S_DEF_DEFAULT constants into constant.py, in order to be able to easily change the s-param definition everywhere for sure
- added test in test_network for s parameter conversion when Network is created from Z or Y parameters directly
+add small real part on z0 in case of pure imaginary values to prevent numerical errors
+ add a related test case
This fixes:
[...]/skrf/io/touchstone.py in is_from_hfss(self)
    417         '''
    418         status = False
--> 419         if 'exported from hfss' in str.lower(self.comments):
    420             status = True
    421         return status

TypeError: descriptor 'lower' requires a 'str' object but received a 'NoneType'

... when comments is None. Return False instead.
ZVA: add missing single quotation mark for CONV name
is_from_hfss(): fix TypeError when comments is None.

Thank you.
Presently, Circuit algo works with complex impedance but give the same results that previous s-param implementation of scikit-rf, that is sort of "traveling" waves, but not power-waves. So changed doc to precise that z0 should be real to avoid confusion.
Fix bug in write_touchstone (Issue Number 325)
jhillairet and others added 29 commits January 30, 2020 21:31
Correct s-parameters calculations for complex characteristic impedance
- was made before in the work on complex z0, but disappear of the final changes... (?)
due to PR#289, the port order has changed in the reference networks used in Circuit tests
Suppress Numpy warning with lstsq in calibration.py
Integrates the content of PR proposal #289.
Fix few minor things related with equations too close from the text
since networkx is used in `Circuit`
All 1-port Network were previously filtered in the Circuit builder in order to filter out "port" Networks, which is obviously not correct if one has to deal with 1-port Network in the Circuit. Instead, now only 'port' Networks are sorted out, and 1-port Networks are kept. Also add new tests for various 1-port devices.
- Added Circuit tutorial and associated figures
- Added examples on matching from Pozar book (LC and stub)
- corrected reference in Time Domain
- use notebook image support in One Port Tiered Calibration.ipynb instead of IPython SVG
- Added svg file containing Network symbols
- fix missing os import in tutorial/Networks
Return kHz when network.frequency.unit = 'khz'
Fix bug associated to issue 341
The data from "simple_touchstone.s2p" now also checked for if the
correct S-parameter is returned.
In TouchStone 1.0 files, the data order for 2-port data is:
(11) (21) (12) (22)

while for a higher number of ports, the data is arranged as follows
(11) (12) (13) ... (1n)

This is now honored in the get_sparameter_data() function's return
values, if the filename ends on "s2p". The internal representation
of the class is unchanged.
@JAnderson419 JAnderson419 merged commit a43854f into JAnderson419:master Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants