Skip to content

Commit

Permalink
a interface with fixed backscatter 4*pi and that is perfectly isotropic
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainp committed Jul 25, 2019
1 parent bb8b4a8 commit 63aa09f
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
40 changes: 40 additions & 0 deletions smrt/interface/radar_calibration_sphere.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding: utf-8

"""Surface with a backscatter of 4pi.
"""

import numpy as np

# local import
from smrt.core.interface import Interface
from smrt.core.lib import smrt_matrix, len_atleast_1d

class RadarCalibrationSphere(Interface):

args = []
optional_args = {}

def specular_reflection_matrix(self, frequency, eps_1, eps_2, mu1, npol):

return smrt_matrix(0)

def diffuse_reflection_matrix(self, frequency, eps_1, eps_2, mu_s, mu_i, dphi, npol):

m = smrt_matrix.zeros((npol, len_atleast_1d(dphi), len_atleast_1d(mu_i)))
m[0:2, :, :] = 1.

return m

def ft_even_diffuse_reflection_matrix(self, frequency, eps_1, eps_2, mu_s, mu_i, m_max, npol):

m = smrt_matrix.zeros((npol, m_max + 1, len_atleast_1d(mu_s)))

# only mode 0, pola 0 and 1, are non-null
m[0:2, 0, :] = 1.

return m

def coherent_transmission_matrix(self, frequency, eps_1, eps_2, mu1, npol):

return smrt_matrix(0)
18 changes: 18 additions & 0 deletions smrt/substrate/radar_calibration_sphere.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# coding: utf-8


"""
Implement the radar_calibration_sphere interface boundary for the bottom layer (substrate).
"""

# local import
from smrt.interface.radar_calibration_sphere import RadarCalibrationSphere as iRadarCalibrationSphere
from smrt.core.interface import substrate_from_interface

# autogenerate from interface.radar_calibration_sphere
@substrate_from_interface(iRadarCalibrationSphere)
class RadarCalibrationSphere:
pass


0 comments on commit 63aa09f

Please sign in to comment.