diff --git a/CHANGELOG.md b/CHANGELOG.md index d5b5dd3cb2..6954571097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,8 @@ release. - Removed the `.py` extention from the _isisdataeval_ tool `isisdata_mockup` for consistency and install it in $ISISROOT/bin; added the `--tojson` and `--hasher` option to _isisdata_mockup_ tool improve utility; updated the tool `README.md` documentation to reflect this change, removed help output and trimmed example results; fixed paths to test data in `make_isisdata_mockup.sh`. [#5163](https://github.com/DOI-USGS/ISIS3/pull/5163) - Significantly refactored FASTGEOM processing in findfeatures to accommodate stability and functionality. The scope of the algorithm was taken out of the ImageSource class and isolated to support this feature. [#4772](https://github.com/DOI-USGS/ISIS3/issues/4772) - Report better information regarding the behavior of findfeatures, FASTGEOM algorithms, and creation of the output network. [#4772](https://github.com/DOI-USGS/ISIS3/issues/4772) +- Modified tgocassisstitch to optionally allow either a outputprefix or an + outputsuffix, both, or neither for naming convention purposes. [#5162](https://github.com/DOI-USGS/ISIS3/pull/5162) ### Added - Added rclone to run dependencies in meta.yaml [#5183](https://github.com/DOI-USGS/ISIS3/issues/5183) @@ -50,6 +52,9 @@ release. - Added two new examples demonstrating/documenting the use of FASTGEOM algorithm, parameterization using GLOBALS and creation of a regional mosaic using findfeatures. [#4772](https://github.com/DOI-USGS/ISIS3/issues/4772) - Added new option GEOMSOURCE=BOTH to findfeatures to check both the MATCH and FROM/FROMLIST images for valid control measure geometry to produce better networks and prevent downstream processing errors. Ignore points that end up with no valid measures (but can be retained with use of PreserveIgnoredControl via GLOBALS parameterization). [#4772](https://github.com/DOI-USGS/ISIS3/issues/4772) - Added new gtests for findfeatures that replaces all the old application tests. These tests are FunctionalTestFindfeaturesFastGeomDefault, FunctionalTestFindfeaturesFastGeomRadialConfig, FunctionalTestFindfeaturesFastGeomGridDefault and FunctionalTestFindfeaturesFastGeomGridConfig. [#4772](https://github.com/DOI-USGS/ISIS3/issues/4772) +- Added an optional cubename parameter to tgocassisstitch which lets the user + override the timestamp style naming convention of the output cube with their + own name; if not specified retains existing behavior [#5125](https://github.com/USGS-Astrogeology/ISIS3/issues/5162) ### Deprecated diff --git a/isis/src/tgo/apps/tgocassisstitch/tgocassisstitch.cpp b/isis/src/tgo/apps/tgocassisstitch/tgocassisstitch.cpp index 64de84ac90..f5afc8332b 100644 --- a/isis/src/tgo/apps/tgocassisstitch/tgocassisstitch.cpp +++ b/isis/src/tgo/apps/tgocassisstitch/tgocassisstitch.cpp @@ -66,18 +66,34 @@ namespace Isis { throw IException(e, IException::Unknown, msg, _FILEINFO_); } + // read the optional cubename + FileName frameletCubeFlag(ui.GetCubeName("CUBENAME")); + QString frameletCubeName = frameletCubeFlag.expanded(); + // Stitch together the individual frames - FileName outputFileName(ui.GetCubeName("OUTPUTPREFIX")); - QString outputBaseName = outputFileName.expanded(); + FileName outputPrefix(ui.GetCubeName("OUTPUTPREFIX")); + FileName outputSuffix(ui.GetCubeName("OUTPUTSUFFIX")); + QString outputPrefBaseName = outputPrefix.expanded(); + QString outputSuffBaseName = outputSuffix.expanded(); QStringList frameKeys = frameMap.uniqueKeys(); Progress stitchProgress; stitchProgress.SetText("Stitching Frames"); stitchProgress.SetMaximumSteps(frameKeys.size()); stitchProgress.CheckStatus(); + foreach(QString frameKey, frameKeys) { try { QString frameIdentifier = frameKey.split("/").last(); - FileName frameFileName(outputBaseName + "-" + frameIdentifier + ".cub"); + FileName frameFileName; + if (frameletCubeName != "") { + frameFileName = FileName(outputPrefBaseName + "-" + + frameletCubeName + + outputSuffBaseName + ".cub"); + } else { + frameFileName = FileName(outputPrefBaseName + "-" + + frameIdentifier + + outputSuffBaseName + ".cub"); + } stitchFrame( frameMap.values(frameKey), frameFileName ); stitchProgress.CheckStatus(); } diff --git a/isis/src/tgo/apps/tgocassisstitch/tgocassisstitch.xml b/isis/src/tgo/apps/tgocassisstitch/tgocassisstitch.xml index ff10ca1895..5ad519c5c3 100644 --- a/isis/src/tgo/apps/tgocassisstitch/tgocassisstitch.xml +++ b/isis/src/tgo/apps/tgocassisstitch/tgocassisstitch.xml @@ -29,6 +29,15 @@ Modified stitchFrame to store the Archive group for ingested framelets. Fixes #5333. + + Modified stitchFrame to have logic for suffix or prefix in the output + filename. Fixes #5125. + + + Added an optional argument to tgocassisstitch which allows for an optional + cubename to override the default timestamp-style naming convention and + bahavior for the output cube. Fixes #5125. + @@ -54,11 +63,28 @@ + + cube + + input + + An optional name for the output cube. + + + An optional name for the output cube instead of the default timestamp + style naming. + + + *.cub + + + - cube + cube + output - Output ISIS cube basename. + Output ISIS cube basename prefix. The stitched cubes will be output as this basename plus the last @@ -68,6 +94,23 @@ *.cub + + + + cube + + output + + output ISIS cube basename suffix. + + + The stitched cubes will be output as the last component of the serial + number plus this basename. Usually this will be the start time for + the frame. + + + *.cub + diff --git a/isis/tests/FunctionalTestsTgocassisstitch.cpp b/isis/tests/FunctionalTestsTgocassisstitch.cpp index 038d351306..df0b73b237 100644 --- a/isis/tests/FunctionalTestsTgocassisstitch.cpp +++ b/isis/tests/FunctionalTestsTgocassisstitch.cpp @@ -22,10 +22,12 @@ TEST(TgoCassisstitch, TgoCassisstitchMultiframeTest) { cubeList->append("data/tgoCassis/tgocassisstitch/CAS-MCO-2016-11-22T16.16.16.833-RED-01006-B1_crop.cub"); cubeList->append("data/tgoCassis/tgocassisstitch/CAS-MCO-2016-11-22T16.16.16.833-NIR-02006-B1_crop.cub"); cubeList->append("data/tgoCassis/tgocassisstitch/CAS-MCO-2016-11-22T16.16.16.833-PAN-00006-B1_crop.cub"); - + QString cubeListFile = prefix.path() + "/cubelist.lis"; cubeList->write(cubeListFile); + QString cubeName = "default"; + QVector args = {"fromlist=" + cubeListFile, "outputprefix=" + prefix.path() + "/CAS-MCO"}; UserInterface options(APP_XML, args); @@ -220,7 +222,10 @@ TEST(TgoCassisstitch, TgoCassisstitchSingleframeTest) { QString cubeListFile = prefix.path() + "/cubelist.lis"; cubeList->write(cubeListFile); + QString cubeName = "default"; + QVector args = {"fromlist=" + cubeListFile, + "cubename=" + cubeName, "outputprefix=" + prefix.path() + "/CAS-MCO"}; UserInterface options(APP_XML, args); @@ -231,7 +236,7 @@ TEST(TgoCassisstitch, TgoCassisstitchSingleframeTest) { FAIL() << "Unable to run tgocassisstitch with cube list: " << e.what() << std::endl; } - Cube cube(prefix.path() + "/CAS-MCO-2016-11-22T16:16:10.833.cub"); + Cube cube(prefix.path() + "/CAS-MCO-default.cub"); Pvl *isisLabel = cube.label(); // Dimensions Group @@ -401,4 +406,4 @@ TEST(TgoCassisstitch, TgoCassisstitchSingleframeTest) { EXPECT_EQ(hist->ValidPixels(), 100); EXPECT_NEAR(hist->StandardDeviation(), 0.063902362199265747, 0.0001); -} \ No newline at end of file +}