Skip to content
Merged
Changes from 4 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
31 changes: 25 additions & 6 deletions src/compass/utils/h5_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,32 @@ 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 correction has been applied"),
Meta('azimuth_fm_rate_applied', bool(cfg.lut_params.enabled),
"If True, azimuth FM-rate mismatch correction has been applied"),
Meta('geometry_doppler_applied', bool(cfg.lut_params.enabled),
"If True, geometry steering doppler 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
Copy Markdown
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
Copy Markdown
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('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
Copy Markdown
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
Copy Markdown
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