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

Phocube Slope and Normal Calculations #4605

Merged
merged 8 commits into from
Sep 2, 2021
Merged

Conversation

acpaquette
Copy link
Collaborator

@acpaquette acpaquette commented Aug 23, 2021

Uses this branch as a basis
Adds new slope and surface normal calculations to phocube

Description

Adds three new options to phocube:

  • Slope: Calculate the slope on a per pixel basis
  • Ellipsoid Normal: Calculate an X, Y, and Z back plane of the ellipsoid normal on a per pixel basis
  • Local Normal: Calculate an X, Y, and Z back plane of the local normal on a per pixel basis

Related Issue

Closes #3645

Motivation and Context

2021 Q4 Sprint

How Has This Been Tested?

Not currently tested

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation change (update to the documentation; no code change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read and agree to abide by the Code of Conduct
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have added myself to the .zenodo.json document.
  • I have added any user impacting changes to the CHANGELOG.md document.

Licensing

This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words:

This work is free and unencumbered software released into the public domain. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain.

  • I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

@@ -319,6 +319,13 @@ xsi:noNamespaceSchemaLocation=
<change name="Kaitlyn Lee" date="2020-03-15">
Converted application and tests for Gtest conversion.
</change>
<change name="Jesse Maple" date="2020-08-12">
Added initial slope and slope azimuth computation to phocube.
</change>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would axe my old change entry as it was never released independent of this one.

and placed in a band in the output cube. The output cube labels will
contain "Slope" in the BandBin group, in band sequence of the output
file. The slope is in degrees with 0 degrees being perfectly flat and
90 degrees being sheer vertical.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a note that the slope is measured relative to a sphere and not a more complex datum like the gravity model.

If this parameter is true, the local normal will be computed for
every pixel and placed in three bands (X, Y, Z) in the output cube.
The output cube labels will contain three "Local Normal (coord)" keywords
in the BandBin group, in band sequence of the output file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note that the X, Y, and Z values are in the body fixed reference frame. Also, add something about the local normal being computed from the shapemodel.

If this parameter is true, the ellipsoid normal will be computed for
every pixel and placed in three bands (X, Y, Z) in the output cube.
The output cube labels will contain three "Ellipsoid Normal (coord)"
keywords in the BandBin group, in band sequence of the output file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reference frame comment as local normal, except indicate that this is computed from the triaxial ellipsoid.

@jessemapel
Copy link
Contributor

This also needs an "Added" entry in the Changelog.

@acpaquette acpaquette requested a review from jessemapel August 24, 2021 17:50
@acpaquette acpaquette merged commit 8c8df01 into DOI-USGS:dev Sep 2, 2021
acpaquette added a commit to acpaquette/ISIS3 that referenced this pull request Sep 8, 2021
* First pass at slope in phocube

* Added slope and azimuth cals to phocube.cpp

* Added local normal and ellipsoid normal back plan calculations to phocube

* Force pulled upstream new phocube main.cpp

* Removed unused includes and moved a few lines around

* Fixed up the includes one more time

* Updated phocube docs based on PR feedback

* Added changelog entry

Co-authored-by: Jesse Mapel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Phocube missing essential output options (local phase angle, slope, slope azimuth)
2 participants