Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waveform plotting of short seismograms #5

Closed
trac2github opened this issue Sep 9, 2012 · 2 comments
Closed

Waveform plotting of short seismograms #5

trac2github opened this issue Sep 9, 2012 · 2 comments

Comments

@trac2github
Copy link

Currently waveform plotting is intended to be used with large amounts of data points (at least 10000 data points). It works with smaller data sets too but results will look strange and confusing as can be seen in the attached picture. A new method for plotting these small sets and a switch in the plotting function that decides which method will be used for plotting the seismograms need to be implemented.
This is probably not trivial as the new method needs to account for any possible gaps and overlaps present in the seismograms.

[[Image(SmallDataSet.png, border=1)]]

@trac2github
Copy link
Author

[barsch] wenn gaps aufgefüllt werden mit NaN's dann werden sie in matplotlib plots ignoriert, für overlaps kann man ja interpolieren

ich werde evtl. heute noch eine Funktion dafür einbauen, die das "mergen" von unterbrochenen Traces (durch Gaps oder Overlaps) vereinfacht

@trac2github
Copy link
Author

[krischer](In [577]) - add method for Traces and therefore all depending methods like merge, ... now return a masked array if it contains NaNs. In addition it now set the stats.npts attribute to the number of samples in the Trace excluding NaNs. Please check whether it breaks anything.

  • This required some changes in Trace methods (e.g. the len(Trace) now returns the number of not masked samples) and also some changes in the tests.
  • obspy.imaging.waveform now hopefully plots whatever you throw at it (closes Waveform plotting of short seismograms #5 and obspy.imaging.waveform: ValueError: zero-size array to ufunc.reduce without identity #8). I already did a lot of tests but it got pretty complicated so please help testing. Especially look at the scaling of the y-axis, the number of samples in the top right corner and whether all samples are plotted.
  • Removed waveform tests from the genereal obspy.core.testing because they now take too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant