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

rls_on_rma.sh 1.1 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
  1. #!/usr/bin/env bash
  2. # Test Reweighted L-2 measure using Reduced Major Axis area misfit
  3. # Make sure the Reweighted path (-Nw) yields the same regression as
  4. # regression just the good points after removing the outliers.
  5. # Test data from Dietmar Muller.
  6. ps=rls_on_rma.ps
  7. echo "0 red 1 red" > code.cpt
  8. echo "1 blue 2 blue" >> code.cpt
  9. gmt regress noisy_data.txt -Nr -Er > rma.txt
  10. gmt regress noisy_data.txt -Nr -Er -S > raw.txt
  11. gmt regress noisy_data.txt -Nw -Er > model.txt
  12. gmt psxy rma.txt -R-200/-30/200/800 -JX6i/9i -P -Baf -W2p,green -i0,2 -K -Xc > $ps
  13. gmt psxy model.txt -R -J -O -K -W4p -i0,2 >> $ps
  14. gmt regress raw.txt -i0,1 -Er | gmt psxy -R -J -O -K -W1p,orange -i0,2 >> $ps
  15. gmt psxy model.txt -i0,1,6 -Ccode.cpt -R -J -O -Sc0.25c -K >> $ps
  16. gmt pslegend -R -J -O -DjBR+w3.5i+jBR+o0.1i -F+p1p << EOF >> $ps
  17. S 0.2i c 0.25c blue - 0.5i Good point according to @;green;RMA via LMS@;;
  18. S 0.2i c 0.25c red - 0.5i Outlier according to @;green;RMA via LMS@;;
  19. D 0.1i 0.25p
  20. S 0.2i - 0.25i - 2p,green 0.5i RMA via LMS
  21. S 0.2i - 0.25i - 4p 0.5i Reweighted RMA
  22. S 0.2i - 0.25i - 1p,orange 0.5i RMA via LS on good points only
  23. EOF
Tip!

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

Comments

Loading...