NeoGeographyToolkit / StereoPipeline

The NASA Ames Stereo Pipeline is a suite of automated geodesy & stereogrammetry tools designed for processing planetary imagery captured from orbiting and landed robotic explorers on other planets.
Apache License 2.0
479 stars 169 forks source link

Unexpected results from `--save-index-map` option in `dem_mosaic` with the `--median` switch #253

Closed ShashankBice closed 5 years ago

ShashankBice commented 5 years ago

The output index map returned with the median in dem_mosaic option does not correspond to the index saved in the output text file. This works for last and first options though.

dshean commented 5 years ago

Interesting.

I use use this to create median timestamp products, and I the output looked OK, although I didn't test exhaustively: https://github.com/dshean/gmbtools/blob/master/gmbtools/dem_mosaic_validtiles.py https://github.com/dshean/gmbtools/blob/master/gmbtools/dem_mosaic_index_ts.py

I have this note about using a nonzero nodata value, and recall a discussion about an issue like this in the past: https://github.com/dshean/pygeotools/blob/master/pygeotools/lib/geolib.py#L2236

ShashankBice commented 5 years ago

Yeah, I have used this in the past, although the current 3 CCD workflow provides a very easy way to check this. The DEM index returned by the tool which should have been in the middle column of the DEM configuration is actually at the base of the right column. The 0 no data value does make sense and I checked that the tool uses a non-zero value for --save-index-map configuration. Just shared data with Oleg, Scott and you.

oleg-alexandrov commented 5 years ago

I will look at this in a few days. Thank you for the report.

On Mon, Apr 15, 2019 at 5:11 PM Shashank Bhushan notifications@github.com wrote:

Yeah, I have used this in the past, although the current 3 CCD workflow provides a very easy way to check this. The DEM index returned by the tool which should have been in the middle column of the DEM configuration is actually at the base of the right column. The 0 no data value does make sense and I checked that the tool uses a non-zero value for --save-index-map configuration. Just shared data with Oleg, Scott and you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NeoGeographyToolkit/StereoPipeline/issues/253#issuecomment-483463396, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQ6bELvBkOlBNy9WdTcbK4WtGtXbXphks5vhRUegaJpZM4crE-O .

oleg-alexandrov commented 5 years ago

That was a bug, thank you. I put a fix. It was a bookkeeping issue in some circumstances. As a temporary work-around, you can invoke dem_mosaic with a value of --block-size larger than our output image size. The bug was showing up with --save-index-map when paired with median or nmad computation.