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

NAME

6       mst_findmatch  -  Searching  a MSTraceGroup for specific MSTrace struc‐
7       tures.
8
9

SYNOPSIS

11       #include <libmseed.h>
12
13       MSTrace  *mst_findmatch ( MSTrace *startmst, char dataquality,
14                                 char *network, char *station,
15                                 char *location, char *channel );
16
17       MSTrace  *mst_findadjacent ( MSTraceGroup *mstg,
18                                    flag *whence, char dataquality,
19                                    char *network, char *station,
20                                    char *location, char *channel,
21                                    double samprate, double sampleratetol,
22                                    hptime_t starttime, hptime_t endtime,
23                                    double timetol);
24
25

DESCRIPTION

27       mst_findmatch traverses  a  MSTrace  chain  starting  at  startmst  and
28       returns  the  first entry that matches the source name identifiers.  If
29       dataquality is not zero it must also match the found entry.  A  calling
30       program  commonly  calls  this  routine  in a loop in order to find all
31       matching MSTraces in a MSTraceGroup.
32
33       mst_findadjacent finds the first entry in the MSTraceGroup  pointed  to
34       by  mstg  that  matches  the  given source name identifiers and is time
35       adjacent to the time coverage described by the samprate, starttime  and
36       endtime.   If  dataquality  is  not  zero  it must also match the found
37       entry.  See ms_time(3) for a description of the  high  precision  epoch
38       time format needed for starttime and endtime.
39
40       The  tolerance for sample rate and time matching can also be specified.
41       If sampratetol is -1.0 the default tolerance of abs(1-sr1/sr2) < 0.0001
42       is used.  If timetol is -1.0 the default time tolerance of 1/2 the sam‐
43       ple period will be used.  If sampratetol or timetol is -2.0 the respec‐
44       tive  tolerance  check will not be performed.  If time tolerance is not
45       checked whence will be set to whichever end fits best.  The time toler‐
46       ance is specified in seconds.
47
48       When  an adjacent MSTrace is found the whence flag will be set to indi‐
49       cate where the indicated time span is adjacent in the following way:
50
51       1: time span fits at the end of the MSTrace
52       2: time span fits at the beginning of the MSTrace
53
54

RETURN VALUES

56       mst_findmatch returns a pointer to the matching MSTrace structure or  0
57       if no match found or error.
58
59       mst_findadjacent  returns  a  pointer to the adjacent MSTrace structure
60       and the whence flag is set when an adjacent MSTrace is found or 0  when
61       no adjacent MSTrace is found.
62
63

SEE ALSO

65       ms_intro(3), mst_init(3) and ms_time(3).
66
67

AUTHOR

69       Chad Trabant
70       IRIS Data Management Center
71
72
73
74Libmseed API                      2006/02/27                  MST_FINDMATCH(3)
Impressum