faninsar.constants.SAR#

class faninsar.constants.SAR[source]#

Bases: object

Base class for SAR missions with immutable frequency/wavelength properties.

This class provides a simple base for defining SAR missions. Subclasses should define the _frequency class attribute to specify the mission’s frequency. The wavelength is automatically computed from the frequency.

_frequency#

The frequency of the SAR mission (class attribute, defined by subclasses).

Type:

Frequency

Properties#
----------
frequency#

The frequency of the SAR mission (read-only).

Type:

Frequency

wavelength#

The wavelength computed from frequency (read-only).

Type:

Wavelength

Examples

>>> # Define a SAR mission by subclassing
>>> class Sentinel1(SAR):
...     _frequency = Frequency(5.405, "GHz")
>>> # Access frequency and wavelength directly from class
>>> print(Sentinel1._frequency)
5.405 GHz
>>> # Or use with instantiation
>>> s1 = Sentinel1()
>>> print(s1.frequency)
5.405 GHz
>>> print(s1.wavelength)
55.46 mm

Notes

  • The wavelength is computed from frequency on-the-fly.

  • Properties are read-only - attempting to modify them will raise AttributeError.

  • Subclasses only need to define the _frequency class attribute.

  • No __init__ method is needed, making the class simple to inherit.

__init__()#

Methods

Attributes

frequency

Get the frequency of the SAR mission.

wavelength

Get the wavelength of the SAR mission.

property frequency: Frequency#

Get the frequency of the SAR mission.

Returns:

The frequency of the SAR mission.

Return type:

Frequency

Examples

>>> s1 = Sentinel1()
>>> print(s1.frequency)
5.405 GHz
property wavelength: Wavelength#

Get the wavelength of the SAR mission.

The wavelength is computed from frequency.

Returns:

The wavelength of the SAR mission in millimeters.

Return type:

Wavelength

Examples

>>> s1 = Sentinel1()
>>> print(s1.wavelength)
55.46 mm