matlab spc,Read data from SPC file

tgspcread

Read data from SPC file

Syntax

SPCStruct = tgspcread(File)

tgspcread(..., 'ZRange', ZRangeValue,

...)

tgspcread(..., 'ScanIndices', ScanIndicesValue,

...)

tgspcread(..., 'Verbose', VerboseValue,

...)

Description

SPCStruct = tgspcread(File) reads

a Galactic SPC file from Thermo Scientific®, and returns the data

in a MATLAB® structure.

tgspcread(..., 'PropertyName', PropertyValue,

...) calls tgspcread with optional properties

that use property name/property value pairs. You can specify one or

more properties in any order. Enclose each PropertyName in

single quotation marks. Each PropertyName is

case insensitive. These property name/property value pairs are as

follows:

tgspcread(..., 'ZRange', ZRangeValue,

...) specifies a range of z data values

in the SPC file from which to extract scans.

tgspcread(..., 'ScanIndices', ScanIndicesValue,

...) specifies a scan, multiple scans, or range of scans

in the SPC file to read.

tgspcread(..., 'Verbose', VerboseValue,

...)

controls the display of the progress of the reading of the SPC file. Choices are

true (default) or false.

Input ArgumentsFileCharacter vector or string specifying a file name or path and file name of an SPC file that

conforms to the Thermo Scientific Universal Data Format Specification. If

you specify only a file name, that file must be on the MATLAB search path or in the current folder.

ZRangeValueTwo-element numeric array [Start End] that

specifies the range of z data values in File to

read. Start and End must

be positive scalars, and Start must be

less than End. Default is to extract all

scans.

Tip

For summary information about the z data

values in an SPC file, use the tgspcinfo function.

Note

If you specify a ZRangeValue, you

cannot specify a ScanIndicesValue.

ScanIndicesValuePositive integer, vector of integers, or a two-element numeric

array [Start_Ind: End_Ind] that

specifies a scan, multiple scans, or a range of scans in File to

read. Start_Ind and End_Ind are

each positive integers indicating a scan index. Start_Ind must

be less than End_Ind. Default is to read

all scans.

Tip

For summary information about the scan indices in an SPC file,

check the NumScans field in the structure returned

by the tgspcinfo function.

Note

If you specify a ScanIndicesValue,

you cannot specify a ZRangeValue.

VerboseValueControls the display of the progress of the reading of File.

Choices are true (default) or

false.

Output ArgumentsSPCStructStructure containing information from an SPC file. The structure

contains the following fields.

FieldDescriptionHeaderStructure containing the following fields:

Filename — Name of the SPC

file.

FileSize — Size of the SPC

file in bytes.

ExperimentType — Experimental

technique used to create the data.

NumDataPoints — Number of

data points (y data values) in the SPC file.

XFirst — First x data

value in the SPC file.

XLast — Last x data

value in the SPC file.

NumScans — Number of scans

or subfiles in the SPC file.

XLabel — Label for the x data

values.

YLabel — Label for the y data

values.

ZLabel — Label for the z data

values.

CollectionTime — Date and

time the scan data were collected.

CollectionTimeDatenum —

Date and time the scan data were collected in serial date number format.

For more information, see datenum.

Resolution — Instrument

resolution.

SourceInstrument — Name

or model of instrument used to collect data.

InterferogramPeakPointNumber —

Peak point number for interferograms. It is 0 for

scans that are not interferograms.

Comment — User-provided

comments.

CustomAxisUnitLabel — User-provided

labels for the axis units.

SubScanHeaders — Header

information for subfiles or scans, including scan index, next scan

index, and w data value.

ZValues — Vector containing

the z data values of all scans in the SPC file.

XVector or cell array containing the x data

values.

If all scans share the same x data

values, then X is a vector. If scans have different x data

values, then X is a cell array.

YVector, matrix, or cell array containing the y data

values.

If there is only one scan, then Y is

a vector. If there are multiple scans that share the same x data

values, then Y is a matrix. If there are multiple

scans having different x data values, then Y is

a cell array.

ZVector containing the z data values

of scans read from the SPC file

Examples

This example assumes that you already have an SPC file to use. sample.spc file

is not provided with the Bioinformatics Toolbox™ software.

Read an SPC file:

% Read the contents of an SPC file into a MATLAB structure

out = tgspcread('results.spc')

File contains 1 scans

out =

Header: [1x1 struct]

X: [12031x1 single]

Y: [12031x1 double]

Z: 0

Plot an SPC file:

% Plot the first scan in the SPC file:

plot(out.X,out.Y(:,1));

Introduced in R2009b

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值