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

filter.sh 1.0 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
  1. #!/bin/sh
  2. # $Id$
  3. # Testing filter1d
  4. . ../functions.sh
  5. header "Test filter1d with or without -E option"
  6. ps=filter.ps
  7. # Make some random noise with a data gap, then save this in CVS as otherwise it would differ each time.
  8. #gmtmath -T-500/500/10 T POP 0 100 NRAND = | awk '{if ($1 < -100 || $1 > 50) print $0}' | gmtconvert -gx50 > noise.txt
  9. psxy -R-500/500/-300/300 -JX6i/2i -P -T -K -Y8.5i -Xc > $ps
  10. psxy -R -J -B100g50/100g50WSne -O noise.txt -W0.25p,red,. -K > tmp.ps
  11. psxy -R -J -O noise.txt -Sc0.05i -Gred -K >> tmp.ps
  12. cat tmp.ps >> $ps
  13. # Median without -E
  14. psxy -R -J -O -T -K -Y-2.5i >> $ps
  15. cat tmp.ps >> $ps
  16. filter1d -Fm100 -N0 noise.txt | psxy -R -J -O -K -W2p,blue >> $ps
  17. # Median with -E
  18. psxy -R -J -O -T -K -Y-2.5i >> $ps
  19. cat tmp.ps >> $ps
  20. filter1d -Fm100 -E -N0 noise.txt | psxy -R -J -O -K -W2p,blue >> $ps
  21. # Median with -E then Gaussian
  22. psxy -R -J -O -T -K -Y-2.5i >> $ps
  23. cat tmp.ps >> $ps
  24. filter1d -Fm100 -E -N0 noise.txt | filter1d -Fg100 -E -N0 | psxy -R -J -O -K -W2p,blue >> $ps
  25. psxy -R -J -O -T >> $ps
  26. pscmp
  27. rm -f tmp.ps
Tip!

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

Comments

Loading...