Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

psevents_dz.sh 1.4 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  1. #!/usr/bin/env bash
  2. # Make a figure illustrating dz curve for an event across time in psevents
  3. gmt begin psevents_dz ps
  4. gmt set GMT_THEME cookbook
  5. cat <<- EOF > B.txt
  6. -0.5 afg t@-r@-
  7. 0 afg t@-b@-
  8. 0.6 afg t@-p@-
  9. 1.5 afg t@-d@-
  10. 3 afg t@-e@-
  11. 3.5 afg t@-f@-
  12. EOF
  13. # Rise (t = -0.5 to 0 symbol dz goes from 0 to 1)
  14. gmt math -T-0.5/0/0.02 T 0.5 ADD 2 MUL 2 POW = t.txt
  15. # plateau (t = 0 to 0.5 symbol dz stays at 1)
  16. gmt math -T0/0.6/0.1 1 = >> t.txt
  17. # Decay (t = 0.5 to 1.5 symbol dz decays from 1 to 0)
  18. gmt math -T0.6/1.5/0.02 0.9 T 0.6 SUB SUB 0.9 DIV 2 POW = >> t.txt
  19. # active (t = 1.5 to 3 symbol dz stays at 0)
  20. gmt math -T1.5/3/0.1 0 = >> t.txt
  21. # Fade (t = 3 to 3.5 symbol dz linearly drops to -0.2 during fading)
  22. gmt math -T3/3.5/0.1 T 3 SUB 0.4 MUL NEG = >> t.txt
  23. # Coda (t = 3.5 5 symbol dz stays at -0.2 during code)
  24. gmt math -T3.5/5/0.1 -0.2 = >> t.txt
  25. gmt basemap -R-1/5/-0.30/1.30 -JX6i/2i -BWStr -BxcB.txt -Bya+l"Symbol @~D@~z"
  26. gmt plot -W0.25p,- <<- EOF
  27. -1 0
  28. 6 0
  29. EOF
  30. gmt plot -W2p t.txt
  31. gmt plot -Sv0.15i+bt+et+s -W1.5p,red <<- EOF
  32. -0.5 1.10 1.5 1.10
  33. EOF
  34. gmt plot -Sv0.15i+bt+et+s -W1.5p,blue <<- EOF
  35. 0 1.20 3 1.20
  36. EOF
  37. gmt plot -St0.15i -Gblue <<- EOF
  38. 0 -0.18
  39. 3 -0.18
  40. EOF
  41. gmt text -F+f9p -Gwhite <<- EOF
  42. -0.25 -0.07 RISE
  43. 0.3 -0.07 PLATEAU
  44. 1 -0.07 DECAY
  45. 2.25 -0.07 NORMAL
  46. 3.25 -0.07 FADE
  47. 4.25 -0.07 CODA
  48. 0.5 1.10 ANNOUNCE
  49. 1.5 1.20 DURATION OF EVENT
  50. EOF
  51. rm -f B.txt t.txt
  52. gmt end show
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...