Skip to content

API Reference

sipkit.effective_index

sipkit.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)
array(2.)
>>> neff(0.5, [1.5, 1.6])
array([2. , 2.1])
>>> neff([0.5, 0.6], 1.5)
array([2. , 1.9])
>>> neff([0.5, 0.6], [1.5, 1.6])
array([[2. , 2.1],
>>> neff(0.5, [[1.5, 1.6], [1.7, 1.8]])
array([[2. , 2.1],
       [1.9, 2. ]])
>>> neff([[0.5, 0.6], [0.7, 0.8]], 1.5)
array([[2. , 1.9],
       [1.8, 1.7]])
>>> waveguide_width = jnp.array([0.5, 0.6])
>>> wavelength = np.array([1.5, 1.6, 1.7])
>>> waveguide_width, wavelength = np.meshgrid(waveguide_width, wavelength)
>>> neff(waveguide_width, wavelength)
array([[2. , 2.1],
       [1.9, 2. ],
       [1.8, 1.9]])
Source code in sipkit/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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@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)
        array(2.)

        >>> neff(0.5, [1.5, 1.6])
        array([2. , 2.1])

        >>> neff([0.5, 0.6], 1.5)
        array([2. , 1.9])

        >>> neff([0.5, 0.6], [1.5, 1.6])
        array([[2. , 2.1],

        >>> neff(0.5, [[1.5, 1.6], [1.7, 1.8]])
        array([[2. , 2.1],
               [1.9, 2. ]])

        >>> neff([[0.5, 0.6], [0.7, 0.8]], 1.5)
        array([[2. , 1.9],
               [1.8, 1.7]])

        >>> waveguide_width = jnp.array([0.5, 0.6])
        >>> wavelength = np.array([1.5, 1.6, 1.7])
        >>> waveguide_width, wavelength = np.meshgrid(waveguide_width, wavelength)
        >>> neff(waveguide_width, wavelength)
        array([[2. , 2.1],
               [1.9, 2. ],
               [1.8, 1.9]])

    """
    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,
    )

sipkit.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 sipkit/effective_index.py
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
@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,
    )

sipkit.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 sipkit/effective_index.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@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,
    )

sipkit.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 sipkit/effective_index.py
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
@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,
    )

sipkit.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 sipkit/effective_index.py
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@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,
    )

sipkit.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 sipkit/effective_index.py
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
@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,
    )

sipkit.permittivity

sipkit.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 sipkit/permittivity.py
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
75
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)

sipkit.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 sipkit/permittivity.py
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
42
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)

sipkit.util

by Aycan Deniz Vit


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