Skip to content

Commit

Permalink
[ARTS-2.6] Bugfix Rayleigh scattering phase matrix (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
olemke authored Jun 20, 2024
2 parents c61c851 + 6bdd15a commit 1576f9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def starARTS_clearsky(f_grid, sensor_pos, sensor_los, sun_pos, Reflectivity,
stokes_dim=1)

# Reference data
yREFERENCE = np.array([3.94192129256117e-13])
yREFERENCE = np.array([3.92491800384289e-13])

# Compare with reference
ws.CompareRelative(y, yREFERENCE, 1e-6)
23 changes: 8 additions & 15 deletions src/m_gas_scattering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,26 +159,19 @@ void gas_scattering_matRayleigh(TransmissionMatrix& gas_scattering_mat,
// Rayleigh phase matrix in scattering system
Vector pha_mat_int = calc_rayleighPhaMat(theta_rad, stokes_dim);

// transform the phase matrix
Matrix pha_mat(stokes_dim, stokes_dim, 0.0);

// account for depolarization factor
Numeric delta =
(1 - depolarization_factor) / (1 + 0.5 * depolarization_factor);
Numeric delta_prime =
(1 - 2 * depolarization_factor) / (1 - depolarization_factor);
Vector depol(6, 0.0);

switch (stokes_dim) {
case 4:
depol[5] = 1;
pha_mat_int[5] *= delta_prime;
[[fallthrough]];
case 1:
depol[0] = 1;
depol *= 1 - delta;
pha_mat_int += depol;
}

// add depolarization to phase matrix according to Hansen and Travis (1974)
pha_mat_int *= delta;
pha_mat_int[0] += (1 - delta);
if (stokes_dim == 4) pha_mat_int[5] *= delta_prime;

// transform the phase matrix
Matrix pha_mat(stokes_dim, stokes_dim, 0.0);

pha_mat_labCalc(pha_mat,
pha_mat_int,
Expand Down

0 comments on commit 1576f9a

Please sign in to comment.