Yagami.RayTracing.AtmInterpolateType

AtmInteoplate{N,M,T}

A structure representing an atmospheric interpolation object for ray tracing.

AtmInterpolate(knots_θ, knots_h, parameters; logh=false)

Create an atmospheric interpolation object for ray tracing. The interpolation is defined by the knots of height and angle, and the parameters matrix.

Arguments

  • knots_θ::AbstractVector{T}: A vector of angles in degrees, where T is a subtype of AbstractFloat.
  • knots_h::AbstractVector{T}: A vector of heights in kilometers, where T is a subtype of AbstractFloat.
  • parameters::AbstractMatrix{T}: A matrix of parameters for the interpolation, where T is a subtype of AbstractFloat.
  • logh::Bool: If true, use logarithmic interpolation for height. Default is false.

Returns

  • An AtmInterpolate object with the specified knots and parameters.
source
Yagami.RayTracing.AtmosphereSettingType

AtmosphereSetting(knots_θ, knots_h, temperature, pressure, humidity=0.0, co2ppm=0.0, wavelength=10.0)

Create an atmosphere setting interpolation object for ray tracing.

Arguments

  • knots_θ::AbstractVector{T}: A vector of angles in degrees, where T is a subtype of AbstractFloat.
  • knots_h::AbstractVector{T}: A vector of heights in kilometers, where T is a subtype of AbstractFloat.
  • temperature::AbstractMatrix{T}: A matrix of temperature values, where each row corresponds to a level and each column corresponds to a radius.
  • pressure::AbstractMatrix{T}: A matrix of pressure values, where each row corresponds to a level and each column corresponds to a radius.
  • humidity::AbstractFloat (optional): A scalar or matrix of humidity values, default is 0.0. If a scalar is provided, it is broadcasted to match the size of the temperature matrix.
  • co2ppm::AbstractFloat (optional): A scalar or matrix of CO2 concentration values in parts per million, default is 0.0. If a scalar is provided, it is broadcasted to match the size of the temperature matrix.
  • wavelength::AbstractFloat (optional): A scalar or matrix of wavelength values, default is 10.0. If a scalar is provided, it is broadcasted to match the size of the temperature matrix.

Returns

  • An AtmosphereSetting object containing interpolated atmospheric properties for ray tracing.
source
Yagami.RayTracing.RayTracingProblemType

Data structure for the ray tracing problem. This struct holds all the necessary data for performing ray tracing calculations, including the atmosphere, refractive index, and satellite scan information.

source
Yagami.RayTracing.RayTracingProblemMethod
RayTracingProblem(fileorfolder; ...)
RayTracingProblem(
    fileorfolder,
    dataformat;
    meantype,
    model,
    earthmodel,
    logger
)

Create a RayTracingProblem from an available data format. This function is a factory method that dispatch a RayTracingProblem based on the specified data format.

Arguments:

  • fileorfolder::String: The path to the file or folder containing the ray tracing data.
  • dataformat::ADF: The data format of the file or folder, which can be NCFormat or MipasFormat. (default is NCFormat).
  • meantype::MT=GeometricMean(): The mean type to be used for the refractive index calculation (default is GeometricMean).
  • model::AM=Ciddor(): The air model to be used for the refractive index calculation (default is Ciddor).
  • earthmodel::EA=Fukushima(): The earth approximation model to be used (default is Fukushima).
  • logger=nothing: An optional logger to log information during the problem creation (default is NullLogger).

Returns:

  • RayTracingProblem: An instance of RayTracingProblem containing the data read from the file or folder and the calculated refractive index and atmosphere.
source
Yagami.RayTracing.SimpleResultMethod
SimpleResult()
SimpleResult(pointx)
SimpleResult(pointx, pointy)
SimpleResult(pointx, pointy, directionx)
SimpleResult(pointx, pointy, directionx, directiony)
SimpleResult(
    pointx,
    pointy,
    directionx,
    directiony,
    altitude
)
SimpleResult(
    pointx,
    pointy,
    directionx,
    directiony,
    altitude,
    azimuth
)
SimpleResult(
    pointx,
    pointy,
    directionx,
    directiony,
    altitude,
    azimuth,
    length
)
SimpleResult(
    pointx,
    pointy,
    directionx,
    directiony,
    altitude,
    azimuth,
    length,
    i
)
SimpleResult(
    pointx,
    pointy,
    directionx,
    directiony,
    altitude,
    azimuth,
    length,
    i,
    j
)
SimpleResult(
    pointx,
    pointy,
    directionx,
    directiony,
    altitude,
    azimuth,
    length,
    i,
    j,
    descending
)

Create a SimpleResult with default values for the fields. SimpleResult is a data structure used to store the results of ray tracing calculations and it is a sybtype of AbstractResult.

Arguments

  • pointx::T=MAJORAXIS(): X-coordinate of the point, default is the major axis.

  • pointy::T=MINORAXIS(): Y-coordinate of the point, default is the minor axis.

  • directionx::T=0.0: X-component of the direction vector, default is 0.0.

  • directiony::T=-1.0: Y-component of the direction vector, default is -1.0.

  • altitude::T=zero(T): Altitude, default is 0.

  • azimuth::T=zero(T): Azimuth, default is 0.

  • length::T=zero(T): Length, default is 0.

  • i::Int=0: Index i, default is 0.

  • j::Int=0: Index j, default is 0.

  • descending::Bool=true: Whether the ray is descending, default is true.

    Returns

  • A SimpleResult object with the specified or default values.

source
Yagami.RayTracing.GeofitRayTracingProblemMethod
GeofitRayTracingProblem(
    folder;
    meantype,
    model,
    earthmodel,
    logger,
    humidity,
    co2ppm
)

Create a RayTracingProblem from a Mipas folder. This struct represents a ray tracing problem with all the necessary data to perform ray tracing calculations, including the atmosphere, refractive index, and satellite scan information.

Arguments:

  • filename::String: The path to the Cairt file containing the ray tracing data.

Key Arguments:

  • meantype::MT=GeometricMean(): The mean type to be used for the refractive index calculation (default is GeometricMean).
  • model::AM=Ciddor(): The air model to be used for the refractive index calculation (default is Ciddor).
  • earthmodel::EA=Fukushima(): The earth approximation model to be used (default is Fukushima).
  • logger=nothing: An optional logger to log information during the problem creation (default is NullLogger).

Returns:

  • RayTracingProblem: An instance of RayTracingProblem containing the data read from the Cairt file and the calculated refractive index and atmosphere.
source
Yagami.RayTracing.NCRayTracingProblemMethod
NCRayTracingProblem(
    filename;
    meantype,
    model,
    earthmodel,
    logger,
    humidity,
    co2ppm
)

Create a RayTracingProblem from a Cairt file. This struct represents a ray tracing problem with all the necessary data to perform ray tracing calculations, including the atmosphere, refractive index, and satellite scan information.

Arguments:

  • ::Cairt: A type representing the Cairt file format, which is used to read the ray tracing data.
  • filename::String: The path to the Cairt file containing the ray tracing data.

Key Arguments:

  • meantype::MT=GeometricMean(): The mean type to be used for the refractive index calculation (default is GeometricMean).
  • model::AM=Ciddor(): The air model to be used for the refractive index calculation (default is Ciddor).
  • earthmodel::EA=Fukushima(): The earth approximation model to be used (default is Fukushima).
  • logger=nothing: An optional logger to log information during the problem creation (default is NullLogger).

Returns:

  • RayTracingProblem: An instance of RayTracingProblem containing the data read from the Cairt file and the calculated refractive index and atmosphere.
source
Yagami.RayTracing.create_atmosphereMethod

create_atmosphere(; θᵢ, hᵢ, temperatureᵢ, pressureᵢ, humidity=0.0, co2ppm=0.0, wavelength=10.0, knots_θ=create_hlevelset(T;), knots_h=create_radii(T;))

Create an atmosphere setting for ray tracing. This function generates an AtmosphereSetting object based on the provided parameters, which include angles, heights, temperature, pressure, humidity, CO2 concentration, and wavelength.

Key Arguments

  • θᵢ::AbstractVector{T}: A vector of angles in degrees, where T is a subtype of AbstractFloat.
  • hᵢ::AbstractVector{T}: A vector of heights in kilometers, where T is a subtype of AbstractFloat.
  • temperatureᵢ::AbstractMatrix{T}: A matrix of temperature values, where each row corresponds to a level and each column corresponds to a radius.
  • pressureᵢ::AbstractMatrix{T}: A matrix of pressure values, where each row corresponds to a level and each column corresponds to a radius.
  • humidity=0.0: A scalar or matrix of humidity values, default is 0.0. If a scalar is provided, it is broadcasted to match the size of the temperature matrix.
  • co2ppm=0.0: A scalar or matrix of CO2 concentration values in parts per million, default is 0.0. If a scalar is provided, it is broadcasted to match the size of the temperature matrix.
  • wavelength=10.0: A scalar or matrix of wavelength values, default is 10.0. If a scalar is provided, it is broadcasted to match the size of the temperature matrix.
  • knots_θ::AbstractVector{T}=create_hlevelset(T;): A vector of angles in degrees for the knots, default is created using create_hlevelset.
  • knots_h::AbstractVector{T}=create_radii(T;): A vector of heights in kilometers for the knots, default is created using create_radii.

Returns

  • An AtmosphereSetting object containing interpolated atmospheric properties for ray tracing.
source
Yagami.RayTracing.create_hlevelsetMethod
create_hlevelset(; ...)
create_hlevelset(; hmin, hmax, levels, logscale)

Create a set of levels for the raytracing method. The levels are evenly spaced in the range [hmin, hmax] if logscale=false, or logarithmically spaced if logscale=true.

Note

The levels are sorted in descending order, meaning the first element is the maximum level and the last element is the minimum level. This is the format required by the reay tracing algorithm.

Arguments

  • T::Type{<:AbstractFloat}: The type of the levels, default is Float64.
  • hmin::T: The minimum value of the levels, default is 0.0.
  • hmax::T: The maximum value of the levels, default is 120.0.
  • levels::Int: The number of levels to create, must be a positive integer, default is 100.
  • logscale::Bool: If true, the levels are logarithmically spaced; if false, they are linearly spaced. Default is true.

Returns

  • A vector of levels of type T, either logarithmically or linearly spaced between hmin and hmax.
source
Yagami.RayTracing.create_radiiMethod
create_radii(; ...)
create_radii(; θmin, θmax, radii)

Create a set of radii for the raytracing method. The radii are evenly spaced in the range [θmin, θmax].

Note

The radii are sorted in ascending order, meaning the first element is the minimum radius and the last element is the maximum radius.

Arguments

  • T::Type{<:AbstractFloat}: The type of the radii, default is Float64.
  • θmin::AbstractFloat: The minimum angle in degrees, default is 0.0.
  • θmax::AbstractFloat: The maximum angle in degrees, default is 359.0.
  • radii::Int: The number of radii to create, must be a positive integer, default is 360.

Returns

  • A vector of radii of type T, evenly spaced between θmin and θmax.
source
Yagami.RayTracing.extrapolateco2ppmMethod
`extrapolateco2ppm(prob::RayTracingProblem, θ::AbstractFloat, h::AbstractFloat)`
`extrapolateco2ppm(prob::RayTracingProblem; theta=0.0, h=0.0)`

Extrapolates the CO2 concentration in ppm at a given line of angle θ and height h for a given RayTracingProblem.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • θ::AbstractFloat: The angle in degree and geodesic coordinates.
  • h::AbstractFloat: The altitude with respect to the surface in km.

Returns:

  • Float64: The extrapolated CO2 concentration in ppm

Key Arguments:

  • theta::AbstractFloat: The angle in degrees (default is 0.0).
  • h::AbstractFloat: The height in kilometers (default is 0.0).

Example:

julia> extrapolateco2ppm(prob, 10.0, 5.0) # angle in degrees, height in km
400.0
julia> extrapolateco2ppm(prob; theta=10.0, h=5.0) # using keyword arguments
400.0
julia> extrapolateco2ppm(prob) # defaults to theta=0.0, h=0.0
400.0
source
Yagami.RayTracing.extrapolatehumidityMethod
`extrapolatehumidity(prob::RayTracingProblem, θ::AbstractFloat, h::AbstractFloat)`
`extrapolatehumidity(prob::RayTracingProblem; theta=0.0, h=0.0)`

Extrapolates the humidity at a given line of angle θ and height h for a given RayTracingProblem.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • θ::AbstractFloat: The angle in degree and geodesic coordinates.
  • h::AbstractFloat: The altitude with respect to the surface in km.

Returns:

  • Float64: The extrapolated humidity in %
source
Yagami.RayTracing.extrapolatepressureMethod

extrapolatepressure(prob::RayTracingProblem, θ::AbstractFloat, h::AbstractFloat) extrapolatepressure(prob::RayTracingProblem; theta=0.0, h=0.0) Extrapolates the pressure at a given line of angle θ and height h for a given RayTracingProblem.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • θ::AbstractFloat: The angle in degree and geodesic coordinates.
  • h::AbstractFloat: The altitude with respect to the surface in km.

Returns:

  • Float64: The extrapolated pressure in Pa

Key Arguments:

  • theta::AbstractFloat: The angle in degrees (default is 0.0).
  • h::AbstractFloat: The height in kilometers (default is 0.0).

Example:

julia
> extrapolatepressure(prob, 10.0, 5.0) # angle in degrees, height in km
101325.0
julia> extrapolatepressure(prob; theta=10.0, h=5.0) # using keyword arguments
101325.0
julia> extrapolatepressure(prob) # defaults to theta=0.0, h=0.0
101325.0
source
Yagami.RayTracing.extrapolatetemperatureMethod

extrapolatetemperature(prob::RayTracingProblem, θ::AbstractFloat, h::AbstractFloat) extrapolatetemperature(prob::RayTracingProblem; theta=0.0, h=0.0) Extrapolates the temperature at a given line of angle θ and height h for a given RayTracingProblem.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • θ::AbstractFloat: The angle in degree and geodesic coordinates.
  • h::AbstractFloat: The altitude with respect to the surface in km.

Returns:

  • Float64: The extrapolated temperature in Kelvin

Key Arguments:

  • theta::AbstractFloat: The angle in degrees (default is 0.0).
  • h::AbstractFloat: The height in kilometers (default is 0.0).

Example:

julia> extrapolatetemperature(prob, 10.0, 5.0) # angle in degrees, height in km
273.15
julia> extrapolatetemperature(prob; theta=10.0, h=5.0) # using keyword arguments
275.15
julia> extrapolatetemperature(prob) # defaults to theta=0.0, h=0.0
278.15
source
Yagami.RayTracing.extrapolatewavelengthMethod
`extrapolatewavelength(prob::RayTracingProblem, θ::AbstractFloat, h::AbstractFloat)`
`extrapolatewavelength(prob::RayTracingProblem; theta=0.0, h=0.0)`

Extrapolates the wavelength at a given line of angle θ and height h for a given RayTracingProblem.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • θ::AbstractFloat: The angle in degree and geodesic coordinates.
  • h::AbstractFloat: The altitude with respect to the surface in km.

Returns:

  • Float64: The extrapolated wavelength in μm

Key Arguments:

  • theta::AbstractFloat: The angle in degrees (default is 0.0).
  • h::AbstractFloat: The height in kilometers (default is 0.0).

Example:

julia> extrapolatewavelength(prob, 10.0, 5.0) # angle in degrees, height in km
1.0
julia> extrapolatewavelength(prob; theta=10.0, h=5.0) # using keyword arguments
1.0
julia> extrapolatewavelength(prob) # defaults to theta=0.0, h=0.0
1.0
source
Yagami.RayTracing.getquotetangentMethod

getquotetangent(prob::RayTracingProblem, los::Int, scan::Int) getquotetangent(prob::RayTracingProblem; los=1, scan=1) Returns the tangent point coordinates for a given line of sight (los) and scan index in a RayTracingProblem.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • los::Int: The line of sight index.
  • scan::Int: The scan index.

Returns:

  • Tuple{Float64, Float64}: A tuple containing the tangent height and azimuth angle at the specified los and scan.

Key Arguments:

  • los::Int: The line of sight index (default is 1).
  • scan::Int: The scan index (default is 1).

Example:

julia> getquotetangent(prob, 1, 1) # returns the tangent point for los=1 and scan=1
(100.0, 45.0)
julia> getquotetangent(prob; los=1, scan=1) # using keyword arguments
(100.0, 45.0)
julia> getquotetangent(prob) # defaults to los=1, scan=1
(100.0, 45.0)
source
Yagami.RayTracing.getsatdirectionMethod

getsatdirection(prob::RayTracingProblem, los::Int, scan::Int) getsatdirection(prob::RayTracingProblem; los=1, scan=1) Returns the satellite direction (from the nadir angle) for a given line of sight (los) and scan index in a RayTracingProblem.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • los::Int: The line of sight index.
  • scan::Int: The scan index.

Returns:

  • Vector{Float64}: A vector containing the x and y components of the satellite direction.

Key Arguments:

  • los::Int: The line of sight index (default is 1).
  • scan::Int: The scan index (default is 1).

Example:

julia julia> getsatdirection(prob, 1, 1) # returns the direction for los=1 and scan=1 [0.1, 0.2] julia> getsatdirection(prob; los=1, scan=1) # using keyword arguments [0.1, 0.2] julia> getsatdirection(prob) # defaults to los=1, scan=1 [0.1, 0.2]`

source
Yagami.RayTracing.getsatpositionMethod

getsatposition(prob::RayTracingProblem, los::Int, scan::Int) getsatposition(prob::RayTracingProblem; los=1, scan=1) Returns the satellite initial position for a given line of sight (los) and scan index in a RayTracingProblem.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • los::Int: The line of sight index.
  • scan::Int: The scan index.

Returns:

  • Vector{Float64}: A vector containing the x and y coordinates of the satellite position.

Key Arguments:

  • los::Int: The line of sight index (default is 1).
  • scan::Int: The scan index (default is 1).

Example:

```julia julia

getsatposition(prob, 1, 1) # returns the position for los=1 and scan=1

[100.0, 200.0] julia> getsatposition(prob; los=1, scan=1) # using keyword arguments [100.0, 200.0] julia> getsatposition(prob) # defaults to los=1, scan=1 [100.0, 200.0]

source
Yagami.RayTracing.node_co2ppmMethod

node_co2ppm(prob::RayTracingProblem, i_theta::Int, j_h::Int) Returns the nodes of the co2ppm for a given RayTracingProblem at specified wedge edge.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • i_theta::Int: The index of the theta knot (angle).
  • j_h::Int: The index of the h knot (height).

Returns:

  • Tuple{Int,Int},T: A tuple containing the theta and h values at the specified indices and the value of co2ppm.

Example:

julia> node_co2ppm(prob, 1, 1) # returns the nodes for i_theta=1 and j_h=1
(0.0, 0.0, 273.15)
source
Yagami.RayTracing.node_humidityMethod

node_humidity(prob::RayTracingProblem, i_theta::Int, j_h::Int) Returns the nodes of the humidity for a given RayTracingProblem at specified wedge edge.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • i_theta::Int: The index of the theta knot (angle).
  • j_h::Int: The index of the h knot (height).

Returns:

  • Tuple{Int,Int},T: A tuple containing the theta and h values at the specified indices and the value of humidity.

Example:

julia> node_humidity(prob, 1, 1) # returns the nodes for i_theta=1 and j_h=1
(0.0, 0.0, 273.15)
source
Yagami.RayTracing.node_pressureMethod

node_pressure(prob::RayTracingProblem, i_theta::Int, j_h::Int) Returns the nodes of the pressure for a given RayTracingProblem at specified wedge edge.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • i_theta::Int: The index of the theta knot (angle).
  • j_h::Int: The index of the h knot (height).

Returns:

  • Tuple{Int,Int},T: A tuple containing the theta and h values at the specified indices and the value of pressure.

Example:

julia> node_pressure(prob, 1, 1) # returns the nodes for i_theta=1 and j_h=1
(0.0, 0.0, 273.15)
source
Yagami.RayTracing.node_temperatureMethod

node_temperature(prob::RayTracingProblem, i_theta::Int, j_h::Int) Returns the nodes of the temperature for a given RayTracingProblem at specified wedge edge.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • i_theta::Int: The index of the theta knot (angle).
  • j_h::Int: The index of the h knot (height).

Returns:

  • Tuple{Int,Int},T: A tuple containing the theta and h values at the specified indices and the value of temperature.

Example:

julia> node_temperature(prob, 1, 1) # returns the nodes for i_theta=1 and j_h=1
(0.0, 0.0, 273.15)
source
Yagami.RayTracing.node_wavelengthMethod

node_wavelength(prob::RayTracingProblem, i_theta::Int, j_h::Int) Returns the nodes of the wavelength for a given RayTracingProblem at specified wedge edge.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.
  • i_theta::Int: The index of the theta knot (angle).
  • j_h::Int: The index of the h knot (height).

Returns:

  • Tuple{Int,Int},T: A tuple containing the theta and h values at the specified indices and the value of wavelength.

Example:

julia> node_wavelength(prob, 1, 1) # returns the nodes for i_theta=1 and j_h=1
(0.0, 0.0, 273.15)
source
Yagami.RayTracing.num_edgesMethod

num_edges(prob::RayTracingProblem) Returns the number of edges in a RayTracingProblem as N x M, where N is the number of angle knots and M is the number of height knots.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.

Returns:

  • Tuple{Int, Int}: A tuple containing the number of edges (N, M).

Note:

Due to the circularity of the matrix along the theta dimension, the number of edges in the theta direction is one less than the number of knots in the theta direction, while the number of edges in the height dimension is one less than the number of knots in the height direction.

Example:

julia> num_edges(prob) # returns the number of edges in the problem
(10, 19)

See also: num_wedges

source
Yagami.RayTracing.num_wedgesMethod

numwedges(prob::RayTracingProblem) Returns the number of wedges in a RayTracingProblem as N x M, where N is the number of angle knots and M is the number of height knots.

Arguments:

  • prob::RayTracingProblem: The ray tracing problem instance.

Returns:

  • Tuple{Int, Int}: A tuple containing the number of wedges (N, M).

Note:

due to the circularity of the matrix along the theta dimension, the number of wedges in the theta dimension is the same as the number of edges in the theta direction, while the number of wedges in the height dimension is one less than the number of edges in the h direction.

Example:

julia> numwedges(prob) # returns the number of wedges in the problem
(10, 20)

See also: num_edges

source
Yagami.RayTracing.raytracing!Method
raytracing!(results, problem)
raytracing!(results, problem, itermax)
raytracing!(results, problem, itermax, tol)

Perform ray tracing calculations for a given problem and store the results in the provided results matrix. This function iterates over the points and directions specified in the problem, solving for the ray path using the Zbrent method. It updates the results matrix with the ray tracing results for each point and direction. It also writes a log of the ray tracing results to the logger associated with the problem.

Arguments:

  • results::RR: The results matrix where the ray tracing results will be stored.
  • problem::RP: The ray tracing problem containing the points, directions, refractive index grid, and other necessary data.
  • itermax::Int: The maximum number of iterations to perform for each ray tracing calculation (default is 100).
  • tol::T: The tolerance for the ray tracing calculations (default is 1e-10).
source
Yagami.RayTracing.raytracing_grid!Function
`raytracing_grid!(ax, angles, altitudes;majoraxis = WGS84MAJORAXIS, minoraxis = WGS84MINORAXIS,color=:black,linewidth=3,kwargs...)`

Draws a grid of rays on an axis, where each ray is defined by a constant angle and altitude. The rays are drawn as vertical lines at constant angles and horizontal lines at constant altitudes. The grid is based on an ellipsoid defined by the major and minor axes.

source
Yagami.RayTracing.raytracing_parallel!Method
raytracing_parallel!(results, problem)
raytracing_parallel!(results, problem, itermax)
raytracing_parallel!(results, problem, itermax, tol)

Perform parallel ray tracing calculations for a given problem and store the results in the provided results matrix. This function uses multithreading to perform ray tracing calculations for each point and direction specified in the problem. It updates the results matrix with the ray tracing results for each point and direction. It also writes a log of the ray tracing results to the logger associated with the problem.

Arguments:

  • results::RR: The results matrix where the ray tracing results will be stored.
  • problem::RP: The ray tracing problem containing the points, directions, refractive index grid, and other necessary data.
  • itermax::Int: The maximum number of iterations to perform for each ray tracing calculation (default is 100).
  • tol::T: The tolerance for the ray tracing calculations (default is 1e-10).
source
Yagami.RayTracing.raytracingθ!Method
raytracingθ!(results, problem)
raytracingθ!(results, problem, itermax)
raytracingθ!(results, problem, itermax, tol)

Perform ray tracing calculations for a given problem and store the results in the provided results matrix. This function iterates over the points and directions specified in the problem, solving for the ray path using the Zbrent method. It updates the results matrix with the ray tracing results for each point and direction. It also writes a log of the ray tracing results to the logger associated with the problem.

Arguments:

  • results::RR: The results matrix where the ray tracing results will be stored.
  • problem::RP: The ray tracing problem containing the points, directions, refractive index grid, and other necessary data.
  • itermax::Int: The maximum number of iterations to perform for each ray tracing calculation (default is 100).
  • tol::T: The tolerance for the ray tracing calculations (default is 1e-10).
source
Yagami.RayTracing.raytracingθ_parallel!Method
raytracingθ_parallel!(results, problem)
raytracingθ_parallel!(results, problem, itermax)
raytracingθ_parallel!(results, problem, itermax, tol)

Perform parallel ray tracing calculations for a given problem and store the results in the provided results matrix. This function uses multithreading to perform ray tracing calculations for each point and direction specified in the problem. It updates the results matrix with the ray tracing results for each point and direction. It also writes a log of the ray tracing results to the logger associated with the problem.

Arguments:

  • results::RR: The results matrix where the ray tracing results will be stored.
  • problem::RP: The ray tracing problem containing the points, directions, refractive index grid, and other necessary data.
  • itermax::Int: The maximum number of iterations to perform for each ray tracing calculation (default is 100).
  • tol::T: The tolerance for the ray tracing calculations (default is 1e-10).
source
Yagami.RayTracing.wedge_refractiveMethod

wedge_refractive(problem::RayTracingProblem, i_theta::Int, j_h::Int;complement::Bool=false) Returns the refractive index at a given wedge edge specified by indices i_theta and j_h in a RayTracingProblem.

Arguments:

  • problem::RayTracingProblem: The ray tracing problem instance.
  • i_theta::Int: The index of the theta knot (angle).
  • j_h::Int: The index of the h knot (height).

Key Arguments:

  • complement::Bool: If true, returns the complement of the refractive index (n-1), that can be more useful in some cases (default is false).

Returns:

  • Tuple{Tuple{Float64, Float64}, Float64}: A tuple containing the theta and h values at the specified indices and the refractive index.

Example:

julia> wedge_refractive(prob, 1, 1) # returns the refractive index for i_theta=1 and j_h=1
((0.0, 0.0), 1.0003)
source