This is an example of how to perform profiling on the Arc Unwrapping algorithms. In this example we used the so-called "LAMBDA method" developed by TUDelft, and use a wrapper function in DePSI to call the unwrapping algorithm.
- LAMBDA method: LAMBDA.py (private repo)
- Wrapper funtion
lambda_estimation: lambda_estimation (private repo) - Data needed for the example: stm_amsterdam_173p.zarr
- lambda_unwrap.ipynb: Jupyter notebook for debugging and visualization
- lambda_unwrap.py: Python script for running the unwrapping algorithm in a recursive loop
- lambda_unwrap_dask.ipynb: Jupyter notebook for debugging dask method
- lambda_unwrap_dask.py: Python script for running the same unwrapping algorithm with dask databags
We use the py-spy package to profile the unwrapping algorithm. For example, we can use the following command to profile the unwrapping algorithm without dask
py-spy record --output profile_loop_60pnts.json --idle --rate 5 --subprocesses --format speedscope python lambda_unwrap.pyIn lambda_unwrap_dask.py configure:
# Configure dask scheduler
dask.config.set(scheduler="processes") py-spy record --output profile_dask_60pnts_processes.json --idle --rate 5 --subprocesses --format speedscope python lambda_unwrap_dask.py# Configure dask scheduler
dask.config.set(scheduler="threads") py-spy record --output profile_dask_60pnts_threads.json --idle --rate 5 --subprocesses --format speedscope python lambda_unwrap_dask.pyThen you can visualize the profiling results using the speedscope web tool by uploading the corresponding JSON file.
The results for 5 points, 24 points and 60 points can be found at: this link