https://github.com/andrewannex/asap_stereo

Ames Stereo Automated Pipeline (ASAP) for reproducible DEMs

https://github.com/andrewannex/asap_stereo

Science Score: 46.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

photogrammetry planetary-science
Last synced: 6 months ago · JSON representation

Repository

Ames Stereo Automated Pipeline (ASAP) for reproducible DEMs

Basic Info
  • Host: GitHub
  • Owner: AndrewAnnex
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 563 KB
Statistics
  • Stars: 20
  • Watchers: 2
  • Forks: 5
  • Open Issues: 3
  • Releases: 6
Topics
photogrammetry planetary-science
Created over 7 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License Code of conduct

README.rst

.ASAP-Stereo (Ames Stereo Automated Pipeline)
=============================================

.. image:: https://readthedocs.org/projects/asap-stereo/badge/?version=main
   :target: https://asap-stereo.readthedocs.io/en/main/?badge=main
   :alt: Documentation Status
   
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4171570.svg
   :target: https://doi.org/10.5281/zenodo.4171570
   :alt: Cite using doi.org/10.5281/zenodo.4171570

ASAP-Stereo is workflow wrapper for the `NASA Ames Stereo Pipeline`_, it is a reimplementation of the `asp_scripts`_ workflow to produce
co-registered CTX and HiRISE Digital Elevation Models (DEMs) from stereo image pairs in python and jupyter notebooks.

ASAP-Stereo currently only support the original MRO CTX/HiRISE stereo pair workflow from the asp_scripts, but could be built upon to make workflows for other imaging datasets.

*NOTE:* Advanced knowledge of the Ames Stereo Pipeline, Bash environment, and ISIS3 is a near prerequisite for using ASAP-Stereo.
No guarantees are implied for product quality or correctness, and it is not endorsed by the ASP developers. Proceed with caution.

Please cite!

.. _asp_scripts: https://github.com/USGS-Astrogeology/asp_scripts
.. _NASA Ames Stereo Pipeline: https://github.com/NeoGeographyToolkit/StereoPipeline

Docs
----

Documentation is available at https://asap-stereo.readthedocs.io 

Goals
-----

The aim of ASAP-Stereo is to enable reproducible workflows for ASP. Through rich logging and the jupyter notebook based workflows, users can distribute
the complete log of the steps they ran to produce a digital elevation model, and from that other users can run the same steps to duplicate results.
ASAP-Stereo, like the asp_scripts project, provides high level functions to execute many individual steps of the pipeline to reduce the complexity of producing a CTX or DEM to two steps.

In addition, workflows are broken down to dozens of granular steps that users can re-run with different parameters to fix issues as they arise.

High Level Workflow
-------------------

ASAP-Stereo provides both a command line interface and jupyter notebook based workflows that are also executable using the
command line interface, accessible using the `asap` command.
Generally, users should first make the CTX DEM for a location they are interested in and verify it is correctly registered to MOLA topography. Then users
can proceed to produce a HiRISE DEM, and aligning it to the CTX DEM in the 2nd step for good co-registration of the HiRISE DEM.

The advantage of the CLI interface is that there are many individual steps in the workflow that sometimes
need to be re-run with different parameters when things don't go well. However, often this is only one or
two steps in the workflow, such as stereo correlation or point cloud alignment that can be run in relative
isolation of the other steps in the pipeline. Different steps require varying degrees of granularity as
some steps are much faster than others.

The advantage of the Jupyter Notebook workflows are that the configuration parameters and preview images are richly displayed
along side logs of the commands that were run so that workflows are both
reproducible and easy to interact with. Should things go wrong for a processing step, the Jupyter Notebooks
are easy to modify so steps can be re-run easily. The Jupyter Notebook workflow uses the same CLI interface
for ASAP-Stereo so the notebooks are the preferred way to interact with ASAP-Stereo.

Differences from asp_scripts
----------------------------
There are a few minor to major differences between the workflow in ASAP-Stereo and the asp_scripts default workflow that are
partially listed here.

1. Bundle Adjustment was added to the HiRISE workflow, possibly of marginal benefit.
2. PEDR data, and pedr2tab is optional as the ODE Rest API is used to get relevant data.
3. Image resolutions are encoded in file names in meters with an underscore for decimals (ie 0_25.tif would be 25 cm per pixel).
4. Hillshade alignment of the HiRISE dem to the target DEM is used to improve/speed up alignment of HiRISE to CTX.

.. _SLURM: https://slurm.schedmd.com

Installation
------------
ASAP can be installed using pip in a conda environment hosting ASP and ISIS. See the documentation for more details. 

Clone the repository, cd into the project and run: python setup.py install (or develop).

You must also have all of the other dependencies for ASP and the asp_scripts installed and available in the path to run.
You will also need GDAL command line tools,and ISIS3 installed. It is recommended to use anaconda to isolate the ASAP-Stereo
environment.

Usage
=====

Please checkout the documentation available at https://asap-stereo.readthedocs.io for more complete documentation and usage than below. 

Once installed, asap-stereo is available in the command line as the command `asap`.
Try this out, and see the list of sub-commands that are available in the output of running `asap`.
When you want to produce a DEM, make a new directory and `cd` into it, all commands run relative to the current working directory.

New CTX-HiRISE Workflow (with notebooks)
----------------------------------------
`nohup` is recommended for each of the following steps for long running processes.

Pick two CTX and/or HiRISE images as stereo pairs and note their product ids, which can be partial.

You can either start with CTX or HiRISE, but note that the third HiRISE step requires a reference DEM
like the once produced from CTX.

Detailed help for each command can be viewed by running: `asap PREFIX COMMAND -- --help`,
for example `asap ctx notebook_pipeline_make_dem -- --help`.

For CTX:
~~~~~~~~
`asap ctx notebook_pipeline_make_dem PRODUCTID1 PRODUCTID2 STEREO_CONF`


Final products from step 2 are located in the `PRODUCTID_PRODUCTID/results_map_ba/dem_align` folder. The
`PRODUCTID_PRODUCTID_map_ba_align_24_0-DEM-adj.tif` is the final DEM product,
and the map projected images are `PRODUCTID_PRODUCTID_map_ba_align_24_0-DRG.tif`
and `PRODUCTID_PRODUCTID_map_ba_align_6_0-DRG.tif`.

For HiRISE:
~~~~~~~~~~~
`asap hirise notebook_pipeline_make_dem ID1 ID2 STEREO_CONF REFDEM`

where REFDEM is the path to the CTX DEM (not the geoid adjusted "adj.tif" DEM) created before.

Final products from step 3 are located in the `PRODUCTID_PRODUCTID/results/dem_align` folder. The
`PRODUCTID_PRODUCTID_align_1_0-DEM-adj.tif` is the final DEM product, and the map projected images
are `PRODUCTID_PRODUCTID_align_1_0-DRG.tif` and `PRODUCTID_PRODUCTID_align_0_25-DRG.tif`.

Estimating Max-Disparity (--maxdisp)
------------------------------------
*note:*  As of 0.2.0 disparity is estimated for the user by ASAP, this note retained for cases when overrides needed.

The maximum disparity parameter used in both workflows above can be estimated by loading the reference and target
DEM products into a GIS environment (like QGIS) to determine the distance in the x, y, and z axes between the two products.
It is good practice to add a hundred meter margin to this estimate. For CTX use the PEDR CSV file to estimate it from MOLA,
for HiRISE use the final DEM.tif (non-geoid corrected) for the corresponding CTX pair.

Owner

  • Name: Dr. Andrew Annex
  • Login: AndrewAnnex
  • Kind: user
  • Location: Pasadena, CA
  • Company: SETI Institute

Coder and Planetary Science PhD from Johns Hopkins University. Fmr Postdoc @ Caltech, Current Senior Science Systems Engineer @ SETI Institute

GitHub Events

Total
  • Watch event: 2
  • Delete event: 1
  • Push event: 34
  • Pull request event: 3
  • Create event: 3
Last Year
  • Watch event: 2
  • Delete event: 1
  • Push event: 34
  • Pull request event: 3
  • Create event: 3

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 144
  • Total Committers: 2
  • Avg Commits per committer: 72.0
  • Development Distribution Score (DDS): 0.174
Top Committers
Name Email Commits
Andrew Annex a****y@v****u 119
Andrew Annex a****x@g****m 25
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • AndrewAnnex (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 87 last-month
  • Total docker downloads: 82
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
  • Total maintainers: 1
pypi.org: asap-stereo

A high level CLI and reproducible workflow for the Ames Stereo Pipeline

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 87 Last month
  • Docker Downloads: 82
Rankings
Docker downloads count: 3.4%
Dependent packages count: 10.1%
Average: 27.2%
Downloads: 27.8%
Dependent repos count: 67.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • fire *
  • moody >=0.2.0
  • papermill *
  • pvl *
  • pyproj *
  • rasterio *
  • requests *
  • sh *
setup.py pypi
  • fire *
  • moody >=0.2.0
  • papermill *
  • pyproj *
  • rasterio *
  • requests *
  • sh *
.github/workflows/ci-test-ctx.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • conda-incubator/setup-miniconda v2.1.1 composite
.github/workflows/python-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v2 composite
pyproject.toml pypi
  • fire *
  • moody >=0.2.0
  • papermill *
  • pyproj *
  • rasterio *
  • requests *
  • sh >=2.0.0