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 details flag is greater than 0, the sample rate and the sample count get printed for each trace. cute AND informative πŸ’…
  • if the gaps flag is greater than zero, the time gap from the previous MSTrace gets 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 dccid string, 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 subsecond flag 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 mingap or maxgap is not NULL, 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 the MSTraces in the MSTraceGroup include 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 πŸ’…βœ¨πŸ’–