Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

29 pydepsi to depsi #32

Merged
merged 3 commits into from
Dec 20, 2024
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
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# PyDePSI (Tentative name)

This is repository is WIP, where we are developing a Python package for inteferometric SAR processing. The software will be inspired by the MATLAB software DePSI, but implemented in Python and include recent developments in the field.
# DePSI
This is the WIP repository for the Python version of DePSI *(), a Python package for inteferometric SAR processing. The software is inspired by the MATLAB version DePSI. In this repository, we implement classic DePSI algorithms and new InSAR developments in Python.

## Installation for development

Expand All @@ -9,22 +8,22 @@ It is assumed that you have `mamba` installed. If not, you can find the installa
Clone this repository and `cd` into it:

```bash
git clone [email protected]:MotionbyLearning/PyDePSI.git
cd PyDePSI
git clone [email protected]:TUDelftGeodesy/DePSI.git
cd DePSI
```

Create a new conda environment (here we give an example name `pydepsi-dev`) with `mamba`.:
Create a new conda environment (here we give an example name `depsi-dev`) with `mamba`.:

```bash
mamba create -c conda-forge -n pydepsi-dev python=3.12
mamba create -c conda-forge -n depsi-dev python=3.12
```

Here we use Python 3.12 since we aim to support python 3.10 and above.

Activate the environment:

```bash
mamba activate pydepsi-dev
mamba activate depsi-dev
```

Install this package in development mode:
Expand All @@ -43,3 +42,9 @@ pre-commit install
- [Python packaging user guide](https://packaging.python.org/)
- [Testing in Python](https://docs.kedro.org/en/stable/development/automated_testing.html)
- [Code formatting and linting](https://docs.kedro.org/en/stable/development/linting.html)

## License

Copyright (c) 2023 - 2025, Netherlands eScience Center & Delft University of Technology

Apache Software License 2.0
File renamed without changes.
2 changes: 1 addition & 1 deletion pydepsi/io.py → depsi/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import numpy as np

from pydepsi.utils import _orbit_fit
from depsi.utils import _orbit_fit

# Define constants
SC_N_PATTERN = r"\s+([-+]?\d+(?:\.\d+)?(?:[eE][-+]?\d+)?)"
Expand Down
File renamed without changes.
File renamed without changes.

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions examples/scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Example script for PyDePSI
# Example script for DePSI

This folder contains scripts to run PyDePSI on SLURM infrastructures. One needs to modify `exec_python.slurm` to specify 1) a conda environment with PyDePSI and 2) the desired Python script. The following command can be used to execute the specified script:
This folder contains scripts to run DePSI on SLURM infrastructures. One needs to modify `exec_python.slurm` to specify 1) a conda environment with DePSI and 2) the desired Python script. The following command can be used to execute the specified script:

```bash
sbatch exec_python.slurm
Expand All @@ -10,12 +10,12 @@ The submitted SLURM job will execute the Python script. A Dask cluster will be c

## Prerequisites

It is assumed that the user has a working conda environment with PyDePSI installed. This conda environment is required in the `exec_python.slurm` script.
It is assumed that the user has a working conda environment with DePSI installed. This conda environment is required in the `exec_python.slurm` script.

Some HPC system (for example SURF Spider system, see [this documentation](https://doc.spider.surfsara.nl/en/latest/Pages/software_on_spider.html)) may require the user to execute the conda environment inside a container. One can for example use the [LUMI container wrapper](https://docs.lumi-supercomputer.eu/software/installing/container-wrapper/) as a solution. The [JupyterDaskOnSLURM](https://github.com/RS-DAT/JupyterDaskOnSLURM/tree/main) tool from RS-DAT platform provides the LUMI container wrapper together with Jupyter Lab interface and Dask-Slurm cluster, see the [Container wrapper for Spider system](https://github.com/RS-DAT/JupyterDaskOnSLURM/blob/main/user-guide.md#container-wrapper-for-spider-system) section. For more information on the RS-DAT platform, please refer to the following section "PyDePSI with RS-DAT".
Some HPC system (for example SURF Spider system, see [this documentation](https://doc.spider.surfsara.nl/en/latest/Pages/software_on_spider.html)) may require the user to execute the conda environment inside a container. One can for example use the [LUMI container wrapper](https://docs.lumi-supercomputer.eu/software/installing/container-wrapper/) as a solution. The [JupyterDaskOnSLURM](https://github.com/RS-DAT/JupyterDaskOnSLURM/tree/main) tool from RS-DAT platform provides the LUMI container wrapper together with Jupyter Lab interface and Dask-Slurm cluster, see the [Container wrapper for Spider system](https://github.com/RS-DAT/JupyterDaskOnSLURM/blob/main/user-guide.md#container-wrapper-for-spider-system) section. For more information on the RS-DAT platform, please refer to the following section "DePSI with RS-DAT".

## PyDePSI with RS-DAT
## DePSI with RS-DAT

The [RS-DAT platform](https://rs-dat.github.io/RS-DAT/) developed by Netherlands eScience Center can be used to start up a Jupyter environment with Dask cluster. RS-DAT can also be used to start a Dask cluster scheduler on a HPC system, to which other Python scripts/processes can connect by providing the scheduler address. In this way, the same Dask cluster can be re-used for multiple Python script executions. This can be useful for developing and testing PyDePSI scripts.
The [RS-DAT platform](https://rs-dat.github.io/RS-DAT/) developed by Netherlands eScience Center can be used to start up a Jupyter environment with Dask cluster. RS-DAT can also be used to start a Dask cluster scheduler on a HPC system, to which other Python scripts/processes can connect by providing the scheduler address. In this way, the same Dask cluster can be re-used for multiple Python script executions. This can be useful for developing and testing DePSI scripts.

Please refer to the [RS-DAT JupyterDaskOnSLURM user guide](https://github.com/RS-DAT/JupyterDaskOnSLURM/blob/main/user-guide.md) for this option.
4 changes: 2 additions & 2 deletions examples/scripts/script_reslc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from dask_jobqueue import SLURMCluster
import sarxarray

from pydepsi.slc import ifg_to_slc
from pydepsi.io import read_metadata
from depsi.slc import ifg_to_slc
from depsi.io import read_metadata

# Make a logger to log the stages of processing
logger = logging.getLogger(__name__)
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "pydepsi"
name = "depsi"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
Expand Down Expand Up @@ -48,7 +48,7 @@ demo = [
]

[tool.setuptools]
packages = ["pydepsi"]
packages = ["depsi"]

[tool.pytest.ini_options]
minversion = "6.0"
Expand All @@ -59,7 +59,7 @@ testpaths = [

[tool.coverage.run]
branch = true
source = ["pydepsi"]
source = ["depsi"]

[tool.ruff]
lint.select = [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_io.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydepsi.io import read_metadata
from depsi.io import read_metadata


def test_read_metadata_lines_pixels():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_slc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
import xarray as xr

from pydepsi.slc import _slc_complex_recontruct, ifg_to_slc
from depsi.slc import _slc_complex_recontruct, ifg_to_slc


def test__slc_complex_recontruct():
Expand Down
Loading