Skip to content

Commit

Permalink
Fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Jan 2, 2025
1 parent ef1ad4a commit 0c686ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions sarsen/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

def simulate_acquisition(
dem_ecef: xr.DataArray,
orbit_interpolator: orbit.OrbitPolyfitIterpolator,
orbit_interpolator: orbit.OrbitPolyfitInterpolator,
include_variables: Container[str] = (),
) -> xr.Dataset:
"""Compute the image coordinates of the DEM given the satellite orbit."""
Expand Down Expand Up @@ -50,7 +50,7 @@ def simulate_acquisition(

def map_simulate_acquisition(
dem_ecef: xr.DataArray,
orbit_interpolator: orbit.OrbitPolyfitIterpolator,
orbit_interpolator: orbit.OrbitPolyfitInterpolator,
template_raster: xr.DataArray,
correct_radiometry: str | None = None,
) -> xr.Dataset:
Expand Down Expand Up @@ -97,7 +97,7 @@ def do_terrain_correction(

template_raster = dem_ecef.isel(axis=0).drop_vars(["axis", "spatial_ref"]) * 0.0

orbit_interpolator = orbit.OrbitPolyfitIterpolator.from_position(
orbit_interpolator = orbit.OrbitPolyfitInterpolator.from_position(
product.state_vectors()
)

Expand Down
7 changes: 5 additions & 2 deletions sarsen/orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def polyder(coefficients: xr.DataArray) -> xr.DataArray:


@attrs.define
class OrbitPolyfitIterpolator:
class OrbitPolyfitInterpolator:
coefficients: xr.DataArray
epoch: np.datetime64
interval: tuple[np.datetime64, np.datetime64]
Expand All @@ -32,7 +32,7 @@ def from_position(
deg: int = 5,
epoch: np.datetime64 | None = None,
interval: tuple[np.datetime64, np.datetime64] | None = None,
) -> "OrbitPolyfitIterpolator":
) -> "OrbitPolyfitInterpolator":
time = position.coords[dim]
assert time.dtype.name in ("datetime64[ns]", "timedelta64[ns]")

Expand Down Expand Up @@ -83,3 +83,6 @@ def velocity(self, time: xr.DataArray | None = None, **kwargs: Any) -> xr.DataAr
velocity = xr.polyval(time - self.epoch, velocity_coefficients)
velocity = velocity.assign_coords({time.name: time})
return velocity.rename("velocity")

# keep wrong spelling used elsewhere
OrbitPolyfitIterpolator = OrbitPolyfitInterpolator

0 comments on commit 0c686ca

Please sign in to comment.