ts_data_channel

Time series data storage and manipulation.

Contents

Description

Each channel can have its own start time and sampling rate. Data are uniformly spaced along the time axis In Tiskit, multiple channels are combined in a ts_data object

Properties

samprate      - Samples per second                    (double)
starttime     - Time of first sample                  (ts_datetime)
data          - Data storage                          (double vector)
metadata      - Includes station, component ...       (ts_data_channel_metadata)
md            - Alias for "metadata"
sourcefile    - Information about source data file    (ts_file)
subplotprops  -                                       (ts_figureproperties_subplot)
sampinterval  - READONLY: Interval between samples    (double)
                          (seconds)  ==1/samprate;
nSamples      - READONLY: Number of samples in data   (double)
nSeconds      - READONLY: Number of seconds in data   (double)
endtime       - READONLY: time of last sample         (ts_datetime)
                           (NOT DRIFT CORRECTED)
endtime_dc    - READONLY: time of last sample         (ts_datetime)
                           (DRIFT CORRECTED)

Methods

ts_data_channel  - Creator
demean           - Remove mean of data
detrend          - Remove mean plus trend
filter           - Butterworth filter
resample         - Resample data
trueAmplitude    - Correct for instrument response
calcNumSamps     - Calculate the samples in a given number of seconds, hours, etc
calcOffset       - Calculate time offset between two ts_data_channel objects
isempty          - Is data vector is empty?
isConsecutive    - Returns 1 if two data channels are consecutive in time
isNotConsecutive - Returns 1 if two ts_data_channel objects are NOT consecutive
overLapSeconds   - Return overlap between two channels, in seconds
overLapSamples   - Gives overlap between two channels, in samples
cat              - Concatenate two ts_data_channel objects
cut              - Return a section of the data
calcSpectrogram  - Make a spectrogram
plot             - Plot a data channel

Example

sps=40; t=0:1/sps:100; x=sin(t/5);
c=ts_data_channel(x,sps);
c.metadata.station='Napoli';
c.metadata.component='BHZ';
c.starttime='2007/01/01 00:00:00';
plot(c);
c
c = 

       samprate: 40
      starttime: 2007/01/01 00:00:00.000 ('ts_datetime' object)
       nSamples: 4001
           info: 'ts_data_channel_metadata' object
                    station: 'Napoli' 
                    network: '      ' 
                information: '      ' 
                   timezero:      NULL
                   tzoffset:        0 
                 clockdrift:        0 
                        lon:        0 
                        lat:        0 
                       elev:        0 
                     wdepth:        0 
                  component: '   BHZ' 
               response (PxZ):  0x0     

     sourcefile: 'ts_file' object

See also

ts_data_channel_metadata, ts_datetime, ts_file, ts_subplotinfo