Transforms X to uniform margins using each cell's fitted CDF, then
optionally applies the probit transform to obtain centred Gaussian scores.
Examples
if (FALSE) { # \dontrun{
f <- system.file("extdata", "Copernicus_dailymax_1994_2021.nc",
package = "HazardMaps")
x <- hm_read_netcdf(f, var = "i10fg")
x <- hm_standardize_coords(x)
x <- hm_decode_time(x)
x_ext <- hm_select_extreme_events(x, threshold = 25)
X <- hm_to_matrix(x_ext)
fits <- hm_fit_marginals(X)
pit <- hm_pit_transform(X, fits)
dim(pit$U)
} # }
