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

hideal2pds #3978 fix #3998

Merged
merged 7 commits into from
Sep 10, 2020
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
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ISIS3 Contributors
- Steven Lambright
- Stuart Sides
- Summer Stapleton
- Timothy Giroux
- Tracie Sucharski
- Travis Addair
- Tyler Wilson
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ update the Unreleased link so that it compares against the latest release tag.

- Equalizer now reports the correct equation and values used to perform the adjustment. [#3987](https://github.com/USGS-Astrogeology/ISIS3/issues/3987)
- Map2cam now works correctly when specifying bands for input cubes. [#3856](https://github.com/USGS-Astrogeology/ISIS3/issues/3856)
- mro/hideal2pds app now writes the correct SAMPLE_BIT_MASK values to the output label. [#3978](https://github.com/USGS-Astrogeology/ISIS3/issues/3978)

### Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ INSTRUMENT_HOST_NAME = String
TARGET_NAME = String
MISSION_PHASE_NAME = String
ORBIT_NUMBER = Integer
SOURCE_PRODUCT_ID = String
#SOURCE_PRODUCT_ID = String
RATIONALE_DESC = String
SOFTWARE_NAME = String
SAMPLE_DETECTORS = Integer
LINE_DETECTORS = Integer
INSTRUMENT_TYPE = Enum
EPHEMERIS_TIME = Real
FOCAL_PLANE_X_DEPENDENCY = Integer
EXPOSURE_DURATION = (Real, 4)
EXPOSURE_DURATION = (Real, 6)
IMAGE_JITTER_CORRECTED = Integer
SHAPE_MODEL = String
A_AXIS_RADIUS = (Real, 2)
Expand Down Expand Up @@ -68,7 +68,7 @@ BANDS = Integer
OFFSET = Real
SCALING_FACTOR = Real
SAMPLE_BITS = Integer
SAMPLE_BIT_MASK = ("Binary",16)
SAMPLE_BIT_MASK = ("Binary",8)
SAMPLE_TYPE = Enum
FILTER_NAME = String
CENTER_FILTER_WAVELENGTH = Real
Expand Down
3 changes: 3 additions & 0 deletions isis/src/mro/apps/hideal2pds/hideal2pds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
<change name="Tyler Wilson" date="2019-02-08">
Added an option to control the output bits. min = 8, max =16, default = 10. Fixes #5527.
</change>
<change name="Timothy Giroux" date="2020-09-08">
Output label now has the correct SAMPLE_BIT_MASK value according to bits input. Fixes #3978.
</change>
</history>

<groups>
Expand Down
173 changes: 0 additions & 173 deletions isis/src/mro/apps/hideal2pds/hiriseIdealPds.pft

This file was deleted.

13 changes: 12 additions & 1 deletion isis/src/mro/apps/hideal2pds/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ void IsisMain() {

updatePdsLabelTimeParametersGroup(pdsLabel);
updatePdsLabelImageObject(isisCubeLab, pdsLabel);

// change SAMPLE_BIT_MASK value according to BITS input
PvlObject &image = pdsLabel.findObject("IMAGE");
image.addKeyword(PvlKeyword("SAMPLE_BIT_MASK", toString((int)pow(2.0, (double)nbits) - 1)),
Pvl::Replace);

Camera *cam = inputCube->camera();
updatePdsLabelRootObject(isisCubeLab, pdsLabel, ui, cam);

Expand Down Expand Up @@ -287,7 +293,12 @@ void IsisMain() {
// Read in the proper keyword types (Real, Enum, String, Integer, etc) for
// each PvlKeyword so that the PDS labels have proper format
PvlFormat *formatter = pdsLabel.format();
formatter->add("$ISISROOT/appdata/translations/MroHiriseIdealPds.typ");

if( nbits != 8 ) {
formatter->add("$ISISROOT/appdata/translations/MroHiriseIdealPds_16bit.typ");
} else {
formatter->add("$ISISROOT/appdata/translations/MroHiriseIdealPds_8bit.typ");
}

// Format ordering of keywords/objects/groups/comments in the PDS labels
pdsLabel.setFormatTemplate("$ISISROOT/appdata/translations/MroHiriseIdealPds.pft");
Expand Down