Skip to content

Commit

Permalink
Dcoumentation style accoding to flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Apr 25, 2022
1 parent 51add7c commit 346c807
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
5 changes: 3 additions & 2 deletions xarray_sentinel/conventions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""CF representation of metadata according to
Sentinel-1 Product Specification: S1-RS-MDA-52-7441, DI-MPC-PB, MPC-0240, 3/7, 27/02/2020 See:
"""CF representation of metadata according to Sentinel-1 Product Specification.
See: S1-RS-MDA-52-7441, DI-MPC-PB, MPC-0240, 3/7, 27/02/2020
https://sentinel.esa.int/documents/247904/1877131/Sentinel-1-Product-Specification
"""

Expand Down
19 changes: 10 additions & 9 deletions xarray_sentinel/sentinel1.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,10 @@ def crop_burst_dataset(
use_center: bool = False,
burst_id: T.Optional[int] = None,
) -> DataArrayOrDataset:
"""
Returns the measurement dataset cropped to the selected burst.
"""Return the measurement dataset cropped to the selected burst.
Only one keyword between 'burst_index' and 'azimuth_anx_time' and 'burst_id' must be defined.
:param xr.Dataset pol_dataset: measurement dataset
:param int burst_index: burst index can take values from 1 to the number of bursts
:param float azimuth_anx_time: azimuth anx time of first line of the bursts
Expand Down Expand Up @@ -659,9 +660,11 @@ def mosaic_slc_iw(
def calibrate_amplitude(
digital_number: xr.DataArray, calibration_lut: xr.DataArray
) -> xr.DataArray:
"""Returns the calibrated amplitude. The calibration is done using the calibration LUT in the product metadata.
"""Return the calibrated amplitude. The calibration is done using the calibration LUT in the product metadata.
:param digital_number: digital numbers to be calibrated
:param calibration_lut: calibration LUT (sigmaNought, betaNought or gamma).
The LUT can be opened using the measurement sub-group `calibration`
"""
calibration = calibration_lut.interp(
Expand All @@ -685,8 +688,8 @@ def calibrate_intensity(
as_db: bool = False,
min_db: T.Optional[float] = -40.0,
) -> xr.DataArray:
"""
Returns the calibrated intensity. The calibration is done using the calibration LUT in the product metadata.
"""Return the calibrated intensity. The calibration is done using the calibration LUT in the product metadata.
:param digital_number: digital numbers to be calibrated
:param calibration_lut: calibration LUT (sigmaNought, betaNought or gamma).
The LUT can be opened using the measurement sub-group `calibration`.
Expand Down Expand Up @@ -717,14 +720,12 @@ def slant_range_time_to_ground_range(
slant_range_time: xr.DataArray,
coordinate_conversion: xr.Dataset,
) -> xr.DataArray:
"""
Convert the slant range time coordinates to ground range coordinates using the coordinate conversion `sr0`
and `srgrCoefficients` product metadata
"""Convert slant range time to ground range using the coordinate conversion metadata.
:param azimuth_time: azimuth time coordinates
:param slant_range_time: slant range time
:param coordinate_conversion: coordinate conversion dataset.
The coordinate conversion dataset can be opened using the measurement sub-groub `coordinate_conversion`
:return:
"""
slant_range = SPEED_OF_LIGHT / 2.0 * slant_range_time
cc = coordinate_conversion.interp(azimuth_time=azimuth_time)
Expand Down

0 comments on commit 346c807

Please sign in to comment.