Parameters
Parameters
The Parameters class represents the parameters for a simulation, including wavelength, refractive indices, scattering particles, and initial field, and provides methods for computing angular frequency and wave vectors.
Initializes the class with the given parameters and sets up the necessary variables.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
wavelength |
array
|
An array that represents the wavelengths of the light being used. It contains the values of the wavelengths at which the simulation will be performed. |
required |
medium_refractive_index |
array
|
An array that represents the refractive index of the medium in which the particles are located. It contains the refractive index values at different wavelengths. |
required |
particles |
Particles
|
An instance of the "Particles" class. It represents the particles present in the medium. |
required |
initial_field |
InitialField
|
An object of the |
required |
Source code in yasfpy/parameters.py
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 43 |
|
wavelength = wavelength
instance-attribute
medium_refractive_index = medium_refractive_index
instance-attribute
wavelengths_number = wavelength.size
instance-attribute
particles = particles
instance-attribute
initial_field = initial_field
instance-attribute
__setup
The function sets up the necessary computations for omega and ks.
Source code in yasfpy/parameters.py
45 46 47 48 |
|
__compute_omega
The function calculates the value of omega using the wavelength.
Source code in yasfpy/parameters.py
50 51 52 |
|
__interpolate_refractive_index_from_table
Interpolates the refractive index values from a table for different wavelengths.
Returns:
Name | Type | Description |
---|---|---|
refractive_index_interpolated |
array
|
An array that contains the interpolated refractive index values for the particles at different wavelengths. |
Source code in yasfpy/parameters.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
__index_to_table
Source code in yasfpy/parameters.py
84 85 86 |
|
__compute_ks
Computes the values of k_medium and k_particle based on the refractive index of the medium and particles.
Source code in yasfpy/parameters.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|