Repository navigation
Closed
Labels
feature requestNew feature wanted
Description
This issue serves as the central place for discussing and tracking the implementation of the pygmt.info function in PyGMT. The issue will be closed when the initial implementation is complete. Progress is tracked at PyGMT: Wrapping GMT modules.
Documentation
- GMT: https://docs.generic-mapping-tools.org/dev/gmtinfo.html
- GMT.jl: https://www.generic-mapping-tools.org/GMTjl_doc/documentation/modules/gmtinfo
- PyGMT: https://www.pygmt.org/dev/api/generated/pygmt.info.html
GMT Option Flags and Modifiers
☑️: Implemented; ⬜: To be implemented/discussed; Strikethrough: Won't implement.
- ☑️
-C(per_column): Report the min/max values per column in separate output columns. - ⬜
-D[dx]: Modifies-Ito report the range of each column rounded to the nearest multiple of dx, where each column may have a different increment. - ⬜
-E[H|L][col]: Report the record that contains the extreme value (maximum with H, minimum with L) in column col (default is the first column, i.e., 0). - ⬜
-F[i|d|t]: Report the number of tables (t), segments (d), or data records (i) in the input. - ☑️
-I[b|p|f|s] dx[/dy[...]]: (spacing) Compute the min/max values of the first n columns rounded to the nearest multiple of the provided increments. - ⬜
-L: For multiple input files, determine the common region that covers all files; output in the same format as-R. - ⬜
-Q: Quick; pass all records through without processing and without checking for bad data records. - ⬜
-S[x][y]: Report the mean and standard deviation of x and/or y in addition to the min/max. - ☑️
-Tdz[+c col]: (nearest_multiple) Report the min/max of the first (or col'th) column to the nearest multiple of dz and output as[zmin, zmax, dz]. - ☑️
-V(verbose): Verbosity level. : Use-X/-YFigure.shift_origininstead.- ☑️
-a(aspatial): Aspatial column assignment. - ⬜
-b: Binary input/output. - ⬜
-d: Replace NaN with a specified nodata value on input/output. - ⬜
-e: Pattern matching to select input rows. - ☑️
-f(coltypes): Column data types. - ⬜
-g: Gap detection. - ⬜
-h: Read/write header records. - ☑️
-i(incols): Select input columns. - ⬜
-o: Select output columns. - ⬜
-q: Select rows by row number or range. - ☑️
-r(registration): Declare the data are node-registered (gridline or pixel). - ⬜
-s: Skip rows containing NaN values. - ⬜
-w: Wrap repeated cycles. : Use--PAR=valuepygmt.configinstead.
Notes on Input Formats
data: Accepts a file path, 1-D/2-Dnumpy.ndarray, orpandas.DataFrame.- Returns a
numpy.ndarrayif any ofper_column,spacing, ornearest_multipleare set; otherwise returns astrwith the rawgmtinfooutput. - When
spacingis set, the output is in the form[w, e, s, n], suitable for use as theregionparameter in other functions. - When
nearest_multipleis set, the output is in the form[zmin, zmax, dz], suitable for use as theseriesparameter inpygmt.makecpt.
Linked Pull Requests
- Initial feature implementation – Add docstrings and tests to gmtinfo #144
- Add inline docstring example – Fix typos in tutorial 'Making subplots' #2083
- Implement
-D(per-column rounding increments) option - Implement
-E(extreme-value record reporting) option - Implement
-S(mean and standard deviation) option - Add common data I/O options (
-b,-d,-e,-g,-h,-o,-q,-s,-w)
Related Issues and Discussions
pygmt.infois commonly used to determine theregionargument for other PyGMT functions by rounding data bounds to a convenient multiple viaspacing.- The
nearest_multipleoutput is the natural input forpygmt.makecpt'sseriesparameter. - For grid data, use
pygmt.grdinfoinstead, which reports similar statistics for 2-D grids.
Metadata
Metadata
Assignees
Labels
feature requestNew feature wanted
Type
Projects
- StatusShow more project fieldsNo status
Activity