Ms bin
Jump to navigation
Jump to search
Purpose
Bins Mass Spectral data into user-defined bins.
Synopsis
- dso = ms_bin(data)
- dso = ms_bin(data, options)
Description
Often raw Mass Spec data is output in its original profile format (e.g., 14.5, 14.5, 14.6,...) and one requires "unit" mass resolution (e.g., 14, 15, 16,...) in order to reduce the size of the data and or analyze the data properly. In its default form the MS_BIN function will bin at unit resolution and return the data in a DataSet Object. Using the two optional parameters (resolution and round_off_point) the function can be adjusted to meet different requirements.
Inputs
- data : a cell array with the data. Each cell will correspond to a row in the resulting dataset 'dso' and should contain nx2 numeric array of "xy" MS data: the first column contains the mass numbers, the second column contains the counts (intensities). The number of rows in the cells can be different.
Outputs
- dso : dataset object
Options
- resolution : optional, defines the resolution. The default value is 1.
- round_off_point : optional. Normally the round-off point is in the middle of the bin. For unit resolution it would be 0.5: everything below 0.5 will be rounded down, everything higher than 0.5 will be rounded up. In case the peak is asymmetrical other points are used, e.g. 0.65. The round off for the array m with the mass numbers is then: round(m+0.5-round_off_point); The asymmetric round-off is also valid for resolution lower than 1: the round_off_point is the relative position in the bin.