-
Notifications
You must be signed in to change notification settings - Fork 361
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
The -i for memory datasets via matrix used the wrong parameter #5289
Conversation
Instead of the column order it echoed back the column loop variable.
This PR fixes the initial issue, but makes other tests failing. Here is an failing example using this branch (datafile: points.txt):
|
I have Chair duty this morning so will be slow looking at this. But I now what the issue is: the gmtio_ascii_input has a loop to handle repeated columns while the column function does not. So there is some replication to do I think where it is being called (4+ times in gmt_api.c). I will see how far I can get. |
Got this far but no longer. python/miniconda/pygmt not doing arm64 I guess?
I am on the laptop this morning so not done this recently. |
I committed my test changes for this case (see lines 9576-9589 in gmt_api.c. Perhaps you can try this to see - it may have bugs since I am unable to go through it, but it is similar to what gmtio_ascii_input does when it loops over the tokens. Should it miraculously work as is then there are other places in gmt_api.c that need a similar upgrade. |
I am still getting the same result as Dongdong posted above with the lastest commit. |
OK, well then if you have time to debug this, compare that new code with what happens for data files (gmt_io.c lines 3638-3676, but especially lines 3663 onwards [also note 3639-3645. Otherwise late afternoon for me when I get back to the safety of my home office. |
OK, I will take a look. |
Co-authored-by: Meghan Jones <[email protected]>
OK, great - have a check to see if it fixes all of them. |
There are still some issues:
|
The
|
I am not able to reproduce the crash in the original contour script. Do you get any error messages with the crash? |
I used |
Just arrived home, have 50 minutes until a zoom. So api_get_record_vector need similar fix, no? I can take a first crack at it since I know @meghanrjones is probably busy with her REU student. |
Just checking, which of the rose figs fail? The ones with the incols args? Both of them? Or OK to just try one? |
And given my lack of Python chops, would be best if you could copy/paste into this issue a simple failing script. |
Please try this one: from pygmt import Figure
from pygmt.datasets import load_fractures_compilation
data = load_fractures_compilation()
fig = Figure()
fig.rose(
data=data,
region=[0, 1, 0, 360],
sector=15,
diameter="5.5c",
color="blue",
frame=["x0.2g0.2", "y30g30", "+glightgray"],
incols=[1, 0],
pen="1p",
norm="",
scale=0.4,
)
fig.show() |
Thanks, so I can see it is hanging. Ctrl-C does not seem to kill the fig.rose call in the terminal - is this normal? Looks like I have to kill that terminal window or the python process? |
It also bothers me a lot. I don't have a solution yet. |
Thanks, not a real problem but killing the terminal was the quickest. |
OK, fixed that I think - hopefully no other side-effects; let me know. |
The rose tests no longer wait for inputs, but the images are wrong. The above test uses the
|
OK, and sorry I got confused by the numbers above. The 272.954 is actually the length and 0 is the azimuth, Given that the GMT_IS_VECTOR passes 272.95,0 it is passing length,azimuth which is the expected data format for gmt rose. The @fractures_06.txt file contains angle,azimuth, hence it needs -:. Adding -i1,0 in the present case would reverse that and give the plot you obtained. So I wonder how the GMT_IS_VECTOR structure is assembled since it seems it already has the columns switched. How was it made? |
I just realized that although the |
After correcting the column order returned by the |
Puh, great! |
By the way, the appearance of the grid lines in rose figures using 6.2.0 (gridlines in background) slightly changed compared to 6.1.1. (in foreground). Is there an (undocumented) option available to change that @PaulWessel @meghanrjones ? |
I think this is probably a consequence of #4274, fixing #4265. @PaulWessel, can you confirm that the above plot order for rose in 6.2.0 is the intended order? @michaelgrund The way around this is to do a separate basemap command after rose. |
Instead of the column order it echoed back the column loop variable. Addresses GenericMappingTools/pygmt#1313, I hope.