Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitattributes
Comment thread
vincelhx marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
*.ipynb filter=nbstrip_full

# for setuptools_scm in conda-forge see https://pypi.org/project/setuptools-scm-git-archive/
.git_archival.txt export-subst
.git_archival.txt export-subst

* text=auto
*.py text eol=lf
*.js text eol=lf
*.md text eol=lf
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
create-args: >-
python=${{matrix.python-version}}
post-cleanup: "none"

- name: Install xsar
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/upstream-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
create-args: >-
python=${{ matrix.python-version }}
pytest-reportlog
post-cleanup: "none"

- name: install upstream-dev dependencies
run: bash ci/install-upstream-dev.sh
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/environment.yaml
Comment thread
vincelhx marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ dependencies:
- geopandas
- lxml
- rioxarray
- mapraster
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
#html_theme = 'classic'
# html_theme = 'classic'
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
Expand All @@ -79,12 +79,12 @@

html_style = 'css/xsar.css'

#html_logo = "_static/logo.png"
# html_logo = "_static/logo.png"
html_theme_options = {
'logo_only': False,
'display_version': True,
'navigation_depth': 4, # FIXME: doesn't work as expeted: should expand side menu
'collapse_navigation': False # FIXME: same as above
'collapse_navigation': False # FIXME: same as above
}

# If true, links to the reST sources are added to the pages.
Expand All @@ -104,4 +104,4 @@
----
"""

today_fmt = '%b %d %Y at %H:%M'
today_fmt = '%b %d %Y at %H:%M'
4 changes: 2 additions & 2 deletions docs/examples/mask.ipynb
Comment thread
vincelhx marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "env_xsar",
"language": "python",
"name": "python3"
},
Expand All @@ -294,7 +294,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.10.15"
}
},
"nbformat": 4,
Expand Down
22 changes: 17 additions & 5 deletions docs/examples/projections.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,24 @@
"source": [
"## Mapping a raster onto original xsar grid\n",
"\n",
"Using `rioxarray.reproject_match` with a destination grid containing gcps (like xsar dataset) is currently not supported, but xsar provide [xsar.BaseDataset.map_raster](../basic_api.rst#xsar.BaseDataset.map_raster).\n",
"Using `rioxarray.reproject_match` with a destination grid containing gcps (like xsar dataset) is currently not supported.\n",
"\n",
"It's argument is a projected dataset, that we want to map onto the xsar grid.\n",
"mapraster provides map_raster. \n",
"\n",
"One argument is a projected dataset, that we want to map onto the xsar grid.\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "350d9cea",
"metadata": {},
"outputs": [],
"source": [
"from mapraster import map_raster"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -424,7 +436,7 @@
"outputs": [],
"source": [
"#xsar_obj.dataset['sigma0_rasterized'] = \n",
"tmp_ds = xsar_obj.map_raster(merged_grid['sigma0'])\n",
"tmp_ds = map_raster(merged_grid['sigma0'], xsar_obj._dataset,footprint = xsar_obj.sar_meta.footprint, cross_antimeridian=xsar_obj.sar_meta.cross_antimeridian)\n",
"tmp_ds.name = 'sigma0_rasterized'\n",
"xsar_obj.datatree['measurement'] = xsar_obj.datatree['measurement'].assign(xr.merge([xsar_obj.dataset,tmp_ds]))\n",
"xsar_obj.recompute_attrs()"
Expand All @@ -448,7 +460,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "env_xsar",
"language": "python",
"name": "python3"
},
Expand All @@ -462,7 +474,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"version": "3.10.15"
}
},
"nbformat": 4,
Expand Down
36 changes: 34 additions & 2 deletions docs/examples/xsar_batch_datarmor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -576,11 +576,43 @@
"cluster.close()\n",
"client.close()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d2d43ce0",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "84ebe89c",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "710632aa",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "7b7ab189",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "env_xsar",
"language": "python",
"name": "python3"
},
Expand All @@ -594,7 +626,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.10.15"
},
"nbsphinx": {
"execute": "never"
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/xsar_multiple.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "env_xsar",
"language": "python",
"name": "python3"
},
Expand All @@ -229,7 +229,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.10.15"
}
},
"nbformat": 4,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ dependencies = [
'jinja2',
'rioxarray',
'lxml',
'mapraster'
]
[project.optional-dependencies]
RS2 = ["xradarsat2"]
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ matplotlib
packaging
pytest
dill
lxml
lxml
map_raster
3 changes: 2 additions & 1 deletion requirements_doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ jupyter-sphinx
sphinxcontrib-programoutput
xradarsat2
xarray-safe-rcm
xarray-safe-s1
xarray-safe-s1
mapraster
Loading