diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d7d7e1b87..196c61e6d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ release. - 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) - Changed the default PCK load behavior to try and load mission specific PCKs, if that fails we default to the base PCKs [#5335](https://github.com/DOI-USGS/ISIS3/pull/5335) +- Disabled option to use web=true when running spiceinit with HRSC images. [#5223](https://github.com/DOI-USGS/ISIS3/issues/5223) ### Added - Added rclone to run dependencies in meta.yaml [#5183](https://github.com/DOI-USGS/ISIS3/issues/5183) diff --git a/isis/src/base/apps/spiceinit/spiceinit.cpp b/isis/src/base/apps/spiceinit/spiceinit.cpp index 8ff35b9b63..e3b717af8d 100644 --- a/isis/src/base/apps/spiceinit/spiceinit.cpp +++ b/isis/src/base/apps/spiceinit/spiceinit.cpp @@ -614,6 +614,11 @@ namespace Isis { QString instrumentId = labels.findGroup("Instrument", Pvl::Traverse)["InstrumentId"][0]; + if (instrumentId == "HRSC"){ + QString msg = "Spice Server does not support MEX HRSC images. Please rerun spiceinit with local MEX data."; + throw IException(IException::User, msg, _FILEINFO_); + } + QString url = ui.GetString("URL") + "?mission=" + missionName + "&instrument=" + instrumentId; int port = ui.GetInteger("PORT"); diff --git a/isis/src/base/apps/spiceinit/spiceinit.xml b/isis/src/base/apps/spiceinit/spiceinit.xml index 4ebc794c28..0971210278 100644 --- a/isis/src/base/apps/spiceinit/spiceinit.xml +++ b/isis/src/base/apps/spiceinit/spiceinit.xml @@ -102,6 +102,15 @@ "NADIR" options typically have less accuracy than reconstructed and smithed kernels which is why they are disabled by default.

+

Issues running HRSC using ISIS SPICE Web Service: + Currently HRSC images cannot be spiceinit'd using ISIS SPICE web services. + This is due to the HRSC camera model relying on cube data to process + line scan times. When using the SPICE server, only the label is returned + causing the camera model to fail initialization. In order to run spiceinit on + HRSC images, download the MEX data locally. See download instructions at + https://github.com/DOI-USGS/ISIS3/blob/dev/README.md#mission-specific-data-downloads. +

+ diff --git a/isis/tests/FunctionalTestsSpiceinit.cpp b/isis/tests/FunctionalTestsSpiceinit.cpp index 3a97e0e2bd..9687fb577e 100644 --- a/isis/tests/FunctionalTestsSpiceinit.cpp +++ b/isis/tests/FunctionalTestsSpiceinit.cpp @@ -25,6 +25,7 @@ using json = nlohmann::json; #include "gmock/gmock.h" using namespace Isis; +using ::testing::HasSubstr; static QString APP_XML = FileName("$ISISROOT/bin/xml/spiceinit.xml").expanded(); @@ -710,3 +711,84 @@ TEST_F(SmallCube, FunctionalTestSpiceinitCsminitRestorationOnFail) { EXPECT_PRED_FORMAT2(AssertPvlGroupEqual, csmInfoGroup, outputCube.group("CsmInfo")); } + +TEST(Spiceinit, TestSpiceinitHrscWebError) { + + std::istringstream labelStrm(R"( + Object = IsisCube + Object = Core + StartByte = 65537 + Format = Tile + TileSamples = 323 + TileLines = 409 + + Group = Dimensions + Samples = 2584 + Lines = 19632 + Bands = 1 + End_Group + + Group = Pixels + Type = Real + ByteOrder = Lsb + Base = 0.0 + Multiplier = 1.0 + End_Group + End_Object + + Group = Instrument + SpacecraftName = "MARS EXPRESS" + InstrumentId = HRSC + StartTime = 2019-01-16T13:11:27.926 + StopTime = 2019-01-16T13:13:37.796 + SpacecraftClockStartCount = 1/0495724211.25691 + SpacecraftClockStopCount = 1/0495724397.63935 + MissionPhaseName = ME_Phase_40 + TargetName = Mars + Summing = 2 + FocalPlaneTemperature = 8.9911 + LensTemperature = 9.6028 + InstrumentTemperature = 11.8457 + End_Group + + Group = Archive + DataSetId = MEX-M-HRSC-3-RDR-V3.0 + DetectorId = MEX_HRSC_P1 + EventType = MARS-REGIONAL-MAPPING-Im-Gl-Pf + OrbitNumber = 19029 + ProductId = HJ029_0000_P12.IMG + End_Group + + Group = BandBin + Width = 174.0 + Center = 675.0 + End_Group + + Group = Kernels + NaifIkCode = -41217 + End_Group + End_Object + End + )"); + + Pvl label; + labelStrm >> label; + + QTemporaryFile tempFile; + tempFile.open(); + Cube testCube; + + testCube.fromLabel(tempFile.fileName() + ".cub", label, "rw"); + + QVector args = {"web=true"}; + UserInterface options(APP_XML, args); + + + try { + spiceinit(&testCube, options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("Spice Server does not support MEX HRSC images. Please rerun spiceinit with local MEX data.")); + } +}