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

spheres.jl 1.2 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
31
32
33
34
35
  1. function spheres(out_path::ASCIIString="")
  2. # OUT_PATH -> Path to where the PS file will be written. If not in input must be set via the "outPath" global var
  3. # PS -> Full name of the created postscript file (built from OUT_PATH)
  4. # PATH -> Path to where this file lives (useful for gmtest.m)
  5. #
  6. global outPath
  7. if (isempty(out_path)) out_path = outPath; end
  8. pato, fname = fileparts(@__FILE__)
  9. ps = out_path * fname * ".ps"
  10. path = pato * "/"
  11. gmt("destroy"), gmt("gmtset -Du"), gmt("destroy") # Make sure we start with a clean session
  12. r = 10; z0 = -15; ro = 1000;
  13. li1 = gmt("sample1d -Fl -I1", [-50 0; 50 0])
  14. ptodos_g = gmt("gmtgravmag3d -Tr" * path * "sphere.raw -C" * "$ro" * " -F", li1)
  15. # xyzokb solution
  16. gmt("psxy -i0,2 -R-50/50/0/0.125 -JX14c/10c -Bx10f5 -By.01 -BWSne+t\"Anomaly (mGal)\" -W1p -P -K > " * ps, ptodos_g)
  17. gmt("psxy -i0,2 -R -JX -Sc.1c -G0 -O -K >> " * ps, ptodos_g)
  18. # Profile of analytic anomaly
  19. ztmp = gmt("gmtmath -T-50/50/1 T -15 HYPOT 3 POW INV 6.674e-6 MUL 4 MUL 3 DIV PI MUL 10 3 POW MUL 1000 MUL -15 ABS MUL")
  20. gmt("psxy -R -JX -W1p,200/0/0 -O >> " * ps, ztmp)
  21. rm("gmt.conf")
  22. return ps, path
  23. end
  24. spheres() = spheres("")
Tip!

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

Comments

Loading...