- _write_cnv(catalog, filename, phase_mapping=None, ifx_list=None, weight_mapping=None, default_weight=0)[source]
Catalogobject to CNV event summary format (used as event/pick input by VELEST program).
This function should NOT be called directly, it registers via the the
write()method of an ObsPy
Catalogobject, call this instead.
Catalog) – Input catalog for CNV output..
filename (str or file) – Filename to write or open file-like object
phase_mapping (dict) – Mapping of phase hints to “P” or “S”. CNV format only uses a single letter phase code (either “P” or “S”). If not specified the following default mapping is used: ‘p’, ‘P’, ‘Pg’, ‘Pn’, ‘Pm’ will be mapped to “P” and ‘s’, ‘S’, ‘Sg’, ‘Sn’, ‘Sm’ will be mapped to “S”.
ifx_list (list of
ResourceIdentifier) – List of events for which the ‘IFX’ flag should be set (used in VELEST to fix the y coordinate of the hypocenter).
weight_mapping (list[float]]) – Mapping of pick uncertainties to integer weights. (Sorted) list of floats of boundary uncertainties. If uncertainty of pick is lower than the first entry of the list than a weight of 0 is assigned. If it is larger than the first entry, but smaller than the second entry a weight of 1 is assigned, and so on. The list of uncertainty boundaries should not contain more than 9 entries because the integer weight is restricted to a single digit. If not specified all picks will be output with weight default_weight.
default_weight (int) – Default weight to use when pick has no timing uncertainty and thus can not be mapped using weight_mapping parameter. Default weight should not be larger than 9, as the weight is represented as a single digit.