DOI-USGS / ISIS3

Integrated Software for Imagers and Spectrometers v3. ISIS3 is a digital image processing software package to manipulate imagery collected by current and past NASA and International planetary missions.
https://isis.astrogeology.usgs.gov
Other
197 stars 166 forks source link

CAM2MAP Broken in Some Cases with 8.0.2+ #5615

Open astrostu opened 1 week ago

astrostu commented 1 week ago

ISIS version(s) affected: 8.0.2+, not 8.0.1-

Description
Trying to figure out why CAM2MAP failed in some cases on one computer but not another, I tracked it down to using ISIS version 8.0.1 on the one it worked, and 8.0.2 on the one it didn't. I have also tried with ISIS 8.1.0 and 8.2.0, both of which fail. I'm processing MARCI data's backplanes, where I have a cube with the emission, phase, and incidence angles all in the same cube. I crop the cube a few times due to thruster firings to minimize sky pixels and ISIS being very slow to try to project those in CAM2MAP. So, this is a multiple-plane cube that's been cropped. In running CAM2MAP on various crops, it often works on the first cropped region (though line ≠ 0 for the starting line), but usually fails on subsequent cropped areas.

The error is: **PROGRAMMER ERROR** Angle cannot be a non-Null special pixel.

I had encountered this in some cases in version 8.0.1, but I traced the bug to not explicitly saying propspice=true in the ISIS crop command. That sometimes resulted in cube files where, in QVIEW, there were N/A for every pixel's latitude and longitude. Oddly, the cube history also was corrupted in those. I have verified that these cubes seem to be okay now, and running CAM2MAP on them works perfectly in ISIS version 8.0.1. However, it does not in 8.0.2+. In fact, I just did another test: In hovering over a pixel in the cube in QVIEW when QVIEW was opened from 8.0.1, lat/lon show fine. But, hovering over a pixel in 8.0.2+ (such as 8.2.0), lat/lon are again showing up as N/A.

My cube files otherwise cropped this way are fine, just not the ones with multiple planes.

I have no idea what broke between 8.0.1 and 8.0.2, but it seems to be something not in CAM2MAP nor QVIEW, but something more fundamental about how ISIS reads the SPICE data. I don't see anything obvious in the change log.

How to reproduce
I've uploaded with this post one of the images. Try opening it in QVIEW with ISIS 8.0.1 or earlier and looking at lat/lon at a given pixel, and then try it in QVIEW with 8.0.2 or later. I've tested it on 8.0.1, 8.0.2, 8.1.0, and 8.2.0. All on a Mac. I tried lots of different versions of the CAM2MAP command and they failed with the above error, also with v8.0.2 and later. Exact same command worked in 8.0.1. Same with CAMRANGE and other things. E.g.,:

camrange from= D12_031701_3109_MU_00N319W.odd.l1.band0002.summing8.l3.pho.crop00002.bak.cub to=test.txt

D12_031701_3109_MU_00N319W.odd.l1.band0002.summing8.l3.pho.crop00002.bak.cub.zip

Possible Solution
Use 8.0.1 until there's a fix?

acpaquette commented 1 week ago

Thanks for the report @astrostu , could you provide the ALE version for both your 8.0.1 install and the 8.0.2 install? Might be the culprit here

astrostu commented 1 week ago

Hmmm... doesn't look like it. version 8.0.2 and 8.0.1 both have ale version 0.9.1. I'll note ISIS 8.2.0 has ale version 0.10.0, but again that doesn't seem to be the issue (or, it might be an additional issue).