Skip to content

pspolar: Merge -C with -D and improve parsing#4870

Merged
PaulWessel merged 6 commits intomasterfrom
pspolar-update
Mar 1, 2021
Merged

pspolar: Merge -C with -D and improve parsing#4870
PaulWessel merged 6 commits intomasterfrom
pspolar-update

Conversation

@PaulWessel
Copy link
Member

@PaulWessel PaulWessel commented Feb 28, 2021

See #4869 for background.

To make room for a possible -Ccpt option across many modules, we let the optional alternate point be set via a modifier to -D (which sets the primary point) instead. The new parsing allows for long/lat to be given in the usual geographic syntax accepted elsewhere in GMT (i.e., ddd:mm:ssF as well as decimal).

A few concerns remain (apart from the letter used for the modifier in -D – currently +z):

  1. The description of -M is strange: "Sets the size of the beach ball to plot polarities in". We are not plotting beachballs here but the lower half of the focal sphere, no? Copy/paste issue? I can understand the +m modifier to scale size to magnitude for beachballs. Does this still make sense for a focal sphere and we just update the language?
  2. The default size of the small circle at the point set via -D when an alternate location is given is listed as 0.015i. But the code is using GMT_DOT_SIZE which is actually 0.005i. So that is a factor of 3 between usage documentation and actual values, and the documentation is quiet about it. The 0.005i is 0.36 points so I put in 0.5 points so the circle can be seen. However, I never make these plots so I do not know what is a useful default, but being smalle than the pen thickness of 0.25p cannot be useful. Note: This will be the same issue for meca (and possibly coupe if that capability is added). I also note that meca uses the same 0.005i default diameter but says in the documentation it is 0 (presumably means no circle). So there needs to be a common default and common language used in both usage and docs across these modules.

Hoping @seisman can opine on these issues.

TO make room for a possible -Ccpt option across many modules, we let the optional alternate point be set via a modifier to -D (which sets the primary point). The new parsing allows for long/lat to be given in the usual geographic syntax accepted elsewhere in GMT (i.e., ddd:mm:ssF as well as decimal).
@PaulWessel PaulWessel self-assigned this Feb 28, 2021
@PaulWessel
Copy link
Member Author

Pinging @seisman for comments on the questions above.

@seisman
Copy link
Member

seisman commented Feb 28, 2021

  1. The description of -M is strange: "Sets the size of the beach ball to plot polarities in". We are not plotting beachballs here but the lower half of the focal sphere, no? Copy/paste issue? I can understand the +m modifier to scale size to magnitude for beachballs. Does this still make sense for a focal sphere and we just update the language?

Yes, changing it to "Sets the size of the focal sphere to plot polarities in" should be good.

@PaulWessel
Copy link
Member Author

OK done. For my education, is this true?: The data plotted are all observations from a single earthquake observed at various stations at different azimuths and distances. The focal sphere is typically plotted at the location of the earthquake, given via -D (but see +z for offsetting its location). If so, should I add something like that to the docs?

@PaulWessel
Copy link
Member Author

Any opinion on the size of that tiny circle? I think if default pen is 0.25p we should at least make the circle 0.5p. Just tested that with plot and it gives a tiny donut:

echo 0 0 | gmt plot -R-1/1/-1/1 -JX5c -Sc0.5p -W0.25p -B -pdf t

@seisman
Copy link
Member

seisman commented Feb 28, 2021

OK done. For my education, is this true?: The data plotted are all observations from a single earthquake observed at various stations at different azimuths and distances. The focal sphere is typically plotted at the location of the earthquake, given via -D (but see +z for offsetting its location). If so, should I add something like that to the docs?

Yes, your understanding is correct. It's good to add these explainations.

2. The default size of the small circle at the point set via -D when an alternate location is given is listed as 0.015i. But the code is using GMT_DOT_SIZE which is actually 0.005i. So that is a factor of 3 between usage documentation and actual values, and the documentation is quiet about it. The 0.005i is 0.36 points so I put in 0.5 points so the circle can be seen. However, I never make these plots so I do not know what is a useful default, but being smalle than the pen thickness of 0.25p cannot be useful. Note: This will be the same issue for meca (and possibly coupe if that capability is added). I also note that meca uses the same 0.005i default diameter but says in the documentation it is 0 (presumably means no circle). So there needs to be a common default and common language used in both usage and docs across these modules.

Any opinion on the size of that tiny circle? I think if default pen is 0.25p we should at least make the circle 0.5p. Just tested that with plot and it gives a tiny donut:

echo 0 0 | gmt plot -R-1/1/-1/1 -JX5c -Sc0.5p -W0.25p -B -pdf t

I'm thinking about do we really need the line and the circle in polar.

We have an example for polar in test/pspolar/pspolar_01.sh. In the below figure, the left panel is plotted using meca and polar, and the right panel is plotted using polar only. I think we all agree that using polar only doesn't provide any useful information.

image

In meca, we have the -C option to shift the beachball location, add a line connecting the old and new locations, and also add a circle at the old location. The below figure shows how -C works. In the left panel, I need to add -C to both meca and polar so that the beachball and the polarity symbols can match. In the right panel, -C is added to polar, but again, without a beachball, the right panel seems useless.

image

So I think the new syntax should be -D<lon>/<lat>[+z<lon>/<lat>] only. If anyone wants to connect the old and new locations, they should do it in meca, not in polar. Does it make sense to you?

@seisman
Copy link
Member

seisman commented Feb 28, 2021

Any opinion on the size of that tiny circle? I think if default pen is 0.25p we should at least make the circle 0.5p. Just tested that with plot and it gives a tiny donut:

echo 0 0 | gmt plot -R-1/1/-1/1 -JX5c -Sc0.5p -W0.25p -B -pdf t

Back to meca, the default circle size is too small. It seems 0.5p is also too small (see the figure below, using the default pen and 0.5p circle):
image

@PaulWessel
Copy link
Member Author

PaulWessel commented Feb 28, 2021

Thanks @seisman, I agree it seems pointless to let pspolar draw that circle and line. There is likely a lot of copy/paste in these various codes and docs rom way back. But if we did -D<lon>/<lat>[+z<lon>/<lat>], what purpose does the initial lon/lat serve? It is simply ignored then, right, since it is no longer used in drawing line or circle. Should we just simply use -Dlon/lat for wherever we want to place the sphere?

@PaulWessel
Copy link
Member Author

Since we are fixing bugs anyway, I guess we can pick what the default circle should be. 0.5p is very tiny. Perhaps 0.1c is better?

@seisman
Copy link
Member

seisman commented Feb 28, 2021

Thanks @seisman, I agree it seems pointless to let pspolar draw that circle and line. There is likely a lot of copy/paste in these various codes and docs rom way back. But if we did -D<lon>/<lat>[+z<lon>/<lat>], what purpose does the initial lon/lat serve? It is simply ignored then, right, since it is no longer used in drawing line or circle. Should we just simply use -Dlon/lat for wherever we want to place the sphere?

Yes, that's a good point. -Dlon/lat is enough.

@seisman
Copy link
Member

seisman commented Feb 28, 2021

Since we are fixing bugs anyway, I guess we can pick what the default circle should be. 0.5p is very tiny. Perhaps 0.1c is better?

0.1c seems good on a 7-inch map.
image

@PaulWessel
Copy link
Member Author

Your 0.1c circle seems filled? How did that happen?

@seisman
Copy link
Member

seisman commented Feb 28, 2021

Your 0.1c circle seems filled? How did that happen?

I think the color is controlled by -G.

@PaulWessel
Copy link
Member Author

Finally, with +z no longer needed then meca could instead use -A for "alternative location" of symbol, unless you think coupe may one day want to specify alternative locations. But being projected, not clear how to me. Anyway, the options now are

  1. Use -Z in meca for what -C now does, and in the future we could use -Z in coupe for the same thing
  2. Use -A in meca for what -C now does, and decide there will never be such a need in coupe.

I think you can better make that choice than I!

@seisman
Copy link
Member

seisman commented Feb 28, 2021

I don't think it's possible to specify new locations in coupe. So -A seems good to me

@PaulWessel
Copy link
Member Author

Great, I will make it so in meca. I think I did all the things we discussed in pspolar so I will remove the WIP - maybe a final check from you and we are done?

@PaulWessel PaulWessel changed the title WIP pspolar: Merge -C with -D and improve parsing pspolar: Merge -C with -D and improve parsing Feb 28, 2021
@PaulWessel
Copy link
Member Author

I still wonder about the 0.1c circle. In GMT4 the default was 0 (no circle, just the line). In GMT5-6.1.1 the circle size was 0.005i which is so small that unless the user selected a faint line it would be covered by the line. So effectively zero. Should we just state that the circle is optional; append +s to plot it - otherwise just draw the line?

@PaulWessel
Copy link
Member Author

If you look at test meca_input_columns.sh you can see some examples of drawing the line and there is a barely discernible bump at the end for the 0.005i circle. I think this is not a good look. We should not plot it by default and let user select a size if they want it.

@seisman
Copy link
Member

seisman commented Mar 1, 2021

Should we just state that the circle is optional; append +s to plot it - otherwise just draw the line?

Sounds good to me.

@PaulWessel
Copy link
Member Author

OK, done.

@PaulWessel PaulWessel merged commit 510c502 into master Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants