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

Update tgocassisrdrgen to export footprint information #4508

Merged
merged 6 commits into from
Jun 17, 2021

Conversation

krlberry
Copy link
Contributor

@krlberry krlberry commented Jun 4, 2021

Description

Updates tgocassisrdrgen to export footprint information added by the geometry pipeline to the cube label as described in ticket #4473

Related Issue

Closes #4473

Motivation and Context

Updates the exported PDS4 product to contain footprint information that was added to the cube label by the geometry pipeline.

How Has This Been Tested?

Tested by-hand on constructed labels.

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.

@krlberry krlberry marked this pull request as draft June 4, 2021 04:52
@krlberry krlberry marked this pull request as ready for review June 7, 2021 16:05

pixelInterceptNode2.setTagName("geom:Pixel_Intercept");
pixelInterceptNode3.setTagName("geom:Pixel_Intercept");
pixelInterceptNode4.setTagName("geom:Pixel_Intercept");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed? I'd expect the translation file to put these in the correct places based on the siblings.

Copy link
Contributor Author

@krlberry krlberry Jun 7, 2021

Choose a reason for hiding this comment

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

@jessemapel This is a work-around because I couldn't get it working just via the translation files. I know you worked on the original code for ProcessExportPds4 (etc) as well, do you know if there's a better way? I might have forgotten the right way to handle this.

When I just had:
(The difference is that I removed the numbers from the end of the geom:Pixel_Intercept values and added the OutputSiblings entry to the longitude translation groups in addition to the latitude translation groups.)

Group = Corner1Lattiude
  Auto
  Optional
  InputKey        = Corner1Latitude
  InputPosition   = (IsisCube, Archive)
  OutputSiblings =  ("geom:reference_pixel_location|Lower Left Corner")
  OutputName      = geom:pixel_latitude
  OutputPosition  = (Product_Observational, Observation_Area, Discipline_Area, geom:Geometry, geom:Geometry_Orbiter, geom:Surface_Geometry, geom:Surface_Geometry_Specific, geom:Footprint_Vertices, geom:Pixel_Intercept)
  Translation     = (*, *)
End_Group

Group = Corner1Longitude
  Auto
  Optional
  InputKey        = Corner1Longitude
  InputPosition   = (IsisCube, Archive)
  OutputName      = geom:pixel_longitude
  OutputPosition  = (Product_Observational, Observation_Area, Discipline_Area, geom:Geometry, geom:Geometry_Orbiter, geom:Surface_Geometry, geom:Surface_Geometry_Specific, geom:Footprint_Vertices, geom:Pixel_Intercept)
  Translation     = (*, *)
End_Group

Group = Corner2Lattiude
  Auto
  Optional
  InputKey        = Corner2Latitude
  InputPosition   = (IsisCube, Archive)
  OutputName      = geom:pixel_latitude
  OutputPosition  = (Product_Observational, Observation_Area, Discipline_Area, geom:Geometry, geom:Geometry_Orbiter, geom:Surface_Geometry, geom:Surface_Geometry_Specific, geom:Footprint_Vertices, new@geom:Pixel_Intercept)
  OutputSiblings = ("geom:reference_pixel_location|Lower Right Corner")
  Translation     = (*, *)
End_Group

Group = Corner2Longitude
  Auto
  Optional
  InputKey        = Corner2Longitude
  InputPosition   = (IsisCube, Archive)
  OutputName      = geom:pixel_longitude
  OutputPosition  = (Product_Observational, Observation_Area, Discipline_Area, geom:Geometry, geom:Geometry_Orbiter, geom:Surface_Geometry, geom:Surface_Geometry_Specific, geom:Footprint_Vertices, geom:Pixel_Intercept)
  OutputSiblings = ("geom:reference_pixel_location|Lower Right Corner")
  Translation     = (*, *)
End_Group

Group = Corner3Lattiude
  Auto
  Optional
  InputKey        = Corner3Latitude
  InputPosition   = (IsisCube, Archive)
  OutputName      = geom:pixel_latitude
  OutputPosition  = (Product_Observational, Observation_Area, Discipline_Area, geom:Geometry, geom:Geometry_Orbiter, geom:Surface_Geometry, geom:Surface_Geometry_Specific, geom:Footprint_Vertices, new@geom:Pixel_Intercept)
  OutputSiblings  = ("geom:reference_pixel_location|Upper Left Corner")
  Translation     = (*, *)
End_Group

Group = Corner3Longitude
  Auto
  Optional
  InputKey        = Corner3Longitude
  InputPosition   = (IsisCube, Archive)
  OutputName      = geom:pixel_longitude
  OutputPosition  = (Product_Observational, Observation_Area, Discipline_Area, geom:Geometry, geom:Geometry_Orbiter, geom:Surface_Geometry, geom:Surface_Geometry_Specific, geom:Footprint_Vertices, geom:Pixel_Intercept)
  OutputSiblings  = ("geom:reference_pixel_location|Upper Left Corner")
  Translation     = (*, *)
End_Group

Group = Corner4Lattiude
  Auto
  Optional
  InputKey        = Corner4Latitude
  InputPosition   = (IsisCube, Archive)
  OutputName      = geom:pixel_latitude
  OutputPosition  = (Product_Observational, Observation_Area, Discipline_Area, geom:Geometry, geom:Geometry_Orbiter, geom:Surface_Geometry, geom:Surface_Geometry_Specific, geom:Footprint_Vertices, new@geom:Pixel_Intercept)
  OutputSiblings  = ("geom:reference_pixel_location|Upper Right Corner")
  Translation     = (*, *)
End_Group

Group = Corner4Longitude
  Auto
  Optional
  InputKey        = Corner4Longitude
  InputPosition   = (IsisCube, Archive)
  OutputName      = geom:pixel_longitude
  OutputPosition  = (Product_Observational, Observation_Area, Discipline_Area, geom:Geometry, geom:Geometry_Orbiter, geom:Surface_Geometry, geom:Surface_Geometry_Specific, geom:Footprint_Vertices, geom:Pixel_Intercept)
  OutputSiblings  = ("geom:reference_pixel_location|Upper Right Corner")
  Translation     = (*, *)
End_Group

I got the following:

.
.
.

 <geom:Geometry>
    <geom:Geometry_Orbiter>
     <geom:Surface_Geometry>
      <geom:Surface_Geometry_Specific>
       <geom:Footprint_Vertices>
        <geom:Pixel_Intercept>
         <geom:reference_pixel_location>Lower Left Corner</geom:reference_pixel_location>
         <geom:pixel_latitude unit="deg">10</geom:pixel_latitude>
         <geom:pixel_longitude unit="deg">1</geom:pixel_longitude>
         <geom:pixel_longitude unit="deg">2</geom:pixel_longitude>
         <geom:pixel_longitude unit="deg">3</geom:pixel_longitude>
         <geom:pixel_longitude unit="deg">4</geom:pixel_longitude>
        </geom:Pixel_Intercept>
        <geom:Pixel_Intercept>
         <geom:reference_pixel_location>Lower Right Corner</geom:reference_pixel_location>
         <geom:pixel_latitude unit="deg">12</geom:pixel_latitude>
        </geom:Pixel_Intercept>
        <geom:Pixel_Intercept>
         <geom:reference_pixel_location>Upper Left Corner</geom:reference_pixel_location>
         <geom:pixel_latitude unit="deg">13</geom:pixel_latitude>
        </geom:Pixel_Intercept>
        <geom:Pixel_Intercept>
         <geom:reference_pixel_location>Upper Right Corner</geom:reference_pixel_location>
         <geom:pixel_latitude unit="deg">14</geom:pixel_latitude>
        </geom:Pixel_Intercept>
       </geom:Footprint_Vertices>
      </geom:Surface_Geometry_Specific>
     </geom:Surface_Geometry>
    </geom:Geometry_Orbiter>
   </geom:Geometry>

Copy link
Contributor

Choose a reason for hiding this comment

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

Strange, I don't know why that's happening. It looks like it should spit things out in the expected places. Considering the isisexport work being done, I think this is okay.

jessemapel
jessemapel previously approved these changes Jun 7, 2021
Copy link
Contributor

@jessemapel jessemapel left a comment

Choose a reason for hiding this comment

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

Are there expected changes in test outputs for this?

@krlberry
Copy link
Contributor Author

krlberry commented Jun 8, 2021

@jessemapel Yes, I updated the input and truthdata for one category test.

@Kelvinrr
Copy link
Collaborator

Kelvinrr commented Jun 8, 2021

Seems like the TGO module tests are failing with comparison tests? I would assume there needs more changes to other cat tests?

@krlberry
Copy link
Contributor Author

krlberry commented Jun 9, 2021

@Kelvinrr This is now fixed. It was a real issue, thanks for pointing it out and sorry I didn't see your comment yesterday.

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.

Add footprint coordinates for TGO CaSSIS images to exported label
3 participants