Skip to content
Glenn Thompson edited this page Nov 9, 2021 · 4 revisions

Functions in libMVO.py:

fix_trace_id(st, shortperiod=False):

  • Calls correct_nslc on each Trace object, returning correct tr.id
  • Sets units to 'Pa' or 'm/s' depending on whether instrument code is 'D' or 'H', if tr.stats.history indicates Trace has been 'deconvolved' or 'calibrated'
  • Modifying each tr modifies st in-place

correct_nslc(tr.id, Fs, shortperiod=False): Contains current best logic to map MVO tr.id to SEED-compliant tr.id. Returns string.

inventory_fix_id_mvo(inv): Contains current best logic to map inventory objects from MVO Seisan response files to SEED-compliant tr.id. Returns modified inv (not in-place).

this_inv = load_mvo_inventory(tr, CALDIR): Looks for xmlfile matching CALDIR/station.MV.$sta..$matchcode*$component.xml, e.g. station.MV.MBWH..[ES]*Z.xml for MV.MBWH..SHZ (or station.MV.MBGB..[BH]*Z.xml for MV.MBGB..BHZ)

change_last_sample(tr): Cuts off last 2 samples, Trace object modified in-place.

swap32(): Changes the endianness of samples.

Clone this wiki locally