GeoStat-Framework / GSTools

GSTools - A geostatistical toolbox: random fields, variogram estimation, covariance models, kriging and much more
https://geostat-framework.org
GNU Lesser General Public License v3.0
544 stars 71 forks source link

Feature Enhancement: Unit selection and max_distance with Variogram where latlon = True #282

Closed Megil-Zesty closed 1 year ago

Megil-Zesty commented 1 year ago

When defining a variogram with latlon=True, I would love to be able to set max_distance directly in gs.vario_estimate() as well as the units for the distance. Then, when plotting the variogram data, I could see semivariance vs distance.

MuellerSeb commented 1 year ago

Could you provide a code-example? I don't think I fully understand your problem.

MuellerSeb commented 1 year ago

308 solves at least the units issue for the CovModel representation, that can now be defined with the new geo_scale attribute of the CovModel. You can choose between KM_SCALE (earth radius in km as reference), DEGREE_SCALE (length scale in degrees) and RADIAN_SCALE (default, length scale in radians). To use other distance units, you could multiply conversion factors to KM_SCALE, like 1000 * KM_SCALE to have a meter scale.

The vario_estimate routine will always use radians for the great circle distance. To have a better plotting, you could multiply the bin centers with one of the scales given above to have another unit for the x-axis.

For the other problem I assume you mean the remaining arguments of the standard_bins routine, namely bin_no and max_dist that could be forwarded by the vario_estimate routine. This seems like a useful extension. I will take a look.

MuellerSeb commented 1 year ago

geo_scale was added to vario_estimate to select the units of the bins with #308

MuellerSeb commented 1 year ago

Also additional keywords will be forwarded to standard_bins, so this will be solved.