forked from DOI-USGS/ISIS3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed small typo in isisimport.cpp * Added support for writing clipper line time tables for pushbroom images * Adjust Clipper EIS plugin name * Fixed clipper line time import function * Minor Clipper PB camera adjustments * Address breaking change * Capture detector offset in isisimport and the ClipperPushBroomCamera * Adjusted detector offset * Reverted detector origin * Updated Clipper pushbroom camera tests * Fixed detector center and offset * Fixes EIS Import Tests * Fixes ClipperPushBroomTests * Fix "Failed to open file" failures --------- Co-authored-by: amystamile-usgs <[email protected]>
- Loading branch information
1 parent
3793da6
commit b224a0f
Showing
19 changed files
with
923 additions
and
1,586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#ifndef CLIPPER_H | ||
#define CLIPPER_H | ||
|
||
#include "iTime.h" | ||
#include "Pvl.h" | ||
#include "PvlGroup.h" | ||
#include "PvlKeyword.h" | ||
#include "Table.h" | ||
#include "TableField.h" | ||
#include "TableRecord.h" | ||
|
||
using namespace std; | ||
|
||
namespace Isis { | ||
|
||
void clipperEisPBCreateLineTable(Cube *cube) { | ||
TableField ephTimeField("EphemerisTime", TableField::Double); | ||
TableField expTimeField("ExposureTime", TableField::Double); | ||
TableField lineStartField("LineStart", TableField::Integer); | ||
|
||
TableRecord timesRecord; | ||
timesRecord += ephTimeField; | ||
timesRecord += expTimeField; | ||
timesRecord += lineStartField; | ||
|
||
Table timesTable("LineScanTimes", timesRecord); | ||
|
||
Pvl *inputCubeLabel = cube->label(); | ||
|
||
PvlGroup instGroup; | ||
try { | ||
instGroup = inputCubeLabel->findGroup("Instrument", PvlObject::FindOptions::Traverse); | ||
} | ||
catch(IException &e) { | ||
QString msg = "Unable to find instrument group in [" + cube->fileName() + "]"; | ||
throw IException(e, IException::User, msg, _FILEINFO_); | ||
} | ||
|
||
QString startTime = QString(instGroup.findKeyword("StartTime")); | ||
iTime time(startTime); | ||
PvlKeyword exposureDuration = instGroup.findKeyword("ExposureDuration"); | ||
double lineDuration = (double)exposureDuration; | ||
if (exposureDuration.unit() == "ms") { | ||
lineDuration /= 1000; | ||
} | ||
lineDuration /= cube->lineCount(); | ||
|
||
timesRecord[0] = time.Et(); | ||
timesRecord[1] = lineDuration; | ||
timesRecord[2] = 1; | ||
timesTable += timesRecord; | ||
|
||
cube->write(timesTable); | ||
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.