- Technical report
- Open Access
Online plotting applications for paleomagnetic and rock magnetic data
© The Author(s) 2018
- Received: 5 April 2018
- Accepted: 10 August 2018
- Published: 23 August 2018
- Rock magnetism
- Drawing applications
- Online services
In various fields of Earth sciences, there are methods and pieces of software for visualization of various data. In paleomagnetism and rock magnetism, the Zijderveld diagram (As and Zijderveld 1958; Zijderveld 1967) uses three-dimensional vectors projected onto two planes to represent changes in magnetization during the demagnetizing process and is the most popular method for visualizing paleomagnetic direction. On the other hand, paleomagnetic directions (i.e., the stable directions of each specimen and the mean direction of all samples from a site) are often plotted on equal-area projections. In such plots, the dispersion, error, or confidence interval of the direction (Fisher 1953) is shown as a cone, or a circle projected onto the sphere, and the virtual magnetic poles (VGPs) are also often plotted on the global map.
Because plotting methods such as the Zijderveld diagram are unpopular outside of the subfields of paleomagnetism and rock magnetism, programs for plotting are often produced specifically for magnetic measurements. These software products are distributed in various ways: (1) as software bundled with instruments such as magnetometers; (2) as programs coded by an individual researcher and distributed among colleagues or more widely; or (3) as macros or scripts created for use in general-purpose data visualization software such as Microsoft Excel.
Many of these programs are dependent on the operating system or require special runtime libraries that must be installed individually. Therefore, it can be difficult to share the work of analysis among collaborators who use different computing environments. Here we present a newly developed platform-agnostic web-based service to generate plots of paleomagnetic and rock magnetic data.
Here we provide an outline of, and describe the implementation of, the plotting services. The basic concept was described by Hatakeyama (2015), but additional details are provided here because only a part of the services were introduced in the previous work, using test implementation on a local server, and the text was published in an unreviewed institutional report in Japanese.
The greatest advantage of providing plotting tools as a web service is that the user interface requires only a graphical World Wide Web browser. Web browsers such as Google Chrome are based on open standard protocols (e.g., http), and the behavior of input, output and displaying is almost uniform, so users of the web service have the same experience in any web browser on any operating system. In addition, on each operating system, since the application can use clipboard functions offered by the OS, the user can copy data from other programs, such as a text editor or spreadsheet manager, and paste them into a text box on the website; this property is useful for data visualization.
Paleomagnetism.org (Koymans et al. 2016; http://paleomagnetism.org/), a multifunction web-based service for paleomagnetism and rock magnetism, is based on similar concepts to those of the present study and houses many plotting and analysis tools. This site is attractive because the user interface and drawn materials are sophisticated. On the other hand, the greatest advantage of our service is the simplicity of use, as the interface related to data handling requires only copy and paste operations, instead of uploading formatted data to a server.
To actualize a web-based plotting service, descriptions of both front- and back-end programs are necessary. The front-end programs generate web pages that transfer data and results between the user and the back-end programs. We prepare three front-end pages for each instance of the service. On the first page, the user inputs data via PHP. On the second page, data inputs are displayed for confirmation using PHP scripts, and data files are produced to send to the back-end programs. The third page uses Perl CGI to send data and options to the back-end program, receives results after analysis, and displays results and link buttons to download the figure.
The back-end program is used for analysis and figure generation. The plotting programs for this service were created by our group and are used regularly to display paleomagnetic and rock magnetic results; only minor modifications are necessary for web functionality. The back-end programs use the Perl Data Language (PDL; Glazebrook and Economou 1997) for mathematical analysis and Generic Mapping Tools (GMT; Wessel and Smith 1991) and gnuplot (Racine 2006) for plotting and drawing results.
Here we provide a technical description of the Kyoto file format used by the proposed services. Many paleomagnetists, especially in Japan, have used the plotting programs Progress and Direction, which draw stepwise demagnetization curves on a Zijderveld diagram and paleodirections on a polar Lambert azimuthal equal-area projection (Hidetoshi Shibuya, http://www.sci.kumamoto-u.ac.jp/earthsci/shibuya/index.html); however, the link for downloadable versions of these applications is presently broken. Early versions of these programs were developed at Kyoto University, Japan. In the 1980s, the original code was written for the PC98 platform architecture; this was the first popular 16-bit computer series developed by NEC and was widely distributed in Japan during the 1980s and 1990s. The PC98 architecture used Intel 8086 series CPUs, and supported BASIC, MS-DOS, and Microsoft Windows operating systems during its history. These PCs were very popular and common in the paleomagnetic laboratories of Japanese research institutions. Since the 1990s, these programs have been ported and developed for the Mac OS architecture and have been released for Mac OS X. Although the data files used by Progress and Direction follow a simple format, requiring only a space-separated values file with the minimum number of columns required to display the paleomagnetic results, the output figures are of the quality required for publication. We now formally define the file format for Progress, Direction, and their derivative programs, which we name KyotoFormat after Fukuma and Xuan (2017). These are the file formats used by our programs, as well as modern versions of Progress and Direction.
KyotoFormat (/P and /D) files are simple text files that contain no binary data. The line break code in the file is different for each of platform; LF (line feed or new line, ASCII hex code 0x0a) in UNIX, Linux, Mac OS X, and other derivatives and CR + LF (carriage return + line feed, 0x0d + 0x0a) in Microsoft Windows. The treatment and display of non-ASCII characters are not standardized, so the output displayed depends on the program used; the use of other non-printing ASCII characters is therefore not recommended. The first line of the file indicates the plot title. In each line (record) below the title, the column delimiter should be either a space (0x20) or tab (0x09) character.
The KyotoFormat/D protocol is used to plot paleomagnetic directions on Lambert azimuthal equal-area projections, and its specifications are given in Fig. 1b, which is compatible with the format for the Direction program. The first line includes the name of the site or region as a title. Each line after the second corresponds to an individual sample or subsite, including the name, declination, and inclination, arranged in columns separated by the delimiters. In the fourth column of each line, the angle of the uncertainty, error, or confidence interval can be included to draw a circle (cone) projected onto the projection, but this is optional.
Our online plotting services have been released under the name MagePlot and are available at http://mage-p.org/mageplot/. We currently provide two paleomagnetic analysis tools and two rock magnetic analysis tools, and we introduce their usage below using sample screenshots. In all programs, any type of line break character is acceptable, including CR, LF, or CR + LF, and users do not need to reformat input data. A sample input file for each service is available from the website.
When “Automatic (experimental)” in the “Regression” option is selected, an experimental procedure is adopted for automatic determination of the best-fit interval. The demagnetization levels of the start and end of the best-fit line from principal component analysis (PCA) are selected when the MAD value (Kirschvink 1980), normalized by the unbiased weight defined as the square root of the value with two subtracted from the number of points used for fitting, is minimized.
For archaeomagnetism in Japan, we include two additional options: the user can restrict the drawing area to − 30° ≤ D ≤ + 30° and + 30° ≤ I ≤ + 70°, and secular variation curves (Hirooka 1977, 1983) can be drawn, reduced from the reference position in Osaka to the site location by keeping the common VGP position.
We have developed and released a web-based service to facilitate easy plotting of paleomagnetic and rock magnetic data in any operating system. About 600 and 400 plots have been generated by MagePlot/P and /D since its release in November 2016, respectively, but no usage statistics are available for MagePlot/MB or /H services because they were released recently in March 2018. In the future, we would like to release additional services and prepare guides that enable non-paleomagnetic users to use these services more easily. Additional analysis options will be provided in future releases, including more methods to choose the best interval in the demagnetization diagram using different mathematical techniques (Schmidt 1982; Kent et al. 1983), fitting a hysteresis loop to an unsaturated curve (von Dobeneck 1996; Doubrovine and Tarduno 2006) and calculating the uncertainty of the demagnetization direction from a single specimen, e.g., from sedimentary data (Khokhlov and Hulot 2016).
All of coding, writing and administration of the site have been performed by TH. The author read and approved the final manuscript.
We thank two anonymous reviewers for their constructive and useful comments. We also thank Masaru Kono and Hidetoshi Shibuya for discussions. This study was partly performed under the cooperative research program of the Center for Advanced Marine Core Research, Kochi University (14A016, 14B014, 15A006, 15B006, 16A034, 16B030, 17A033, and 17B033).
The author declares that he/she has no competing interests.
Availability of data and materials
Anyone can use the services with his/her own data noticed in this paper. The author is releasing the code with an open source license (GPL3) on Zenodo.org (URL of ver. 1.0 is in https://zenodo.org/record/1307545), and users can execute the plotting tools on their own environments.
This study was partly funded by JSPS KAKENHI Grant Nos. 24720362, 16H01826, and 17H02420.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
- As JA, Zijderveld JDA (1958) Magnetic cleaning of rocks in paleomagnetic research. Geophys J 1:308–319Google Scholar
- Doubrovine PV, Tarduno JA (2006) N-type magnetism at cryogenic temperatures in oceanic basalt. Phys Earth Planet Inter 157:46–54. https://doi.org/10.1016/j.pepi.2006.03.002 View ArticleGoogle Scholar
- Fisher RA (1953) Dispersion on a sphere. Proc R Soc Lond A217:295–305View ArticleGoogle Scholar
- Fukuma K, Xuan C (2017) Multi-platform applications generated from MATLAB codes for viewing and analyzing demagnetization and directional data. JpGU-AGU Joint Meeting 2017 abstr: SEM20-P14Google Scholar
- Glazebrook K, Economou F (1997) PDL: The Perl data language, Dr. Dobb’s Journal: Sep 01. http://www.ddj.com/184410442. Accessed 9 July 2018
- Hatakeyama T (2015) On providing user interfaces by web services from non-GUI applications. Bull Inf Process Cent Okayama Univ Sci 36:25–30 (in Japanese with English abstract). http://www.center.ous.ac.jp/pdf/bulletin/bulletin_36.pdf
- Hirooka K (1977) Recent trend in archaeomagentic and paleomagnetic studies in quaternary research. Quater Res 15:200–203 (in Japanese with English abstract) View ArticleGoogle Scholar
- Hirooka K (1983) Results from Japan. In: Creer KM, Tucholka P, Barton CE (eds) Geomagnetism of baked clays and recent sediments. Elsevier, Amsterdam, pp 150–157Google Scholar
- Kent JT, Briden JC, Mardia KV (1983) Linear and planar structure in ordered multivariate data as applied to progressive demagnetization of palaeomagnetic remanence. Geophys J R Astron Soc 75:593–621. https://doi.org/10.1111/j.1365-246X.1983.tb05001.x View ArticleGoogle Scholar
- Khokhlov A, Hulot G (2016) Principal component analysis of palaeomagnetic directions: converting a Maximum Angular Deviation (MAD) into an α95 angle. Geophys J Int 204:274–291. https://doi.org/10.1093/gji/ggv451 View ArticleGoogle Scholar
- Kirschvink JL (1980) The least-squares line and plane and the analysis of paleomagnetic data. Geophys J R Astron Soc 62:699–718. https://doi.org/10.1111/j.1365-246X.1980.tb02601.x View ArticleGoogle Scholar
- Koymans MR, Langereis CG, Pastor-Galan D, van Hinsbergen DJJ (2016) Paleomagnetism.org: an online multi-platform open source environment for paleomagnetic data analysis. Comput Geosci 93:127–137. https://doi.org/10.1016/j.cageo.2016.05.007 View ArticleGoogle Scholar
- Racine J (2006) gnuplot 4.0: a portable interactive plotting utility. J Appl Econometr 21:133–141. https://doi.org/10.1002/jae.885 View ArticleGoogle Scholar
- Schmidt PL (1982) Linearity spectrum analysis of multi-component magnetizations and its application to some igneous rock from south-eastern Australia. Geophys J R Astron Soc 70:647–655. https://doi.org/10.1111/j.1365-246X.1982.tb05978.x View ArticleGoogle Scholar
- von Dobeneck T (1996) A systematic analysis of natural magnetic mineral assemblages based on modelling hysteresis loops with coercivity-related hyperbolic basic functions. Geophys J Int 124:675–694. https://doi.org/10.1111/j.1365-246X.1996.tb05632.x View ArticleGoogle Scholar
- Wessel P, Smith WHF (1991) Free software helps map and display data. EOS Trans Am Geophys Union 72:445–446. https://doi.org/10.1029/90EO00319 View ArticleGoogle Scholar
- Zijderveld JDA (1967) A.C. demagnetization of rocks: analysis of results. In: Collinson DW, Creer KM, Runcorn SK (eds) Methods in palaeomagnetism. Elsevier, Amsterdam, pp 254–286Google Scholar