Comments (13)
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. We appreciate that you took the time to contribute!
from gmt.
@SquirrelKnight could you include the script or exact command you ran? It also helps if you include the images that are generated.
from gmt.
I've attached a PDF of the figure generated by my script. It is fairly long, so I will include the relevant snippet.
if ($showpol == 1) then
awk 'NR==1 {print $12,$11,$13,$22,$23,$24,5,0,0}' $pol_file | gmt psmeca $region $projection -Sa2.5i -Z$depthscale -O -K -N>> $post_script_name #For HASH
set pol_lon =
awk 'NR==1 {print $12}' $pol_file #For HASH
set pol_lat =
awk 'NR==1 {print $11}' $pol_file #For HASH
awk '{if (NR!=1) {print $1,$2,$3,$4}}' $pol_file | gmt pspolar $region $projection -D$pol_lon/$pol_lat -N -M2.5i -Sc0.4 -T -h1 -O -K >> $post_script_name
endif
The script essentially plots the focal mechanism in question, and then overlays the poles on top of the focal mechanism. pspolar did work for me with an older version of GMT on CentOS using this exact code, so I'm not sure what changed, and unfortunately there are no errors output when running my script.
from gmt.
I'd like to note that upon looking at the figures very carefully, you can actually see dots 1 px large for the polarities (only after converting from ps 2 pdf). When zooming in on those dots, they don't become any larger. I also tried completely removing GMT and reinstalling with brew, but had no success after doing so.
from gmt.
@SquirrelKnight Can you give us a minimal example to reproduce this issue?
There are so many variables (e.g. $pol_lon
) in the example you posted 20 days ago, which are meaningless to us.
A minimal example should look like this:
gmt psmeca -Fo -R85/89/25/50 -JX7i -P -M -Sm4i -N -L -K -G150 -T0 << EOF > test.ps
87 35 -0.26 -0.71 0.97 -0.20 -0.61 2.60 27 0 0
EOF
gmt pspolar -R -J -D87/35 -M4i -N -Sc0.3i -Qe -B0 -O << EOF >> test.ps
1 147.8 53 c
2 318.6 53 c
3 311.9 53 c
EOF
from gmt.
Hi,
I have made a small script and have also realized what the problem might be.
`set min_lon = "-129.5"
set max_lon = "-126.5"
set min_lat = "48.5"
set max_lat = "50"
set projection = "-JM14c"
set boundaries = "-Bxf0.25a0.5 -Byf0.25a0.5 -BWSne"
set region = "-R$min_lon/$max_lon/$min_lat/$max_lat"
set pol_file = "Event1_pol_HASH.txt"
set post_script_name = "test_pol.ps"
set pol_lon = -127.69666
set pol_lat = 49.67583
echo $pol_lon' '$pol_lat
gmt psmeca $region $projection -P -M -Sa4i -N -L -K -G150 -T0 << EOF > $post_script_name #For HASH
-127.69666 49.67583 27.690 9 30 -98 8 0 0
EOF
gmt pspolar -R -J -D$pol_lon/$pol_lat -M4i -N -Sc0.3i -T -Qe -O << EOF >> $post_script_name
FLYN 73.08 104.71 c
HSNT 86.96 97.41 c
MTCH 81.97 96.36 c
PLMP 88.97 98.98 c
SJ06 177.47 96.15 c
SJ07 183.04 99.01 c
SJ20 154.15 105.25 d
SJ21 194.61 100.38 d
SJ23 180.47 107.51 d
SJ24 167.73 110.96 c
SJ25 156.46 114.20 c
SJ26 206.98 98.54 c
SJ27 202.34 101.72 d
SJ29 191.94 110.32 d
SJ31 163.71 121.47 c
SJ32 214.74 102.30 c
SJ33 210.53 107.01 d
SJ34 205.28 113.51 c
ZBLS 59.99 100.72 c
EOF`
It looks like because my data has takeoff angles higher than 90 degrees, they will not plot (the stations will, but the polarity circles will not). In this case, it is functionality I would like to see added. In the meantime, I believe by subtracting 90 from any takeoff angles higher than 90, and by subtracting 180 from the azimuth, I should be able to achieve similar results. Is that correct?
from gmt.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.
from gmt.
Note that your scale for psmeca is 4i which is scaled to a magntidue 5 earthquake, where as scale of pspolar is not. i.e., to get the correct projection, you have to scale your pspolar bubble as follows;
new_size=4/5*magnitude of the current event
example shell code
mag=2.5
ball_size='4i'
polar_ballsize=echo "scale=3; ${ball_size::${#ball_size}-1}*$mag/5" | bc
gmt pspolar -R -J -D$pol_lon/$pol_lat -M$polar_ballsize -N -Sc0.3i -T -Qe -O << EOF >> $post_script_name
I also suggest you use -V -P -K flags to check for bugs in your code.
from gmt.
@79seismo The size of the beachball is 4 inch, and not scale to the magnitude 5, since he uses -M
option.
As what he said, the problem is that pspolar only plots polarities which take off from lower hemisphere, and ignore all upper-hemisphere polarities.
from gmt.
Is there a solution to this problem? Can you project up-going rays to the lower focal hemisphere? I think the solution is projecting the up-going ray to the lower focal sphere as given in Udias et al. in Source Mechanisms of Earthquakes: Theory and Practice, pp.112. i.e., Your new coordinates in the focal sphere should be back azimuth (instead of the azimuth) and 180-original up-going take off angle. This is because you're projecting the intersection point of the up-going ray and the focal sphere through the center of the focal sphere to the lower hemisphere.
from gmt.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.
from gmt.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.
from gmt.
It turns out this is a pspolar bug and should be fixed in #2461.
from gmt.
Related Issues (20)
- Figures dissapear in the documentation? HOT 2
- DOC: Add a central introduction page HOT 1
- coast: limit decimals when dumping GSHHG/DCW HOT 18
- docs: correct url to use HOT 4
- Link Checker Report on 2024-06-09
- inconsistent multithread (`-x` option) behavior HOT 3
- Link Checker Report on 2024-06-16
- grdinfo -L0 doesn't work for external wrappers HOT 12
- Consistent citation style in the cookbook HOT 2
- Link Checker Report on 2024-06-30
- Review GMT's known failures
- pscoast is wrong when the -J has a proj4 string with +x_0 and +y_0
- grdcut: segmentation fault if output extension is omitted HOT 3
- Link Checker Report on 2024-07-07
- Link Checker Report on 2024-07-14
- Link Checker Report on 2024-07-21
- Link Checker Report on 2024-07-28
- Bug with binstats -Cn and binary input.
- Link Checker Report on 2024-08-04 HOT 1
- Link Checker Report on 2024-08-11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmt.