Scroll to navigation

MSTL_PRINT(3) Library Functions Manual MSTL_PRINT(3)

NAME

mstl_print - Printing of MSTrace information.

SYNOPSIS

#include <libmseed.h>
void   mstl_printtracelist ( MSTraceList *mstl, flag timeformat,
                             flag details, flag gaps );
void   mstl_printsynclist ( MSTraceList *mstl, char *dccid,
                            flag subsecond );
void   mstl_printgaplist ( MSTraceList *mstl, flag timeformat,
                           double *mingap, double *maxgap );

DESCRIPTION

mstl_printtracelist prints a formatted list of the trace segments in the given MSTraceList. If the details flag is greater than 0 the sample rate and sample count are printed for each trace. If the gaps flag is greater than zero the time gap from the previous segment is printed. All output is printed using ms_log(3) at level 0.

mstl_printsynclist prints a formatted list of the trace segments in the given MSTraceList similar to mstl_printtracelist but the format is a SYNC listing. If a dccid string is supplied it will be used along with the current system date to create the SYNC header line. If the subsecond flag is true (non-zero) the time values in the SYNC lines will include full libmseed precision, otherwise they will be truncted to integer second values.

mstl_printgaplist prints a formatted list of the gaps between trace segments in the given MSTraceList. If mingap or maxgap is not NULL their values will be enforced and only gaps/overlaps matching their implied criteria will be printed.

The timeformat argument for both mstl_printtracelist and mstl_printgaplist controls the format of the resulting time strings. Possible formats are:

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)

Both mstl_printtracelist and mstl_printgaplist represent time overlaps as negative gaps. For a single sample overlap the value of the gap is calculated as zero, this will be printed as "-0" or negative zero to indicate an overlap.

GAP/OVERLAP RULES

The existence of gaps and overlaps is implicit in the structure of the MSTraceList, no special processing is done to detect gaps and overlaps in these routines.

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.

The value of an overlap is calculated as the time between two samples which represent the maximum amount of timeseries overlap.

When the traces in the MSTraceList 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.

SEE ALSO

ms_intro(3)

AUTHOR

Chad Trabant
IRIS Data Management Center
2008/11/21 Libmseed API