Yagami.RayTracing.AtmInterpolate — Type
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, whereTis a subtype ofAbstractFloat.knots_h::AbstractVector{T}: A vector of heights in kilometers, whereTis a subtype ofAbstractFloat.parameters::AbstractMatrix{T}: A matrix of parameters for the interpolation, whereTis a subtype ofAbstractFloat.logh::Bool: If true, use logarithmic interpolation for height. Default is false.
Returns
- An
AtmInterpolateobject with the specified knots and parameters.
Yagami.RayTracing.AtmosphereSetting — Type
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, whereTis a subtype ofAbstractFloat.knots_h::AbstractVector{T}: A vector of heights in kilometers, whereTis a subtype ofAbstractFloat.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 is0.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 is0.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 is10.0. If a scalar is provided, it is broadcasted to match the size of the temperature matrix.
Returns
- An
AtmosphereSettingobject containing interpolated atmospheric properties for ray tracing.
Yagami.RayTracing.RayTracingProblem — Type
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.
Yagami.RayTracing.RayTracingProblem — Method
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 beNCFormatorMipasFormat. (default isNCFormat).meantype::MT=GeometricMean(): The mean type to be used for the refractive index calculation (default isGeometricMean).model::AM=Ciddor(): The air model to be used for the refractive index calculation (default isCiddor).earthmodel::EA=Fukushima(): The earth approximation model to be used (default isFukushima).logger=nothing: An optional logger to log information during the problem creation (default isNullLogger).
Returns:
RayTracingProblem: An instance ofRayTracingProblemcontaining the data read from the file or folder and the calculated refractive index and atmosphere.
Yagami.RayTracing.SimpleResult — Method
SimpleResult()
SimpleResult()
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
SimpleResultobject with the specified or default values.
Yagami.RayTracing.GeofitRayTracingProblem — Method
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 isGeometricMean).model::AM=Ciddor(): The air model to be used for the refractive index calculation (default isCiddor).earthmodel::EA=Fukushima(): The earth approximation model to be used (default isFukushima).logger=nothing: An optional logger to log information during the problem creation (default isNullLogger).
Returns:
RayTracingProblem: An instance ofRayTracingProblemcontaining the data read from the Cairt file and the calculated refractive index and atmosphere.
Yagami.RayTracing.NCRayTracingProblem — Method
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 isGeometricMean).model::AM=Ciddor(): The air model to be used for the refractive index calculation (default isCiddor).earthmodel::EA=Fukushima(): The earth approximation model to be used (default isFukushima).logger=nothing: An optional logger to log information during the problem creation (default isNullLogger).
Returns:
RayTracingProblem: An instance ofRayTracingProblemcontaining the data read from the Cairt file and the calculated refractive index and atmosphere.
Yagami.RayTracing.__setdescending! — Method
__setdescending!(df::DistanceFunc, value::Bool=true) Set the :descending field of the DistanceFunc.
Yagami.RayTracing.__setdirectionx! — Method
__setdirectionx!(df::DistanceFunc, value::T=0.0) Set the :directionx field of the DistanceFunc.
Yagami.RayTracing.__setdirectiony! — Method
__setdirectiony!(df::DistanceFunc, value::T=1.0) Set the :directiony field of the DistanceFunc.
Yagami.RayTracing.__sethmax! — Method
__sethmax!(df::DistanceFunc, value::T=120.0) Set the :hmax field of the DistanceFunc.
Yagami.RayTracing.__sethmin! — Method
__sethmin!(df::DistanceFunc, value::T=0.0) Set the :hmin field of the DistanceFunc.
Yagami.RayTracing.__seti! — Method
__seti!(df::DistanceFunc, value::Int=0) Set the :i field of the DistanceFunc.
Yagami.RayTracing.__setislevel! — Method
__setislevel!(df::DistanceFunc, value::Bool=true) Set the :islevel field of the DistanceFunc.
Yagami.RayTracing.__setj! — Method
__setj!(df::DistanceFunc, value::Int=0) Set the :j field of the DistanceFunc.
Yagami.RayTracing.__setn! — Method
__setn!(df::DistanceFunc, value::T=1.0) Set the :n field of the DistanceFunc.
Yagami.RayTracing.__setpointx! — Method
__setpointx!(df::DistanceFunc, value::T=1.0e-5) Set the :pointx field of the DistanceFunc.
Yagami.RayTracing.__setpointy! — Method
__setpointy!(df::DistanceFunc, value::T=1.0e-5) Set the :pointy field of the DistanceFunc.
Yagami.RayTracing.__setθmax! — Method
__setθmax!(df::DistanceFunc, value::T=Inf) Set the :θmax field of the DistanceFunc.
Yagami.RayTracing.__setθmin! — Method
__setθmin!(df::DistanceFunc, value::T=-Inf) Set the :θmin field of the DistanceFunc.
Yagami.RayTracing.create_atmosphere — Method
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, whereTis a subtype ofAbstractFloat.hᵢ::AbstractVector{T}: A vector of heights in kilometers, whereTis a subtype ofAbstractFloat.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 is0.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 is0.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 is10.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 usingcreate_hlevelset.knots_h::AbstractVector{T}=create_radii(T;): A vector of heights in kilometers for the knots, default is created usingcreate_radii.
Returns
- An
AtmosphereSettingobject containing interpolated atmospheric properties for ray tracing.
Yagami.RayTracing.create_hlevelset — Method
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 isFloat64.hmin::T: The minimum value of the levels, default is0.0.hmax::T: The maximum value of the levels, default is120.0.levels::Int: The number of levels to create, must be a positive integer, default is100.logscale::Bool: Iftrue, the levels are logarithmically spaced; iffalse, they are linearly spaced. Default istrue.
Returns
- A vector of levels of type
T, either logarithmically or linearly spaced betweenhminandhmax.
Yagami.RayTracing.create_radii — Method
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 isFloat64.θmin::AbstractFloat: The minimum angle in degrees, default is0.0.θmax::AbstractFloat: The maximum angle in degrees, default is359.0.radii::Int: The number of radii to create, must be a positive integer, default is360.
Returns
- A vector of radii of type
T, evenly spaced betweenθminandθmax.
Yagami.RayTracing.extrapolateco2ppm — Method
`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.0Yagami.RayTracing.extrapolatehumidity — Method
`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 %
Yagami.RayTracing.extrapolatepressure — Method
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.0Yagami.RayTracing.extrapolatetemperature — Method
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.15Yagami.RayTracing.extrapolatewavelength — Method
`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.0Yagami.RayTracing.getdescending — Method
getdescending(df::DistanceFunc) Return the :descending field of the DistanceFunc.
Yagami.RayTracing.getdirectionx — Method
getdirectionx(df::DistanceFunc) Return the :directionx field of the DistanceFunc.
Yagami.RayTracing.getdirectiony — Method
getdirectiony(df::DistanceFunc) Return the :directiony field of the DistanceFunc.
Yagami.RayTracing.gethmax — Method
gethmax(df::DistanceFunc) Return the :hmax field of the DistanceFunc.
Yagami.RayTracing.gethmin — Method
gethmin(df::DistanceFunc) Return the :hmin field of the DistanceFunc.
Yagami.RayTracing.geti — Method
geti(df::DistanceFunc) Return the :i field of the DistanceFunc.
Yagami.RayTracing.getislevel — Method
getislevel(df::DistanceFunc) Return the :islevel field of the DistanceFunc.
Yagami.RayTracing.getj — Method
getj(df::DistanceFunc) Return the :j field of the DistanceFunc.
Yagami.RayTracing.getn — Method
getn(df::DistanceFunc) Return the :n field of the DistanceFunc.
Yagami.RayTracing.getpointx — Method
getpointx(df::DistanceFunc) Return the :pointx field of the DistanceFunc.
Yagami.RayTracing.getpointy — Method
getpointy(df::DistanceFunc) Return the :pointy field of the DistanceFunc.
Yagami.RayTracing.getquotetangent — Method
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)Yagami.RayTracing.getsatdirection — Method
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]`
Yagami.RayTracing.getsatposition — Method
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]
Yagami.RayTracing.getθmax — Method
getθmax(df::DistanceFunc) Return the :θmax field of the DistanceFunc.
Yagami.RayTracing.getθmin — Method
getθmin(df::DistanceFunc) Return the :θmin field of the DistanceFunc.
Yagami.RayTracing.node_co2ppm — Method
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)Yagami.RayTracing.node_humidity — Method
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)Yagami.RayTracing.node_pressure — Method
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)Yagami.RayTracing.node_temperature — Method
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)Yagami.RayTracing.node_wavelength — Method
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)Yagami.RayTracing.num_edges — Method
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
Yagami.RayTracing.num_wedges — Method
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
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).
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.
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).
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).
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).
Yagami.RayTracing.wedge_refractive — Method
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)