Skip to content

Conversation

@seisman
Copy link
Member

@seisman seisman commented Aug 28, 2020

Description of proposed changes

For most GMT modules, if -J is not given, GMT uses -JX15c for Cartesian
data, and -JQ15c for Geographic data.

pssac can either plot seismograms as time series (Cartesian data)
or plot seismograms on maps (Geographic data). Currently, pssac always
uses -JQ15c when -J is not given.

Plotting seismograms as time series gives the following error:

gmt sac seis.SAC -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred -pdf single
sac [ERROR]: -S option is needed in geographic plots.

because GMT sets the default -JQ15c. But for geographic plots, -S
(controling the waveform time scaling) is required.

Obviously, the -JQ15c is the wrong choice. This PR fixes the issue.

In this PR, pssac always use Cartesian projection, unless -S is used.

All tests still pass. With this PR, the command

gmt sac seis.SAC -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred -pdf single

plots seismograms using -JX15c, and command (with -S option)

gmt sac *.z -R-120/-40/35/65 -Baf -M1i -S300c -pdf map

plots seismograms on maps, using -JQ15c.

For most GMT modules, if -J is not given, GMT uses -JX15c for Cartesian
data, and -JQ15c for Geographic data.

pssac can either plot seismograms as time series (Cartesian data)
or plot seismograms on maps (Geographic data). Currently, pssac always
uses -JQ15c when -J is not given.

Plotting seismograms as time series gives the following error:
```
gmt sac seis.SAC -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred -pdf single
sac [ERROR]: -S option is needed in geographic plots.
```
because GMT sets the default -JQ15c. But for geographic plots, -S
(controling the waveform time scaling) is required.

Obviously, the -JQ15c is the wrong choice. This PR fixes the issue.

In this PR, pssac always use Cartesian projection, unless -S is used.

All tests still pass. With this PR, the command
```
gmt sac seis.SAC -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred -pdf single
```
plots seismograms using -JX15c, and command (with -S option)
```
gmt sac *.z -R-120/-40/35/65 -Baf -M1i -S300c -pdf map
```
plots seismograms on maps, using -JQ15c.
@seisman seisman requested review from PaulWessel and joa-quim August 28, 2020 03:21
@seisman
Copy link
Member Author

seisman commented Aug 28, 2020

This PR works as expected, but I'm not sure if these changes are the best way to do this.

@seisman seisman added the backport 6.1 Backport this PR to 6.1 branch label Aug 28, 2020
Copy link
Member

@PaulWessel PaulWessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good solution I think.

@PaulWessel PaulWessel merged commit 35ff208 into master Aug 28, 2020
@PaulWessel PaulWessel deleted the pssac-autoJ branch August 28, 2020 04:02
github-actions bot pushed a commit that referenced this pull request Aug 28, 2020
For most GMT modules, if -J is not given, GMT uses -JX15c for Cartesian
data, and -JQ15c for Geographic data.

pssac can either plot seismograms as time series (Cartesian data)
or plot seismograms on maps (Geographic data). Currently, pssac always
uses -JQ15c when -J is not given.

Plotting seismograms as time series gives the following error:
```
gmt sac seis.SAC -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred -pdf single
sac [ERROR]: -S option is needed in geographic plots.
```
because GMT sets the default -JQ15c. But for geographic plots, -S
(controling the waveform time scaling) is required.

Obviously, the -JQ15c is the wrong choice. This PR fixes the issue.

In this PR, pssac always use Cartesian projection, unless -S is used.

All tests still pass. With this PR, the command
```
gmt sac seis.SAC -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred -pdf single
```
plots seismograms using -JX15c, and command (with -S option)
```
gmt sac *.z -R-120/-40/35/65 -Baf -M1i -S300c -pdf map
```
plots seismograms on maps, using -JQ15c.
seisman added a commit that referenced this pull request Aug 28, 2020
…4094)

For most GMT modules, if -J is not given, GMT uses -JX15c for Cartesian
data, and -JQ15c for Geographic data.

pssac can either plot seismograms as time series (Cartesian data)
or plot seismograms on maps (Geographic data). Currently, pssac always
uses -JQ15c when -J is not given.

Plotting seismograms as time series gives the following error:
```
gmt sac seis.SAC -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred -pdf single
sac [ERROR]: -S option is needed in geographic plots.
```
because GMT sets the default -JQ15c. But for geographic plots, -S
(controling the waveform time scaling) is required.

Obviously, the -JQ15c is the wrong choice. This PR fixes the issue.

In this PR, pssac always use Cartesian projection, unless -S is used.

All tests still pass. With this PR, the command
```
gmt sac seis.SAC -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred -pdf single
```
plots seismograms using -JX15c, and command (with -S option)
```
gmt sac *.z -R-120/-40/35/65 -Baf -M1i -S300c -pdf map
```
plots seismograms on maps, using -JQ15c.

Co-authored-by: Dongdong Tian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 6.1 Backport this PR to 6.1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants