Skip to content
New issue

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

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

Already on GitHub? # to your account

Lro lidar infrastructure Added a new input parameter, FROMLIST to the user interface #3162

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
4bc6273
Updated the cmake version to 3.10
celbal Nov 5, 2018
7d55f34
Adding configurations for gtest
celbal Nov 5, 2018
5bd8c91
Tweaking things for gtest
celbal Nov 6, 2018
59c8469
Got gtest working and made a small example test
celbal Nov 6, 2018
31dbbad
Updated the cmake version to be 3.10 or greater
celbal Nov 6, 2018
32fe49a
Merge pull request #527 from makaylas/testing
krlberry Nov 6, 2018
8046da0
Added test file discovery support and seperated the main into another…
celbal Nov 7, 2018
1c2d12b
Merge pull request #534 from makaylas/testing
Nov 7, 2018
2be2cb4
Added more tests for FileName
celbal Nov 7, 2018
3c7c8d8
Updated with the new testing guidelines and added new tests.
celbal Nov 8, 2018
1e45b6b
Added gmock
celbal Nov 8, 2018
ae10f82
Merge pull request #535 from makaylas/testing
Nov 8, 2018
d727034
Merge pull request #540 from USGS-Astrogeology/dev
celbal Nov 8, 2018
6bf151a
PixelTest (#536)
Nov 14, 2018
4b474f5
Refactored stats to a functions
jessemapel Nov 16, 2018
11d878d
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into stats
jessemapel Nov 30, 2018
0609a28
Modified to have cubeit remove mosaic pixel tracking info from labels…
scsides Dec 4, 2018
e19024b
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into dev
scsides Dec 4, 2018
f26bb03
Update cubeit.xml
scsides Dec 4, 2018
6d7964c
Merge pull request #629 from scsides/dev
krlberry Dec 4, 2018
c1f322e
Fixes conda channels in Jenkinsfile & adds a MacOS node (#633)
evindunn Dec 7, 2018
3adc5a7
Merged dev and cleaned up header conflicts
jessemapel Dec 10, 2018
8c2d0cc
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into stats
jessemapel Dec 10, 2018
c8dc715
Update for #619.
jlaura Dec 10, 2018
db5bd8e
Merge pull request #584 from jessemapel/stats
Dec 11, 2018
c00f88e
Fix libtiff dependency (#636) (#644)
seignovert Dec 17, 2018
645a838
Moved ISIS3 conda-build recipe from ISIS3_deps repository (#650)
jessemapel Dec 17, 2018
08edafe
Fixed warning in Pixel unit tests
jessemapel Dec 17, 2018
90baaa7
Merge pull request #652 from jessemapel/warnings
krlberry Dec 18, 2018
8fa370e
Removing build numbers from external libraries (#660)
SgStapleton Dec 19, 2018
a92a0c4
Added pixel type attribute to the output image of program shadow. Fix…
kaitlyndlee Dec 19, 2018
997f8c7
Added section for Environment and PreferemcesSetup in the Getting Sta…
kaitlyndlee Dec 19, 2018
520ccca
Updated .gitmodules to use https rather than ssh (#673)
SgStapleton Dec 19, 2018
d7ab32c
Added build type release to conda recipe (#676)
SgStapleton Dec 20, 2018
4a76370
Updates README with Discourse (#690)
jlaura Feb 6, 2019
ee65fb7
Added fix to Spice Server to accept clients with version nums >=3.5.*…
Feb 13, 2019
3ef5aeb
Fixed error when trying to export a compressed image using pds2hideal…
kaitlyndlee Feb 14, 2019
776a65e
Adding explanatory comments to the meta.yaml file (#2358)
SgStapleton Feb 15, 2019
b47d919
Added option to sort the output for consistent order in testing and a…
dcookastro Feb 25, 2019
283b851
Cleaned up commented out lines in LidarData.h and .cpp
dcookastro Feb 25, 2019
2da1e36
Added additional documentation for LidarData, LidarControlPoint, and …
dcookastro Feb 26, 2019
707d2a0
Multisegment DSK support for Bullet engine (#2791)
Feb 27, 2019
94bacdc
Minor updates to download sizes and some text. (#2790)
scsides Feb 28, 2019
835533d
Removed debug lines from LidarData.cpp and old comments from the lrol…
dcookastro Feb 28, 2019
0452915
Added an additional comment about the Test format to LidarData.cpp
dcookastro Feb 28, 2019
41def84
Phocube will export RA and declination planes even if the point is no…
kaitlyndlee Feb 28, 2019
32ce1c4
Fixed SummingMode keyword being set in tgocassis2isis (#2847)
SgStapleton Feb 28, 2019
22016b7
Setting tgocassismos to have tracking turned-on (#2856)
SgStapleton Mar 1, 2019
a085f2d
Updates to tgocassisrdrgen and ProcessExportPds4 to add content to ex…
krlberry Mar 1, 2019
bfd80e2
Conflict in phocube main.cpp fixed during merge of dev into LroLidar_…
dcookastro Mar 1, 2019
e861e57
Adds Issue Templates to Issues (#664)
jlaura Mar 2, 2019
1d28b31
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into LroLida…
dcookastro Mar 3, 2019
55e7ea2
Updates issue template for questions (#3131)
jlaura Mar 4, 2019
6a53517
Added gtest for ID and split TestUtilities into a cpp and h file to f…
kaitlyndlee Mar 4, 2019
963d788
tgocassisrdrgen exported label re-order. (#3135)
krlberry Mar 4, 2019
31ee0d7
Update label generated by tgocassisrdrgen from additional feedback (#…
krlberry Mar 6, 2019
02d7423
Changed global variable proj back to projection to avoid build ambigu…
dcookastro Mar 6, 2019
58a6eec
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into LroLida…
dcookastro Mar 6, 2019
a3c80a4
Merge branch 'LroLidar_Infrastructure' into LroLidar_Infrastructure
dcookastro Mar 6, 2019
fc04379
Took care of conflict in ProcessExportPds4from merge of repo branch i…
dcookastro Mar 6, 2019
c1b8e8b
Took care of conflict in ProcessExportPds4from merge of repo branch i…
dcookastro Mar 6, 2019
36a8bb9
Added option to enter a list of Lidar input files
dcookastro Mar 13, 2019
4217861
Removed deprecated code requiring target body radii to convert point …
dcookastro Mar 13, 2019
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
20 changes: 1 addition & 19 deletions isis/src/base/objs/ProcessExportPds4/ProcessExportPds4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,24 +429,6 @@ namespace Isis {
}


/**
* Allows mission specific programs to set version_id
* required for PDS4 labels. This value is added to the xml file
* by the identificationArea() method.
*
* The input string should be colon separated string with 6
* identifiers:
*
* @author 2019-03-01 Kristin Berry
*
* @param versiondId The version_id value required for PDS4
* compliant labels.
*/
void ProcessExportPds4::setVersionId(QString versionId) {
m_versionId = versionId;
}


/**
* Allows mission specific programs to set the title
* required for PDS4 labels. This value is added to the xml file
Expand All @@ -462,7 +444,7 @@ namespace Isis {
}


/**
/**
* Allows mission specific programs to use specified
* versions of dictionaries.
*
Expand Down
40 changes: 37 additions & 3 deletions isis/src/lro/apps/lrolola2isis/lrolola2isis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@
</change>
<change name="Debbie A Cook" date="2019-02-23">
Added new file OUTPUTTYPE=TEST, to be used strictly for testing.
This option does a SLOW sort on the output data. References #5343.
This option does a SLOW sort on the output data. The resulting output file
is sorted by pointID, which allows testing software to compare
output with truth data. References #5343.
</change>
<change name="Debbie A Cook" date="2019-03-11">
Added new input parameter FROMLIST to allow entering multiple input
Lidar CSV files. All input points are written out into a single Lidar data file.
</change>
</history>

Expand All @@ -57,16 +63,44 @@
<type>filename</type>
<fileMode>input</fileMode>
<brief>
Input LOLA Lidar CSV
Input LOLA Lidar RDR data in CSV format
</brief>
<description>
This file is a complied CSV with data from LOLA.
This file is downloaded from Washington University at

"https://ode.rsl.wustl.edu/moon/indextools.aspx?displaypage=lolardr"

It contains altimetry readings organized along the spacecraft orbit track.

</description>
<exclusions>
<item>FROMLIST</item>
</exclusions>
<filter>
*.csv
</filter>
</parameter>

<parameter name="FROMLIST">
<type>filename</type>
<fileMode>input</fileMode>
<internalDefault>None</internalDefault>
<brief>
Input LOLA Lidar CSV file list from which to generate the Lidar control point file
</brief>
<description>
This file contains a list of CSV files of LOLA Lidar RDR that will be used to generate
an Isis Lidar control point file. Each file in FROMLIST is expected to be a CSV with
LOLA Lidar RDR data. See FROM for more information on the data.
</description>
<exclusions>
<item>FROM</item>
</exclusions>
<filter>
*.lis
</filter>
</parameter>

<parameter name="CUBES">
<type>filename</type>
<fileMode>input</fileMode>
Expand Down
167 changes: 76 additions & 91 deletions isis/src/lro/apps/lrolola2isis/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "FileName.h"
#include "ID.h"

#include "FileList.h"
#include "IException.h"
#include "iTime.h"
#include "Latitude.h"
Expand All @@ -36,8 +37,19 @@ struct LidarCube {

void IsisMain() {

FileList filelist;
UserInterface &ui = Application::GetUserInterface();
FileName dataFile = ui.GetFileName("FROM");

// Get the Lidar csv data from either/or both FROM and FROMLIST
if (ui.WasEntered("FROM")) filelist.push_back(FileName(ui.GetFileName("FROM")));
if (ui.WasEntered("FROMLIST")) filelist.read(FileName(ui.GetFileName("FROMLIST")));

if (filelist.size() < 1) {
QString msg =
"Input CSV files must be specified in FROM and/or FROMLIST - no files were found.";
throw IException(IException::User,msg,_FILEINFO_);
}

SerialNumberList cubeList = SerialNumberList(ui.GetFileName("CUBES"));
double threshold = ui.GetDouble("THRESHOLD");
double rangeSigma = ui.GetDouble("POINT_RANGE_SIGMA");
Expand All @@ -56,6 +68,7 @@ void IsisMain() {
radiusSigma = ui.GetDouble("POINT_RADIUS_SIGMA");
}

// Read necessary label information from cubes
QList<LidarCube> images;

for (int i = 0; i < cubeList.size(); i++) {
Expand All @@ -73,8 +86,6 @@ void IsisMain() {
images.append(lidarCube);
}

CSVReader lidarDataFile;
lidarDataFile.read(dataFile.expanded());
LidarData lidarDataSet;
CubeManager cubeMgr;
Distance majorAx;
Expand All @@ -84,110 +95,84 @@ void IsisMain() {
// Set up an automatic id generator for the point ids
ID pointId = ID(ui.GetString("POINTID"));

//Start at 1 because there is a header. TODO actually set a header in lidarDataFile
for (int i = 1; i < lidarDataFile.rows(); i++) {
CSVReader::CSVAxis row = lidarDataFile.getRow(i);

iTime time(row[0]);
Latitude lat(row[2].toDouble(), Angle::Units::Degrees);
Longitude lon(row[1].toDouble(), Angle::Units::Degrees);
Distance radius(row[3].toDouble(), Distance::Units::Kilometers);
double range = row[4].toDouble();
// QString quality = row[]; //TODO figure out how/where to find this value
// Loop through Lidar csv data file(s) and load the data into a single LidarData object, LidarDataSet
for (int ifile = 0; ifile < filelist.size(); ifile++) {
CSVReader lidarDataFile;
lidarDataFile.read(filelist[ifile].expanded());

// Start at 1 to skip the header. TODO actually set a header in lidarDataFile

for (int i = 1; i < lidarDataFile.rows(); i++) {
CSVReader::CSVAxis row = lidarDataFile.getRow(i);

iTime time(row[0]);
Latitude lat(row[2].toDouble(), Angle::Units::Degrees);
Longitude lon(row[1].toDouble(), Angle::Units::Degrees);
Distance radius(row[3].toDouble(), Distance::Units::Kilometers);
double range = row[4].toDouble();
// QString quality = row[]; //TODO figure out how/where to find this value

LidarControlPoint *lidarPoint = new LidarControlPoint;
lidarPoint->SetId(pointId.Next());

lidarPoint->setTime(time);
lidarPoint->setRange(range);
lidarPoint->setSigmaRange(rangeSigma);

// Just set the point coordinates for now. We need to wait until we set
// the target radii to be able to set the coordinate sigmas. The sigmas
// will be converted to angles and the target radii are needed to do that.
SurfacePoint spoint(lat, lon, radius);
// lidarPoint->SetAprioriSurfacePoint(SurfacePoint(lat, lon, radius));
LidarControlPoint *lidarPoint = new LidarControlPoint;
lidarPoint->SetId(pointId.Next());

lidarPoint->setTime(time);
lidarPoint->setRange(range);
lidarPoint->setSigmaRange(rangeSigma);

// Set the point coordinates and their sigmas and add to the Lidar Control Point file
SurfacePoint spoint(lat, lon, radius);
spoint.SetSphericalSigmasDistance(
Distance(latSigma, Distance::Units::Meters),
Distance(lonSigma, Distance::Units::Meters),
Distance(radiusSigma, Distance::Units::Meters));
lidarPoint->SetAprioriSurfacePoint(spoint);

bool setSurfacePointRadii = true;

for (int j = 0; j < images.size(); j++) {
Cube *cube = cubeMgr.OpenCube(images[j].name.expanded());
// Loop through images to set measures in the Lidar Control Point
for (int j = 0; j < images.size(); j++) {
Cube *cube = cubeMgr.OpenCube(images[j].name.expanded());

if (cube != NULL) {
if (cube != NULL) {
Camera *camera = cube->camera();

Camera *camera = cube->camera();

if (camera != NULL) {
if (camera->SetGround(spoint)) {
double samp = camera->Sample();
double line = camera->Line();
if (camera != NULL) {
if (camera->SetGround(spoint)) {
double samp = camera->Sample();
double line = camera->Line();

if (samp > 0.5 - threshold && line > 0.5 - threshold
&& samp < camera->Samples() + .5 && line < camera->Lines() + .5) {

ControlMeasure *measure = new ControlMeasure;

measure->SetCoordinate(camera->Sample(), camera->Line());
measure->SetCubeSerialNumber(images[j].sn);

if (setSurfacePointRadii) {
// Get the radii and set the radii in the SurfacePoint
std::vector<Distance> targetRadii;
targetRadii = camera->target()->radii();
majorAx = targetRadii[0];
minorAx = targetRadii[1];
polarAx = targetRadii[2];
setSurfacePointRadii = false;
spoint.SetSphericalSigmasDistance(
Distance(latSigma, Distance::Units::Meters),
Distance(lonSigma, Distance::Units::Meters),
Distance(radiusSigma, Distance::Units::Meters));
lidarPoint->SetAprioriSurfacePoint(spoint);
// if (camera->target()->shape()->hasValidTarget()) {
// targetRadii = camera->target()->shape()->targetRadii();
// }
// else {
// QString msg = "Valid target not defined in shape model ";
// throw IException(IException::Unknown, msg, _FILEINFO_);
// }

// targid = camera->SpkTargetId();
// Distance targetRadii[3];
// camera0>getDouble(
// camera->radii(targetRadii);
// majorAx = targetRadii[0];
// minorAx = targetRadii[1];
// polarAx = targetRadii[2];
// setSurfacePointRadii = false;
}

lidarPoint->Add(measure);
if (time >= images[j].startTime && time <= images[j].endTime) {
QString newSerial = measure->GetCubeSerialNumber();
lidarPoint->addSimultaneous(newSerial);
if (samp > 0.5 - threshold && line > 0.5 - threshold
&& samp < camera->Samples() + .5 && line < camera->Lines() + .5) {
ControlMeasure *measure = new ControlMeasure;
measure->SetCoordinate(camera->Sample(), camera->Line());
measure->SetCubeSerialNumber(images[j].sn);
lidarPoint->Add(measure);
if (time >= images[j].startTime && time <= images[j].endTime) {
QString newSerial = measure->GetCubeSerialNumber();
lidarPoint->addSimultaneous(newSerial);
}
}
}
}
else {
QString msg = "Unable to create a camera from " + images[j].name.expanded();
throw IException(IException::Unknown, msg, _FILEINFO_);
}
}
else {
QString msg = "Unable to create a camera from " + images[j].name.expanded();
QString msg = "Unable to open a cube from " + images[j].name.expanded();
throw IException(IException::Unknown, msg, _FILEINFO_);
}
}
}
else {
QString msg = "Unable to open a cube from " + images[j].name.expanded();
throw IException(IException::Unknown, msg, _FILEINFO_);
}
}
// end image loop
// end image loop

if (lidarPoint->GetNumMeasures() <= 0 ||
lidarPoint->snSimultaneous().size() <=0) {
continue;
}
continue;
}

lidarDataSet.insert(QSharedPointer<LidarControlPoint>(lidarPoint));
}
lidarDataSet.insert(QSharedPointer<LidarControlPoint>(lidarPoint));
} // End loop on lidarDataFile rows
lidarDataFile.clear();
} // End loop on lidar data file list


if (ui.GetString("OUTPUTTYPE") == "JSON") {
Expand Down