Programs of the Old Type for Paleomagnetic Analysis
The author of this home page, a living fossil from MS-DOS era, presents some programs of the old type with C language to analyze paleomagnetic data. Unlike the recent applications with GUI (Graphical User Interface), users have to type in commands through a terminal on Linux system. There are two series of programs.
First series of programs uses classic mode of Generic Mapping Tools 6 (GMT 6) of Wessel et al. (2019) via system calls to draw PostScript figures as shown in the figure below. The classic mode of GMT 6 modules are equivalent to those of GMT 5 (Wessel et al. 2013). Hence, the programs work only on the Linux system in which either GMT 6 or GMT 5 are installed. When a command is typed in, the program does necessary calculations and creates a PostScript plot using GMT 6 (GMT 5). Then the PostScript viewer, Evince, shows the resultant plot.
Second series of programs does only computations and do not use any of GMT tools. Hence, the programs should work on terminals of most Linux systems.

Outline of the programs
First series of programs which uses classic mode of GMT 6 (GMT 5)
There are eight programs in the first series which draws a figure by using GMT 6 (GMT 5); five for paleomagnetic analysis, two for statistical tests, and one for circle fitting.
- "pdemag": sample-level analysis of progressive demagnetization data.
- "pdirec": site-level analysis to determine a site-mean paleodirection and a VGP (above snapshot).
- "pstat": group-level analysis for grand-mean direction and a paleomagnetic pole.
- "psvar": group-level analysis of sequential lava sites.
- "pinte": analysis of results of paleointensity experiments by Thellier’s method
- "histo": test of distribution for one data set.
- "histo2": test of distribution for two data sets.
- "pcirc": circle fitting to 2-dimensional X-Y data (Taubin's algebraic method).
System environment for first series of programs
Programs are now working with ”GMT 6.3.0” and ”evince 42.3” on ”Ubuntu 22.04” in which ”gcc 11.4.0” is installed. For other Linux environments, the compatibility is unknown, but the programs will probably work as long as "GMT 6" (or "GMT 5") and "evince" are installed.
Here, only the C sources are provided, which should be compiled by gcc. The programs are working on terminals in which TC shell ”tcsh” is used as a login shell, but using other shell is probably OK. Use these programs at your own risk, although any problems have never been encountered. Nevertheless, you should be familiar with the minimum level of Unix commands such as ”ps” and ”kill” in case freeze of program occurs and "Ctrl+C" does not work.
Installation
Put "pmagm302.tar.gz" (→download) at a certain directory and extract by,
tar xvfz pmagm302.tar.gz"pmagm302" directory is created and enter to this directory by,
cd pmagm302Then compile the source files by,
make
Executable files (programs) will be created under "pmagm302/bin" directory. Copy them to your usual binary directory such as "/usr/local/bin", etc. There is one or more test data files in each of source directory, such as "t-iceland.d" at the directory "pmagm302/psvar-src". Before using the programs, read "MEMOS_pmagm302.pdf" which instructs how to use them.
Note:
- On start of the program from a terminal, evince window is the top level of the display. So, click the terminal window first before any analyses so that the terminal comes to the top level.
- In rare cases on the start of the program, nothing appears on the evince window. This is most likely that the evince is set for two facing pages view. In that case, just make the setting off.
Second series of programs which does NOT use GMT
Seven programs in second series are as the following.
- "tmean": test of a common mean for two scalar data sets.
- "tmeandir": test of a common mean direction for two or more groups of unit vectors.
- "pcalc": simple calculator for paleomagnetism (includes IGRF and circle fitting).
- "igrf": Calculation of main field elements from IGRF-13 up to n=m=10.
- "sunpmag": core orientation by a sun compass for Natsuhara's orientation device.
- "sp2m": conversion of Natsuhara's SPIN2 files "*.txt" with new format.
- "_sp2m": conversion of Natsuhara's SPIN2 files "_*.txt" with old format.
System environment for second series of programs
Programs are now working on ”Ubuntu 22.04” in which ”gcc 11.4.0” is installed. The second series programs should work on other Linux environment as long as "gcc" of recent version is installed.
Here, only the C sources are provided, which should be compiled by gcc. The programs are working on terminals in which TC shell ”tcsh” is used as a login shell, but using other shell is probably OK. Use these programs at your own risk, although any problems have never been encountered. Nevertheless, you should be familiar with the minimum level of Unix commands such as ”ps” and ”kill” in case freeze of program occurs and "Ctrl+C" does not work.
Installation
Put "pmagt401.tar.gz" (→download) at a certain directory and extract by,
tar xvfz pmagt401.tar.gz"pmagt401" directory is created and enter to this directory by,
cd pmagt401Then compile the source files by,
make
The programs will be created in "pmagt401/bin" directory. Copy them to your usual binary directory such as "/usr/local/bin", and so on. Each source directory, such as ”pmagt401/tmean-src”, contains one or more test data files which are usually named as ”t-*.d”. Before using the programs, read "MEMOS_pmagt401.pdf" which instructs how to use them.
References:
- Wessel, P., W.H.F. Smith, R. Scharroo, J. Luis, and F. Wobbe, Generic Mapping Tools: Improved Version Released, EOS Trans. AGU, 94 (45), 409-410, 2013. (doi: 10.1002/2013EO450001)
- Wessel, P., Luis, J.F., Uieda, L., Scharroo, R., Wobbe, F., Smith, W.H.F., and Tian, D., The Generic Mapping Tools version 6, Geochemistry, Geophysics, Geosystems, 20, 5556–5564, 2019. (doi: 10.1029/2019GC008515; Manuals: https://docs.generic-mapping-tools.org/6.0/)