Skip to content

API Reference

siphotonics.effective_index

siphotonics.effective_index.grad_neff(width, wavelength)

Gets derivatives of Effective Index at funcdamental mode with respect to waveguide width and wavelength.

Parameters:

Name Type Description Default
width float

Waveguide width in microns. (0.25 - 0.7)

required
wavelength float

Wavelength in microns. (1.2 - 1.7)

required

Returns:

Type Description
tuple[float, float]

Tuple of derivatives of Effective Index at fundamental mode with respect to waveguide width and wavelength.

Examples:

>>> grad_neff(0.5, 1.5)
(0.0, 0.0)
>>> grad_neff([0.5, 0.6], [1.5, 1.6])
(array([0., 0.]), array([0., 0.]))
Source code in siphotonics/effective_index.py
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
@jit
def grad_neff(width: float, wavelength: float) -> tuple[float, float]:
    """
    Gets derivatives of Effective Index at funcdamental mode with respect to waveguide width and
    wavelength.

    Args:
        width (float): Waveguide width in microns. (0.25 - 0.7)
        wavelength (float): Wavelength in microns. (1.2 - 1.7)

    Returns:
        Tuple of derivatives of Effective Index at fundamental mode with respect to waveguide width and wavelength.

    Examples:
        >>> grad_neff(0.5, 1.5)
        (0.0, 0.0)

        >>> grad_neff([0.5, 0.6], [1.5, 1.6])
        (array([0., 0.]), array([0., 0.]))
    """
    return fastmath.grad(neff, (0, 1))(width, wavelength)

siphotonics.effective_index.neff(width, wavelength)

Gets Effective Index value by using corresponding parameters. This is a JAX compatible function. JIT is enabled.

Parameters:

Name Type Description Default
width float

Waveguide width in microns. (0.24 - 0.7) Scalar or list

required
wavelength float

Wavelength in microns. (1.2 - 1.7) Scalar or list

required

Returns:

Type Description
float | list[float]

Effective Index value(s).

Examples:

>>> neff(0.5, 1.5)
2.0
>>> neff([0.5, 0.6], [1.5, 1.6])
[2.0, 2.1]
>>> neff(0.5, [1.5, 1.6])
[2.0, 2.1]
Source code in siphotonics/effective_index.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@jit
def neff(width: float, wavelength: float) -> float | list[float]:
    """
    Gets Effective Index value by using corresponding parameters. This is
    a JAX compatible function. JIT is enabled.

    Args:
        width (float): Waveguide width in microns. (0.24 - 0.7) Scalar or list
        wavelength (float): Wavelength in microns. (1.2 - 1.7) Scalar or list

    Returns:
        Effective Index value(s).

    Examples:
        >>> neff(0.5, 1.5)
        2.0

        >>> neff([0.5, 0.6], [1.5, 1.6])
        [2.0, 2.1]

        >>> neff(0.5, [1.5, 1.6])
        [2.0, 2.1]
    """
    return ndimage.map_coordinates(
        neff_data,
        [
            (wavelength - wav_min) * ((wav_size - 1) / (wav_max - wav_min)),
            (width - width_min) * ((width_size - 1) / (width_max - width_min)),
        ],
        order=1,
    )

siphotonics.effective_index.neff_te0(width, wavelength)

Gets Effective Index value of TE0 by using corresponding parameters. This is a JAX compatible function. JIT is enabled.

Parameters:

Name Type Description Default
width float

Waveguide width in microns. (0.24 - 0.7) Scalar or list

required
wavelength float

Wavelength in microns. (1.2 - 1.7) Scalar or list

required

Returns:

Type Description
float | list[float]

Effective Index value(s).

Source code in siphotonics/effective_index.py
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@jit
def neff_te0(width: float, wavelength: float) -> float | list[float]:
    """
    Gets Effective Index value  of TE0 by using corresponding parameters. This is
    a JAX compatible function. JIT is enabled.

    Args:
        width (float): Waveguide width in microns. (0.24 - 0.7) Scalar or list
        wavelength (float): Wavelength in microns. (1.2 - 1.7) Scalar or list

    Returns:
        Effective Index value(s).
    """
    return ndimage.map_coordinates(
        effective_index_te0,
        [
            (width - width_min) * ((width_size - 1) / (width_max - width_min)),
            (wavelength - wav_min) * ((wav_size - 1) / (wav_max - wav_min)),
        ],
        order=1,
    )

siphotonics.effective_index.neff_te1(width, wavelength)

Gets Effective Index value of TE1 by using corresponding parameters. This is a JAX compatible function. JIT is enabled.

Parameters:

Name Type Description Default
width float

Waveguide width in microns. (0.24 - 0.7) Scalar or list

required
wavelength float

Wavelength in microns. (1.2 - 1.7) Scalar or list

required

Returns:

Type Description
float | list[float]

Effective Index value(s).

Source code in siphotonics/effective_index.py
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
@jit
def neff_te1(width: float, wavelength: float) -> float | list[float]:
    """
    Gets Effective Index value  of TE1 by using corresponding parameters. This is
    a JAX compatible function. JIT is enabled.

    Args:
        width (float): Waveguide width in microns. (0.24 - 0.7) Scalar or list
        wavelength (float): Wavelength in microns. (1.2 - 1.7) Scalar or list

    Returns:
        Effective Index value(s).
    """
    return ndimage.map_coordinates(
        effective_index_te1,
        [
            (width - width_min) * ((width_size - 1) / (width_max - width_min)),
            (wavelength - wav_min) * ((wav_size - 1) / (wav_max - wav_min)),
        ],
        order=1,
    )

siphotonics.effective_index.neff_te2(width, wavelength)

Gets Effective Index value of TE2 by using corresponding parameters. This is a JAX compatible function. JIT is enabled.

Parameters:

Name Type Description Default
width float

Waveguide width in microns. (0.24 - 0.7) Scalar or list

required
wavelength float

Wavelength in microns. (1.2 - 1.7) Scalar or list

required

Returns:

Type Description
float | list[float]

Effective Index value(s).

Source code in siphotonics/effective_index.py
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
@jit
def neff_te2(width: float, wavelength: float) -> float | list[float]:
    """
    Gets Effective Index value  of TE2 by using corresponding parameters. This is
    a JAX compatible function. JIT is enabled.

    Args:
        width (float): Waveguide width in microns. (0.24 - 0.7) Scalar or list
        wavelength (float): Wavelength in microns. (1.2 - 1.7) Scalar or list

    Returns:
        Effective Index value(s).
    """
    return ndimage.map_coordinates(
        effective_index_te2,
        [
            (width - width_min) * ((width_size - 1) / (width_max - width_min)),
            (wavelength - wav_min) * ((wav_size - 1) / (wav_max - wav_min)),
        ],
        order=1,
    )

siphotonics.effective_index.neff_tm0(width, wavelength)

Gets Effective Index value of TM0 by using corresponding parameters. This is a JAX compatible function. JIT is enabled.

Parameters:

Name Type Description Default
width float

Waveguide width in microns. (0.24 - 0.7) Scalar or list

required
wavelength float

Wavelength in microns. (1.2 - 1.7) Scalar or list

required

Returns:

Type Description
float | list[float]

Effective Index value(s).

Source code in siphotonics/effective_index.py
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@jit
def neff_tm0(width: float, wavelength: float) -> float | list[float]:
    """
    Gets Effective Index value  of TM0 by using corresponding parameters. This is
    a JAX compatible function. JIT is enabled.

    Args:
        width (float): Waveguide width in microns. (0.24 - 0.7) Scalar or list
        wavelength (float): Wavelength in microns. (1.2 - 1.7) Scalar or list

    Returns:
        Effective Index value(s).
    """
    return ndimage.map_coordinates(
        effective_index_tm0,
        [
            (width - width_min) * ((width_size - 1) / (width_max - width_min)),
            (wavelength - wav_min) * ((wav_size - 1) / (wav_max - wav_min)),
        ],
        order=1,
    )

siphotonics.effective_index.neff_tm1(width, wavelength)

Gets Effective Index value of TM1 by using corresponding parameters. This is a JAX compatible function. JIT is enabled.

Parameters:

Name Type Description Default
width float

Waveguide width in microns. (0.24 - 0.7) Scalar or list

required
wavelength float

Wavelength in microns. (1.2 - 1.7) Scalar or list

required

Returns:

Type Description
float | list[float]

Effective Index value(s).

Source code in siphotonics/effective_index.py
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
@jit
def neff_tm1(width: float, wavelength: float) -> float | list[float]:
    """
    Gets Effective Index value  of TM1 by using corresponding parameters. This is
    a JAX compatible function. JIT is enabled.

    Args:
        width (float): Waveguide width in microns. (0.24 - 0.7) Scalar or list
        wavelength (float): Wavelength in microns. (1.2 - 1.7) Scalar or list

    Returns:
        Effective Index value(s).
    """
    return ndimage.map_coordinates(
        effective_index_tm1,
        [
            (width - width_min) * ((width_size - 1) / (width_max - width_min)),
            (wavelength - wav_min) * ((wav_size - 1) / (wav_max - wav_min)),
        ],
        order=1,
    )

siphotonics.permittivity

siphotonics.permittivity.perm_oxide(wavelength)

Permittivity value of SiO2 at given wavelength.

Parameters:

Name Type Description Default
wavelength float

Wavelength in microns. (1.2 - 1.7) Scalar or list

required

Returns:

Type Description
float | list[float]

Permittivity value(s).

Raises:

Type Description
ValueError

If wavelength is not between 1.2-1.7 microns.

Examples:

>>> perm_oxide(1.5)
3.44
>>> perm_oxide([1.5, 1.6])
[3.44, 3.44]
>>> perm_oxide(1.8)
Traceback (most recent call last):
    ...
ValueError: Wavelength must be between 1.2-1.7 micron
Source code in siphotonics/permittivity.py
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
def perm_oxide(wavelength: float | list[float]) -> float | list[float]:
    """
    Permittivity value of SiO2 at given wavelength.

    Args:
        wavelength (float): Wavelength in microns. (1.2 - 1.7) Scalar or list

    Returns:
        Permittivity value(s).

    Raises:
        ValueError: If wavelength is not between 1.2-1.7 microns.

    Examples:

        >>> perm_oxide(1.5)
        3.44

        >>> perm_oxide([1.5, 1.6])
        [3.44, 3.44]

        >>> perm_oxide(1.8)
        Traceback (most recent call last):
            ...
        ValueError: Wavelength must be between 1.2-1.7 micron

    """
    if not wav_min <= wavelength <= wav_max:
        raise ValueError("Wavelength must be between 1.2-1.7 micron")

    return perm["SiO2"](wavelength * 1000)

siphotonics.permittivity.perm_si(wavelength)

Permittivity value of Si at given wavelength.

Parameters:

Name Type Description Default
wavelength float

Wavelength in microns. (1.2 - 1.7) Scalar or list

required

Returns:

Type Description
float | list[float]

Permittivity value(s).

Raises:

Type Description
ValueError

If wavelength is not between 1.2-1.7 microns.

Examples:

>>> perm_si(1.5)
11.68
>>> perm_si([1.5, 1.6])
[11.68, 11.68]
>>> perm_si(1.8)
Traceback (most recent call last):
    ...
ValueError: Wavelength must be between 1.2-1.7 micron
Source code in siphotonics/permittivity.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
def perm_si(wavelength: float | list[float]) -> float | list[float]:
    """
    Permittivity value of Si at given wavelength.

    Args:
        wavelength (float): Wavelength in microns. (1.2 - 1.7) Scalar or list

    Returns:
        Permittivity value(s).

    Raises:
        ValueError: If wavelength is not between 1.2-1.7 microns.

    Examples:
        >>> perm_si(1.5)
        11.68

        >>> perm_si([1.5, 1.6])
        [11.68, 11.68]

        >>> perm_si(1.8)
        Traceback (most recent call last):
            ...
        ValueError: Wavelength must be between 1.2-1.7 micron
    """
    if not wav_min <= wavelength <= wav_max:
        raise ValueError("Wavelength must be between 1.2-1.7 micron")

    return perm["Si"](wavelength * 1000)

siphotonics.util

by Aycan Deniz Vit


Last update: 2022-12-07
Created: 2022-12-07