Split2Events

Split2Events is a software tool to split one file with data from several events into one file for each event. The resulting folder with a number of files can automaticaly be imported with the Massenimport routine of 4D. Split2Events may also extract a list of unknown parameters prior to splitting.

General
 * Empty columns and lines which contain GEOCODE only will be removed.
 * If data set description is included, 4D will analyze it and format during sequential import.
 * When defining data set titles and filename, the placeholder $E may be used to add individual event labels.
 * Keywords are not added by Split2Events; they may be set manually in 4D prior to import.

Just split
 * 1) Start Split2Events and drag/drop the file to the program window.
 * 2) The Mandatory tab shows the entries of the last session.
 * 3) Click on New if a new file collection is processed.
 * 4) Go to the Options tab and check split file to events.
 * 5) Click OK. An import file is written for each event, stored in a new folder.
 * 6) Use 4D (Import/Analytical data/Open folder) for sequential import.

Split with data description
 * 1) Start Split2Events and drag/drop the file to the program window.
 * 2) The Mandatory tab shows the entries of the last session.
 * 3) Click on New if a new file collection is processed.
 * 4) On the Mandatory tab fill out the fields as required.
 * 5) On the Optional tab add information as required.
 * 6) On the Options tab check split file to events and write data description.

Split using a metafile
 * 1) Open an import file and choose the option “use metadata file; find parameter by position”.
 * 2) Create a template of a metadata file by clicking the button “Create metadata template”. The metadata file will be created with the extension _metadata.txt.
 * 3) Open this file with an editor and modify a appropriate. Each line contains the information for one parameter.


 * Parameter name as given in the data file. If the ID is given in the data file this entry is empty.
 * Parameter ID, in this mode the ID is mostly “unknown”. Only the ID of the GEOCODE is given automatically. You have to fill in the right ID for the parameter.
 * PI ID as provided through the PI field of Split2Events.
 * Method ID; use ID=43 if not_given. If left empty, the default method will be used.
 * Comment of data series.
 * Format as suggested from the precision of the numeric values of the related parameter.
 * Factor if a recalculation is required, e.g. may be used to convert units.
 * Fill empty cells with add characters, which should be used to fill empty cells
 * Range min and Range max defines the range of values of parameter (e.g. for temperature in water set this -5 to 50). If a value is outside of the given range, the value will be marked with the flag not valid = /.

Split using a metafile and find parameter IDs automatically
 * 1) Prepare a local list of all parameters called ParameterDB.pdb; see Parameter.
 * 2) Set path to ParameterDB.pdb on the Options tab.
 * 3) Check write parameter import file on the Options tab
 * 4) Create a metadata file with the option “use metadata file; find parameter by name”. Split2Events identifies the ID for each parameter by using the parameter list. If a parameter is unknown, the ID is set to unknown and a list of required parameters is written to imp_Parameters.txt. After completing this file send it to [mailto:hgrobe@pangaea.de hgrobe@pangaea.de].

Reference and detailed description
-- Mandatory tab --
 * Staff ID of principal investigator. This entry sets the ID for the PI of data in the data description part. The ID 999999 will be replaced by @P@Event label@ (e.g. @P@PS2742-5@). With the PanTool function Search and replace many strings the PI of data of this event can be set easily.
 * Staff ID of author(s). This entry sets a list of IDs for the authors of the datasets. The ID 999999 will be replaced by @A@Event label@ (e.g. @A@PS2742-5@).
 * Institution ID of source. This entry sets the ID for the source (related to institution) of data. The ID 999999 will be replaced by @S@Event label@ (e.g. @S@PS2742-5@).
 * Reference ID(s). This entry sets a list of IDs for the references of the dataset in the data description part. The ID 999999 will be replaced by @R@Event label@ (e.g. @R@PS2742-5@).
 * Project ID(s). This entry sets a list of IDs for the projects of the dataset in the data description part. The ID 999999 will be replaced by @Pro@Event label@ (e.g. @Pro@PS2742-5@).
 * Dataset title. This entry sets the citation of the dataset in the data description part. The placeholder $E will be replaced by the event label. The placeholder $@ will be replaced by the string behind the “@” given in the event label. The ID 999999 will be replaced by @D@Event label@ (e.g. @D@PS2742-5@).
 * Export filename. This entry sets the export filename. The placeholder $E will be replaced by the event label. The placeholder $@ will be replaced by the string behind the “@” given in the event label.

-- Optional tab --
 * Dataset comment (optional). This entry sets the dataset comment. The placeholder $E will be replaced by the event label. The placeholder $@ will be replaced by the string behind the '@' given in the event label.
 * URL Further details (optional). This entry sets the URL of the further details link. The URL has to begin with “http://” . The placeholder $E will be replaced by the event label. The placeholder $@ will be replaced by the string behind the “@” given in the event label. The ID 999999 will be replaced by @F@Event label@ (e.g. @F@PS2742-5@).
 * Topologic type. Menue to select the topologic type of a dataset.

-- Options tab --
 * Split to events options
 * split file to events: Split2Events splits a file to events only if this option is set. Uncheck it for creating surface datasets.
 * write data description: The data description part of the import file contains all import options. This is needed for importing a huge number of files. But it can also be useful to configure complex import files outside 4D.
 * marks files with 1, 2 or 3 lines: Use to separate data from cores and surfaces are mixed.
 * write info file: Statistic of process. Not really needed.
 * Use name of input file for $E or ID=999999: Together with use filename instead on the mandatory tab, the PI or author can be set by the filename (e.g. @P@filename@, @A@filename@).


 * Metadata file
 * don’t use metadata file: The metadata file will not be used.
 * use auto metadata file: Sets the default method and a suitable format for each parameter automatically.
 * use metadata file; find parameter by position: If the program splits a file to events, a metadata file is loading. The position of parameters in the metadata file has to be the same order as in the data file. A metadata template can be created with Create metadata template.
 * use metadata file; find parameter by name: If the program splits a file to events, a metadata file is loading. The program finds the right parameter automatically. A metadata template can be created with Create metadata template.


 * Create metadata template options
 * write parameter import file: If the option use metadata file; find parameter by name is selected and the user creates a metadata template, Split2Events finds missing parameters and writes them into imp_Parameter.txt. After completing this file send it to mailto:hgrobe@pangaea.de.


 * Parameter database. To create a metadata template and find missing parameters the program needs a list of all known parameters defined in PANGAEA. The so called parameter database can be downloaded from http://www.pangaea.de/parameter. A good name for this file is ParameterDB.pdb. Browse for it and select it.
 * Metadata files. Split2Events searches for the metadata file in the directory that the data file is stored in. If the file is not found, the program searches for default_metadata.txt in the same directory. To search the metadata file in other directories the user can overwrite the search path.
 * Project files. With Save and Load the user can save or load a project file. This file contains all settings of the current project. The user can specify the directory for storing the project files. If save project file is checked the program offers the Save file dialog for saving the project file on every run.


 * Buttons
 * Create metadata template. Pressing this button creates a metadata template file. This depends on the metadata file options and the Create metadata template options. If Use metadata file; find parameter by name is selected a parameter database is needed.
 * New. Resets all settings.
 * Save. Saves a project file manually.
 * Load. Loads a project file. Overwrites all given settings!
 * OK. Starts splitting procedure.
 * Cancel. Closes the settings dialog. No settings will be changed.