-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrapper for blockmedian #348
Labels
feature request
New feature wanted
Milestone
Comments
weiji14
referenced
this issue
in weiji14/pygmt
Oct 20, 2019
Initial commit for wrapping the blockmedian function for #348, to be implemented under filtering.py. Original GMT `blockmedian` documentation can be found at https://docs.generic-mapping-tools.org/latest/blockmedian.html. Storing sample test cases under test_blockmedian.py. Current implementation only allows for pandas.DataFrame or ASCII file name inputs, and correspondingly outputs the same type. Tests currently use the load_sample_bathymetry dataset, and we check for a variety of cases that the blockmedian filtered output is valid. Also aliased required arguments spacing (I) and region (R).
weiji14
referenced
this issue
in weiji14/pygmt
Oct 25, 2019
Initial commit for wrapping the blockmedian function for #348, to be implemented under filtering.py. Original GMT `blockmedian` documentation can be found at https://docs.generic-mapping-tools.org/latest/blockmedian.html. Storing sample test cases under test_blockmedian.py. Current implementation only allows for pandas.DataFrame or ASCII file name inputs, and correspondingly outputs the same type. Tests currently use the load_sample_bathymetry dataset, and we check for a variety of cases that the blockmedian filtered output is valid. Also aliased required arguments spacing (I) and region (R).
weiji14
referenced
this issue
in weiji14/pygmt
Nov 1, 2019
Initial commit for wrapping the blockmedian function for #348, to be implemented under filtering.py. Original GMT `blockmedian` documentation can be found at https://docs.generic-mapping-tools.org/latest/blockmedian.html. Storing sample test cases under test_blockmedian.py. Current implementation only allows for pandas.DataFrame or ASCII file name inputs, and correspondingly outputs the same type. Tests currently use the load_sample_bathymetry dataset, and we check for a variety of cases that the blockmedian filtered output is valid. Also aliased required arguments spacing (I) and region (R).
weiji14
referenced
this issue
in weiji14/pygmt
Nov 7, 2019
Initial commit for wrapping the blockmedian function for #348, to be implemented under filtering.py. Original GMT `blockmedian` documentation can be found at https://docs.generic-mapping-tools.org/latest/blockmedian.html. Storing sample test cases under test_blockmedian.py. Current implementation only allows for pandas.DataFrame or ASCII file name inputs, and correspondingly outputs the same type. Tests currently use the load_sample_bathymetry dataset, and we check for a variety of cases that the blockmedian filtered output is valid. Also aliased required arguments spacing (I) and region (R).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 implementblockmedian
under a new file calledfiltering.py
which will eventually hold other GMT filtering functions likeblockmean
andblockmode
.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. :
* 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
The text was updated successfully, but these errors were encountered: