Skip to content

Commit

Permalink
Fix python 3.8 breackage
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Apr 25, 2022
1 parent c5874ff commit c9e7182
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions xarray_sentinel/sentinel1.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def open_orbit_dataset(
position = xr.Variable(data=data["position"], dims=("axis", "azimuth_time")) # type: ignore
velocity = xr.Variable(data=data["velocity"], dims=("axis", "azimuth_time")) # type: ignore

attrs = attrs | {}
attrs = attrs.copy()
if reference_system is not None:
attrs.update({"reference_system": reference_system})

Expand Down Expand Up @@ -443,15 +443,18 @@ def open_pol_dataset(
number_of_bursts = swath_timing["burstList"]["@count"]
range_pixel_spacing = image_information["rangePixelSpacing"]

attrs = attrs | {
"radar_frequency": product_information["radarFrequency"] / 10**9,
"azimuth_pixel_spacing": image_information["azimuthPixelSpacing"],
"range_pixel_spacing": range_pixel_spacing,
"azimuth_time_interval": azimuth_time_interval,
"range_sampling_rate": range_sampling_rate,
"incidence_angle_mid_swath": image_information["incidenceAngleMidSwath"],
"ascending_node_time": image_information["ascendingNodeTime"],
}
attrs = attrs.copy()
attrs.update(
{
"radar_frequency": product_information["radarFrequency"] / 10**9,
"azimuth_pixel_spacing": image_information["azimuthPixelSpacing"],
"range_pixel_spacing": range_pixel_spacing,
"azimuth_time_interval": azimuth_time_interval,
"range_sampling_rate": range_sampling_rate,
"incidence_angle_mid_swath": image_information["incidenceAngleMidSwath"],
"ascending_node_time": image_information["ascendingNodeTime"],
}
)
encoding = {}
swap_dims = {}
chunks: T.Union[None, T.Dict[str, int]] = None
Expand Down

0 comments on commit c9e7182

Please sign in to comment.