Fitting and reconstructing APSFs - eoplus/apsfs GitHub Wiki
The APSFs calculated in grid geometry are ready to be applied for sensors that match the spatial resolution of the simulations. This means that every sensor or band at a different resolution would require its own grid simulation. This is despite the fact that the underlying density PSF is the same for a given set of conditions differing only on the spatial resolution of the simulation grid.
The APSFs differ between different spatial resolutions because the APSFs for real sensors (finite resolution) are discrete functions: they are the integrals of the density PSF over the grid cell areas. If it is possible to retrieve the underlying density PSF, the APSF can be reconstructed at any spatial resolution. This would make it possible to use annular and sectorial simulations to reconstruct grids on the fly for any sensor and possibly view angle.
This chapter describe the methods necessary to retrieve the density APSF and to perform the reconstruction.
Annular geometries represent a problem that can be simplified to a single dimension. An example is the symmetrical condition represented by a nadir viewing sensor over a flat Lambertian surface. Recall from the accumulator geometries section that for this condition the APSF depends only on radius and can be described as:
where is the discrete APSFs,
is the density PSF and
is the average product of the density PSF and the radius within the annulus
. It can be seen that
cannot be isolated directly from the Monte Carlo simulation results. However,
can be calculated from the derivative of the cumulative distribution function. The cumulative distribution function,
, is:
And its derivative is:
Since the cumulative distribution can be computed only at the radial break points of the Monte Carlo simulation, it is necessary to fit a model for a continuous description of the CDF curve and numerically calculate the derivative. Those relations are presented in graphical format below.
The model chosen to fit the annular CDF with respect to radius is a modification of the two term exponential function commonly used to fit univariate APSF CDF, including an additional term and pressure dependence. The model is described as:
where pressure is the atmospheric pressure at the surface (mbar), to
are fitted parameters and
is the total fraction of diffusely transmitted photons (will equal 1 if APSF is normalized). Note that
. This model can be fitted with the function
fit_annular and solved at requested radial positions with the function predict_annular (unidimensional).
The predictions can be of three types: (1) "cpsf" solves for the cumulative of the PSF; (2) "dpsf" solves for the numeric derivative of the cumulative distribution to retrieve the density PSF; and (3) "psf" uses the density PSF and the quadrature rule to calculate the integral density PSF over the annulus (or grid cell) area (discrete PSF).
The unidimensional predictions are presented below:
![]() |
![]() |
![]() |
![]() |
With the function predict_grid, it is possible to reconstruct a discrete PSF grid at any sensor resolution from the annular simulations. In this case, the radial distances are calculated to the grid cell corners and the discrete PSF calculated with bidimensional quadrature. The example below show a reconstruction of a grid PSF at 30 m resolution based on the fit_annular model. The Mean Absolute Relative Error (MARE) to a native grid simulation under the same conditions is 0.09.
![]() |
![]() |
One generalization in two dimensions is to keep the polar coordinates but divide the annuli in sectors (polar grid). Recall from the accumulator geometries section that for this condition the APSF depends on radius and azimuth and can be described as:
where is the discrete APSF at the polar grid cell
,
is the density PSF and
the average product of the density PSF and the radius within the annulus sector. Analogously to the annular geometry,
can be calculated from the mixed partial derivative of the bidimensional cumulative distribution function. The bidimensional cumulative distribution function,
, is:
And its mixed partial derivative is:
Since the main objective of the sectorial simulations is to include asymmetry from varying view angle, a more complex model was used for interpolation of the bidimensional cumulative PSF, allowing for a third predictor (e.g., view angle). This model first uses singular value decomposition (SVD) of the PSF polar grid, than fit each component of the u and v structural parameters with polynomial expansions. In its simplest format (without a third predictor) and in vector notation, it can be described as:
where and
are the structural parameters of the SVD,
its singular value, and
and
the fitted polynomial coefficients of order
to each component
of the structural parameters. This model can be fitted with the function
fit_sectorial and solved at requested radial and azimuthal positions with the function predict_sectorial.
The sectorial predictions at a view angle of 60° are presented below:
![]() |
![]() |
![]() |
![]() |
As for the annular fit, it is also possible to use the sectorial fit to predict a regular grid. An example is presented below for a view angle of 60°. The Mean Absolute Relative Error (MARE) to a native grid simulation under the same conditions is 0.07.
![]() |
![]() |
By default the viewing azimuth is set to 90° (from north), but can be changed with parameter vaz. Below are reconstructions for a viewing azimuths of 45° and 160°.
![]() |
![]() |
Although at this version no method is provided to fit grid simulations, their direct application is facilitated by rotating the azimuth to the correct viewing azimuth. By default simulations are performed at 90° (from north). The function rotate_grid can be used for rotation by specifying the viewing azimuth (vaz). Note that there is no extrapolation beyond the PSF convex hull and pixels beyond that limit will receive a value of zero (this is of no consequence to application, but prevents NA values that are incompatible with some adjacency correction methods). Below are rotations of grid simulations at 60° for viewing azimuths of 45° and 160°.
![]() |
![]() |
The utility of the model fits are many fold. Model parameters have low storage space and memory requirements, are generic in nature to include any new sensor, allow extrapolation in extent (with care!) and remove the noise fluctuations from insufficient statistical sampling in regions far from the origin, were probabilities are extremely low.
If the sensor view angle range within the swath is lower than 20°, grids reconstructed from annular fits should provide the best representation of the APSF. At higher view angles, sectorial fits with two predictors (radius and azimuth) are the next best representation. Although it is possible to include view angle as a third predictor for the sectorial fit, uncertainties will be higher.
| Previous: Sensor configuration | Next : Code validation |















