-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pixel count for the pixel classification in QA (#204)
* initial commit to the branch * print out error message when land polygon file is not found * mod on `MANIFEST.in` to install land polygon GPKG file * pixel classificaiton for static layer * A costant for OPERA operator email; email addtess updated * change in description for azimuth carrier phase and flattening phase * Logic change to rasterize land maskl use dissolved polygon to compute land mask * remove unnecessary codes; revise docstring; bit of linting * addressed comments in the PR; revvised the docstrings; remove unused GPKG file * using `WORKFLOW_SCRIPTS_DIR` to define `LAND_GPKG_FILE` * docstring revised * `valid_pixel_percentages` -> `percent_land_and_valid_pixels` * Addressing comments in the PR (round 2) * codacy issue --------- Co-authored-by: Seongsu Jeong <[email protected]>
- Loading branch information
1 parent
2471107
commit 998e203
Showing
7 changed files
with
213 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
recursive-include src/compass/* *.yaml | ||
recursive-include src/compass/data *.gpkg |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,8 @@ | |
metadata_to_h5group, DATA_PATH, | ||
ROOT_PATH) | ||
from compass.utils.helpers import (bursts_grouping_generator, get_module_name, | ||
get_time_delta_str) | ||
get_time_delta_str, | ||
OPERA_OPERATION_CONTACT_EMAIL) | ||
from compass.utils.yaml_argparse import YamlArgparse | ||
from compass.utils.radar_grid import get_decimated_rdr_grd | ||
|
||
|
@@ -162,7 +163,7 @@ def run(cfg, burst, fetch_from_scratch=False): | |
|
||
# Global attributes for static layers | ||
h5_root.attrs['conventions'] = "CF-1.8" | ||
h5_root.attrs["contact"] = np.string_("[email protected]") | ||
h5_root.attrs["contact"] = np.string_(OPERA_OPERATION_CONTACT_EMAIL) | ||
h5_root.attrs["institution"] = np.string_("NASA JPL") | ||
h5_root.attrs["project_name"] = np.string_("OPERA") | ||
h5_root.attrs["reference_document"] = np.string_("JPL-108762") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,8 @@ | |
metadata_to_h5group, | ||
DATA_PATH, METADATA_PATH, ROOT_PATH) | ||
from compass.utils.helpers import (bursts_grouping_generator, | ||
get_time_delta_str, get_module_name) | ||
get_time_delta_str, get_module_name, | ||
OPERA_OPERATION_CONTACT_EMAIL) | ||
from compass.utils.lut import cumulative_correction_luts | ||
from compass.utils.yaml_argparse import YamlArgparse | ||
|
||
|
@@ -119,7 +120,7 @@ def run(cfg: GeoRunConfig): | |
|
||
with h5py.File(output_hdf5, 'w') as geo_burst_h5: | ||
geo_burst_h5.attrs['conventions'] = "CF-1.8" | ||
geo_burst_h5.attrs["contact"] = np.string_("[email protected]") | ||
geo_burst_h5.attrs["contact"] = np.string_(OPERA_OPERATION_CONTACT_EMAIL) | ||
geo_burst_h5.attrs["institution"] = np.string_("NASA JPL") | ||
geo_burst_h5.attrs["project_name"] = np.string_("OPERA") | ||
geo_burst_h5.attrs["reference_document"] = np.string_("JPL-108278") | ||
|
@@ -185,8 +186,7 @@ def run(cfg: GeoRunConfig): | |
# Declare names, types, and descriptions of carrier and flatten | ||
# outputs | ||
phase_names = ['azimuth_carrier_phase', 'flattening_phase'] | ||
phase_descrs = [f'{pol} geocoded CSLC image {desc}' | ||
for desc in phase_names] | ||
phase_descrs = ['azimuth carrier phase', 'flattening phase'] | ||
|
||
# Prepare arrays and datasets for carrier phase and flattening | ||
# phase | ||
|
@@ -280,8 +280,10 @@ def run(cfg: GeoRunConfig): | |
cfg.tropo_params.delay_type) | ||
cslc_qa.compute_CSLC_raster_stats(geo_burst_h5, bursts) | ||
cslc_qa.populate_rfi_dict(geo_burst_h5, bursts) | ||
cslc_qa.valid_pixel_percentages(geo_burst_h5) | ||
cslc_qa.percent_land_and_valid_pixels(geo_burst_h5, | ||
bursts[0].polarization) | ||
cslc_qa.set_orbit_type(cfg, geo_burst_h5) | ||
|
||
if cfg.quality_assurance_params.output_to_json: | ||
cslc_qa.write_qa_dicts_to_json(out_paths.stats_json_path) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
QA_PATH = '/quality_assurance' | ||
METADATA_PATH = '/metadata' | ||
|
||
|
||
@dataclass | ||
class Meta: | ||
''' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
|
||
|
||
WORKFLOW_SCRIPTS_DIR = os.path.dirname(compass.__file__) | ||
OPERA_OPERATION_CONTACT_EMAIL = '[email protected]' | ||
|
||
# get the basename given an input file path | ||
# example: get_module_name(__file__) | ||
|