PanTool

From PANGAEA Wiki
Jump to navigation Jump to search
PanTool logo

PanTool is a software tool box like a Swiss Army Knife for data conversion and recalculation, written to harmonize individual data collections to standard import format used by PANGAEA. The format of input files the program PanTool needs is a tabular saved in plain ASCII. The user can create this files with a spread sheet program like MS-Excel or with the system text editor.

Find the current version at doi:10.1594/PANGAEA.787549

An old version of PanTool is avaiblable at doi:10.1594/PANGAEA.510701.

Find Sourcecode at GitHub

Contact: PanTool was developed by Rainer Sieger, please contact PANGAEA. The software is provided as freeware under the (GNU General Public License (GPLv3) and is freely distributed without warranty by the Alfred Wegener Institute, Helmholtz Center for Polar and Marine Research, Bremerhaven.


Installation

Open doi:10.1594/PANGAEA.787549 and click on "View dataset as HTML". Download the current version of PanTool to your computer.

Windows

Double-click PanTool_Win.exe and follow the instructions. If the MSVCR120.dll is missing on your computer, you have to install the Visual C++ Redistributable Packages for Visual Studio 2013 from Microsoft.

OS X

Open the downloaded dmg file with a double-click. Drag and drop the file PanTool.app onto the appliction folder icon.

Linux

Uncompress the archive to your user bin directory. Double-click PanTool.sh.

Reference and detailed description of PanTool

Work with files

General options dialog

PanTool2 works with text files only. The basic idea is to open choose one or many file(s) and select a tool from the Basic tools or the Special tools menu. The Basic tools works on all text files, the files for the Special tools needs special formats (e.g. files must contain latitude/longitude in the first two columns).

The file(s) can be choosen by using the file dialog File -> Open... or by the folder dialog File -> Select Folder. Drag & drop can be used also for selecting file(s) or folder(s).

In general PanTool don't ask for the name of the output file. With File -> Options... the format of the output files name can be given. If more than one tools needed, the new input file is the output file of the step before.

Examples (-> after the tool has been working):

  • zz%a_%N.txt : test.tab -> zz1_test.txt -> zz2_test.txt -> ...
  • %N_imp.txt : test.txt -> test_imp.txt
  • %N0%a.dat  : test.txt -> test01.dat -> test02.dat -> ...

The encoding of the input and output file can be choosen.

Basic tools

Extract columns

Extract columns dialog

Extracts all columns specified by the list of columns.

Example:

  • 3 : column 3 will be extracted.
  • 4-7 : column 4, 5, 6, and 7 will be extracted.
  • 1,3,4,10-end : column 1, 3, 4, 10, 11, 12, ... , last column

Extract matched columns

Extract matched columns dialog

Extract lines

Extract lines dialog

Extract matched lines

Extract matched lines dialog

Delete columns

Extract columns dialog

Deletes all columns specified by the list of columns.

Example:

  • 3 : column 3 will be deleted.
  • 4-7 : column 4, 5, 6, and 7 will be deleted.
  • 1,3,4,10-end : column 1, 3, 4, 10, 11, 12, ... , last column

Delete matched columns

Extract matched columns dialog

Delete lines

Extract lines dialog

Delete matched lines

Extract matched lines dialog

Delete comment blocks

Delete comment blocks dialog

Delete double lines

Delete double lines dialog

Deletes all double lines in input files.

Concatenate files by columns

Concatenate files by columns

More than one files can be concatenated by columns with this tool. The output file will namend with the name of the folder + "_all.txt". All files must have the same number of lines!

Options:

  • Skip a number of first lines : The given number skips this lines.
  • Include filename in first line: some times very useful.
  • Delete original file : after concatenating to the all-file the original file will bee deleted. Be careful!

Concatenate files by lines

Concatenate files by lines

More than one files can be concatenated by lines with this tool. The output file will namend with the name of the folder + "_all.txt".

Options:

  • Skip a number of first lines : all files have header lines. The given number skips this lines.
  • Include filename in each line : some times very useful.
  • Skip empty lines : if a line is empty (length equal to 0) or containing only tabs, the line will be skiped.
  • Skip comment lines : if a line starts with // the line will be skiped.
  • Delete original file : after concatenating to the all-file the original file will bee deleted. Be careful!

Save list of files

Creates a list of files shown in the program window. An output name will be requested.

The output file contains no header lines. The columns containing:

  • complete filename with path
  • the path
  • the filename with extension
  • the filename without extension
  • the file extension
  • the size of file in bytes
  • the file creation date

Download PANGAEA datasets

Provides a special tool for the download of multiple data sets from PANGAEA. It uses the PANGAEA data set ID which is unique and part of the DOI. In a first step a list of ID's of those data sets to be downloaded must be created. There are two choices to define this individual collection of sets. Based on the ID list, the tool will be downloaded the data sets. Failed downloads are written to the file *_failed.txt. Protected datasets can not be downloaded by this tool. For a full documentation see PanGet.

Special tools

Convert CrossRef XML file(s)

Convert Tree Ring data

Convert TSG data

Pressure -> Depth

If the input file contains the columns Latitude and "Pressure, water [dbar]" this tool calculates Depth, water [m]. The algorithm based on a source code snippet from Reiner Schlitzer (AWI). No dialog.

Conductivity, temperature, pressure -> salinity

If the input file contains the columns Conductivity [mS/cm], Temperature, water [deg C], and Pressure, water [dbar] this tool calculates Salinity. The algorithm base on a source code snippet from Jan Schulz. See http://www.code10.info/.... No dialog.