Skip to content

Commit 5d4ca7a

Browse files
committed
Add 2 Parker figs
1 parent 1f8d7df commit 5d4ca7a

File tree

6 files changed

+54
-69
lines changed

6 files changed

+54
-69
lines changed

_assets/Parker_grav.png

392 KB
Loading

_assets/Parker_mag.png

36.1 KB
Loading

_assets/common_opts/explain_fft.md

+37-49
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,38 @@
11
- **N** or **dimensions** or **inquire** : -- _dimensions=[**a**|**f**|**m**|**r**|**s**|*nx/ny*][**+a**|**d**|**h**|**l**][**+e**|**n**|**m**][**+t**_width_][**+v**][**+w**[_suffix_]][**+z**[**p**]]_\
2-
Choose or inquire about suitable grid dimensions for FFT and set
3-
optional parameters. Control the FFT dimension via these directives:
4-
5-
- **a** - Let the FFT select dimensions yielding the most accurate result.
6-
- **f** - Force the FFT to use the actual dimensions of the data.
7-
- **m** - Let the FFT select dimensions using the least work memory.
8-
- **r** - Let the FFT select dimensions yielding the most rapid calculation.
9-
- **s** - Just present a list of optional dimensions, then exit.
10-
11-
Without a directive we expect **-N**\ *nx/ny* which will do FFT on array size *nx/ny*
12-
(must be >= grid file size). Default chooses dimensions >= data which optimize speed
13-
and accuracy of FFT. If FFT dimensions > grid file dimensions, data are extended and
14-
tapered to zero.
15-
16-
Control detrending of data by appending a modifier for removing a linear trend.
17-
Consult module documentation for the default action:
18-
19-
- **+d** - Detrend data, i.e. remove best-fitting linear trend.
20-
- **+a** - Only remove the mean value.
21-
- **+h** - Only remove the mid value, i.e. 0.5 * (max + min).
22-
- **+l** - Leave data alone.
23-
24-
Control extension and tapering of data by appending a modifier to control how
25-
the extension and tapering are to be performed:
26-
27-
- **+e** - Extend the grid by imposing edge-point symmetry [Default].
28-
- **+m** - Extends the grid by imposing edge mirror symmetry.
29-
- **+n** - Turns off data extension.
30-
31-
Tapering is performed from the data edge to the FFT grid edge [100%].
32-
Change this percentage via modifier **+t**\ *width*. When **+n** is in effect,
33-
the tapering is applied instead to the data margins as no extension is
34-
available [0%].
35-
36-
Control messages being reported:
37-
38-
- **+v** - Report suitable dimensions during processing.
39-
40-
Control writing of temporary results:
41-
For detailed investigation you can write the intermediate grid being passed
42-
to the forward FFT; this is likely to have been detrended, extended by
43-
point-symmetry along all edges, and tapered. Use these modifiers to ave such grids:
44-
45-
- **+w** - Set the *suffix* from which output file name(s) will be created
46-
(i.e., *ingrid_prefix.ext*) [Default is "tapered"], where *ext* is your file extension
47-
- **+z** - Save the complex grid produced by the forward FFT. By default we
48-
write the real and imaginary components to *ingrid*\ \_real.\ *ext* and
49-
*ingrid*\ \_imag.\ *ext*. Append **p** to instead use the polar form of magnitude
50-
and phase to files *ingrid*\ \_mag.\ *ext* and *ingrid*\ \_phase.\ *ext*.
2+
Choose or inquire about suitable grid dimensions for FFT and set
3+
optional parameters. Control the FFT dimension via these directives:
4+
- **a** - Let the FFT select dimensions yielding the most accurate result.
5+
- **f** - Force the FFT to use the actual dimensions of the data.
6+
- **m** - Let the FFT select dimensions using the least work memory.
7+
- **r** - Let the FFT select dimensions yielding the most rapid calculation.
8+
- **s** - Just present a list of optional dimensions, then exit.
9+
Without a directive we expect **N**_nx/ny_ which will do FFT on array size *nx/ny*
10+
(must be >= grid file size). Default chooses dimensions >= data which optimize speed
11+
and accuracy of FFT. If FFT dimensions > grid file dimensions, data are extended and
12+
tapered to zero.\
13+
Control detrending of data by appending a modifier for removing a linear trend.
14+
Consult module documentation for the default action:
15+
- **+d** - Detrend data, i.e. remove best-fitting linear trend.
16+
- **+a** - Only remove the mean value.
17+
- **+h** - Only remove the mid value, i.e. 0.5 * (max + min).
18+
- **+l** - Leave data alone.
19+
Control extension and tapering of data by appending a modifier to control how
20+
the extension and tapering are to be performed:
21+
- **+e** - Extend the grid by imposing edge-point symmetry [Default].
22+
- **+m** - Extends the grid by imposing edge mirror symmetry.
23+
- **+n** - Turns off data extension.
24+
Tapering is performed from the data edge to the FFT grid edge [100%].
25+
Change this percentage via modifier **+t**_width_. When **+n** is in effect,
26+
the tapering is applied instead to the data margins as no extension is available [0%].\
27+
Control messages being reported:
28+
- **+v** - Report suitable dimensions during processing.
29+
Control writing of temporary results:
30+
For detailed investigation you can write the intermediate grid being passed
31+
to the forward FFT; this is likely to have been detrended, extended by
32+
point-symmetry along all edges, and tapered. Use these modifiers to ave such grids:
33+
- **+w** - Set the *suffix* from which output file name(s) will be created
34+
(i.e., *ingrid_prefix.ext*) [Default is "tapered"], where *ext* is your file extension
35+
- **+z** - Save the complex grid produced by the forward FFT. By default we
36+
write the real and imaginary components to *ingrid_real.ext* and
37+
*ingrid_imag.ext*. Append **p** to instead use the polar form of magnitude
38+
and phase to files *ingrid_mag.ext* and *ingrid_phase.ext*.

documentation/modules/gravfft.md

+8-14
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,15 @@ Optional Arguments
5959

6060
- **F** or **field** : -- *field=(faa=true, slab=true, far_field=true, bouguer=true, geoid=true, vgg=true, east=true, north=true)*\
6161
Specify desired geopotential field: compute geoid rather than gravity
62-
63-
- **faa** = Free-air anomalies (mGal) [Default]. Add **slab=true** to add in the slab
62+
- **faa** = Free-air anomalies (mGal) [Default]. Add **slab=true** to add in the slab
6463
implied when removing the mean value from the topography. This requires zero topography
6564
to mean no mass anomaly. Alternatively, to force the far-field to be exactly zero
6665
(i.e., the corner nodes of the grid), select **far_field=true** instead.
67-
68-
- **bouguer** = Bouguer gravity anomalies (mGal).
69-
70-
- **geoid** = Geoid anomalies (m).
71-
72-
- **vgg** = Vertical Gravity Gradient (VGG; 1 Eotvos = 0.1 mGal/km).
73-
74-
- **east** = East deflections of the vertical (micro-radian).
75-
76-
- **north** = North deflections of the vertical (micro-radian).
66+
- **bouguer** = Bouguer gravity anomalies (mGal).
67+
- **geoid** = Geoid anomalies (m).
68+
- **vgg** = Vertical Gravity Gradient (VGG; 1 Eotvos = 0.1 mGal/km).
69+
- **east** = East deflections of the vertical (micro-radian).
70+
- **north** = North deflections of the vertical (micro-radian).
7771

7872
\textinput{common_opts/opt_save_grd}
7973

@@ -171,9 +165,9 @@ Examples
171165
```julia
172166
using GMT, FFTW
173167

174-
G = grdcut("@earth_relief_10m", region=(-12.5,-10,35.5,37.5));
168+
G = grdcut("@earth_relief_02m", region=(-12.5,-10,35.5,37.5));
175169
G2 = gravfft(G, density=1700, field=(faa=6, slab=4), f=:g);
176-
imshow(G2)
170+
imshow(G2, colorbar=true)
177171
```
178172
\end{examplefig}
179173

documentation/utilities/parkergrav.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ Example
6969
A synthetic example. Make a Kaba like magnetization distribution of 10 A/m, compute the
7070
magnetic field created by it and invert this field.
7171

72-
\begin{examplefig}{}
7372
```julia
7473
using GMT, FFTW
7574

@@ -96,7 +95,10 @@ grdimage!(Gbat_inv, figsize=7, xshift=-9, yshift=-9.0, title="Calculated Interfa
9695
grdimage!(Gres, figsize=7, xshift=9, title="Residues (mGal)", cmap=:auto,
9796
contour=true, colorbar=true, show=true)
9897
```
99-
\end{examplefig}
98+
99+
~~~
100+
<img src="/assets/Parker_grav.png" width="1000" class="center"/>
101+
~~~
100102

101103
See Also
102104
--------

documentation/utilities/parkermag.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ Example
7373
A synthetic example. Make a Kaba like magnetization distribution of 10 A/m, compute the
7474
magnetic field created by it and invert this field.
7575

76-
\begin{examplefig}{}
7776
```julia
7877
using GMT, FFTW
7978

@@ -85,10 +84,12 @@ f3d = parkermag(Gm, Gh, "dir", year=2000, thickness=1, pct=0);
8584
m3d = parkermag(f3d, Gh, "inv", year=2000, thickness=1, pct=0);
8685

8786
grdimage(f3d, figsize=6, title="Field (nT)", colorbar=true)
88-
C = makecpt(m3d); # Need a different colormap for the magnetization
89-
grdview!(f3d, figsize=6, zsize=4, view=(210, 40), title="Magnetization (A/m)", cmap=C, surf=:image, B=:za, xshift=8, show=true)
87+
grdview!(m3d, figsize=6, zsize=4, view=(210, 40), title="Magnetization (A/m)", cmap=:auto, surf=:image, B=:za, xshift=8, show=true)
9088
```
91-
\end{examplefig}
89+
90+
~~~
91+
<img src="/assets/Parker_mag.png" width="900" class="center"/>
92+
~~~
9293

9394

9495
See Also

0 commit comments

Comments
 (0)