Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
pygmt.x2sys_cross: Refactor to use virtualfiles for output tables [BREAKING CHANGE: Dummy times in 3rd and 4th columns now have np.timedelta64 type] #3182
pygmt.x2sys_cross: Refactor to use virtualfiles for output tables [BREAKING CHANGE: Dummy times in 3rd and 4th columns now have np.timedelta64 type] #3182
Changes from 37 commits
95fab98
ce926a0
86278cb
58c6ea4
d6eeade
9d12ae1
28eb1df
5e926e8
c1c756d
3a3df0a
3aea9a6
d869a32
b46d21d
81a1ec0
07fe53e
5f04506
84765e4
b9b4098
bf59e61
9bc063a
b0b5099
1396ee8
6f2671a
a9a4179
04a1986
b27212b
aa3e9af
97312fb
6450ba0
29a7f9e
d5294a4
55f7c30
a44390d
b81e292
870d9c7
db94b91
de17d5e
ebce56e
71af717
cf2cfc7
3a62fc1
9fd35ce
2b3474b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that
x2sys_cross
can output multi-segment files (each segment is separated byIO_SEGMENT_MARKER
which is>
by default, see https://docs.generic-mapping-tools.org/6.5/reference/file-formats.html#optional-segment-header-records). If I'm not mistaken, the currentvirtualfile_to_dataset
method does not implement multi-segment file handling yet? To be fair though, the current implementation inx2sys_cross
simply merges all segments into one, since we skip rows starting with>
, but we need to check thatvirtualfile_to_dataset
will return all segments in a multi-segment file instead of just the first one.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The main problem is that, as far as I know, there is no equivalent way to represent a multi-segment file in pandas. The multi-segment support was also mentioned in #2729 (comment).
If we can have a general way to represent multi-segment in pandas, then it should be straightforward to output multi-segments from
_GMT_DATASET
to the desired data structure.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already tested in the
_GMT_DATASET
docstringspygmt/pygmt/datatypes/dataset.py
Line 215 in 466c8b6
For
x2sys_cross
, we also test the shape of the output pd.DataFrame.