obspy plugin refactor