MST_FINDMATCH(3)
MST_FINDMATCH π
okay bestie, welcome to the MST_FINDMATCH(3) page β this is section 3 of the manual (library functions, the fun ones β¨), and it's literally all about hunting down the exact MSTrace you want inside a MSTraceGroup. no cap. let's go π¦
β¨ NAME β¨
mst_findmatch β searching a MSTraceGroup for specific MSTrace structures. it's giving "where's my trace" energy, and honestly? iconic.
β¨ SYNOPSIS β¨
#include <libmseed.h>
MSTrace *mst_findmatch ( MSTrace *startmst, char dataquality,
char *network, char *station,
char *location, char *channel );
MSTrace *mst_findadjacent ( MSTraceGroup *mstg,
flag *whence, char dataquality,
char *network, char *station,
char *location, char *channel,
double samprate, double sampleratetol,
hptime_t starttime, hptime_t endtime,
double timetol);
likeβ¦ two functions, one header, zero drama π
β¨ DESCRIPTION β¨
the mst_findmatch of it all
so mst_findmatch traverses a MSTrace chain starting at startmst and returns the first entry that matches the source name identifiers. like it's just out here walking the linked list, matching vibes. πΆββοΈβ¨
and bestie, if dataquality is not zero, it has to match the found entry too. no exceptions, that's the rule. π
a calling program commonly calls this routine in a loop in order to find all matching MSTraces in a MSTraceGroup. so yes, the intended lifestyle is: loop it. periodt.
the mst_findadjacent of it all
mst_findadjacent finds the first entry in the MSTraceGroup pointed to by mstg that matches the given source name identifiers and is time adjacent to the time coverage described by the samprate, starttime and endtime. adjacent as in "right next to it", not adjacent as in "we sat next to each other in class once". π
again, if dataquality is not zero it must also match the found entry.
psst β seems_time(3)for a description of the high precision epoch time format needed forstarttimeandendtime. don't skip that, fr fr. π
tolerances, aka how picky are we being
the tolerance for sample rate and time matching can also be specified. here's the tea: π΅
- if
sampratetolis-1.0the default tolerance ofabs(1-sr1/sr2) < 0.0001is used. - if
timetolis-1.0the default time tolerance of1/2the sample period will be used. - if
sampratetolortimetolis-2.0the respective tolerance check will not be performed. - if time tolerance is not checked,
whencewill be set to whichever end fits best. - the time tolerance is specified in seconds. β±οΈ
the whence flag moment π
when an adjacent MSTrace is found, the whence flag will be set to indicate where the indicated time span is adjacent, in the following way:
- time span fits at the end of the
MSTrace - time span fits at the beginning of the
MSTrace
slay. two options. very demure. πΈ
β¨ RETURN VALUES β¨
mst_findmatchreturns a pointer to the matchingMSTracestructure β or0if no match found or error. π (a0is not a vibe, but it is a valid answer.)mst_findadjacentreturns a pointer to the adjacentMSTracestructure and thewhenceflag is set when an adjacentMSTraceis found β or0when no adjacentMSTraceis found.
β¨ SEE ALSO β¨
ms_intro(3), mst_init(3) and ms_time(3). go read them, bestie, they're part of the friend group π«Ά
β¨ AUTHOR β¨
Chad Trabant IRIS Data Management Center
and that's the whole page, you ate it π β¨
cute little sign-off for the receipts: this one's from the Libmseed API, dated 2006/02/27 β old but iconic, a true vintage. ππ
π¦ where this page comes from
- debian bookworm: libmseed-doc 2.19.8-1 Β· LGPL-3.0-or-later
- debian trixie: libmseed-doc 2.19.8-1 Β· LGPL-3.0-or-later
- fedora 43: libmseed-devel 2.19.5-21.fc43 Β· LGPL-3.0-or-later
- fedora 43: libmseed-devel 2.19.5-21.fc43 Β· LGPL-3.0-or-later
- fedora 44: libmseed-devel 2.19.5-22.fc44 Β· LGPL-3.0-or-later
- fedora 44: libmseed-devel 2.19.5-22.fc44 Β· LGPL-3.0-or-later
- ubuntu jammy: libmseed-doc 2.19.6-3 Β· LGPL-3.0-or-later
- ubuntu noble: libmseed-doc 2.19.8-1ubuntu2 Β· LGPL-3.0-or-later
- ubuntu questing: libmseed-doc 2.19.8-1ubuntu2
- ubuntu resolute: libmseed-doc 2.19.8-1ubuntu3 Β· LGPL-3.0-or-later
- ubuntu stonking: libmseed-doc 2.19.8-1ubuntu3 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms