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

Write CSLC raster and correction stats to HDF5 #120

Merged
merged 7 commits into from
Mar 23, 2023

Conversation

LiangJYu
Copy link
Contributor

This PR:

  • writes stats (currently only found in JSON) to HDF5
  • adds iono and SET correction stat computations

add iono and SET correction stat computations
@LiangJYu
Copy link
Contributor Author

Red curly brackets in pic below show where stats are in HDF5
image

Copy link
Contributor

@seongsujeong seongsujeong left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe @vbrancat can give more comments about the structure.
I've left a small question regarding the correction data to include.

Copy link
Contributor

@vbrancat vbrancat left a comment

Choose a reason for hiding this comment

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

It seems we are still generating the JSON file for the stats. Would it be possible to remove it?

@LiangJYu
Copy link
Contributor Author

It seems we are still generating the JSON file for the stats. Would it be possible to remove it?

Do you prefer:

  1. remove JSON generation by default but keep ability to generate JSON
  2. remove ability to generate JSON

@vbrancat
Copy link
Contributor

Let's keep the ability of generating the JSON file but let's not produce it

@vbrancat
Copy link
Contributor

also, shall we indicate that stats are actually QA metric by calling them qa_stats?

@LiangJYu
Copy link
Contributor Author

Let's keep the ability of generating the JSON file but let's not produce it

Currently the HDF5 doesn't include all the QA fields found in the JSON (pixel_classification_percentatges, rfi_info, orbit_info).

What do you think about consolidating all QA items under one quality_assurance group in the HDF5 as detailed below?

science/SENTINEL1/CSLC
├── corrections
├── grids
├── metadata
└── quality_assurance (NEW)
    ├── orbit_info
    │   └── orbit_type
    ├── pixel_classification_percentages
    │   ├── topo
    │   │   ├── percent_layover_pixels
    │   │   ├── percent_shadow_pixels
    │   │   └── percent_combined_pixels
    │   ├── percent_land_pixels
    │   └── percent_valid_pixels
    ├── rfi_info
    │   ├── is_rfi_info_available
    │   ├── rfi_mitigation_performed
    │   ├── rfi_mitigation_domain
    │   └── rfi_burst_report
    └── stats
        ├── corrections
        │   └── <correction_name>
        │       ├── mean
        │       ├── min
        │       ├── max
        │       └── std
        └── grids
            └── <polarization>
                ├── mean
                ├── min
                ├── max
                └── std

@vbrancat
Copy link
Contributor

Yes, I like that. Be aware pixel_classification_percentages that this:

│   ├── topo
  │   │   ├── percent_layover_pixels
  │   │   ├── percent_shadow_pixels
  │   │   └── percent_combined_pixels

should go into the static layers topo product and not in CSLC

@LiangJYu
Copy link
Contributor Author

Yes, I like that. Be aware pixel_classification_percentages that this:

│   ├── topo
  │   │   ├── percent_layover_pixels
  │   │   ├── percent_shadow_pixels
  │   │   └── percent_combined_pixels

should go into the static layers topo product and not in CSLC

For the sake of consistency, should I add quality_assurance group to the static layer HDF5 with:

  1. move topo percentage over from CSLC HDF5
  2. add stats for each static layer
  3. organization structure below:
science/SENTINEL1/CSLC
science/SENTINEL1/CSLC
├── grids
├── metadata
└── quality_assurance (NEW)
    ├── orbit_info
    │   └── orbit_type
    ├── pixel_classification_percentages
    │   └── topo
    │       ├── percent_layover_pixels
    │       ├── percent_shadow_pixels
    │       └── percent_combined_pixels
    └── stats
        └── static_layers
            └── <layer_name>
                ├── mean
                ├── min
                ├── max
                └── std

@vbrancat
Copy link
Contributor

Absolutely, let's go for it.

add common function write to HDF5 and dict
@vbrancat
Copy link
Contributor

A couple of comments:

  1. let's spell orbit_info with orbit_information and pixel_classification_percentages with pixel_classification
  2. For the burst I processed, both the items in pixel_classification are empty. Is this intentional?
  3. This is what I see in rfi_info (let's spell rfi_information)
is_rfi_info_available    Dataset {SCALAR}
    Data:
         TRUE
rfi_burst_report         Dataset {SCALAR}
    Data:
         "\000"
rfi_mitigation_domain    Dataset {SCALAR}
    Data:
         TRUE
rfi_mitigation_performed Dataset {SCALAR}
    Data:
         TRUE

Is this intentional? For the RFI domain I was expecting a string.

  1. Let's spell stats with statistics and imag with imaginary

@LiangJYu
Copy link
Contributor Author

  1. pixel_classification for both CSLC and static layers are 0 (I assume that's what you mean by empty) because it's a placeholder field with no computation being done to populate.
  2. rfi_domain should be a string. Since it's a placeholder, I've switch to an empty string as a placeholder value.

Copy link
Contributor

@vbrancat vbrancat left a comment

Choose a reason for hiding this comment

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

Thanks for having addressed my comments.

@LiangJYu LiangJYu merged commit 822596f into opera-adt:main Mar 23, 2023
@LiangJYu LiangJYu deleted the stats_to_h5 branch March 23, 2023 05:34
seongsujeong pushed a commit to seongsujeong/COMPASS that referenced this pull request Mar 31, 2023
* write stats to HDF5
* add iono and SET correction stat computations
* include RAiDER tropo correction in stat computations
* add common function write to HDF5 and dict
* add QA to static layers HDF5
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.

3 participants