import2Dspectra {ChemoSpec2D}R Documentation

Import 2D Spectroscopic Data

Description

This function imports a single file (for instance, a csv) containing a 2D spectroscopic data set. The current version handles various types of ASCII text files as well as a few other types. This function is called by files2Spectra2DObject and is exported and documented to assist in developing new format codes.

Usage

import2Dspectra(file, fmt, nF2, debug = 0, ...)

Arguments

file

Character string giving the path to a file containing a 2D spectrum.

fmt

Character string giving the format code to use. Details below.

nF2

Integer giving the number of data points in the F2 (x) dimension. Note: If any dimension is zero-filled you may need to study the acquistion details to get the correct value for this argument. This may be vendor-dependent.

debug

Integer. Applies to fmt = "dx" only. See readJDX for details.

...

Arguments to be passed to read.table, or readJDX. For read.table, You MUST supply values for sep, dec and header consistent with your file structure, unless they are the same as the defaults for read.table.

Value

A list with 3 elements:

Format Codes for Plain-Text ASCII Files

ASCII format codes are constructed in two parts separated by a hyphen. Three or more columns are expected. The first part gives the order of the columns in the file, e.g. F2F1R means the first column has the F2 values, the second column has the F1 values and the third the real-valued intensities. The second part of the format code relates to the order of the rows, i.e. which column varies fastest and in what direction. These codes are best understood in relation to how the data is stored internally in a matrix. The internal matrix is organized exactly as the data appears on the screen, with F2 decreasing left-to-right, and F1 increasing top-to-bottom. There are many possible formats (only those listed are implemented, please e-mail for help creating additional combinations):

Other Format Codes

Here are some other format codes you can use:

Author(s)

Bryan A. Hanson, DePauw University.


[Package ChemoSpec2D version 0.5.0 Index]