Project

General

Profile

Bug #5159

lroc cat test fails on prog22 with bad OD_K value

Added by Ian Humphrey 2 months ago. Updated about 1 month ago.

Status:
Assigned
Priority:
Normal
Category:
Infrastructure
Target version:
Impact:
Software Version:
Test Reviewer:

Description

With the updated v007 libraries, prog22 fails its lroc cat test.

When doing a make compare of output vs truth, uvlabel.pvl and vislabel.pvl fail the compare.

Running a pvldiff for uvlabel.pvl:

pvldiff from=output/uvlabel.pvl from2=truth/uvlabel.pvl diff=input/uvlabel.pvl.DIFF

we get

Group = Results
  Compare = Different
  Reason  = "Object NaifKeywords: Keyword 'INS-85626_OD_K' at index 2:
             difference is 7.0e-04 (tolerance is 0.0)"
End_Group

With vislabel, we get:

Group = Results
  Compare = Different
  Reason  = "Object NaifKeywords: Keyword 'INS-85621_OD_K' at index 2:
             difference is 5.0e-04 (tolerance is 0.0)"
End_Group

When examining the INS-85626_OD_K keyword in uvlabel.pvl, the output has (-0.024, -7.0e-04, 1.19591712070755e-316) while the truth has (-0.024, -7.0e-04, -7.0e-04).

For the INS-85621_OD_K keyword in vislabel.pvl, the output has (-0.0099, -5.0e-04, 8.27535451128054e-317) while the truth has (-0.0099, -5.0e-04, -5.0e-04).


Looking at /usgs/cpkgs/isis3/data/lro/kernels/ik/lro_instruments_v12.ti, if we look for the OD_K values, we see:

INS-85621_OD_K = ( -0.0099, -0.0005 )
...
INS-85626_OD_K = ( -0.024, -0.0007 )

This looks like the third elements of the OD_K values are not real values (garbage memory), since the ik doesn't even specify third-element values for the OD_K's. This suggests that wherever the OD_K arrays/vectors are being initialized are not being default initialized (1, 0, NULL, whatever an appropriate default value for an OD_K element value is).

History

#1 Updated by Ian Humphrey 2 months ago

  • Private changed from No to Yes

#2 Updated by Ian Humphrey 2 months ago

Looks like this is related to the CameraDistortionMap p_odk vector.

It is declared as a 0-element std::vector in CameraDistortionMap.h

In the CameraDistortionMap::SetDistortion(int naifIkCode) method,
we have:

QString odkkey = "INS" + toString(naifIkCode) + "_OD_K";
for (int i = 0; i < 3; ++i) {
  p_odk.push_back(p_camera->Spice::getDouble(odkkey, i));
}

It looks like it is always trying to get 3 values from a single OD_K key/array.

#3 Updated by Ian Humphrey 2 months ago

  • Private changed from Yes to No

#4 Updated by Kristin Berry 2 months ago

In other distortion models, we reimplement SetDistortion. It sounds like the lro (wide angle?) distortion map class needs to do this as well, since it has fewer than the default number of distortion coefficients (3).

Except it also looks like the IAK provides both 2-coefficient OD_Ks and 3-coefficient OD_Ks for different NAIF IDs all associated with the wide-angle camera, so this might be more complicated.

#5 Updated by Tammy Becker about 2 months ago

  • Status changed from New to Acknowledged

#6 Updated by Ian Humphrey about 2 months ago

  • Status changed from Acknowledged to Assigned
  • Assignee changed from Ian Humphrey to Makayla Shepherd

#7 Updated by Stuart Sides about 1 month ago

  • Target version set to 3.5.2 (2017-01-31 Jan)

Also available in: Atom PDF