Package for plotting outputs Ames Stereo Pipeline processing
Project description
asp_plot
Scripts and notebooks to visualize output from the NASA Ames Stereo Pipeline (ASP).
Motivation
Our objective is to release a modular Python package with a command-line interface (CLI) that can be run automatically on an ASP output directory to prepare a set of standard diagnostic plots, publication-quality output figures, and a pdf report with relevant information, similar to the reports prepared by many commercial SfM software packages (e.g., Agisoft Metashape, Pix4DMapper).
Status
This is a work in progress.
The directory original_code/
contains initial notebooks compiled from recent projects using sample stereo images from the Maxar WorldView, Planet SkySat-C and BlackSky Global constellations.
The functionality of these notebooks is being ported to the asp_plot/
directory, which is the package asp_plot
.
Files you will need from ASP processing
During the stereo
or parallel_stereo
steps at the heart of the Ames Stereo Pipeline, you can add this to the command to ensure that the files needed for plotting are retained, and files that are not required are cleaned up:
--keep-only '.mask .txt .exr .match -L.tif -L_sub.tif -R_sub.tif -D_sub.tif -D.tif -RD.tif -F.tif -PC.tif'
Not all of those files are used in the plotting, but all are useful for re-processing and detailed analyses.
Install via pip
pip install asp-plot
Notebook example usage
Examples of the modular usage of the package can be found in the notebooks/
directory.
CLI usage
A full report and individual plots can be output via the command-line:
$ asp_plot --directory ./ \
--bundle_adjust_directory ba \
--stereo_directory stereo \
--map_crs EPSG:32604 \
--reference_dem ref_dem.tif
Before that, we recommend running asp_plot --help
for details (and defaults) of all of the command-line flags:
$ asp_plot --help
Usage: asp_plot [OPTIONS]
Options:
--directory TEXT Directory of ASP processing with scenes and
sub-directories for bundle adjustment and
stereo. Default: current directory
--bundle_adjust_directory TEXT Directory of bundle adjustment files.
Default: ba
--stereo_directory TEXT Directory of stereo files. Default: stereo
--map_crs TEXT Projection for bundle adjustment plots.
Default: EPSG:4326
--reference_dem TEXT Reference DEM used in ASP processing. No
default. Must be supplied.
--report_filename TEXT PDF file to write out for report into the
processing directory supplied by
--directory. Default: Directory name of ASP
processing
--report_title TEXT Title for the report. Default: Directory
name of ASP processing
Development
Install from source
If you instead want to install the source code for e.g. developing the project:
$ git clone git@github.com:uw-cryo/asp_plot.git
$ cd asp_plot
$ conda env create -f environment.yml
$ conda activate asp_plot
$ pip install -e .
$ python3 setup.py install
Run tests
To ensure the install was successful, tests can be run with:
$ pytest
When you add a new feature, add some test coverage as well.
Package and upload
$ rm -rf dist/
Then update version in pyproject.toml
and setup.py
, then:
$ python3 -m pip install --upgrade build
$ python3 -m build
$ python3 -m pip install --upgrade twine
$ python3 -m twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file asp_plot-0.3.0.tar.gz
.
File metadata
- Download URL: asp_plot-0.3.0.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef416bc259edf0a0a2e412c4068031ea853c291a84201cedcc16a561b13a3abe |
|
MD5 | 466822a29baad69c137479141517fd39 |
|
BLAKE2b-256 | 3680e51502203f70f9b9e7b681aa88b4d63496c009c3290af5efe2ab60c30d3c |
Provenance
File details
Details for the file asp_plot-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: asp_plot-0.3.0-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6896a1c672191f2db431d91a49c67e135ebb1cff9a2c8811251255010cd13a05 |
|
MD5 | b493f9617ea5aaa4abe01a0dad72dd75 |
|
BLAKE2b-256 | 693fa0b1e8790f9913c19ced3996907b71399d3e81b54fa888bddabda80928aa |