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

varfilt.sh 728 B

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
  1. #!/usr/bin/env bash
  2. # Basic test of variable filter widths
  3. # Make a fake data set
  4. gmt math -T0/1000/1 T 0.5 MUL COSD 4 MUL T 2 MUL COSD ADD T 20 MUL SIND 0.5 MUL ADD = data.txt
  5. # Make a periodic set of filter widths from 5 to 115
  6. gmt math -T0/1000/1 T SIND 55 MUL 60 ADD = fw.txt
  7. gmt begin varfilt ps
  8. gmt subplot begin 2x1 -Fs17c/10c -Srl -Scb -A+jTR -R0/1000/-6/6 -M12p -Bwsrt -T"Variable Filter Widths"
  9. gmt subplot set 0 -AGaussian
  10. gmt filter1d data.txt -Fgfw.txt -T0/1000/1 > out.txt
  11. gmt plot -W0.25p data.txt
  12. gmt plot -W0.5p,orange out.txt
  13. gmt subplot set 1 -AMedian
  14. gmt filter1d data.txt -Fmfw.txt -T0/1000/1 > out.txt
  15. gmt plot -W0.25p data.txt
  16. gmt plot -W0.5p,orange out.txt
  17. gmt subplot end
  18. gmt end show
Tip!

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

Comments

Loading...