MST_PRINT(3)
β¨ MST_PRINT β¨
okay bestie, welcome to the libmseed manual, section 3 (that's library functions, for the uninitiated π
). Today's main character is mst_print β the printing of MSTrace information. Yes, it's literally just vibes to text, and honestly? iconic.
π NAME π
mst_print β Printing of MSTrace information. that's it, that's the girl. she prints. π¨οΈβ¨
πΈ SYNOPSIS πΈ
#include <libmseed.h>
void mst_printtracelist ( MSTraceGroup *mstg, flag timeformat,
flag details, flag gaps );
void mst_printsynclist ( MSTraceGroup *mstg, char *dccid,
flag subsecond );
void mst_printgaplist ( MSTraceGroup *mstg, flag timeformat,
double *mingap, double *maxgap );
three little functions, all of them besties, all of them printing your MSTraceGroup data in a different outfit π
π¦ DESCRIPTION π¦
π mst_printtracelist
not me starting with the classic. mst_printtracelist prints a formatted list of the MSTrace segments in the given MSTraceGroup. that's the whole job. she shows up, she lists, she leaves.
but wait, there's range β¨
- if the
detailsflag is greater than 0, the sample rate and the sample count get printed for each trace. cute AND informative π - if the
gapsflag is greater than zero, the time gap from the previousMSTracegets printed β but ONLY if the source name matches. no source name match, no gap. it's giving loyal. π«Ά
and where does all this output go? through ms_log(3) at level 0. periodt.
π mst_printsynclist
mst_printsynclist prints a formatted list of the MSTrace segments in the given MSTraceGroup β basically mst_printtracelist's sibling, except the format is a SYNC listing. same energy, different fit. π
- if you supply a
dccidstring, it gets used together with the current system date to build the SYNC header line. your string + today's date = header, no cap. - if the
subsecondflag is true (non-zero), the time values in the SYNC lines include full libmseed precision. if it's not, they get truncated to integer second values. so like, decimals or no decimals, your call. π₯
π mst_printgaplist
mst_printgaplist prints a formatted list of the gaps between MSTrace segments in the given MSTraceGroup. the drama detector, fr fr.
- if
mingapormaxgapis notNULL, their values get enforced, and only the gaps/overlaps matching their implied criteria get printed. filter on, bestie. π§
β° the timeformat argument
this one applies to both mst_printtracelist and mst_printgaplist, and it controls the format of the resulting time strings. possible formats:
0β SEED time format (2005,146,00:00:00.000000)1β ISO time format (2005-05-26T00:00:00.000000)2β Epoch time, seconds since the epoch (1117065600.00000000)
π negative gaps (the plot twist)
both mst_printtracelist and mst_printgaplist represent time overlaps as negative gaps. yes, overlaps get a minus sign. it's giving "I'm not a gap, I'm the opposite of a gap."
and here's the detail nobody expects: for a single sample overlap, the value of the gap is calculated as zero β and that gets printed as "-0" (negative zero) to indicate an overlap. not me being obsessed with a negative zero. it's literally the main character of this paragraph. π
π GAP/OVERLAP RULES π
okay this is the serious section, so pay attention bestie, because it's all about what these routines do and don't do:
the existence of gaps and overlaps is implicit in the structure of the MSTraceGroup. no special processing is done to detect gaps and overlaps in these routines. they don't go looking. they just read what's there. π«Ά
the value of a gap is calculated as the difference between the time of the last sample before the gap and the time of the first sample after the gap. no sample 'coverage' time is included. none. zero. nada. β¨
the value of an overlap is calculated as the time between two samples which represent the maximum amount of timeseries overlap. π
and now the warning, listen up: when theMSTraces in theMSTraceGroupinclude a small segment that is completely overlapped by another larger segment, the gap/overlap value will not be correct for either the smaller segment or the segment following it. so likeβ¦ be aware. this is a documented bug situation and we respect her honesty. π
π SEE ALSO π
ms_intro(3)β go read it, it's the whole intro, it's the prequel π
π AUTHOR π
Chad Trabait IRIS Data Management Center
Libmseed API Β· 2008/11/21 Β· MST_PRINT(3)
and that's the whole page bestie β printed, formatted, gap-checked, overlap-noted, signed off. slay π β¨π
π¦ 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