Introducing modes of operation#34
Conversation
Codecov ReportAttention: Patch coverage is
🚀 New features to boost your workflow:
|
That might be ok, but may also be achieved by dropping/excluding variables. Anyway it is out of scope of this PR. Let's create an issue and PR for this after this PR.
I am, because:
We should add this to the user docs!
Yes, we discussed this already once. There is also a TODO in the code and we should create another PR dedicated to this later. |
konstntokas
left a comment
There was a problem hiding this comment.
A few general points here and see my comments below. We are almost done!
- remove
examples/ceph_tests.ipynb - delete cell 22 in
examples/open-sen1-native.ipynband rerun again, the cells after cell 22 are not executed due to the error - [Optional] improve colorbars in
examples/open-sen2-analysis.ipynb; setvminandvmaxfo reflectance data; use mask - run isort .`
| @@ -0,0 +1,108 @@ | |||
| The xarray backend for EOPF data products `"eopf-zarr"` has two modes of operation, | |||
| namely _analysis mode_ and _native mode_, which are described in the following. | |||
There was a problem hiding this comment.
I think we should write here that the analysis mode is the default.
| Works basically as `open_datatree()` but using flattened Zarr groups, e.g., groups | ||
| `r10m`, `r20m`, `r60m` in Sentinel 2 MSI products. | ||
| Flattening includes renaming variables and dimensions by prefixing them using the | ||
| concatenated names of nested groups. | ||
|
|
There was a problem hiding this comment.
There is no renaming happening of the variables and coordinates in the analysis mode. I think these 4 lines need some adjustment.
| OPEN_DT_URL = "https://docs.xarray.dev/en/stable/generated/xarray.open_datatree.html" | ||
| OPEN_DS_URL = "https://docs.xarray.dev/en/stable/generated/xarray.open_dataset.html" | ||
| FSSPEC_USAGE_URL = "https://filesystem-spec.readthedocs.io/en/latest/usage.html" |
There was a problem hiding this comment.
These constants are not used.
There was a problem hiding this comment.
Yes, they are leftovers from my try to use them in f-string docstrings. But unfortunately that didn't work with mkdocs-python.
Removed.
| # TODO: also drop now unused coordinates + dimensions as | ||
| # they remain even if no longer referenced by any data variables |
| data=rescaled_data, | ||
| dims=var.dims[:-2] + ref_var.dims[-2:], | ||
| name=var.name, | ||
| attrs=var.attrs, |
There was a problem hiding this comment.
I think we should add information here, if a band was rescaled and what was the original resolution.
There was a problem hiding this comment.
Yes, good idea. Will add a history entry.
Co-authored-by: Konstantin Ntokas <38956538+konstntokas@users.noreply.github.com>
Co-authored-by: Konstantin Ntokas <38956538+konstntokas@users.noreply.github.com>
Done.
Done.
Adjust as you like.
Done. |
Closes #6