-
Notifications
You must be signed in to change notification settings - Fork 229
Description
Description of the desired feature
Implement blockmedian
that 'Block averages (x,y,z) data tables by L1 norm". This is a data filtering function that I've used in my work before, and one I'd like to incorporate into the upcoming PyGMT FOSS4G workshop #317 (if things move quickly enough!).
The implementation will follow in the footsteps of the surface
function #243, using the same @tut_ship.xyz
example dataset for the unit tests. I'm looking to implement blockmedian
under a new file called filtering.py
which will eventually hold other GMT filtering functions like blockmean
and blockmode
.
Currently I'm facing a problem with deciding how to handle the inputs/outputs. There are various combinations, and I'm thinking of using a 'what you put in is what you get out' strategy, I.e. :
Output\Input | file | pandas table | numpy array* | x, y, z triples** |
---|---|---|---|---|
file | x | |||
pandas table | x | |||
numpy array | x | |||
x, y, z triples | x |
* numpy array could also be a python list of list
** could also be x, y, z, w quadruplets
A tempting alternative is to only provide a pandas.DataFrame table as an output, and if a pandas.DataFrame was provided as input, we make sure to copy the column names to the output table as well. This closely follows the grdtrack
example at #308.
Thoughts?
Are you willing to help implement and maintain this feature? Yes