Skip to content

Commit

Permalink
improve error message and update app docs (#4417)
Browse files Browse the repository at this point in the history
Co-authored-by: tgiroux <[email protected]>
  • Loading branch information
tgiroux and tgiroux authored Apr 23, 2021
1 parent b953e98 commit fa47dac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions isis/src/lro/apps/lronac2isis/lronac2isis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ namespace Isis {
void lronac2isis(UserInterface &ui) {
// Initialize variables
ResetGlobals();
//Check that the file comes from the right camera

// Check that the file comes from the right camera
FileName inFile = ui.GetFileName("FROM");
QString id;
try {
Expand All @@ -50,10 +51,10 @@ namespace Isis {
QString msg = "Unable to read [DATA_SET_ID] from input file [" + inFile.expanded() + "]";
throw IException(IException::Unknown, msg, _FILEINFO_);
}
//Checks if in file is rdr
// Checks if in file is RDR
bool projected = lab.hasObject("IMAGE_MAP_PROJECTION");
if(projected) {
QString msg = "[" + inFile.name() + "] appears to be an rdr file.";
QString msg = "[" + inFile.name() + "] appears to be an RDR file.";
msg += " Use pds2isis.";
throw IException(IException::User, msg, _FILEINFO_);
}
Expand Down Expand Up @@ -90,7 +91,8 @@ namespace Isis {
id = id.simplified().trimmed();
if(id.mid(13, 3) != "EDR") {
QString msg = "Input file [" + inFile.expanded() + "] does not appear to be "
+ "in LROC-NAC EDR format. DATA_SET_ID is [" + id + "]";
+ "in LROC-NAC EDR format. DATA_SET_ID is [" + id + "]"
+ " Use pds2isis for RDR or CDR.";
throw IException(IException::Io, msg, _FILEINFO_);
}

Expand Down
4 changes: 2 additions & 2 deletions isis/src/lro/apps/lronac2isis/lronac2isis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</brief>

<description>
This program takes an image from the Lunar Reconnaissance Orbiter Narrow Angle Camera
and produces an Isis cube containing the image data.
This program takes a raw EDR image from the Lunar Reconnaissance Orbiter Narrow Angle Camera
and produces an Isis cube containing the image data. LRO NAC images in the CDR or RDR format should be ingested using pds2isis.
</description>

<history>
Expand Down

0 comments on commit fa47dac

Please sign in to comment.