Skip to content

Commit 8629f10

Browse files
committed
Chaneg GMT_IN|GMT_IS_REFERENCE to GMT_IN
1 parent 4939ee2 commit 8629f10

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

pygmt/clib/session.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ def open_virtual_file(self, family, geometry, direction, data):
10331033
... lib.put_vector(dataset, column=0, vector=x)
10341034
... lib.put_vector(dataset, column=1, vector=y)
10351035
... # Add the dataset to a virtual file
1036-
... vfargs = (family, geometry, 'GMT_IN|GMT_IS_REFERENCE', dataset)
1036+
... vfargs = (family, geometry, 'GMT_IN', dataset)
10371037
... with lib.open_virtual_file(*vfargs) as vfile:
10381038
... # Send the output to a temp file so that we can read it
10391039
... with GMTTempFile() as ofile:
@@ -1186,9 +1186,7 @@ def virtualfile_from_vectors(self, *vectors):
11861186
dataset, family="GMT_IS_VECTOR|GMT_IS_DUPLICATE", strings=strings
11871187
)
11881188

1189-
with self.open_virtual_file(
1190-
family, geometry, "GMT_IN|GMT_IS_REFERENCE", dataset
1191-
) as vfile:
1189+
with self.open_virtual_file(family, geometry, "GMT_IN", dataset) as vfile:
11921190
yield vfile
11931191

11941192
@contextmanager
@@ -1269,9 +1267,7 @@ def virtualfile_from_matrix(self, matrix):
12691267

12701268
self.put_matrix(dataset, matrix)
12711269

1272-
with self.open_virtual_file(
1273-
family, geometry, "GMT_IN|GMT_IS_REFERENCE", dataset
1274-
) as vfile:
1270+
with self.open_virtual_file(family, geometry, "GMT_IN", dataset) as vfile:
12751271
yield vfile
12761272

12771273
@contextmanager
@@ -1356,7 +1352,7 @@ def virtualfile_from_grid(self, grid):
13561352
registration=_reg,
13571353
)
13581354
self.put_matrix(gmt_grid, matrix)
1359-
args = (family, geometry, "GMT_IN|GMT_IS_REFERENCE", gmt_grid)
1355+
args = (family, geometry, "GMT_IN", gmt_grid)
13601356
with self.open_virtual_file(*args) as vfile:
13611357
yield vfile
13621358

pygmt/tests/test_clib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def test_virtual_file():
324324
data = np.arange(shape[0] * shape[1], dtype=dtype).reshape(shape)
325325
lib.put_matrix(dataset, matrix=data)
326326
# Add the dataset to a virtual file and pass it along to gmt info
327-
vfargs = (family, geometry, "GMT_IN|GMT_IS_REFERENCE", dataset)
327+
vfargs = (family, geometry, "GMT_IN", dataset)
328328
with lib.open_virtual_file(*vfargs) as vfile:
329329
with GMTTempFile() as outfile:
330330
lib.call_module("info", "{} ->{}".format(vfile, outfile.name))
@@ -344,7 +344,7 @@ def test_virtual_file_fails():
344344
vfargs = (
345345
"GMT_IS_DATASET|GMT_VIA_MATRIX",
346346
"GMT_IS_POINT",
347-
"GMT_IN|GMT_IS_REFERENCE",
347+
"GMT_IN",
348348
None,
349349
)
350350

0 commit comments

Comments
 (0)