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

smooth.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
  1. #!/usr/bin/env bash
  2. #
  3. # Testing the smoothing spline option
  4. gmt begin smooth ps
  5. gmt subplot begin 2x1 -Fs6.5i/4.5i -Scb -Srl -A -Y0.75i
  6. gmt subplot set 0 -A"No weights"
  7. gmt plot @topo_crossection.txt -R300/500/-4500/-3000 -Sc0.1c -Gred -N -lData
  8. gmt sample1d @topo_crossection.txt -T300/500/0.1 -Fs1 > new.txt
  9. gmt plot new.txt -Wfaint,red -l"Smooth spline p = 1"
  10. gmt sample1d @topo_crossection.txt -T300/500/0.1 -Fs0.1 > new.txt
  11. gmt plot new.txt -W0.25p -l"Smooth spline p = 0.1"
  12. gmt sample1d @topo_crossection.txt -T300/500/0.1 -Fs0.001 > new.txt
  13. gmt plot new.txt -W0.5p -l"Smooth spline p = 0.001"
  14. gmt sample1d @topo_crossection.txt -T300/500/0.1 -Fs0.0001 > new.txt
  15. gmt plot new.txt -W1p,blue -l"Smooth spline p = 0.0001"
  16. gmt subplot set 1 -A"Weights w = 1/@~s@~@+2@+"
  17. gmt plot @topo_crossection.txt -R300/500/-4500/-3000 -Sc0.1c -Gred -Ey+w3p -N -lData
  18. gmt sample1d @topo_crossection.txt -T300/500/0.1 -Fs1 -W2 > new.txt
  19. gmt plot new.txt -Wfaint,red -l"Smooth spline p = 1"
  20. gmt sample1d @topo_crossection.txt -T300/500/0.1 -Fs0.1 -W2 > new.txt
  21. gmt plot new.txt -W0.25p -l"Smooth spline p = 0.1"
  22. gmt sample1d @topo_crossection.txt -T300/500/0.1 -Fs0.001 -W2 > new.txt
  23. gmt plot new.txt -W0.5p -l"Smooth spline p = 0.001"
  24. gmt sample1d @topo_crossection.txt -T300/500/0.1 -Fs0.0001 -W2 > new.txt
  25. gmt plot new.txt -W1p,blue -l"Smooth spline p = 0.0001"
  26. gmt subplot end
  27. gmt end show
  28. rm -f new.txt
Tip!

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

Comments

Loading...