Rawread

From Eigenvector Research Documentation Wiki
Revision as of 08:10, 15 April 2010 by imported>Scott (→‎See Also)
Jump to navigation Jump to search

Purpose

Imports Physical Electronics .raw files.

Synopsis

out = rawread(filename,mass,blocks)
[out,mass] = rawread(filename,mass,blocks,options)

Description

The inputs to the function are the file name (filename) and optional inputs with mass ranges to integrate (mass, a n by 2 array with upper and lower mass values for each range) and number of data blocks to read in (blocks).

Automatic Binning: If a scalar value (threshold) is passed in place of the (mass) input, RAWREAD will read in the first 200 blocks from the RAW file and identify all peaks which are equal to or larger than the given threshold value in counts. These peaks will then be isolated into separate bins by positioning bin edges half-way between peaks. Finally, the image will be read in using this binning up to the specified number of blocks. The binning will be returned in the (mass) output.

If RAWREAD is called with only the filename, a high resolution spectra is collected over all the pixels and no image data is collected. If n mass ranges are specified, the images are placed in the data field, with the n + 1 layer being the sum of all remaining ions not in the specified ranges. If blocks is not specified, the whole file is read in, which may take some time (10 minutes or so). Otherwise, just the number of specified blocks will be read (500 is a good first choice). Setting mass = 0 and specifying the number of blocks collects just the high resolution spectra from the specified blocks.

Inputs

  • filename = the filename to import, including path if not in the current directory.

Optional Inputs

  • mass = an n by 2 array indicating the upper and lower mass ranges to integrate into each of n bins. See optional threshold input which can be used in place of the mass bins.
  • threshold = passed IN PLACE OF mass, peaks > this number of counts will be located and automatic binning will be performed. Default value for threshold is 1% of the highest observed count. If threshold is zero, only the total ion image and a high-resolution mass spectrum will be returned.
  • blocks = maximum number of data blocks to read from the file. If fewer than this number of blocks exists in the file, only the available blocks will be read. If omitted, the entire file will be read. This may take some time (e.g. 10+ minutes on some systems). A quick estimate of the image can often be obtained using 500 blocks. Higher signal levels can be obtained by reading more blocks.

Outputs

The output is a structure array with fields:

  • filename: name of the file read in
  • date: date file read in
  • time: time file read in
  • header: header info from raw file
  • hi_res_spec: high resolution spectra over all pixels
  • mass_axis: mass axis for high resolution spectra
  • total_ion: total ion image
  • data: 256 x 256 x n+1 array containing images at n specified mass ranges plus remaining ions

Options

options = a structure array with the following fields:

  • waitbar: [ 'off' | {'on'} ] Controls display of waitbar.

See Also

camecard