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
  1. #!/usr/bin/env bash
  2. # Testing gmt filter1d
  3. ps=filter.ps
  4. # Make some random noise with a data gap, then save this in CVS as otherwise it would differ each time.
  5. #gmt math -T-500/500/10 T POP 0 100 NRAND = | $AWK '{if ($1 < -100 || $1 > 50) print $0}' | gmt convert -gx50 > noise.txt
  6. gmt psxy -R-500/500/-300/300 -JX6i/2i -P -T -K -Y8.5i -Xc > $ps
  7. gmt psxy -R -J -Bx100g50 -By100g50 -BWSne -O noise.txt -W0.25p,red,. -K > tmp.eps
  8. gmt psxy -R -J -O noise.txt -Sc0.05i -Gred -K >> tmp.eps
  9. cat tmp.eps >> $ps
  10. # Median without -E
  11. gmt psxy -R -J -O -T -K -Y-2.5i >> $ps
  12. cat tmp.eps >> $ps
  13. gmt filter1d -Fm100 -N0 noise.txt | gmt psxy -R-500/500/-300/300 -J -O -K -W2p,blue >> $ps
  14. # Median with -E
  15. gmt psxy -R -J -O -T -K -Y-2.5i >> $ps
  16. cat tmp.eps >> $ps
  17. gmt filter1d -Fm100 -E -N0 noise.txt | gmt psxy -R-500/500/-300/300 -J -O -K -W2p,blue >> $ps
  18. # Median with -E then Gaussian
  19. gmt psxy -R -J -O -T -K -Y-2.5i >> $ps
  20. cat tmp.eps >> $ps
  21. gmt filter1d -Fm100 -E -N0 noise.txt | gmt filter1d -Fg100 -E -N0 | gmt psxy -R-500/500/-300/300 -J -O -W2p,blue >> $ps
Tip!

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

Comments

Loading...