Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
ws.ray_path_observer_agendaSetGeometric()
ws.spectral_propmat_scat_agendaSet(option="AirSimple")

# %% Set up an air Rayleigh scatterer through the ScatteringSpecies interface.
ws.scat_species = [pyarts.arts.RayleighScatterer(pyarts.arts.RayleighType("EarthAir"))]

# %% Core calculations
pos = [90e3, 0, 0]
zens = np.linspace(0, 5, 21)
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ add_library(artsworkspace STATIC
m_ppvar.cc
m_propagation_path.cc
m_propagation_path_observer.cc
m_radar.cc
m_propmat.cc
m_retrieval.cc
m_rad.cc
Expand Down
2 changes: 1 addition & 1 deletion src/core/geodesy/geodetic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ bool terrain_occludes(Numeric obs_lat,
} // anonymous namespace

std::vector<Vector2> visible_coordinates(Vector2 pos,
Vector2 ellipsoid,
Vector2,
const GeodeticField2& hfield) {
if (not hfield.ok()) return {};

Expand Down
2 changes: 1 addition & 1 deletion src/core/matpack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_library(matpack STATIC
matpack_mdspan_algorithm.cc
)

find_package (Eigen3 3.4 REQUIRED NO_MODULE)
find_package (Eigen3 REQUIRED NO_MODULE)
message(STATUS "Found Eigen3: ${EIGEN3_INCLUDE_DIR}")

target_link_libraries(matpack PRIVATE ${LAPACK_LIBRARIES})
Expand Down
19 changes: 19 additions & 0 deletions src/core/options/arts_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,25 @@ where :math:`D(x)` is the Dawson function.
"Initialize an empty workspace - no variables are set."}},
});

opts.emplace_back(EnumeratedOption{
.name = "RayleighType",
.desc =
R"(Selects the Rayleigh scattering model used by RayleighScatterer.

To add a new model, add a value here and implement it in rayleigh_scatterer.cc.
)",
.values_and_desc =
{Value{"EarthAir",
R"(Empirical air molecular scattering.
Pure scattering, no absorption.
Number density from ideal gas law.
)"},
Value{
"WaterDrop",
R"(Requires diameter. Number density from liquidcloud field.
)"}},
});

opts.emplace_back(EnumeratedOption{
.name = "ZeemanPolarization",
.desc = "A flag for the Zeeman polarization state.\n",
Expand Down
2 changes: 0 additions & 2 deletions src/core/rtepack/rtepack_scattering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ void bulk_backscatter_commutative_transmission_rte(
}
}

namespace {
Numeric cos_scat_angle(const Vector2 &los_in, const Vector2 &los_out) {
using Conversion::cosd;
using Conversion::sind;
Expand All @@ -181,7 +180,6 @@ Numeric cos_scat_angle(const Vector2 &los_in, const Vector2 &los_out) {
// Fix potential overflows by clamping numerical errors
return std::clamp(theta, -1.0, 1.0);
}
} // namespace

muelmat rayleigh_scattering(const Vector2 &los_in,
const Vector2 &los_out,
Expand Down
2 changes: 2 additions & 0 deletions src/core/rtepack/rtepack_scattering.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ void bulk_backscatter_commutative_transmission_rte(
const Array<muelmat_matrix> &dT2,
const Array<muelmat_matrix> &dZ);

Numeric cos_scat_angle(const Vector2 &los_in, const Vector2 &los_out);

muelmat rayleigh_scattering(const Vector2 &los_in,
const Vector2 &los_out,
const Numeric depolarization_factor);
Expand Down
2 changes: 1 addition & 1 deletion src/core/rtepack/rtepack_surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ stokvec nonspecular_radiance_from_patches(std::span<const Vector2> coords,
constexpr Numeric pi = Constant::pi;
using Conversion::deg2rad;

assert(static_cast<Index>(coords.size()) == sources.size());
assert(coords.size() == sources.size());

const Vector& lats = hfield.grid<0>();
const Vector& lons = hfield.grid<1>();
Expand Down
1 change: 1 addition & 0 deletions src/core/scattering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ add_library(scattering STATIC
utils.cc
phase_matrix.cc
henyey_greenstein.cc
rayleigh_scatterer.cc
particle_habit.cc
scattering_habit.cc
bulk_scattering_properties.cc
Expand Down
5 changes: 5 additions & 0 deletions src/core/scattering/general_tro_spectral.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#include "general_tro_spectral.h"

#include <arts_conversions.h>
#include <legendre.h>

#include <cmath>
#include <memory>
#include <numbers>

#include "sht.h"

Expand Down
Loading
Loading