Skip to content

Commit 32666c9

Browse files
authored
Merge pull request #85 from JoeTheVoices/review
Improve readability and fix typos
2 parents 172e1ad + b04e00a commit 32666c9

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

README.md

+27-26
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Overall the software is in the **alpha** phase and the usual caveats apply.
2323
satellite orbit and attitude, ground control points, radiometric calibration look up tables,
2424
Doppler centroid estimation and more
2525
- reads uncompressed and compressed SAFE data products on the local computer or
26-
on a network via [*fsspec*](https://filesystem-spec.readthedocs.io) - **dependes on rasterio>=1.3a3**
26+
on a network via [*fsspec*](https://filesystem-spec.readthedocs.io) - **depends on rasterio>=1.3a3**
2727
- supports larger-than-memory and distributed data access via [*Dask*](https://dask.org) and
2828
[*rioxarray*](https://corteva.github.io/rioxarray) /
2929
[*rasterio*](https://rasterio.readthedocs.io) / [*GDAL*](https://gdal.org)
@@ -87,14 +87,14 @@ Attributes: ...
8787

8888
The root `Dataset` does not contain any data variable, but only attributes that provide general information
8989
on the product and a description of the tree structure of the data.
90-
The attribute `group` contains the name of the current group and the `subgroups` attribute shows
90+
The `group` attribute contains the name of the current group and the `subgroups` attribute shows
9191
the names of all available groups below this one.
9292

9393
### Measurements datasets
9494

9595
To open the other groups we need to add the keyword `group` to `xr.open_dataset`.
96-
So we can read the measurement by selecting the desired beam mode and the polarization,
97-
in this example the data contains the S3 beam mode and we select the VH polarization with `group="S3/VH"`:
96+
The measurement can then be read by selecting the desired beam mode and polarization.
97+
In this example, the data contains the S3 beam mode and the VH polarization with `group="S3/VH"` is selected:
9898

9999
```python-repl
100100
>>> slc_s3_vh = xr.open_dataset(slc_sm_path, group="S3/VH", engine="sentinel-1", chunks=2048)
@@ -126,15 +126,15 @@ Attributes: ...
126126
```
127127

128128
The `measurement` variable contains the Single Look Complex measurements as a `complex64`
129-
and it has dimensions `slant_range_time` and `azimuth_time`.
129+
and has dimensions `slant_range_time` and `azimuth_time`.
130130
The `azimuth_time` is an `np.datetime64` coordinate that contains the UTC zero-Doppler time
131131
associated with the image line
132132
and `slant_range_time` is an `np.float64` coordinate that contains the two-way range time interval
133133
in seconds associated with the image pixel.
134134

135135
### Metadata datasets
136136

137-
The measurement group contains several subgroups with metadata associated with the image, at the moment
137+
The measurement group contains several subgroups with metadata associated with the image. Currently,
138138
*xarray-sentinel* supports the following metadata datasets:
139139

140140
- product XML file
@@ -185,7 +185,7 @@ Attributes: ...
185185
```
186186

187187
Note that in this case, the dimensions are `line` and `pixel` with coordinates corresponding to
188-
the sub-grid of the original image where it is defined the calibration Look Up Table.
188+
the sub-grid of the original image where the calibration Look Up Table is defined.
189189

190190
The groups present in a typical Sentinel-1 Stripmap product are:
191191

@@ -227,7 +227,7 @@ but also because the measurement array is a collage of sub-images called *bursts
227227

228228
You need to first open the desired measurement dataset, for example, the VH polarisation
229229
of the first IW swath of the `S1B_IW_SLC__1SDV_20210401T052622_20210401T052650_026269_032297_EFA4`
230-
product in the current folder:
230+
product, in the current folder:
231231

232232
```python-repl
233233
>>> slc_iw_path = "tests/data/S1B_IW_SLC__1SDV_20210401T052622_20210401T052650_026269_032297_EFA4.SAFE"
@@ -293,7 +293,7 @@ Attributes: ...
293293
294294
```
295295

296-
Note that the helper function also performs additional changes like swapping the dimensions
296+
Note that the helper function also performs additional changes, such as swapping the dimensions
297297
to the physical coordinates and adding burst attributes.
298298

299299
As a quick way to access burst data, you can add the `burst_index` to the group specification on
@@ -352,15 +352,15 @@ Attributes:
352352

353353
**You need the unreleased rasterio>=1.3a3 for fsspec to work on measurement data**
354354

355-
You can test the following after:
355+
You can test with the following:
356356
`pip install -U --pre --no-deps --no-binary rasterio rasterio>=1.3a3`.
357357

358358
*xarray-sentinel* can read data from a variety of data stores including local file systems,
359359
network file systems, cloud object stores and compressed file formats, like Zip.
360360
This is done by passing *fsspec* compatible URLs to `xr.open_dataset` and optionally
361361
the `storage_options` keyword argument.
362362

363-
For exmaple you can open a product directly from a Zip file with:
363+
For example you can open a product directly from a zip file with:
364364

365365
```python-repl
366366
>>> slc_iw_zip_path = "tests/data/S1B_IW_SLC__1SDV_20210401T052622_20210401T052650_026269_032297_EFA4.zip"
@@ -391,7 +391,7 @@ Attributes: ...
391391
392392
```
393393

394-
As an exmaple of remote access you can open a product directly from a GitHub repo with:
394+
As an example of remote access, you can open a product directly from a GitHub repo with:
395395

396396
```python-repl
397397
>>> xr.open_dataset(f"github://bopen:xarray-sentinel@/{slc_iw_path}", group="IW1/VH", engine="sentinel-1") # doctest: +SKIP
@@ -461,36 +461,37 @@ Attributes: ...
461461

462462
## Design decisions
463463

464-
- The main design choice for *xarray-sentinel* is for it to be as much as possible a pure map of
464+
- The main design choice for *xarray-sentinel* is for it to be as much as viable a pure map of
465465
the content of the SAFE data package, with as little interpretation as possible.
466466
- The tree-like structure follows the structure of the SAFE package even when information,
467467
like orbit and attitude, is expected to be identical for different beam modes.
468468
We observed at least a case where the number of orbital state vectors reported
469469
was different between beam modes.
470470
- Data and metadata are converted to the closest available data-type in *Python* / *numpy*.
471471
The most significant conversion is from `CInt16` to `np.complex64` for the SLC measurements
472-
that doubles the space requirements for the data.
472+
that double the space requirements for the data.
473473
Also, *xarray-sentinel* converts UTC times to `np.datetime64` and makes no attempt to support
474474
*leap seconds*, acquisitions containing leap seconds may crash or silently return corrupted data.
475475
See the rationale for choices of the coordinates data-types below.
476476
- We try to keep all naming as close as possible to the original names,
477-
in particular, for metadata we use the names of the XML tags, only converting them
478-
from *camelCase* to *snake_case*. Except for the high-level attributes, see below.
477+
except for high-level attributes (see below).
478+
In particular, for metadata we use the names of the XML tags, only converting them
479+
from *camelCase* to *snake_case*.
479480
- Whenever possible *xarray-sentinel* indexes the data with physical coordinates
480481
`azimuth_time` and `slant_range_time`, but keeps image `line` and `pixel` as auxiliary coordinates.
481482
- As an exception to the metadata naming rule above for high-level attributes, we aim at
482483
STAC Index and CF-Conventions compliance (in this order).
483484
- We aim at opening available data and metadata even for partial SAFE packages, for example,
484485
*xarray-sentinel* can open a measurement dataset for a beam mode even when the TIFF files of other
485-
beam modes / polarization are missing.
486-
- Accuracy considerations and rationale for the data-types of the coordinates
487-
- `azimuth_time` can be expressed as `np.datetime64[ns]` because
486+
beam modes / polarizations are missing.
487+
- Accuracy considerations and rationale for coordinates data-types:
488+
- `azimuth_time` can be expressed as `np.datetime64[ns]` since
488489
spatial resolution at LEO speed is 10km/s * 1ns ~= 0.001cm.
489-
- `slant_range_time` on the other hand cannot be expressed as `np.timedelta64[ns]` because
490+
- `slant_range_time` on the other hand cannot be expressed as `np.timedelta64[ns]` as
490491
spatial resolution at the speed of light is 300_000km/s * 1ns / 2 ~= 15cm,
491-
that it is not enough for interferometric applications.
492-
`slant_range_time` needs a spatial resolution of 0.001cm at a 1_000km distance
493-
so around 1e-9 that is well within 1e-15 resolution of IEEE-754 float64.
492+
i.e. not enough for interferometric applications.
493+
`slant_range_time` needs a spatial resolution of 0.001cm at a 1_000km distance,
494+
i.e. around 1e-9, well within the 1e-15 resolution of IEEE-754 float64.
494495
- This is a list of reference documents:
495496
- Sentinel-1 document library - https://sentinels.copernicus.eu/web/sentinel/user-guides/sentinel-1-sar/document-library
496497
- Sentinel-1 Product Specification v3.9 07 May 2021 S1-RS-MDA-52-7441-3-9 documenting IPF 3.40 -
@@ -508,8 +509,8 @@ Attributes: ...
508509

509510
## Contributing
510511

511-
The main repository is hosted on GitHub,
512-
testing, bug reports and contributions are highly welcomed and appreciated:
512+
The main repository is hosted on GitHub.
513+
Testing, bug reports and contributions are highly welcomed and appreciated:
513514

514515
https://github.com/bopen/xarray-sentinel
515516

@@ -530,7 +531,7 @@ See also the list of [contributors](https://github.com/bopen/xarray-sentinel/con
530531

531532
We wish to express our gratitude to the project sponsors:
532533

533-
- [Microsoft](https://microsoft.com) has contributed to adding GRD products and *fsspec* access
534+
- [Microsoft](https://microsoft.com) has contributed to adding GRD products and *fsspec* access.
534535

535536
## License
536537

0 commit comments

Comments
 (0)