pygmt.blockmean

pygmt.blockmean(table, outfile=None, **kwargs)[source]

Block average (x,y,z) data tables by mean estimation.

Reads arbitrarily located (x,y,z) triples [or optionally weighted quadruples (x,y,z,w)] from a table and writes to the output a mean position and value for every non-empty block in a grid region defined by the region and spacing parameters.

Full option list at https://docs.generic-mapping-tools.org/latest/blockmean.html

Aliases:

  • I = spacing

  • R = region

  • V = verbose

  • a = aspatial

  • f = coltypes

  • r = registration

Parameters
Returns

output (pandas.DataFrame or None) – Return type depends on whether the outfile parameter is set:

  • pandas.DataFrame table with (x, y, z) columns if outfile is not set

  • None if outfile is set (filtered output will be stored in file set by outfile)