You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+71-2Lines changed: 71 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ This project originated as an exploration of the interactive possibilities that
5
5
6
6
**Note**: Some of the features are experimental. They might not function fully as expected or could be subject to changes in future versions.
7
7
8
+
**Note**: It is possible that currently there are too many keywords. Options are being considered to simplify some aspects.
9
+
8
10
**Note**: Certain visual details of the Smith Chart may require further refinement to enhance aesthetic and overall visual quality.
9
11
10
12
## Usage
@@ -37,9 +39,60 @@ DataInspector(fig)
37
39
fig
38
40
```
39
41
42
+
## Integration with Makie Utilities
43
+
44
+
This example showcases the seamless integration of the Smith chart with Makie.jl's interactive functionalities. It demonstrates a typical scenario used to teach impedance matching, where we aim to transform a source impedance of 1+2j to a load impedance of 1. To achieve this, we utilize a transmission line and a parallel stub, and control their lengths via sliders. By dynamically adjusting these lengths, users can observe how the source impedance seen by the load evolves on the Smith chart, visually illustrating the impedance matching process.
45
+
46
+
```julia
47
+
48
+
fig =Figure()
49
+
ax =SmithAxis(fig[1, 1], title ="Stub Matching")
50
+
51
+
Ri =1.0
52
+
Xi =2.0
53
+
zi = Ri + Xi*im
54
+
55
+
functionsimline(z, l)
56
+
bl =2*pi* l # Electrical length
57
+
return (z + im *tan(bl)) / (1+ im * z *tan(bl))
58
+
end
59
+
60
+
functionsimstub(z, l)
61
+
bl =2*pi* l
62
+
y_stub = im *tan(-bl)
63
+
return1/ ((1/ z) + y_stub)
64
+
end
65
+
66
+
N =101
67
+
sg =SliderGrid(
68
+
fig[2, 1],
69
+
(label ="Line", range =range(0.0, 0.5, 151), format ="{:.3f}λ", startvalue =0.0),
70
+
(label ="Stub", range =range(0.0, 0.5, 151), format ="{:.3f}λ", startvalue =0.0))
71
+
72
+
sliderobservables = [s.value for s in sg.sliders]
73
+
z =lift(sliderobservables...) do slvalues...
74
+
line_index, stub_index = [slvalues...]
75
+
line_p =range(0.0, line_index, N)
76
+
stub_p =range(0.0, stub_index, N)
77
+
z_line =simline.(zi, line_p)
78
+
z_stub =simstub.(z_line[end], stub_p)
79
+
return [zi; z_line; z_stub]
80
+
end
81
+
82
+
zend =lift(x->x[end], z)
83
+
smithscatter!(zi)
84
+
smithplot!(z)
85
+
smithscatter!(zend)
86
+
fig
87
+
```
88
+
89
+
90
+
## Plot Reflection Coefficientes
91
+
40
92

41
93
42
-
You can also draw reflection coefficients (S-parameters) with the `reflection = true` keyword.
94
+
You can also draw reflection data with the `reflection = true` keyword. This is useful, for example, when you want to visualize the S-parameters of a simulation or measurement.
In the folder Images there are examples of some keywords.
136
+
How some keywords modify visual aspects of the Smith Chart.
137
+
138
+
### Chart type and grid colors
139
+
140
+
It is possible to change the type of smith chart or modify the color of the grid or subgrid.
84
141
85
142

86
143
144
+
### Interior tick options
145
+
146
+
There are multiple keywords to modify the position of the ticks. Some of them are:
147
+
87
148

88
149
150
+
### Threshold keyword
151
+
152
+
`threshold` keyword controls the cut of the lines in the intersection with other arcs.
153
+
89
154

90
155
156
+
### Subgrid split
157
+
158
+
The `splitminor` keyword controls the number of cuts of a space between ticks when there is no zoom. See also `splitgrid` to control the split when zooming.
0 commit comments