From d4153718596dc3b42b41c235e01211da124d5856 Mon Sep 17 00:00:00 2001 From: Adam Paquette Date: Thu, 28 Mar 2019 14:36:00 -0700 Subject: [PATCH 1/2] Allowed writting of residuals when value is zero to controlnet pvl --- .../objs/ControlNetVersioner/ControlNetVersioner.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp b/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp index 5ff748fcff..b71b779954 100644 --- a/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp +++ b/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp @@ -501,15 +501,13 @@ namespace Isis { "pixels"); } - if ( controlMeasure.GetSampleResidual() != Isis::Null - && controlMeasure.GetSampleResidual() != 0. ) { + if ( controlMeasure.GetSampleResidual() != Isis::Null ) { pvlMeasure += PvlKeyword("SampleResidual", toString(controlMeasure.GetSampleResidual()), "pixels"); } - if ( controlMeasure.GetLineResidual() != Isis::Null - && controlMeasure.GetLineResidual() != 0. ) { + if ( controlMeasure.GetLineResidual() != Isis::Null ) { pvlMeasure += PvlKeyword("LineResidual", toString(controlMeasure.GetLineResidual()), "pixels"); } @@ -1675,7 +1673,7 @@ namespace Isis { pointByteTotal += writeFirstPoint(&output); } - // // Insert header at the beginning of the file once writing is done. + // Insert header at the beginning of the file once writing is done. ControlNetFileHeaderV0005 protobufHeader; protobufHeader.set_networkid(m_header.networkID.toLatin1().data()); From 3a6975fb00e885525729d446ee1bb666fef64572 Mon Sep 17 00:00:00 2001 From: Adam Paquette Date: Thu, 28 Mar 2019 16:10:38 -0700 Subject: [PATCH 2/2] Updated ControlNetVersioner unit test --- .../ControlNetVersioner.truth | 72 +++++++++++-------- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.truth b/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.truth index 6c6270e6fe..c62f45de02 100644 --- a/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.truth +++ b/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.truth @@ -36,21 +36,25 @@ Object = ControlNetwork End_Group Group = ControlMeasure - SerialNumber = M1 - MeasureType = Candidate - ChooserName = Unknown - DateTime = 2018-01-09 - Sample = 1.0 - Line = 1.0 + SerialNumber = M1 + MeasureType = Candidate + ChooserName = Unknown + DateTime = 2018-01-09 + Sample = 1.0 + Line = 1.0 + SampleResidual = 0.0 + LineResidual = 0.0 End_Group Group = ControlMeasure - SerialNumber = M2 - MeasureType = Candidate - ChooserName = Unknown - DateTime = 2018-01-09 - Sample = 1.0 - Line = 1.0 + SerialNumber = M2 + MeasureType = Candidate + ChooserName = Unknown + DateTime = 2018-01-09 + Sample = 1.0 + Line = 1.0 + SampleResidual = 0.0 + LineResidual = 0.0 End_Group End_Object End_Object @@ -80,31 +84,37 @@ Object = ControlNetwork DateTime = 2018-01-19 Group = ControlMeasure - SerialNumber = Cassini-Huygens/ISSNA/1/1467436709.122 - MeasureType = RegisteredPixel - ChooserName = Unknown - DateTime = 2018-01-19 - Sample = 893.0 - Line = 616.0 + SerialNumber = Cassini-Huygens/ISSNA/1/1467436709.122 + MeasureType = RegisteredPixel + ChooserName = Unknown + DateTime = 2018-01-19 + Sample = 893.0 + Line = 616.0 + SampleResidual = 0.0 + LineResidual = 0.0 End_Group Group = ControlMeasure - SerialNumber = Cassini-Huygens/ISSNA/1/1467443189.122 - MeasureType = RegisteredPixel - ChooserName = Unknown - DateTime = 2018-01-19 - Sample = 799.25 - Line = 701.21 - Reference = True + SerialNumber = Cassini-Huygens/ISSNA/1/1467443189.122 + MeasureType = RegisteredPixel + ChooserName = Unknown + DateTime = 2018-01-19 + Sample = 799.25 + Line = 701.21 + SampleResidual = 0.0 + LineResidual = 0.0 + Reference = True End_Group Group = ControlMeasure - SerialNumber = Cassini-Huygens/ISSNA/1/1467454012.125 - MeasureType = RegisteredPixel - ChooserName = Unknown - DateTime = 2018-01-19 - Sample = 569.01 - Line = 807.23 + SerialNumber = Cassini-Huygens/ISSNA/1/1467454012.125 + MeasureType = RegisteredPixel + ChooserName = Unknown + DateTime = 2018-01-19 + Sample = 569.01 + Line = 807.23 + SampleResidual = 0.0 + LineResidual = 0.0 End_Group End_Object End_Object