Skip to content

Add individual correction metadata to CSLC-S1 #156

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

Merged
merged 5 commits into from
May 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions src/compass/utils/h5_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,34 @@ def metadata_to_h5group(parent_group, burst, cfg):
add_dataset_and_attrs(burst_meta_group, meta_item)

# Add parameters group in processing information
dry_tropo_corr = True if (cfg.weather_model_file is not None) and \
('dry' in cfg.tropo_params.delay_type) else False
wet_tropo_corr = True if (cfg.weather_model_file is not None) and \
('wet' in cfg.tropo_params.delay_type) else False
tec_corr = True if cfg.tec_file is not None else False
par_meta_items = [
Meta('ellipsoidalFlatteningApplied', cfg.geocoding_params.flatten,
"If True, CSLC-S1 phase has been flatten with respect to a zero height ellipsoid",
{'units':'unitless'}),
Meta('topographicFlatteningApplied', cfg.geocoding_params.flatten,
"If True, CSLC-S1 phase has been flatten with respect to topographic height using a DEM",
{'units': 'unitless'}),
Meta('ellipsoidal_flattening_applied', bool(cfg.geocoding_params.flatten),
"If True, CSLC-S1 phase has been flatten with respect to a zero height ellipsoid"),
Meta('topographic_flattening_applied', bool(cfg.geocoding_params.flatten),
"If True, CSLC-S1 phase has been flatten with respect to topographic height using a DEM"),
Meta('bistatic_delay_applied', bool(cfg.lut_params.enabled),
"If True, bistatic delay timing correction has been applied"),
Meta('azimuth_fm_rate_applied', bool(cfg.lut_params.enabled),
"If True, azimuth FM-rate mismatch timing correction has been applied"),
Meta('geometry_doppler_applied', bool(cfg.lut_params.enabled),
"If True, geometry steering doppler timing correction has been applied"),
Meta('los_solid_earth_tides_applied', bool(cfg.lut_params.enabled),
"If True, solid Earth tides correction has been applied in slant range direction"),
Comment on lines +586 to +587
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering if we will need to put a placeholder for sth. like azimuth_solid_earth_tides_applied

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not a bad idea. Just in case it will be more difficult to change the product

Meta('azimuth_solid_earth_tides_applied', False,
"If True, solid Earth tides correction has been applied in azimuth direction"),
Meta('static_troposphere_applied', bool(cfg.lut_params.enabled),
"If True, troposphere correction based on a static model has been applied"),
Comment on lines +590 to +591
Copy link
Contributor

Choose a reason for hiding this comment

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

What is going to happen for static troposphere correction if cfg.lut_params.enabled is True, and we apply weather-model based troposphere correction? I think this field has to be False in that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My hope is that when we include the individual enabling/disabling of the LUTs, each of these flags will be replaced by its own individual flag. So later on, we should have the ability to set to False (or True) each of these corrections

Meta('ionosphere_tec_applied', tec_corr,
"If True, ionosphere correction based on TEC data has been applied"),
Meta('dry_troposphere_weather_model_applied', dry_tropo_corr,
"If True, dry troposphere correction based on weather model has been applied"),
Meta('wet_troposphere_weather_model_applied', wet_tropo_corr,
"If True, wet troposphere correction based on weather model has been applied")
]
par_meta_group = processing_group.require_group('parameters')
for meta_item in par_meta_items:
Expand Down