From 32120b88b8053ed0e8b749f5b785cb157dee724e Mon Sep 17 00:00:00 2001
From: Austin Sanders <arsanders@usgs.gov>
Date: Mon, 18 Nov 2024 09:08:50 -0700
Subject: [PATCH] Update camstats PvlGroup "User Parameters" to UserParameters
 (#5672)

* Updated 'User Parameters' group to UserParameters for PVL compliance

* Updated changelog
---
 CHANGELOG.md                                               | 1 +
 isis/src/base/apps/caminfo/caminfo.cpp                     | 2 +-
 isis/src/base/apps/camstats/camstats.cpp                   | 2 +-
 isis/src/base/objs/CameraStatistics/CameraStatistics.cpp   | 6 +++---
 isis/src/base/objs/CameraStatistics/CameraStatistics.truth | 2 +-
 isis/tests/FunctionalTestsCamstats.cpp                     | 2 +-
 6 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1f9b817374..d01d817f1a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -46,6 +46,7 @@ release.
 - Updated pixel2map documentation
 - Changed PVL parsing to no longer allow valueless keywords [#5573](https://github.com/DOI-USGS/ISIS3/pull/5573)
 - Changed all `.trn` files with an `Auto`, `Debug` or `Optional` keyword with no value to have a value of `1` [#5573](https://github.com/DOI-USGS/ISIS3/pull/5573)
+- Changed 'User Parameters' group in camstats to UserParameters for PVL compliance [#5625](https://github.com/DOI-USGS/ISIS3/issues/5625).
 
 ### Fixed
 - Fixed noseam bug where a debugging output statement was inadvertently left in noseam.cpp.
diff --git a/isis/src/base/apps/caminfo/caminfo.cpp b/isis/src/base/apps/caminfo/caminfo.cpp
index 6dc79b2d77..8aea7f82b4 100644
--- a/isis/src/base/apps/caminfo/caminfo.cpp
+++ b/isis/src/base/apps/caminfo/caminfo.cpp
@@ -340,7 +340,7 @@ namespace Isis{
           camstats->append(MakePair("ObliqueResolutionMaximum", cg["ObliqueResolutionMaximum"][0]));
 
           // Add keywords for all camera values
-          // Skips first "User Parameters" group.
+          // Skips first "UserParameters" group.
           for (int i = 1; i < camPvl.groups(); i++) {
             PvlGroup &group = camPvl.group(i);
 
diff --git a/isis/src/base/apps/camstats/camstats.cpp b/isis/src/base/apps/camstats/camstats.cpp
index c094816330..d63e0acdd3 100644
--- a/isis/src/base/apps/camstats/camstats.cpp
+++ b/isis/src/base/apps/camstats/camstats.cpp
@@ -187,7 +187,7 @@ namespace Isis {
       Table table(cam_name, record);
 
       // Place all the gathered camera statistics in a table and attach it to the
-      // cube. Skip "User Parameters" group.
+      // cube. Skip "UserParameters" group.
       for (int i = 1; i < statsPvl.groups(); i++) {
         PvlGroup &group = statsPvl.group(i);
 
diff --git a/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp b/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp
index 802b090890..2bd57e9c7d 100644
--- a/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp
+++ b/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp
@@ -63,7 +63,7 @@ namespace Isis {
    * numbers can be used to improve performance.  The filename provided does
    * not serve a functional purpose during the statistics gathering process,
    * but will report the filename used to create the Camera instance in the
-   * "User Parameters" section of the PVL output from the "toPvl" method.
+   * "UserParameters" section of the PVL output from the "toPvl" method.
    *
    * @param cam Camera pointer upon which statistics will be gathered
    * @param sinc Sample increment for gathering statistics
@@ -294,7 +294,7 @@ namespace Isis {
    * The general format will look as follows:
    *
    * @code
-   *   Group = User Parameters
+   *   Group = UserParameters
    *     Filename (not provided for constructor w/ Camera but not filename)
    *     Linc
    *     Sinc
@@ -366,7 +366,7 @@ namespace Isis {
   Pvl CameraStatistics::toPvl() const {
     // Set up the Pvl groups and get min, max, avg, and sd for each statstics
     // object
-    PvlGroup pUser("User Parameters");
+    PvlGroup pUser("UserParameters");
     if (m_filename != "") pUser += PvlKeyword("Filename", m_filename);
     pUser += PvlKeyword("Linc", toString(m_linc));
     pUser += PvlKeyword("Sinc", toString(m_sinc));
diff --git a/isis/src/base/objs/CameraStatistics/CameraStatistics.truth b/isis/src/base/objs/CameraStatistics/CameraStatistics.truth
index dfb9632ece..4cf1e28765 100644
--- a/isis/src/base/objs/CameraStatistics/CameraStatistics.truth
+++ b/isis/src/base/objs/CameraStatistics/CameraStatistics.truth
@@ -1,6 +1,6 @@
 UnitTest for Camera Statistics
 
-User Parameters:
+UserParameters:
   Linc = 1
   Sinc = 1
 
diff --git a/isis/tests/FunctionalTestsCamstats.cpp b/isis/tests/FunctionalTestsCamstats.cpp
index 8cbe906c30..89e59364fd 100644
--- a/isis/tests/FunctionalTestsCamstats.cpp
+++ b/isis/tests/FunctionalTestsCamstats.cpp
@@ -20,7 +20,7 @@ TEST(CamStats, FunctionalTestCamstatsDefaultParameters) {
 
   camstats(options, &appLog);
 
-  PvlGroup group = appLog.findGroup("User Parameters");
+  PvlGroup group = appLog.findGroup("UserParameters");
   EXPECT_DOUBLE_EQ((double) group.findKeyword("Linc"), 1.0);
   EXPECT_DOUBLE_EQ((double) group.findKeyword("Sinc"), 1.0);
 
-- 
GitLab