tidy3d.FrequencyUtils#
- class FrequencyUtils[source]#
Bases:
Tidy3dBaseModel
Utilities for classifying frequencies/wavelengths and generating samples for standard optical bands.
- Parameters:
attrs (dict = {}) β Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields,
attrs
are mutable. For example, the following is allowed for setting anattr
obj.attrs['foo'] = bar
. Also note that Tidy3D` will raise aTypeError
ifattrs
contain objects that can not be serialized. One can check ifattrs
are serializable by callingobj.json()
.use_wavelength (bool = FieldInfo(annotation=NoneType, required=False, default=False, title='Use, wavelength', description='Indicate, whether, to, use, wavelengths, instead, of, frequencies, for, the, return, values, of, functions, and, parameters.'))
Attributes
Methods
c_band
([n])Optical C band frequencies/wavelengths sorted by wavelength.
classification
(value)Band classification for a given frequency/wavelength.
e_band
([n])Optical E band frequencies/wavelengths sorted by wavelength.
l_band
([n])Optical L band frequencies/wavelengths sorted by wavelength.
o_band
([n])Optical O band frequencies/wavelengths sorted by wavelength.
s_band
([n])Optical S band frequencies/wavelengths sorted by wavelength.
u_band
([n])Optical U band frequencies/wavelengths sorted by wavelength.
Inherited Common Usage
- use_wavelength#
- classification(value)[source]#
Band classification for a given frequency/wavelength.
Frequency values must be given in hertz (Hz). Wavelengths must be given in micrometers (ΞΌm).
- Parameters:
value (float) β Value to classify.
- Returns:
String tuple with classification.
- Return type:
tuple[str]
- o_band(n=11)[source]#
Optical O band frequencies/wavelengths sorted by wavelength.
The returned samples are equally spaced in wavelength.
- Parameters:
n (int) β Desired number of samples.
- Returns:
Samples list.
- Return type:
list[float]
- e_band(n=11)[source]#
Optical E band frequencies/wavelengths sorted by wavelength.
The returned samples are equally spaced in wavelength.
- Parameters:
n (int) β Desired number of samples.
- Returns:
Samples list.
- Return type:
list[float]
- s_band(n=15)[source]#
Optical S band frequencies/wavelengths sorted by wavelength.
The returned samples are equally spaced in wavelength.
- Parameters:
n (int) β Desired number of samples.
- Returns:
Samples list.
- Return type:
list[float]
- c_band(n=8)[source]#
Optical C band frequencies/wavelengths sorted by wavelength.
The returned samples are equally spaced in wavelength.
- Parameters:
n (int) β Desired number of samples.
- Returns:
Samples list.
- Return type:
list[float]
- l_band(n=13)[source]#
Optical L band frequencies/wavelengths sorted by wavelength.
The returned samples are equally spaced in wavelength.
- Parameters:
n (int) β Desired number of samples.
- Returns:
Samples list.
- Return type:
list[float]
- u_band(n=11)[source]#
Optical U band frequencies/wavelengths sorted by wavelength.
The returned samples are equally spaced in wavelength.
- Parameters:
n (int) β Desired number of samples.
- Returns:
Samples list.
- Return type:
list[float]
- __hash__()#
Hash method.