pygmt.clib.Session.create_data¶
-
Session.create_data(self, family, geometry, mode, **kwargs)[source]¶ Create an empty GMT data container.
Parameters: - family : str
A valid GMT data family name (e.g.,
'GMT_IS_DATASET'). See thedata_familiesattribute for valid names.- geometry : str
A valid GMT data geometry name (e.g.,
'GMT_IS_POINT'). See thedata_geometriesattribute for valid names.- mode : str
A valid GMT data mode (e.g.,
'GMT_OUTPUT'). See thedata_modesattribute for valid names.- dim : list of 4 integers
The dimensions of the dataset. See the documentation for the GMT C API function
GMT_Create_Data(src/gmt_api.c) for the full range of options regarding ‘dim’. IfNone, will pass in the NULL pointer.- ranges : list of 4 floats
The dataset extent. Also a bit of a complicated argument. See the C function documentation. It’s called
rangein the C function but it would conflict with the Python built-inrangefunction.- inc : list of 2 floats
The increments between points of the dataset. See the C function documentation.
- registration : int
The node registration (what the coordinates mean). Can be
'GMT_GRID_PIXEL_REG'or'GMT_GRID_NODE_REG'. Defaults to'GMT_GRID_NODE_REG'.- pad : int
The grid padding. Defaults to
GMT_PAD_DEFAULT.
Returns: - data_ptr : int
A ctypes pointer (an integer) to the allocated
GMT_Datasetobject.