Skip to main content
  • Technical report
  • Open access
  • Published:

Online plotting applications for paleomagnetic and rock magnetic data

Abstract

This paper describes the development and release of a series of web-based services to generate plots of paleomagnetic and rock magnetic data. All plotting services require a World Wide Web browser as the user interface. The use of online plotting services facilitates rapid and easy sharing of work of analysis and preliminary results with collaborators who use different platforms and operating systems. To implement these routines, two paleomagnetic data types (stepwise demagnetization and paleodirection) are formally defined. These have been popular among researchers for many decades.

Introduction

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.

Web services

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.

File format for paleomagentism

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.

KyotoFormat/P

The KyotoFormat/P protocol for input data is used to represent progressive demagnetization curves on a Zijderveld diagram and uses the formatting specifications given in Fig. 1a, which is compatible with the format for the Progress program. The first line, or title line, includes the specimen name. The records beginning on the second line show magnetizations at each demagnetization level, which include the level of demagnetization, declination, inclination, and the intensity of magnetization or magnetic moment. Columns beyond the fourth are not read into the plotting program, so descriptive comments can be included here.

Fig. 1
figure 1

File format descriptions for a KyotoFormat/P and b KyotoFormat/D. The fourth column (uncertainty of the direction) of KyotoFormat/D is optional. It is not necessary to describe units in each column

KyotoFormat/D

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.

Usage of online plotting tools

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.

MagePlot/P

MagePlot/P is a web-based program compatible with the Progress program described above, in which a stepwise demagnetization curve is drawn on a Zijderveld diagram. On the first page (Fig. 2a), users select whether or not coordinates are converted, and regression is calculated as part of the demagnetization process. Raw data are pasted in accordance with the KyotoFormat/P protocol. The data can be directly imported from a text editor or a Microsoft Excel spreadsheet using standard copy-and-paste functionality. If conversion and/or regression are selected, the user inputs a value for the angle of the sample coordinates and/or fitting interval. On the second page, the “Confirm” button sets input data and options, and the “Run” button executes the program (Fig. 2b). Data are then transferred to the back-end analysis program, and results and figures are shown on the third page (Fig. 2c). The figure displayed onscreen is downloadable in a number of file formats, including PNG, EPS, and A4-sized PDF. Users can edit figures for presentation and printing after downloading.

Fig. 2
figure 2

Screenshots illustrating the use of the MagePlot/P service: a data and options input window, b confirmation window, and c results window. Links to download generated figures in PNG, PDF, and EPS formats are located in the lines below the figure. The top-right and bottom-right figures in the results window show the movement during demagnetization and the total intensity change, respectively

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.

MagePlot/D

MagePlot/D is a web-based program, compatible with the Direction program, in which the magnetic directions and their mean are plotted on a polar-centered equal-areal projection. On the first web page (Fig. 3a), users select options for plotting/drawing the mean direction and its 95% confidence interval (α95); drawing the scatter, error, or confidence intervals for all data; and drawing VGPs on the global sphere. Data lines formatted in accordance with the KyotoFormat/D protocol are pasted into a large text box. After clicking the “Confirm” button on the second page to save input data and options, the user clicks the “Run” button to execute the program (Fig. 3b). The results and figure derived from the back-end program are shown on the third page (Fig. 3c), and the figure output is downloadable from the page in PNG, EPS, and A4-sized PDF formats.

Fig. 3
figure 3

Screenshots illustrating the use of the MagePlot/D service: a data and options input window, b confirmation window, and c results window. In this example, the option to show a VGP display in the Northern Hemisphere was selected

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.

MagePlot/MB

MagePlot/MB is a web-based program that draws a graph of high-temperature magnetic responses obtained by magnetic suspension balance (Curie balance) NMB-89 by Natsuhara Giken. The output file, in.mbf format with the header from the instrument, can be pasted directly into the text box of the web user interface, and the program will output a downloadable figure. Measurement conditions are extracted from the header and displayed in the figure (Fig. 4). The user can also select options for output normalization and cutoff temperature, below which the magnetization curve is not drawn. This cutoff option is especially useful when plotting data from experiments conducted under vacuum, as precise temperature control of the heater current is difficult under vacuum and the magnetization temperature curve becomes unstable at temperatures below ~ 150 °C. An option for drawing the first-derivative curves of the magnetization helps the user to find the Curie/Néel temperatures easily. These three options are not available in the software bundled with the instrument.

Fig. 4
figure 4

Screenshot of the results window of the MagePlot/MB service. Here, the option for normalization was selected, and the cutoff temperature in the heating process is given at 100 °C. The lower plot shows the first-derivative curves

MagePlot/H

MagePlot/H is a service for plotting the magnetic hysteresis loop (Fig. 5). The readable data format here is the output of VSM/AGM (MicroMag 2900/3900, Lake Shore, PMC), which can be pasted into the text box of the data input window. If data lines include also a column with the values of slope-corrected magnetization that the parallel component due to anti-ferro-, para- and diamagnetism is subtracted from the raw data, two curves (uncorrected and corrected) are drawn. An option for plotting derivatives can be selected to draw the first and second derivatives of the curve. In the future, drawing curves from the output of other instruments and simple applied field (H)—magnetization (J) data will be implemented.

Fig. 5
figure 5

Screenshot of the results window of the MagePlot/H service after selecting the option to plot the first and second derivatives

Summary

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).

References

Download references

Authors’ contributions

All of coding, writing and administration of the site have been performed by TH. The author read and approved the final manuscript.

Acknowledgements

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).

Competing interests

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.

Funding

This study was partly funded by JSPS KAKENHI Grant Nos. 24720362, 16H01826, and 17H02420.

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tadahiro Hatakeyama.

Rights and permissions

Open Access This 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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hatakeyama, T. Online plotting applications for paleomagnetic and rock magnetic data. Earth Planets Space 70, 139 (2018). https://doi.org/10.1186/s40623-018-0906-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s40623-018-0906-5

Keywords