curryer.correction.psf

Attributes

Functions

centroid(→ float)

Compute center-of-mass index for a one-dimensional weight vector.

project_psf(...)

Project optical PSF onto Earth's surface using vectorized ray tracing.

convolve_gcp_with_psf(...)

Convolve GCP reference image with dynamic PSF using FFT.

convolve_psf_with_spacecraft_motion(...)

Apply spacecraft motion blur to projected PSF.

zero_pad_psf(→ curryer.correction.data_structures.PSFGrid)

Zero-pad PSF to center its centroid on the grid.

resample_psf_to_gcp_resolution(...)

Resample PSF to match GCP reference image resolution.

normalize_psf(→ curryer.correction.data_structures.PSFGrid)

Normalize PSF to unit total power.

Module Contents

curryer.correction.psf.logger
curryer.correction.psf.centroid(weights: numpy.ndarray) float

Compute center-of-mass index for a one-dimensional weight vector.

Parameters:

weights (np.ndarray) – One-dimensional weight array.

Returns:

Center-of-mass index position.

Return type:

float

Raises:

ValueError – If weight vector has zero total mass.

curryer.correction.psf.project_psf(r_iss_ctrs_m: numpy.ndarray, optical_psfs: collections.abc.Iterable[curryer.correction.data_structures.OpticalPSFEntry], subimage: curryer.correction.data_structures.ImageGrid, los_set_hs: numpy.ndarray) curryer.correction.data_structures.ProjectedPSF

Project optical PSF onto Earth’s surface using vectorized ray tracing.

Parameters:
  • r_iss_ctrs_m (np.ndarray) – Spacecraft position in ECEF coordinates, shape (3,), units: meters.

  • optical_psfs (Iterable[OpticalPSFEntry]) – Collection of optical PSF samples at different field angles.

  • subimage (ImageGrid) – Image grid defining the observation geometry.

  • los_set_hs (np.ndarray) – Line-of-sight unit vectors in instrument frame, shape (n_pixels, 3).

Returns:

PSF projected onto Earth’s surface with lat, lon, height grids.

Return type:

ProjectedPSF

Raises:
  • ValueError – If no optical PSF entries provided.

  • RuntimeError – If ray-ellipsoid intersection fails.

curryer.correction.psf.convolve_gcp_with_psf(gcp: curryer.correction.data_structures.ImageGrid, psf: curryer.correction.data_structures.PSFGrid) curryer.correction.data_structures.ImageGrid

Convolve GCP reference image with dynamic PSF using FFT.

Parameters:
  • gcp (ImageGrid) – Ground control point reference image.

  • psf (PSFGrid) – Point spread function to convolve with.

Returns:

Convolved GCP image with same coordinate grids.

Return type:

ImageGrid

curryer.correction.psf.convolve_psf_with_spacecraft_motion(psf: curryer.correction.data_structures.ProjectedPSF, composite_img: curryer.correction.data_structures.ImageGrid, config: curryer.correction.data_structures.GeolocationConfig) curryer.correction.data_structures.PSFGrid

Apply spacecraft motion blur to projected PSF.

Parameters:
  • psf (ProjectedPSF) – Projected PSF on Earth’s surface.

  • composite_img (ImageGrid) – Composite image defining spacecraft motion direction.

  • config (GeolocationConfig) – Configuration with PSF sampling parameters.

Returns:

PSF convolved with spacecraft motion blur.

Return type:

PSFGrid

curryer.correction.psf.zero_pad_psf(psf: curryer.correction.data_structures.PSFGrid) curryer.correction.data_structures.PSFGrid

Zero-pad PSF to center its centroid on the grid.

Parameters:

psf (PSFGrid) – Point spread function on rectilinear grid.

Returns:

Zero-padded PSF with centered centroid.

Return type:

PSFGrid

Raises:

ValueError – If PSF lat/lon are not one-dimensional.

curryer.correction.psf.resample_psf_to_gcp_resolution(psf: curryer.correction.data_structures.PSFGrid, gcp: curryer.correction.data_structures.ImageGrid) curryer.correction.data_structures.PSFGrid

Resample PSF to match GCP reference image resolution.

Parameters:
  • psf (PSFGrid) – Point spread function on rectilinear grid.

  • gcp (ImageGrid) – Ground control point reference defining target resolution.

Returns:

Resampled PSF at GCP resolution.

Return type:

PSFGrid

Raises:

ValueError – If PSF is not on a rectilinear grid.

curryer.correction.psf.normalize_psf(psf: curryer.correction.data_structures.PSFGrid) curryer.correction.data_structures.PSFGrid

Normalize PSF to unit total power.

Parameters:

psf (PSFGrid) – Point spread function to normalize.

Returns:

Normalized PSF with total power = 1.

Return type:

PSFGrid

Raises:

ValueError – If PSF has zero total power.