Skip to content

attitudeType is always set to "Custom" #336

Description

@nemo794

Originally reported by @gmgunter on March 17, 2025: https://github-fn.jpl.nasa.gov/isce-3/isce/issues/2170

Summary

attitudeType metadata is always set to "Custom".

Products Impacted: All L1, All L2, and STATIC

Causes (2.5 causes)

Cause 1 -- Incorrect Input Pointing Files

Here is the relevant description from the SIS for the pointing files:

Image

@bhawkins grabbed a random NRP, and saw:

    <fileClass>Custom</fileClass>
    <fileType>NRP</fileType>

@jplzhan grabbed a PRP, and it claimed to be a FRP:

    <fileClass>Custom</fileClass>
    <fileType>FRP</fileType>

Per @bhawkins D&C will need to fix the pointing XML products.

Cause 2 - Hardcoded values in both focus.py and static.py

RSLC: Hardcoded in focus.py

Copy-paste from https://github-fn.jpl.nasa.gov/isce-3/isce/issues/2170 , with updated links:

A thing I noticed while shamelessly stealing @bhawkins's code to use in static layers--

The SLC writer class's set_attitude() method takes an attitude type string as an optional input, defaulting to "Custom". This is used to populate the metadata/attitude/attitudeType dataset in the RSLC product.

def set_attitude(self, attitude: Attitude, orbit: Orbit,
ellipsoid=Ellipsoid(), type="Custom"):
log.info("Writing attitude to SLC")
g = self.root.require_group("metadata/attitude")
d = g.require_dataset("attitudeType", (), "S10", data=np.bytes_(type))
d.attrs["description"] = np.bytes_(
'Attitude type, either "FRP", "NRP", "PRP, or "Custom", where'
' "FRP" stands for Forecast Radar Pointing, "NRP" is Near'
' Real-time Pointing, and "PRP" is Precise Radar Pointing')

When writing output RSLC products in focus.py, we don't override the default attitude type, so it's always set to "Custom".

slc.set_attitude(attitude, orbit)

STATIC: Hardcoded in static.py

# FIXME: There's not currently a good mechanism to get the attitude type. The RSLC
# workflow hardcodes it to 'Custom' so let's do the same here. See
# https://github-fn.jpl.nasa.gov/isce-3/isce/issues/2170.
attitude_type = "Custom"
dataset_spec = product_spec.get_dataset_spec("/".join([group.name, "attitudeType"]))
create_dataset(group.file, dataset_spec, attitude_type)

GSLC, GCOV, InSAR: Inherited from input RSLC HDF5

These workflows copy the attitudeType from the input RSLC. Once focus.py is updated, then the downstream products will automatically populate their products with the correct value.

Action Items

  • D&C to correctly populate the pointing XML files
  • ADT to fix focus.py
  • ADT to fix static.py

cc: @hfattahi @bhawkins @gshiroma @jplzhan @Tyler-g-hudson

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions