Skip to content

Commit

Permalink
8.0.2 Release Prep (#5364)
Browse files Browse the repository at this point in the history
* Cnetthinner application bug fix resolving divide by zero in CnetManager.cpp. (#5356)

* Bug fix for a divide by zero in CnetManager.cpp. Additionally, the cnetthinner app has been converted to a callable function and Makefile tests converted to gtests. Addresses #5354.

* Updated CHANGELOG.md. Addresses #5354.

* Minor change to cnetthinner.xml. Addresses #5354.

* Update photomet's MinnaertEmpirical model to handle PVL input in photemplate format. Fixes #3621. (#5175)

* Update photomet's MinnaertEmpirical model to handle PVL input in photemplate format

* Updated CHANGELOG

* Dawn Target Translation Fix (#5294)

* Fixes dawn target translation for CERES images

* Added Changelog entry

* CSM Camera Qview Try Catches (#5295)

* Fix errors when using CSM camera in qview

* Added Changelog entry

* Fixes CSV parsing in shadowtau (#5316)

* Fixes CSV parsing in shadowtau

* Addressed PR feedback

* Error Report Fix for Program Launcher (#5331)

* Removed line that gets class, it is derived from the code

* Added more detailed error around itime not finding the leapsecond kernel

* Added changelog entry

* Updated trimfilter to correctly use high/low filters (#5340)

* Added high/low filters to trimfilter

* Updated changelog

* Updated changelog

---------

Co-authored-by: acpaquette <[email protected]>

* corrected calibration inclusion filter (needed ,) (#5357)

* corrected calibration inclusion filter (needed ,)

* changelog entry downloadIsisData fix

* Updated changelog

* Updated changelog

* Cnetthinner application bug fix resolving divide by zero in CnetManager.cpp. (#5356)

* Bug fix for a divide by zero in CnetManager.cpp. Additionally, the cnetthinner app has been converted to a callable function and Makefile tests converted to gtests. Addresses #5354.

* Updated CHANGELOG.md. Addresses #5354.

* Minor change to cnetthinner.xml. Addresses #5354.

* The cnetedit application has been refactored to be callable; Makefile tests have been removed and replaced by gtests (#5348)

* The cnetedit application has been refactored to be callable; Makefile tests have been migrated to gtest format. Addresses #5346.

* Removed extraneous variables from FunctionalTestsCnetedit.cpp. Addresses #5346.

* Updated gtests; replace cubes with labels. Addresses #5346.

* Per review cleaned up sloppy spacing; made global variables static in cnetedit.cpp to avoid issues when linking libisis. Addresses #5346.

* The cnetdiff application has been refactored to be callable; Makefile tests have been removed and replaced by gtests. (#5323)

* The cnetedit applciation has been refactored to be callable; Makefile tests have been removed and replace by gtests. Addresses #5322.

* Moved CHANGELOG.md entry for cnetdiff changes from "Added" section to "Changed" section per reviewer suggestion. Addresses #5322.

* Reverted back to original ControlNetDiff source and header files per reviewer suggestion. Addresses #5322.

* Changes to cnetdiff.cpp and main.cpp to use the addLogGroup method to add PvlGroups to Pvl. Per reviewer suggestion. Addresses #5322.

* Put back line erroneously removed in CHANGELOG.md, per review. Addresses #5322.

* Version ticks

* Updated changelog

* Updated changelog

---------

Co-authored-by: kledmundson <[email protected]>
Co-authored-by: Christine Kim <[email protected]>
Co-authored-by: acpaquette <[email protected]>
Co-authored-by: Jacob Cain <[email protected]>
  • Loading branch information
5 people authored Dec 6, 2023
1 parent 99e0500 commit a8c2c49
Show file tree
Hide file tree
Showing 68 changed files with 34,098 additions and 2,131 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ release.

## [Unreleased]

## [8.0.2] - 2023-12-05
### Changed
- Cnetedit has been refactored to be callable; old Makefile tests have been removed and replaced by gtests. Issue: [#5346](https://github.com/USGS-Astrogeology/ISIS3/issues/5346),
- Cnetdiff has been refactored to be callable; old Makefile tests have been removed and replaced by gtests. Issue: [#5322](https://github.com/USGS-Astrogeology/ISIS3/issues/5322),
### Fixed
- Bug fix for Cnetthinner app resolving divide by zero in CnetManager.cpp. Issue: [#5354](https://github.com/USGS-Astrogeology/ISIS3/issues/5354),
- Updated photomet MinnaertEmpirical model to support photemplate-style PVL format [#3621](https://github.com/DOI-USGS/ISIS3/issues/3621)
- Fixed target name translation for any dawn images with target "4 CERES" [#5294](https://github.com/DOI-USGS/ISIS3/pull/5294)
- Fixed exception pop ups in qview when viewing images created using the CSM Camera [#5259](https://github.com/DOI-USGS/ISIS3/pull/5295/files)
- Fixed shadowtau input file parseing errors when using example file [#5316](https://github.com/DOI-USGS/ISIS3/pull/5316)
- Fixed ProgramLauncher failing while reporting errors from launched programs [#5331](https://github.com/DOI-USGS/ISIS3/pull/5331)
- Fixed high/low filter functionality in trimfilter [#5311](https://github.com/DOI-USGS/ISIS3/issues/5311)
- Fixed downloadIsisData script excluding needed files in the calibration folder [#5272](https://github.com/DOI-USGS/ISIS3/issues/5272)

## [8.0.1] - 2023-08-23

### Fixed
Expand Down
44 changes: 44 additions & 0 deletions code.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,50 @@
"metadataLastUpdated": "2023-02-27"
}
}, {
"name": "ISIS3",
"organization": "U.S. Geological Survey",
"description": "GitHub code repository for the Integrated Software for Imagers and Spectrometers (ISIS)",
"version": "8.0.2",
"status": "Production",

"permissions": {
"usageType": "openSource",
"licenses": [
{
"name": "Public Domain, CC0-1.0",
"URL": "https://code.usgs.gov/DOI-USGS/isis/-/raw/8.0.2/LICENSE.md"
}
]
},

"homepageURL": "https://isis.astrogeology.usgs.gov",
"downloadURL": "https://code.usgs.gov/astrogeology/isis/-/archive/8.0.2/isis-8.0.2.zip",
"disclaimerURL": "https://code.usgs.gov/astrogeology/isis/-/raw/8.0.2/DISCLAIMER.md",
"repositoryURL": "https://code.usgs.gov/astrogeology/isis.git",
"vcs": "git",

"laborHours": 0,

"tags": [
"Planetary",
"Remote Sensing",
"Photogrammetry",
"Data Processing"
],

"languages": [
"C++"
],

"contact": {
"name": "Austin Sanders",
"email": "[email protected]"
},

"date": {
"metadataLastUpdated": "2023-12-05"
}
},{
"name": "ISIS3",
"organization": "U.S. Geological Survey",
"description": "GitHub code repository for the Integrated Software for Imagers and Spectrometers (ISIS)",
Expand Down
2 changes: 1 addition & 1 deletion isis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ set(PACKAGE "ISIS")
set(PACKAGE_NAME "USGS ISIS")

# Version number
set(VERSION "8.0.1")
set(VERSION "8.0.2")
string(REPLACE "." ";" VERSION_LIST ${VERSION})
list(GET VERSION_LIST 0 VERSION_MAJOR)
list(GET VERSION_LIST 1 VERSION_MINOR)
Expand Down
2 changes: 1 addition & 1 deletion isis/scripts/downloadIsisData
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import re

# priority is: lowest index is highest priority
filter_list = [
'+ calibration/**' # we generally want everything in calibration
'+ calibration/**', # we generally want everything in calibration
'- source/',
'- /a_older_versions/',
'- /former_versions/',
Expand Down
4 changes: 0 additions & 4 deletions isis/src/base/apps/mosrange/tsts/Makefile

This file was deleted.

48 changes: 38 additions & 10 deletions isis/src/base/apps/shadowtau/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,45 @@ void IsisMain() {
// rejected if there aren't enough words or if any of them don't make
// sense as the corresponding parameter.
FileName sInFileName(sInFile);
TextFile infile(sInFileName.expanded());
// Try with the default ',' delimiter, if that only produces one row
// item, try with spaces
CSVReader inFile(sInFileName.expanded());
if (inFile.getRow(0).dim() <= 1) {
inFile = CSVReader(sInFileName.expanded(), false, 0, ' ');
}

if (inFile.getRow(0).dim() <= 1) {
QString msg = "File [" + sInFileName.expanded() + "] either has only one line item or is not delimited by a ',' or ' '.";
throw IException(IException::User, msg, _FILEINFO_);
}

QString infileString;
while (infile.GetLine(infileString)) {
QStringList tokens = infileString.split(QRegExp("[ ,]"));

QString imgId = tokens.takeFirst();
double inc = toDouble(tokens.takeFirst());
double ema = toDouble(tokens.takeFirst());
double phase = toDouble(tokens.takeFirst());
double pflat = toDouble(tokens.takeFirst());
double pshad = toDouble(tokens.takeFirst());
for (int i = 0; i < inFile.rows(); i++) {
CSVReader::CSVAxis row = inFile.getRow(i);

if (row.dim1() < 6) {
continue;
}

QString imgId = row[0];
std::vector<double> angles = {};
for (int j = 1; j < row.dim(); j++) {
try {
angles.push_back(toDouble(row[j]));
}
catch (IException &e) {
QString msg = "Unable to convert (" + toString(i) + ", " + toString(j) +
") element [" + row[j] + "] to double. You may want to check for excess delimiters." +
"Current delimiter is set to '" + inFile.getDelimiter() + "'";
throw IException(IException::User, msg, _FILEINFO_);
}
}

double inc = angles[0];
double ema = angles[1];
double phase = angles[2];
double pflat = angles[3];
double pshad = angles[4];

// checking validity
if (!imgId.length() || (inc < 0 || inc >= 89.9) || (ema < 0 || ema >= 89.9) ||
Expand Down
8 changes: 8 additions & 0 deletions isis/src/base/apps/trimfilter/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ void IsisMain() {
double low = -DBL_MAX;
double high = DBL_MAX;
int minimum;

if(ui.WasEntered("LOW")) {
low = ui.GetDouble("LOW");
}
if(ui.WasEntered("HIGH")) {
high = ui.GetDouble("HIGH");
}
if(ui.GetString("MINOPT") == "PERCENTAGE") {
int size = lines * samples;
double perc = ui.GetDouble("MINIMUM") / 100;
Expand All @@ -35,6 +42,7 @@ void IsisMain() {
else {
minimum = (int) ui.GetDouble("MINIMUM");
}

p.SetFilterParameters(samples, lines, low, high, minimum);

// Process each line
Expand Down
81 changes: 79 additions & 2 deletions isis/src/base/objs/MinnaertEmpirical/MinnaertEmpirical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace Isis {
* phase curve values that exist between the given phase angles. The values
* in the phase angle list are limited to values that are >=0 and <=180.
*
* @param phaselist List of phase angles to interpolate
* @param phasestrlist List of phase angles to interpolate
*/
void MinnaertEmpirical::SetPhotoPhaseList(QString phasestrlist) {
double phaseangle;
Expand All @@ -92,14 +92,46 @@ namespace Isis {
}
}

/**
* Set the empirical Minnaert function phase angle list. This is the list
* of phase angles that Minnaert K values and phase curve list values will
* be provided for. A spline curve will be used to interpolate K values and
* phase curve values that exist between the given phase angles. The values
* in the phase angle list are limited to values that are >=0 and <=180.
*
* @param phaselist PvlKeyword containing phase angles to interpolate
*/
void MinnaertEmpirical::SetPhotoPhaseList(PvlKeyword phaseList) {

// If the format is Keyword="1,2,3,4,5" rather than Keyword = (1,2,3,4,5)
if (phaseList.size() == 1) {
SetPhotoPhaseList(QString(phaseList));
return;
}

double phaseAngle;
p_photoPhaseList.clear();

for (int i=0; i< phaseList.size(); i++) {
phaseAngle = phaseList[i].toDouble();

if (phaseAngle < 0.0 || phaseAngle > 180.0) {
QString msg = "Invalid value of empirical Minnaert phase angle list value [" +
toString(phaseAngle) + "]";
throw IException(IException::User, msg, _FILEINFO_);
}
p_photoPhaseList.push_back(phaseAngle);
}
}

/**
* Set the empirical Minnaert function K exponent list. This is used to
* govern the limb-darkening in the Minnaert photometric function. Values
* of the Minnaert exponent generally fall in the range from 0.5 ("lunar-like",
* almost no limb darkening) to 1.0 (Lambert function). This
* parameter is limited to values that are >=0.
*
* @param klist List of Minnaert function exponents to interpolate
* @param kstrlist List of Minnaert function exponents to interpolate
*/
void MinnaertEmpirical::SetPhotoKList(QString kstrlist) {
double kvalue;
Expand All @@ -117,6 +149,29 @@ namespace Isis {
}
}

/**
* Set the empirical Minnaert function K exponent list. This is used to
* govern the limb-darkening in the Minnaert photometric function. Values
* of the Minnaert exponent generally fall in the range from 0.5 ("lunar-like",
* almost no limb darkening) to 1.0 (Lambert function). This
* parameter is limited to values that are >=0.
*
* @param kstrList PvkKeyword containing List of Minnaert function exponents to interpolate
*/
void MinnaertEmpirical::SetPhotoKList(PvlKeyword kstrList) {

// If the format is Keyword="1,2,3,4,5" rather than Keyword = (1,2,3,4,5)
if (kstrList.size() == 1) {
SetPhotoKList(QString(kstrList));
return;
}

p_photoKList.clear();
for (int i=0; i<kstrList.size(); i++) {
p_photoKList.push_back(kstrList[i].toDouble());
}
}

/**
* Set the empirical Minnaert function phase curve list. This list provides
* the brightness values that correspond to the limb-darkening values in the
Expand All @@ -135,6 +190,28 @@ namespace Isis {
}
}

/**
* Set the empirical Minnaert function phase curve list. This list provides
* the brightness values that correspond to the limb-darkening values in the
* empirical Minnaert photometric function.
*
* @param phasecurvelist PvlKeyword containing list of brightness values corresponding
* to Minnaert function exponents
*/
void MinnaertEmpirical::SetPhotoPhaseCurveList(PvlKeyword photocurvestrList) {

// If the format is Keyword="1,2,3,4,5" rather than Keyword = (1,2,3,4,5)
if (photocurvestrList.size() == 1) {
SetPhotoPhaseCurveList(QString(photocurvestrList));
return;
}

p_photoPhaseCurveList.clear();
for (int i=0; i<photocurvestrList.size(); i++) {
p_photoPhaseCurveList.push_back(photocurvestrList[i].toDouble());
}
}

double MinnaertEmpirical::PhotoModelAlgorithm(double phase, double incidence,
double emission) {
static double pht_minnaert_empirical;
Expand Down
3 changes: 3 additions & 0 deletions isis/src/base/objs/MinnaertEmpirical/MinnaertEmpirical.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ namespace Isis {
virtual ~MinnaertEmpirical();

void SetPhotoPhaseList(QString phasestrlist);
void SetPhotoPhaseList(PvlKeyword phaselist);
void SetPhotoKList(QString kstrlist);
void SetPhotoKList(PvlKeyword kstrlist);
void SetPhotoPhaseCurveList(QString phasecurvestrlist);
void SetPhotoPhaseCurveList(PvlKeyword phasecurvestrlist);

//! Return photometric phase angle list
// inline std::vector<double> PhotoPhaseList() const {
Expand Down
24 changes: 24 additions & 0 deletions isis/src/base/objs/MinnaertEmpirical/MinnaertEmpirical.truth
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,27 @@ Albedo = 0.008174
Test phase=180.0, incidence=90.0, emission=90.0 ...
Albedo = 0

Object = PhotometricModel
Group = Algorithm
Name = MinnaertEmpirical
PhaseList = (0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120,
130, 140)
KList = (0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1,
1.2, 1.3, 1.4)
PhaseCurveList = (0, 0.3, 0.6, 0.9, 1.2, 1.5, 1.8, 2.1, 2.4, 2.7, 3, 3.3,
3.6, 3.9, 4.2)
End_Group
End_Object
End

Test phase=0.0, incidence=0.0, emission=0.0 ...
Albedo = 0
Test phase=38.0, incidence=11.0, emission=20.0 ...
Albedo = 1.1765
Test phase=65.0, incidence=45.0, emission=30.0 ...
Albedo = 1.63706
Test phase=127.0, incidence=52.0, emission=33.0 ...
Albedo = 1.96227
Test phase=180.0, incidence=90.0, emission=90.0 ...
Albedo = 0

59 changes: 59 additions & 0 deletions isis/src/base/objs/MinnaertEmpirical/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,64 @@ int main() {
e.print();
}

// Test Keyword = (1,2,3,4,5) format for input
//
// The actual numbers used for this test are not relevant -- this test's primary purpose is to
// ensure that this format of input is usable for the calculations done by the class without the
// program error-ing out.
PvlGroup algOtherFormat("Algorithm");
algOtherFormat += PvlKeyword("Name", "MinnaertEmpirical");

PvlKeyword phaseList("PhaseList");
PvlKeyword kList("KList");
PvlKeyword phaseCurveList("PhaseCurveList");

for (int i=0; i < 15; i++) {
phaseList += QString::number(i*10);
kList += QString::number(i*0.1);
phaseCurveList += QString::number(i*0.3);
}

algOtherFormat += phaseList;
algOtherFormat += kList;
algOtherFormat += phaseCurveList;

PvlObject photometricModel("PhotometricModel");
photometricModel.addGroup(algOtherFormat);

Pvl pvlOtherFormat;
pvlOtherFormat.addObject(photometricModel);
std::cout << pvlOtherFormat << std::endl << std::endl;

try {
PhotoModel *pm = PhotoModelFactory::Create(pvlOtherFormat);

std::vector<double>phaselist = pm->PhotoPhaseList();

std::cout << "Test phase=0.0, incidence=0.0, emission=0.0 ..." <<
std::endl;
std::cout << "Albedo = " << pm->CalcSurfAlbedo(0.0, 0.0, 0.0) <<
std::endl;
std::cout << "Test phase=38.0, incidence=11.0, emission=20.0 ..." <<
std::endl;
std::cout << "Albedo = " << pm->CalcSurfAlbedo(38.0, 11.0, 20.0) <<
std::endl;
std::cout << "Test phase=65.0, incidence=45.0, emission=30.0 ..." <<
std::endl;
std::cout << "Albedo = " << pm->CalcSurfAlbedo(65.0, 45.0, 30.0) <<
std::endl;
std::cout << "Test phase=127.0, incidence=52.0, emission=33.0 ..." <<
std::endl;
std::cout << "Albedo = " << pm->CalcSurfAlbedo(127.0, 52.0, 33.0) <<
std::endl;
std::cout << "Test phase=180.0, incidence=90.0, emission=90.0 ..." <<
std::endl;
std::cout << "Albedo = " << pm->CalcSurfAlbedo(180.0, 90.0, 90.0) <<
std::endl << std::endl;
}
catch(IException &e) {
e.print();
}

return 0;
}
Loading

0 comments on commit a8c2c49

Please sign in to comment.