Skip to content

Commit

Permalink
Updates for 3.10.1 (#3730)
Browse files Browse the repository at this point in the history
* Fixes ddd2isis to support updated uvflat files (#3719)

* Fixes ddd2isis to support updated uvflat files

* Added history comment

* Fix for QMOS not updating lat/lon ranges correctly.  (#3714)

* qqqqqqmoooooosssssss

* added doc string

* Prep for 3.10.1

Co-authored-by: acpaquette <acp263@nau.edu>
Co-authored-by: Kelvin Rodriguez <kr788@nau.edu>
  • Loading branch information
3 people authored Mar 4, 2020
1 parent 2c9fbf1 commit b02ad98
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 14 deletions.
2 changes: 1 addition & 1 deletion isis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ set(PACKAGE "ISIS")
set(PACKAGE_NAME "USGS ISIS")

# Version number
set(VERSION "3.10.0")
set(VERSION "3.10.1")
set(PACKAGE_VERSION ${VERSION})

# Full name and version number
Expand Down
4 changes: 4 additions & 0 deletions isis/src/base/apps/ddd2isis/ddd2isis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
bands. Removed the internal default of the output parameter set to None so
that an output file is now requried. Fixes #703.
</change>
<change name="Adam Paquette" date="2020-02-28">
Updated the dataTypes QMap with a new mapping (32, 4) to handle ingesting
the updated uvflat files from malin. Fixes #3715.
</change>
</history>

<category>
Expand Down
7 changes: 7 additions & 0 deletions isis/src/base/apps/ddd2isis/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ void IsisMain() {
dataTypes.insert(1450903360, 8);
dataTypes.insert(8, 1);
dataTypes.insert(16, 2);
dataTypes.insert(32, 4);
dataTypes.insert(48, 2);

// Read bytes 16-19 to get the bit type
Expand Down Expand Up @@ -130,6 +131,12 @@ void IsisMain() {
nOffset = 1024;
}

if (dataTypeBytes == 0) {
string msg = "The value totalBandBits [" + to_string(totalBandBits) + "] does not map " +
"to any byte size in the dataTypes table.";
throw IException(IException::Programmer, msg, _FILEINFO_);
}

fin.close();

PvlGroup results("FileInfo");
Expand Down
24 changes: 24 additions & 0 deletions isis/src/base/apps/ddd2isis/tsts/badBandBit/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
APPNAME = ddd2isis

include $(ISISROOT)/make/isismake.tsts

commands:
# TEST: Throws an error when trying to open the file
if [ `$(APPNAME) \
FROM=$(INPUT)/bad_flat.ddd \
TO=$(OUTPUT)/bad_flat.cub \
2> $(OUTPUT)/temp.txt > /dev/null` ]; \
then true; \
fi;
# TEST: Throws an error when trying to read from a cub instead of ddd
if [ `$(APPNAME) \
FROM=$(INPUT)/bad_flat.cub \
TO=$(OUTPUT)/bad_flat.cub \
2>> $(OUTPUT)/temp.txt > /dev/null` ]; \
then true; \
fi;
# Removes input file path up until input
$(SED) 's+\[.*/input+[input+' $(OUTPUT)/temp.txt > $(OUTPUT)/errorTruth.txt;
$(RM) $(OUTPUT)/temp.txt
14 changes: 8 additions & 6 deletions isis/src/qisis/objs/MosaicSceneWidget/GridGraphicsItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ namespace Isis {
lonMin = lonMax;
lonMax = temp;
}

if (mappingGroup["LatitudeType"][0] == "Planetographic") {

Distance equaRad(tproj->EquatorialRadius(), Distance::Meters);
Expand Down Expand Up @@ -115,6 +114,7 @@ namespace Isis {
Angle::Degrees);
maxLat = Latitude(latMax.degrees(), mappingGroup,
Angle::Degrees);


// Make sure our lat increment is non-zero
if (!qFuzzyCompare(latInc.radians(), 0.0)) {
Expand All @@ -131,7 +131,7 @@ namespace Isis {
if (qFuzzyCompare(endLat.degrees(), 90.0))
endLat = Latitude(90.0, mappingGroup, Angle::Degrees);
}

Longitude minLon(lonMin.degrees(), mappingGroup,
Angle::Degrees);
Longitude maxLon(lonMax.degrees(), mappingGroup,
Expand All @@ -143,7 +143,7 @@ namespace Isis {
startLon = Longitude(
baseLon - Angle(floor((baseLon - minLon) / lonInc) * lonInc));
}

Longitude endLon =
(long)((maxLon - startLon) / lonInc) * lonInc + startLon;

Expand Down Expand Up @@ -199,7 +199,7 @@ namespace Isis {
double y = 0;

bool valid;

// Set ground according to lon direction to get correct X,Y values
// when drawing lines.
if (tproj->IsPositiveWest()) {
Expand Down Expand Up @@ -276,7 +276,7 @@ namespace Isis {
firstIteration = true;
atMaxLat = false;
atMaxLon = false;

// Create the longitude grid lines
for (Longitude lon = minLon; lon != maxLon + lonInc; lon += lonInc) {
if (lon > endLon && lon < maxLon) {
Expand All @@ -300,8 +300,10 @@ namespace Isis {
// Set ground according to lon direction to get correct X,Y values
// when drawing lines.
bool valid;

if (tproj->IsPositiveWest()) {
valid = tproj->SetGround(lat.degrees(), lon.positiveWest(Angle::Degrees));
double glon = tproj->Has180Domain() ? -1*lon.positiveEast(Angle::Degrees): lon.positiveWest(Angle::Degrees);
valid = tproj->SetGround(lat.degrees(), glon);
}
else {
valid = tproj->SetGround(lat.degrees(), lon.positiveEast(Angle::Degrees));
Expand Down
37 changes: 34 additions & 3 deletions isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ namespace Isis {
m_minLon = domainMinLon();
m_maxLon = domainMaxLon();
m_density = 10000;

connect(getWidget(), SIGNAL(projectionChanged(Projection *)),
this, SLOT(onProjectionChanged()), Qt::UniqueConnection);

}


Expand Down Expand Up @@ -445,6 +449,7 @@ namespace Isis {

case Cubes:
if (tproj->SetCoordinate(boundingRect.topLeft().x(), -boundingRect.topLeft().y())) {

topLeft = tproj->Longitude();
}
else {
Expand Down Expand Up @@ -796,6 +801,30 @@ namespace Isis {
configDialog->setAttribute(Qt::WA_DeleteOnClose);
configDialog->show();
}

/*
* Updates lat/lon ranges when a new projection file is loaded. Also
* forces the lat/lon extent source to Map resetting user options in the grid tool dialog.
*
*/
void MosaicGridTool::onProjectionChanged() {
TProjection * tproj = (TProjection *)getWidget()->getProjection();

// If Projection changed from a file, force extents to come from
// the new map file
m_latExtents = Map;
m_lonExtents = Map;

Latitude minLat = Latitude(tproj->MinimumLatitude(), Angle::Degrees);
Latitude maxLat = Latitude(tproj->MaximumLatitude(), Angle::Degrees);

setLatExtents(m_latExtents, minLat, maxLat);

Longitude minLon = Longitude(tproj->MinimumLongitude(), Angle::Degrees);
Longitude maxLon = Longitude(tproj->MaximumLongitude(), Angle::Degrees);

setLonExtents(m_lonExtents, minLon, maxLon);
}


/**
Expand All @@ -813,27 +842,29 @@ namespace Isis {
m_drawGridCheckBox->blockSignals(true);
m_drawGridCheckBox->setChecked(true);
m_drawGridCheckBox->blockSignals(false);

if (!getWidget()->getProjection()) {
QString msg = "Please set the mosaic scene's projection before trying to "
"draw a grid. This means either open a cube (a projection "
"will be calculated) or set the projection explicitly";
QMessageBox::warning(NULL, tr("Grid Tool Requires Projection"), msg);
}


if (m_minLon.degrees() < m_maxLon.degrees() && m_minLat.degrees() < m_maxLat.degrees()) {
m_gridItem = new GridGraphicsItem(m_baseLat, m_baseLon, m_latInc, m_lonInc, getWidget(),
m_density, m_minLat, m_maxLat, m_minLon, m_maxLon);
}

connect(getWidget(), SIGNAL(projectionChanged(Projection *)),
this, SLOT(drawGrid()), Qt::UniqueConnection);

connect(getWidget(), SIGNAL(cubesChanged()),
this, SLOT(onCubesChanged()));

if (m_gridItem != NULL)
getWidget()->getScene()->addItem(m_gridItem);

}


Expand Down
3 changes: 2 additions & 1 deletion isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ namespace Isis {
void drawGrid(bool draw);
void onCubesChanged();
void onToolOpen(bool check);

void onProjectionChanged();

protected:
QWidget *createToolBarWidget();
QAction *getPrimaryAction();
Expand Down
1 change: 1 addition & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mkdir build
cd build
export ISISROOT=$PWD
cmake -GNinja -DJP2KFLAG=ON -Dpybindings=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -Disis3Data=/usgs/cpkgs/isis3/data -Disis3TestData=/usgs/cpkgs/isis3/testData ../isis
ninja install
6 changes: 3 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# A Public Release for ISIS3.6.1: {% set version = "3.6.1" %}
# A Release Candidate for ISIS3.6.1: {% set version = "3.6.1_RC" %}
# A custom build of ISIS3.6.1 for the CaSSIS mission: {% set version = "3.6.1_cassis" %}
{% set version = "3.10.0" %}
{% set version = "3.10.1" %}

# This is the build number for the current version you are building. If this is the first build of
# this version, the build number will be 0. It is incremented by 1 with every consecutive build of
Expand Down Expand Up @@ -79,7 +79,7 @@ requirements:
- ninja==1.7.2
- nn
- openblas==0.2.19
- opencv
- opencv==3.2.0
- openssl==1.0.2n
- pcl==1.8.1
- pip==9.0.1
Expand Down Expand Up @@ -137,7 +137,7 @@ requirements:
- nanoflann==1.2.2
- conda-forge/label/gcc7::nn
- openblas==0.2.19
- opencv
- opencv==3.2.0
- openssl==1.0.2n
- pcl==1.8.1
- pip==9.0.1
Expand Down

0 comments on commit b02ad98

Please sign in to comment.