1MST_ADDMSR(3)              Library Functions Manual              MST_ADDMSR(3)
2
3
4

NAME

6       mst_addmsr - Add time coverage and data samples to MSTrace structures
7
8

SYNOPSIS

10       #include <libmseed.h>
11
12       int    *mst_addmsr ( MSTrace *mst, MSRecord *msr, flag whence );
13
14       int     mst_addspan ( MSTrace *mst, hptime_t starttime, hptime_t endtime,
15                             void *datasamples, int64_t numsamples,
16                             char sampletype,  flag whence );
17
18       MSTrace  *mst_addmsrtogroup ( MSTraceGroup *mstg, MSRecord *msr,
19                                     flag dataquality, double timetol,
20                                     double sampratetol );
21
22       MSTrace  *mst_addtracetogroup ( MSTraceGroup *mstg, MSTrace *mst );
23
24

DESCRIPTION

26       These  routines  provides  different  ways  of  adding time coverage to
27       MSTrace objects.  A common way to organize MSTrace objects  is  with  a
28       MSTraceGroup.   The  mst_addmsrtogroup provides a convenient way to add
29       MSRecord data to a MSTraceGroup, hiding many of the details of  MSTrace
30       matching and bookkeeping.
31
32       mst_addmsr  will  add  the  time coverage from a MSRecord to a MSTrace.
33       The start or end time will be updated and data samples copied  if  they
34       exist.  No checking is done to verify that the record matches the trace
35       in any way.  If whence is 1 the MSRecord coverage will be added at  the
36       end of the MSTrace.  If whence is 2 the MSRecord coverage will be added
37       at the beginning of the MSTrace.
38
39       mst_addspan does the same thing as msr_addmsr except that time coverage
40       and  data  samples  are  explicitly  provided.   See  ms_time(3)  for a
41       description of the high precision epoch time format needed  for  start‐
42       time  and  endtime.  See the Waveform Data section of ms_intro(3) for a
43       description of data sample representation.
44
45       mst_addmsrtogroup adds time coverage from the specified MSRecord to the
46       first  adjacent  MSTrace  found  in the specified MSTraceGroup.  If the
47       dataquality flag is true traces will be grouped by quality in  addition
48       to  the  source name identifiers.  mst_findadjacent(3) is used with the
49       specified sample rate and time tolerances to find  an  adjacent  trace,
50       see mst_findadjacent(3) for further details.  If no adjacent MSTrace is
51       found a new MSTrace will be added to the MSTraceGroup.
52
53       mst_addtracetogroup adds a MSTrace structure to a  MSTraceGroup  struc‐
54       ture.  The MSTrace is added at the end of the MSTrace chain.
55
56

RETURN VALUES

58       mst_addmsr and mst_addspan return 0 on success and -1 on error.
59
60       mst_addmsrtogroup  returns  a  pointer  to  the MSTrace updated or 0 on
61       error.
62
63       mst_addtracetogroup returns a pointer to the  MSTrace  added  or  0  on
64       error.
65
66

SEE ALSO

68       ms_intro(3), mst_init(3), mst_findadjacent(3) and ms_time(3).
69
70

AUTHOR

72       Chad Trabant
73       IRIS Data Management Center
74
75
76
77Libmseed API                      2013/05/17                     MST_ADDMSR(3)
Impressum