Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve lronac2isis error message and update app docs #4417

Merged
merged 1 commit into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
improve error message and update app docs
  • Loading branch information
tgiroux committed Apr 22, 2021
commit 4b8743ff59e032d899c397cc96b9c30a77d604e8
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