Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions antennas/WEST_LH1_half.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# WEST LH1 antenna description
name = "Tore Supra/WEST C3/LH1 antenna (half)"
frequency = 3.7e9

# global description of the modules
[global]
# Number of modules per antenna in the poloidal direction.
nb_mod_theta = 1
# Number of modules per antenna in the toroidal direction.
nb_mod_phi = 8
# Position index of the modules in the followinf order:
# 1) toroidal direction (from low phi to high phi,
# ie. counter-clockwise when seen from above).
# 2) poloidal direction (from low theta to high theta,
# i.e. from bottom to top if the antenna is on LFS).
idx_mod = [1, 2, 3, 4, 5, 6, 7, 8]
# Spacing between toroidally neighboring modules [m]
spacing_btw_mod_phi = 0
# Spacing between poloidally neighboring modules [m]
spacing_btw_mod_theta = 0

# module description
[module]
# Number of waveguides per module in the toroidal direction. (passive and active)
nb_wg_phi = 6
# Number of waveguides per module in the poloidal direction. (passive and active)
nb_wg_theta = 3
# Mask of passive and active waveguides for an internal module
# 1 for active -- 0 for passive.
mask = [1, 1, 1, 1, 1, 1]
# Number of passive waveguide between modules in the toroidal direction.
nb_pwg_btw_mod_phi = 1
# Number of passive waveguides on each antenna edge in the toroidal direction.
nb_pwg_edge = 1
# Spacing between poloidally neighboring waveguides [m]
space_btw_wg_theta = 12e-3
# Height of waveguides in the poloidal direction [m]
wg_size_theta = 70e-3
# Width of active waveguides [m]
awg_size_phi = 8e-3
# Width of internal passive waveguides [m]
pwg_size_phi = 6.5e-3
# Width of edge passive waveguides [m]
pwg_size_edge_phi = 6.5e-3
# Thickness between waveguides in the toroidal direction [m]
e_phi = 2e-3 # between active waveguides
# Thicness between passive waveguides
e_phi_pwg = 3e-3
# Short circuit depth for passive waveguides in guided wavelegth
pwg_depth = [0.25]

[sparameters]
# modules C3
# La modelisation HFSS de l'antenne debute au voisinage du CM.
# Pour prendre en compte le dephasage entre la mesure de phase et le debut de la modelisation HFSS
# il faut calculer le dephasage necessaire :
# phase incident + phase rallonge + phase s12 HFSS = phase en bout
# soit :
# phase rallonge = dphi - phase s12 HFSS
# ou dphi est la correction (connue, cf. doc Annika) utilisee pour calculer la phase en bout
# a partir de la phase incidente.
#
# mesures relative au module 8B

# modules BAS
# -----------
# module correction dphi phase S12 HFSS
# 24b (= 8B) 0 166.4453
# 23b -5.5 -160.9112
# 22b 8 -135.2895
# 21b 14 -122.0280
# 14b 8.5 -116.1493
# 13b 20 -131.2212
# 12b 10 -139.8052
# 11b (= 1B) 20 -166.9180
# nom_fichiers = ['S_C3_24b';'S_C3_23b';'S_C3_22b';'S_C3_21b';'S_C3_14b';'S_C3_13b';'S_C3_12b';'S_C3_11b'];
# phase_rallonge = (pi/180)*[0-166.44; -5.5+160.9; 8+135.3; 14+122; 8.5+116.1; 20+131.2; 10+139.8; 20+166.9];
#
# modules HAUT
# -----------
# module correction dphi phase S12 HFSS
# 24h (= 8H) 17 168.6118
# 23h 11 -154.7044
# 22h 1 -129.9639
# 21h 15 -118.7455
# 14h 16 -113.2875
# 13h 22 -117.8509
# 12h 17 -132.5663
# 11h (= 1B) 15 -164.3341
#
# modules.Sparameters.SFileNames = ['S_C3_24h';'S_C3_23h';'S_C3_22h';'S_C3_21h';'S_C3_14h';'S_C3_13h';'S_C3_12h';'S_C3_11h'];
# phase_rallonge = (pi/180)*[17-168.6; 11+154.7; 1+130; 15+118.7; 16+113.3; 22+117.9; 17+132.6; 15+164.3];

filenames = ['S_C3_24b', 'S_C3_23b', 'S_C3_22b', 'S_C3_21b', 'S_C3_14b', 'S_C3_13b', 'S_C3_12b', 'S_C3_11b']

## Phase deembedding
# These parameters are the phase correction in order to take into account
# the transmission line length between phase measurement and S-matrix description.
# This is only usefull when using input data from experiments.
# modules.Sparameters.phase_deembedded = zeros(nma_phi,1);
# in degrees
phases_deembedded = [-166.44, 155.4, 143.3, 136, 124.6, 151.2, 149.8, 186.9]

# Antenna default power and phase excitations
[excitation]
# Default forward power for all modules [watt]
magnitudes = [1, 1, 1, 1, 1, 1, 1, 1]
# Default phase shifts for all modules [deg]
phases = [0, 90, 180, 270, 0, 90, 180, 270]
71 changes: 71 additions & 0 deletions antennas/simple_antenna.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 8 active Herewaveguides single row antenna
# Each waveguide is fed independantly,
# ie. each waveguide is an independant module.
name = "8 waveguides single row antenna"
frequency = 3.7e9

# global description of the modules
[global]
# Number of modules per antenna in the toroidal direction. (nma_phi)
nb_mod_phi = 8
# Number of modules per antenna in the poloidal direction. (nma_theta)
nb_mod_theta = 1
# Position index of the modules in the following order: (ima)
# 1) toroidal direction (from low phi to high phi,
# ie. counter-clockwise when seen from above).
# 2) poloidal direction (from low theta to high theta,
# i.e. from bottom to top if the antenna is on LFS).
idx_mod = [1, 2, 3, 4, 5, 6, 7, 8]
# Spacing between toroidally neighboring modules [m] (sm_phi)
spacing_btw_mod_phi = 0
# Spacing between poloidally neighboring modules [m] (sm_theta)
spacing_btw_mod_theta = 0

# module description
[module]
# Number of waveguides per module in the poloidal direction. (passive and active) (nmw_theta)
nb_wg_theta = 1
# Number of waveguides per module in the toroidal direction. (passive and active) (nmw_phi)
nb_wg_phi = 1
# Mask of passive and active waveguides for an internal module
# 1 for active -- 0 for passive.
mask = [1]
# Number of passive waveguide between modules in the toroidal direction. (npwbm_phi)
nb_pwg_btw_mod_phi = 0
# Number of passive waveguides on each antenna edge in the toroidal direction. (npwe_phi)
nb_pwg_edge = 1
# Spacing between poloidally neighboring waveguides [m] (sw_theta)
space_btw_wg_theta = 12e-3
# Height of waveguides in the poloidal direction [m] (hw_theta)
wg_size_theta = 70e-3
# Width of active waveguides [m] (bwa)
# if scalar, same thickness for all waveguides
awg_size_phi = 10e-3
# Width of internal passive waveguides [m] (biwp)
# if scalar, same thickness for all waveguides
pwg_size_phi = 8e-3
# Width of edge passive waveguides [m] (bewp)
# if scalar, same thickness for all waveguides
pwg_size_edge_phi = 8e-3
# Thickness between waveguides in the toroidal direction [m]
# if scalar, same thickness for all waveguides
e_phi = 2e-3
# Thickness between passive waveguides
e_phi_pwg = 3e-3
# Short circuit depth for passive waveguides in guided wavelegth
# if scalar, same value for all passive waveguides (scl)
pwg_depth = 0.25

# S-parameters description
[sparameters]
# S-parameters file for each module
filenames = ["S_elem", "S_elem", "S_elem", "S_elem", "S_elem", "S_elem", "S_elem", "S_elem"]
# Phase deembedding for each module inputs
phases_deembedded = [0, 0, 0, 0, 0, 0, 0, 0]

# Antenna default power and phase excitations
[excitation]
# Default forward power for all modules [watt]
magnitudes = [1, 1, 1, 1, 1, 1, 1, 1]
# Default phase shifts for all modules [deg]
phases = [0, 90, 180, 270, 0, 90, 180, 270]
18 changes: 17 additions & 1 deletion prek.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
[[repos]]
repo = "https://github.com/pre-commit/pre-commit-hooks"
rev = "v6.0.0"
hooks = [{ id = "check-yaml" }, { id = "end-of-file-fixer" }]
hooks = [
{ id = "trailing-whitespace" },
{ id = "check-yaml" },
{ id = "check-toml"},
{ id = "end-of-file-fixer" }
]

[[repos]]
repo = "https://github.com/astral-sh/ruff-pre-commit"
rev = "v0.15.0" # Ruff version.
hooks = [
# Run the linter.
{ id = "ruff-check", args = ["--fix"], types_or = ["python", "pyi"] },

# Run the formatter.
{ id = "ruff-format", types_or = ["python", "pyi"] },
]
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ build-backend = "uv_build"

[dependency-groups]
dev = [
"black>=26.3.1",
"prek>=0.3.6",
"ruff>=0.15.7",
{ include-group = "docs" },
Expand Down Expand Up @@ -67,4 +68,5 @@ line-ending = "auto"
testpaths = [
"src", "doc"
]
addopts = "--cov=aloha --ignore-glob='*.ipynb_checkpoints'"
# warning: coverage makes PyCharm not stop at breakpoints
addopts = "--ignore-glob='*.ipynb_checkpoints'"
3 changes: 2 additions & 1 deletion src/aloha/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from . import constants, waveguide
from . import antenna, constants, waveguide

__all__ = [
"constants",
"waveguide",
"antenna"
]
Loading
Loading