Skip to content

(InSAR) Compute baseline metrics #140

@nemo794

Description

@nemo794

@hfattahi requested that QA Stats HDF5 and Report PDF include the InSAR baseline metrics.

Request for 4 new metadata

  1. temporalBaseline
# From InSAR L1/L2 granule, get RSLC start times
# Note: InSAR workflow converts to datetime objects, which truncate to microsecond precision.
# However, zero Doppler time is provided in nanosecond precision.
ref_start_time = "/science/LSAR/identification/referenceZeroDopplerStartTime"
sec_start_time = "/science/LSAR/identification/secondaryZeroDopplerStartTime"

# Compute the temporal baseline in days.
temp_baseline = (sec_start_time - ref_start_time).days
  1. meanParallelBaseline
  • To compute, simply take the numpy.nanmean() of the parallelBaseline LUT.
  • Ideally, QA should recompute and compare to this existing mean_value attribute of that LUT
  • units and dtype should be same as the LUT
  • Description: Maybe something like: "Arithmetic average of the parallel component of the InSAR baseline"
  1. meanPerpendicularBaseline
  • To compute, simply take the numpy.nanmean() of the perpendicularBaseline LUT.
  • Ideally, QA should recompute and compare to this existing mean_value attribute of that LUT
  • units and dtype should be same as the LUT
  • Description: Maybe something like: "Arithmetic average of the perpendicular component of the InSAR baseline"
  1. baseline
  • dtype and units should be same as the LUT
  • description: TBD??? @hfattahi
  • Pseudocode:
baseline = numpy.sqrt(meanPerpendicularBaseline*2 + meanParallelBaseline*2)

Location in QA

The request is to add these to QA Report PDF and QA STATS.h5.

Where to add in QA Report PDF?

Some thoughts from @nemo794 :
The natural home for these is to add them to the table on the cover page. Some caveats with that:

  • Not enough physical space on the cover page?
    • For InSAR, the table already takes up the majority of the page. Adding 4 new rows would probably necessitate a second page.
  • Technical limitation of working with PdfPages?
    • QA uses Matplotlib's PdfPages
    • PdfPages is very simplistic; it requires users to open a PdfPages object once, append each new-and-finalized figure/page to the end (meaning, each page must be appended in-order), and then close that PDF. PdfPages cannot re-open an existing PDF and write to it. PdfPages cannot modify existing pages. PdfPages cannot insert a new page between two existing pages. Unlike modern office software, PdfPages does not "flow" a table that is too-long to a second page; that break would need to be decided and hard-coded apriori.
  • Given all of this, two options come to mind:
  1. Leave the cover-page as-is, and instead create a second page in the PDF for a table containing e.g. "QA-computed metadata for this granule"
  • Pros: From a user perspective, this is a nice, natural place to see these metrics
  • Issue: These InSAR statistics are fairly quick to compute. If this design pattern is inherited by e.g. RSLC, that means these computations would need to occur prior to all processing of the large image rasters, which depending on the requested metrics, could add a LOT of runtime up front to the QA workflow.
  1. Append a new page at the end of the report PDF with these metrics
    • Pros: More future-proof, particularly for large e.g. RSLC datasets. Could allow QA to accumulate different metrics, etc. while going through its workflow, and then simply report out that table at the end.
    • Issue: User-unfriendly. Info would get buried at the end of the PDF.

Where to add in QA Stats HDF5?

For the Stats HDF5, there is not an existing directory which would be a natural home for these. Similar to the L1/L2 products, these metadata do not belong in the identification group.

@nemo794 proposes two suggestions:

  1. add them directly under the QA data group, e.g.: /science/LSAR/QA/data/meanParallelBaseline
  2. make a new subdirectory for metadata that is not specific to a particular layer, e.g. /science/LSAR/QA/data/metadata/meanParallelBaseline

Here is a comparison of an L2 GUNW vs. its QA file, to help visualize/discuss where to place these new metadata:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions