Skip to content

Commit

Permalink
Initial commit of the nadir_lrm_altimetry extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainp committed Oct 9, 2020
1 parent 87c9b5b commit 8e4bce1
Show file tree
Hide file tree
Showing 4 changed files with 640 additions and 0 deletions.
41 changes: 41 additions & 0 deletions smrt/core/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,22 @@ def active(frequency, theta_inc, theta=None, phi=None, polarization_inc=None, po
return sensor


def altimeter(channel, **kwargs):

return Altimeter(channel=channel, **kwargs)


def make_multi_channel_altimeter(config, channel):
# helper function to make a single or multi channel altimter sensor object from a config in dict format
if isinstance(channel, str):
return altimeter(channel, **config[channel])
else:
if channel is None:
channel = config.keys()
return SensorList([altimeter(c, **config[c]) for c in channel])



class SensorBase(object):
pass

Expand Down Expand Up @@ -322,3 +338,28 @@ def iterate(self, axis=None):
if axis is not None and axis != self.axis:
raise SMRTError("SensorList is unable to iterate over a different axis than its axis")
yield from self.sensor_list


class Altimeter(Sensor):
""" Configuration for altimeter.
Use of the functions :py:func:`altimeter`, or the sensor specific functions
e.g. :py:func:`envisat_ra2` are recommended to access this class.
"""

def __init__(self, frequency, altitude, beamwidth, pulse_bandwidth, sigma_p=None, off_nadir_angle=0, beam_asymmetry=0,
ngate=1024, nominal_gate=40, theta_inc_deg=0., polarization_inc=None, polarization=None, channel=None):

channel_map = {channel: dict()} if channel is not None else dict()

super().__init__(frequency=frequency, theta_inc_deg=theta_inc_deg, theta_deg=theta_inc_deg,
polarization_inc=polarization_inc, polarization=polarization, channel_map=channel_map)

self.altitude = altitude
self.beamwidth = beamwidth
self.ngate = ngate
self.pulse_bandwidth = pulse_bandwidth
self.pulse_sigma = sigma_p if sigma_p is not None else 0.513 / pulse_bandwidth
self.nominal_gate = nominal_gate
self.off_nadir_angle = off_nadir_angle
self.beam_asymmetry = beam_asymmetry
69 changes: 69 additions & 0 deletions smrt/inputs/altimeter_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@


from smrt.core.sensor import make_multi_channel_altimeter, altimeter

#
# List of sensors
#


def envisat_ra2(channel=None):
"""return an Altimeter instance for the ENVISAT RA2 altimeter.
:param channel: can be 'S', 'Ku', or both. Default is both.
"""

config = {
'Ku': dict(frequency=13.575e9,
altitude=800e3,
pulse_bandwidth=320e6,
ngate=128,
nominal_gate=45,
beamwidth=1.29,
),
'S': dict(frequency=3.2e9,
altitude=800e3,
pulse_bandwidth=160e6,
ngate=128,
nominal_gate=32, # to correct, the value is rather close to 25
beamwidth=5.5, # Lacroix et al. and Fatras et al.,
),
}

return make_multi_channel_altimeter(config, channel)


def sentinel3_sral(channel=None):
"""return an Altimeter instance for the Sentinel 3 SRAL instrument.
:param channel: can be 'Ku' only ('C' is to be implemented)
"""

config = {
'Ku': dict(frequency=13.575e9,
altitude=814e3,
pulse_bandwidth=320e6,
nominal_gate=44,
ngate=128,
beamwidth=1.35,
),
}

return make_multi_channel_altimeter(config, channel)


def saral_altika():
"""return an Altimeter instance for the Saral/AltiKa instrument.
"""

params = dict(frequency=35.75e9,
altitude=800e3,
pulse_bandwidth=480e6,
nominal_gate=51,
ngate=128,
beamwidth=0.605,
)
return altimeter(channel='Ka', **params)

0 comments on commit 8e4bce1

Please sign in to comment.