[teqc] helpful tip of week 1901

Lou Estey lou at unavco.org
Wed Jun 15 07:06:00 MDT 2016

This week's tip:  using option '+mds'

Because it has come up several times recently (though only once to this list;
see http://postal.unavco.org/pipermail/teqc/2016/002094.html), this is a good
time to review the handy '+mds' option.  Probably many of you use or know about
the '+meta" option.  For example (relying on teqc's auto-identification of the
input file -- see http://postal.unavco.org/pipermail/teqc/2016/002092.html):

[2006] teqc +quiet +meta N183-0407n.tps
filename:                N183-0407n.tps
file format:             Topcon TPS
file size (bytes):       243882
start date & time:       2016-04-07 13:00:00.000
final date & time:       2016-04-07 13:01:08.000
sample interval:
possible missing epochs: 0
4-char station code:
station name:            -Unknown-
station ID number:
antenna ID number:       -Unknown-
antenna type:            -Unknown-
antenna latitude (deg):      55.721872
antenna longitude (deg):     37.651692
antenna elevation (m):        168.265
antenna height (m):      0.0000
receiver serial number:  1294-66666
receiver ID number:      W1QLP53MP76
receiver type:           TPS NET-G5
receiver firmware:       5.1 Mar,03,2016 b5

... all of which goes to standard output (stdout), same as with the output of '+mds'.
(The '+meta[data]' option was developed long ago to extract the file's metadata,
which is part of what we keep here at UNAVCO in a database for each file that we

Less commonly known is the option '+mds' is a short subset of the metadata from
'+meta', so "mds" is for "metadata subset" or "metadata short", so using '+mds'
on the same file as above:

[2007] teqc +quiet +mds N183-0407n.tps
2016-04-07 13:00:00  2016-04-07 13:01:08    243882  N183-0407n.tps

You'll notice that like the output from '+meta', the output of '+mds' has the
start time, end time, filesize in bytes and the filename, but all on one line.
The difference in start and end time compared to using '+meta' is that '+mds' --
currently, at least -- truncates any partial seconds from the output.  (This
detail may need to change as sample intervals < 1 second become more commonly

And if you want, like '+meta', you can use the '+mds' option with the '+doy'
option to display the date in the ordinal "day of year" format:

[2008] teqc +quiet +mds +doy N183-0407n.tps
2016:098 13:00:00  2016:098 13:01:08    243882  N183-0407n.tps

Now, '+mds', like '+meta' and one or two other options, resets teqc's internals
after reading each input file listed on the command line.  This means that you
can list two or more files on the command and get a separate '+mds' output for
each file on the command line.  So, getting back to the email linked above
concerning multiple Leica .m00 files:

[2021] teqc +quiet +mds bcph350a.09.m00 bcph350b.09.m00 bcph350c.09.m00
2009-12-16 00:00:00  2009-12-16 00:59:59   1819528  bcph350a.09.m00
2009-12-16 01:00:00  2009-12-16 01:59:59   1990269  bcph350b.09.m00
2009-12-16 02:00:00  2009-12-16 02:59:59   2055612  bcph350c.09.m00

Now these Leica .m00 files happen to have a part of the filenames corresponding
to the last 2 digits of the year, i.e. '.09' for year 2009.  But what if this
was not part of the filenames, or if one or more of the files were misnamed?  Well,
using UNIX/Linux shell filename globbing to match files a-x (hours 00 - 23) and
piping the output to `sort` or `grep`, you could find files _not_ in 2009, for example:

[2022] teqc +quiet +mds bcph350[a-x].09.m00 | grep -v ^2009 | wc -l
[2023] 0

... which for me found zero .m00 files not from 2009 in this particular

The option '+mds' works with RINEX files as well, and you can mix RINEX observation
files, with the various types of RINEX navigation files, with RINEX met files --
all on one command line if you want.  For example (again using UNIX/Linux shell
filename globbing in the command line):

[2024] teqc +mds bcph3500.09[ogn]
2009-12-16 00:15:00  2009-12-16 23:45:00    211739  bcph3500.09g
2009-12-16 00:00:00  2009-12-16 23:59:44    120401  bcph3500.09n
2009-12-16 00:00:00  2009-12-16 23:59:59  146828771  bcph3500.09o

I use the '+mds' option manually quite a bit -- more than '+meta'.  Give it a go.

Happy teqc-ing!


Louis H. Estey, Ph.D.              office:  [+001] 303-381-7456
UNAVCO, 6350 Nautilus Drive           FAX:  [+001] 303-381-7451
Boulder, CO  80301-5554            e-mail:  lou  unavco.org
      WWW:  http://www.unavco.org   http://jules.unavco.org

"If the universe is the answer, what is the question?"
                                                -- Leon Lederman

Past helpful tips:

week 1894: using teqc config files - http://postal.unavco.org/pipermail/teqc/2016/002067.html
week 1895: qc of high-rate data - http://postal.unavco.org/pipermail/teqc/2016/002071.html
week 1896: UNIX/Linux shells for Windows - http://postal.unavco.org/pipermail/teqc/2016/002072.html
week 1897: '-' vs. '+' teqc options - http://postal.unavco.org/pipermail/teqc/2016/002076.html
week 1898: auto-identification of formats - http://postal.unavco.org/pipermail/teqc/2016/002092.html
week 1899: auto-identification vs. format flags - http://postal.unavco.org/pipermail/teqc/2016/002096.html
week 1900: square brackets in options - http://postal.unavco.org/pipermail/teqc/2016/002105.html

More information about the teqc mailing list