Skip to content

Commit

Permalink
Merge pull request #13 from agrouaze/atbd_1
Browse files Browse the repository at this point in the history
ATBD CWAVE parameters in sphinx documentation
  • Loading branch information
agrouaze authored May 26, 2023
2 parents 878a3a3 + 1b33518 commit c2aa32e
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 2 deletions.
26 changes: 26 additions & 0 deletions docs/atbd.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _atbd:

******************************
SAR Algorithm Level-1C IFREMER
******************************

This page stands as the A.T.B.D. (Algorithm Technical Baseline Document) for Sentinel-1 L1C IFREMER product.

It describes the processing steps to transform Sentinel-1 SLC (Single Look Complex) product into a Level-1C.


C-WAVE
######################

.. toctree::
:maxdepth: 1
:hidden:
:caption: Computation of CWAVE parameters

cwave

:doc:`cwave`




81 changes: 81 additions & 0 deletions docs/cwave.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
.. _cwave:

================================
Computation of CWAVE parameters
================================


CWAVE parmeters are based on the SAR image x-spectrum.

The spectral information of the normalized x-spectrum is decomposed according to orthonormal functions :math:`H_{ij}` defined as tensor products of Gegenbauer polynomial :math:`G_i(\alpha_k(k_x,k_y))` and harmonic :math:`F_j(\alpha_\phi(k_x,k_y))` functions defined in the azimuth :math:`k_y` and range :math:`k_y` wave-number space, following XXX work.

This yields to the general formulation of CWAVE parameters :math:`C_{ij}`:

.. math::
C_{ij} = \sum_{k_x, k_y}\overline{P}(k_x,k_y) H_{ij}(k_x,k_y)dk_x dk_y,
with :math:`i \in [1,n_k]` and :math:`j \in [1,n_{\phi}]`.
In this study :math:`n_k=4` and :math:`n_{\phi}=5`.

The orthonormal functions are defined such as:

.. math::
H_{ij}(k_x,k_y) = G_i(\alpha_k) F_j(\alpha_\phi) \eta(k_x , k_y),
where :math:`\eta` writes as:

.. math::
\eta(k_x,k_y) = \bigg( \frac{2(a_2k_x^2 + 2a_1k_x^4+k_y^2)}{(k_x^2 + k_y^2)(a_2k_x^2 + a_1k_x^4 + k_y^2)(\log k_{\max}-\log k_{\min})}\bigg)^2,
%\log k_{\max}
%(\log k_{\max}-\log k_{\min})
with

.. math::
\begin{align}
\gamma & = 2 \\
a_1 & = \frac{(\gamma^2 - \gamma^4) }{ (\gamma^2 * k_{\min}^2 - k_{\max}^2) }\\
a_2 & = \frac{ k_{\max}^2 - \gamma^4 k_{\min}^2 }{k_{\max}^2 - \gamma^2 k_{\min}^2}
\end{align}
In this study, :math:`k_{\min} = 2\pi/600` and :math:`k_{\max} = 2\pi/25` to take benefit of the improved resolution and size of Sentinel-1 SAR images.

:math:`G_i(\alpha_k(k_x,k_y))` writes :

.. math::
\begin{align}
G_{i}^{(\lambda)}(x) & = \frac{1}{i} \bigg(2 x (i+\lambda-1) G_{i-1}^{(\lambda)}(x) - (i+2\lambda-2) G_{i-2}^{(\lambda)}(x) \bigg), \textrm{ for } i \ge 2.
\end{align}
Otherwise:

.. math::
\begin{align}
C_{0}^{(\lambda)}(x) & = 1 \\
C_{1}^{(\lambda)}(x) & = 2 \lambda x
\end{align}
In this study :math:`\lambda` is set to :math:`3/2`. :math:`F_j(\alpha_\phi(k_x,k_y))` writes :

.. math::
\begin{align}
F_j(x) & = \sqrt{2/\pi}\sin\big(jx\big), \textrm{ for n>1, when i is even} \\
F_j(x) & = \sqrt{2/\pi}\sin\big((j-1)x\big), \textrm{ for n>1, when i is odd}.
\end{align}
otherwise:

.. math::
\begin{align}
F_1(x) & = \sqrt{2/\pi}
\end{align}
Finally :math:`\alpha_k` and :math:`\alpha_{\phi}` write:

.. math::
\begin{align}
\alpha_k & = 2 \frac{ \log\bigg(\sqrt{a_1 k_x^4 + a_2 k_x^2 + k_y^2}\bigg) - \log(k_{\min}) }{ \log(k_{\max})- \log(k_{\min}) } - 1 \\
\alpha_{\phi} &= \arctan(k_x, k_y).
\end{align}
19 changes: 18 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,20 @@ Documentation
Overview
........

**slcl1butils** helps to read L1B products (especially IW TOPS Scan SAR acquistions) containing both intra burst and
**slcl1butils** helps to read L1B products (especially IW TOPS Scan SAR acquisitions) containing both intra burst and
inter (i.e. overlapping bursts) burst cross spectrum.



Algorithm Technical Baseline Document
.....................................

.. note::
The Algorithm Technical Baseline Document (ATBD) describes implemented processing steps from Sentinel-1 SLC product to Level-1C IFREMER products

* :doc:`atbd`


Examples
........

Expand Down Expand Up @@ -70,6 +80,13 @@ Last documentation build: |today|

installing

.. toctree::
:maxdepth: 1
:hidden:
:caption: Algorithm description

atbd

.. toctree::
:maxdepth: 1
:hidden:
Expand Down
2 changes: 1 addition & 1 deletion slcl1butils/scripts/do_IW_L1C_SAFE_from_L1B_SAFE.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def append_ancillary_field(ancillary, ds_intra, ds_inter):
closest_date, filename = resource_strftime(ancillary['resource'], step=ancillary['step'], date=sar_date)
if (len(glob(filename)) != 1):
logging.info('no ancillary files matching %s', filename)
return 0
return ds_intra,ds_inter
# Getting the raster from anxillary data
if (ancillary['name'] == 'ecmwf_0100_1h'):
raster_ds = ecmwf_0100_1h(filename)
Expand Down

0 comments on commit c2aa32e

Please sign in to comment.