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

taup: added a time plot -- analogue to the existing ray path plot #1877

Merged
merged 49 commits into from Oct 9, 2017

Conversation

Projects
None yet
6 participants
@kaspervanwijk
Contributor

kaspervanwijk commented Sep 6, 2017

What does this PR do?

create a method on the arrivals object for a travel time plot, analogue to the ray path plot method. It replaces the old (and removed travelTimePlot function, see https://docs.obspy.org/archive/1.0.3/tutorial/code_snippets/travel_time.html#travel-time-plot)

Why was it initiated? Any relevant Issues?

Fixes #1501, fixes #1330

PR Checklist

  • This PR is not directly related to an existing issue (which has no PR yet).
  • All tests still pass.
  • Any new features or fixed regressions are be covered via new tests.
  • Any new or changed features have are fully documented.
  • Significant changes have been added to CHANGELOG.txt .
  • First time contributors have added your name to CONTRIBUTORS.txt .

Todos

  • add convenience wrapper function
  • add example usage to convenience wrapper function docstring (with example plot)
  • add image test
  • add example plot to gallery
import numpy as np
import matplotlib.pyplot as plt
from obspy.taup import TauPyModel

# set the velocity model you want to use:
model = TauPyModel(model='iasp91')

# set epicentral distances, the phases you want, and a source depth:
DISTANCES=range(0,100,1)
PHASES = ['S','P']
sourcedepth=5

plt.figure(figsize=(10, 10))
ax = plt.subplot(111)

# plot arrival times for all arrivals in arrivals object:
for distance in DISTANCES:
    arrivals = model.get_ray_paths(sourcedepth, distance, phase_list=PHASES)
    if not len(arrivals):
        print('No arrival time for:', PHASES, distance)
        continue
    arrivals.timeplot(PHASES,show=False,ax=ax)
ax.set_xlim(DISTANCES[0],DISTANCES[-1])
plt.show()
@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 7, 2017

Member

@kaspervanwijk Can you post an example image?

Member

megies commented Sep 7, 2017

@kaspervanwijk Can you post an example image?

Show outdated Hide outdated obspy/taup/tau.py

@megies megies changed the title from added a time plot -- analogue to the existing ray path plot -- for ta… to taup: added a time plot -- analogue to the existing ray path plot Sep 7, 2017

@kaspervanwijk

This comment has been minimized.

Show comment
Hide comment
@kaspervanwijk

kaspervanwijk Sep 7, 2017

Contributor

The output of the example test code with this is:
figure_1-9

Contributor

kaspervanwijk commented Sep 7, 2017

The output of the example test code with this is:
figure_1-9

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 7, 2017

Member

Ah OK, so this is basically a replacement for the old plot that is not working in master anymore?

https://docs.obspy.org/tutorial/code_snippets/travel_time.html#travel-time-plot

Member

megies commented Sep 7, 2017

Ah OK, so this is basically a replacement for the old plot that is not working in master anymore?

https://docs.obspy.org/tutorial/code_snippets/travel_time.html#travel-time-plot

@kaspervanwijk

This comment has been minimized.

Show comment
Hide comment
@kaspervanwijk

kaspervanwijk Sep 7, 2017

Contributor

That's right. A replacement (hopefully; this is my first attempt at a PR), but the same way the ray paths are currently plotted: as a method on "arrivals."

Contributor

kaspervanwijk commented Sep 7, 2017

That's right. A replacement (hopefully; this is my first attempt at a PR), but the same way the ray paths are currently plotted: as a method on "arrivals."

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 7, 2017

Member

This will be a really nice PR! Thanks already!

Having this as a method on arrivals is very nice API-wise, but I think also a convenience wrapper function for the whole process would also be a real handy addition. Something like this..

def traveltime_plot(source_depth, phases=['P', 'S'], model='iasp91',
                    distance_range=(0, 180)):
    ...

I'll add some todos in the OP.

Let us know if you need help setting up the image test or adding the plot to the gallery.

Member

megies commented Sep 7, 2017

This will be a really nice PR! Thanks already!

Having this as a method on arrivals is very nice API-wise, but I think also a convenience wrapper function for the whole process would also be a real handy addition. Something like this..

def traveltime_plot(source_depth, phases=['P', 'S'], model='iasp91',
                    distance_range=(0, 180)):
    ...

I'll add some todos in the OP.

Let us know if you need help setting up the image test or adding the plot to the gallery.

@megies megies added this to the 1.1.0 milestone Sep 7, 2017

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 7, 2017

Member

For distances over 180 degrees, this could optionally be done in the plot doing a wraparound like here: in "Jeffreys/Bullen style" but it might be a bit tricky to get the duplicated x-axis labels right..

Member

megies commented Sep 7, 2017

For distances over 180 degrees, this could optionally be done in the plot doing a wraparound like here: in "Jeffreys/Bullen style" but it might be a bit tricky to get the duplicated x-axis labels right..

@kaspervanwijk

This comment has been minimized.

Show comment
Hide comment
@kaspervanwijk

kaspervanwijk Sep 7, 2017

Contributor

Could make the wrapper function you mention, but that would be very similar to the old way (except it would not call deprecated code, but properly use TauPyModel.get_travel_times(). Would you want both the method and the wrapper function?

As is, the plot handles >180 correctly, I believe.

(Yes, I will need some tips on how to do an image test and gallery add)

Contributor

kaspervanwijk commented Sep 7, 2017

Could make the wrapper function you mention, but that would be very similar to the old way (except it would not call deprecated code, but properly use TauPyModel.get_travel_times(). Would you want both the method and the wrapper function?

As is, the plot handles >180 correctly, I believe.

(Yes, I will need some tips on how to do an image test and gallery add)

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 7, 2017

Member

Would you want both the method and the wrapper function?

Yes, I would implement both. For the user it's much more convenient to just have a single function call rather than use the above code snippet. But having the logic as a method with Arrivals is also very nice API-logic-wise.

Member

megies commented Sep 7, 2017

Would you want both the method and the wrapper function?

Yes, I would implement both. For the user it's much more convenient to just have a single function call rather than use the above code snippet. But having the logic as a method with Arrivals is also very nice API-logic-wise.

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 8, 2017

Member

Requesting a docs build for this PR, so that we can check the example plot: +DOCS

Member

megies commented Sep 8, 2017

Requesting a docs build for this PR, so that we can check the example plot: +DOCS

Show outdated Hide outdated obspy/taup/tau.py
Show outdated Hide outdated obspy/taup/tau.py
Show outdated Hide outdated obspy/taup/tau.py
Show outdated Hide outdated obspy/taup/tau.py
@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 8, 2017

Member

This is looking real nice already. :-)

To add it to the gallery, just replace the old example that's still in there (broken of course). I.e. adapt obspy/misc/docs/source/tutorial/code_snippets/travel_time_plot.py and obspy/misc/docs/source/tutorial/code_snippets/travel_time_plot.rst and also adapt it in obspy/misc/docs/source/gallery.rst (line 141).

For the image test, just copy/paste/adapt one of the test routines in obspy/obspy/taup/tests/test_plotting.py. You can then run $ obspy-runtests taup --keep-images (or alternatively $ OBSPY_KEEP_IMAGES= python taup/tests/test_plotting.py if you want to omit the other taup tests) and move the newly created image in obspy/obspy/taup/tests/images/testrun up one directory to drop it in as the base line image. If I'm not mistaken, base line images are still based on matplotlib 1.3.1.. (@krischer, @QuLogic, that right?), so that's the version you should use when creating the base line image.

Member

megies commented Sep 8, 2017

This is looking real nice already. :-)

To add it to the gallery, just replace the old example that's still in there (broken of course). I.e. adapt obspy/misc/docs/source/tutorial/code_snippets/travel_time_plot.py and obspy/misc/docs/source/tutorial/code_snippets/travel_time_plot.rst and also adapt it in obspy/misc/docs/source/gallery.rst (line 141).

For the image test, just copy/paste/adapt one of the test routines in obspy/obspy/taup/tests/test_plotting.py. You can then run $ obspy-runtests taup --keep-images (or alternatively $ OBSPY_KEEP_IMAGES= python taup/tests/test_plotting.py if you want to omit the other taup tests) and move the newly created image in obspy/obspy/taup/tests/images/testrun up one directory to drop it in as the base line image. If I'm not mistaken, base line images are still based on matplotlib 1.3.1.. (@krischer, @QuLogic, that right?), so that's the version you should use when creating the base line image.

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 8, 2017

Member

Btw.. If you want to see what flake8 thinks of your commits right when doing them, you could set up a local git hook, see first paragraph on this page: https://docs.obspy.org/master/coding_style.html#obspy-coding-style-guide

It's really useful.

Member

megies commented Sep 8, 2017

Btw.. If you want to see what flake8 thinks of your commits right when doing them, you could set up a local git hook, see first paragraph on this page: https://docs.obspy.org/master/coding_style.html#obspy-coding-style-guide

It's really useful.

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 8, 2017

Member

Docs build for the PR is up (will be automatically updated on new commits): http://docs.obspy.org/pull-requests/1877/packages/obspy.taup.html#module-obspy.taup

Example plot's not working..: http://docs.obspy.org/pull-requests/1877/packages/autogen/obspy.taup.tau.traveltime_plot.html#obspy.taup.tau.traveltime_plot

See http://docs.obspy.org/pull-requests/1877/log.txt, searching for traveltime_plot:

/private-backup/home/obspy/update-docs-pr/src/obspy/obspy/taup/tau.py:docstring of obspy.taup.tau.traveltime_plot:36: WARNING: Exception occurred in plotting obspy-taup-tau-traveltime_plot-1
 from /private-backup/home/obspy/update-docs-pr/src/obspy/misc/docs/source/packages/autogen/obspy.taup.tau.traveltime_plot.rst:
Traceback (most recent call last):
  File "/home/obspy/anaconda3/envs/tmp_build_docs-pr/lib/python3.4/site-packages/matplotlib/sphinxext/plot_directive.py", line 517, in run_code
    six.exec_(code, ns)
  File "<string>", line 2, in <module>
NameError: name 'travetime_plot' is not defined

Can you also add a short paragraph with plot to the taup landing page (i.e. taup/__init__.py docstring)?

Member

megies commented Sep 8, 2017

Docs build for the PR is up (will be automatically updated on new commits): http://docs.obspy.org/pull-requests/1877/packages/obspy.taup.html#module-obspy.taup

Example plot's not working..: http://docs.obspy.org/pull-requests/1877/packages/autogen/obspy.taup.tau.traveltime_plot.html#obspy.taup.tau.traveltime_plot

See http://docs.obspy.org/pull-requests/1877/log.txt, searching for traveltime_plot:

/private-backup/home/obspy/update-docs-pr/src/obspy/obspy/taup/tau.py:docstring of obspy.taup.tau.traveltime_plot:36: WARNING: Exception occurred in plotting obspy-taup-tau-traveltime_plot-1
 from /private-backup/home/obspy/update-docs-pr/src/obspy/misc/docs/source/packages/autogen/obspy.taup.tau.traveltime_plot.rst:
Traceback (most recent call last):
  File "/home/obspy/anaconda3/envs/tmp_build_docs-pr/lib/python3.4/site-packages/matplotlib/sphinxext/plot_directive.py", line 517, in run_code
    six.exec_(code, ns)
  File "<string>", line 2, in <module>
NameError: name 'travetime_plot' is not defined

Can you also add a short paragraph with plot to the taup landing page (i.e. taup/__init__.py docstring)?

Kasper Van wijk added some commits Sep 8, 2017

Kasper Van wijk
added import of traveltime_plot, so that we can use:
"from obspy.taup import traveltime_plot"

added add a short paragraph with timeplot method and traveltime_plot() function
to the docstring.
Kasper Van wijk
- changed source_depth to an argument (no obvious default value)
- removed redundant "optional" to kwargs with default values
- fixed the default mention on the model parameter (not on type)
- fixed typo in call to example plot
Show outdated Hide outdated obspy/taup/tau.py
@kaspervanwijk

This comment has been minimized.

Show comment
Hide comment
@kaspervanwijk

kaspervanwijk Sep 8, 2017

Contributor

Running into a problem with creating the image, using the timeplot() method. Just like the plot() method, there is an optional creating of an ax, but in the case of timeplot(), the test in not expecting an ax:

[kvan637@sc-phy-324060 tests]$ obspy-runtests taup --keep-images
Running /home/kvan637/obspy/obspy/scripts/runtests.py, ObsPy version '1.0.3.post0+1502.gca18fa85fc.dirty.kaspervanwijk.timeplot'
.F..s..................E..................s.......s..s.....

======================================================================
ERROR: test_travel_time_plot (obspy.taup.tests.test_plotting.TauPyPlottingTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kvan637/obspy/obspy/taup/tests/test_plotting.py", line 124, in test_travel_time_plot
    plt.savefig(ic.name)
  File "/home/kvan637/obspy/obspy/core/util/testing.py", line 423, in __exit__
    msg = self.compare()
  File "/home/kvan637/obspy/obspy/core/util/testing.py", line 523, in compare
    return compare_images(self.baseline_image, self.name, tol=self.tol)
  File "/home/kvan637/obspy/obspy/core/util/testing.py", line 195, in compare_images
    raise IOError('Baseline image %r does not exist.' % expected)
OSError: Baseline image '/home/kvan637/obspy/obspy/taup/tests/images/traveltimeplot.png' does not exist.

======================================================================
FAIL: traveltime_plot (obspy.taup.tau)
Doctest: obspy.taup.tau.traveltime_plot
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kvan637/anaconda3/lib/python3.5/doctest.py", line 2190, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for obspy.taup.tau.traveltime_plot
  File "/home/kvan637/obspy/obspy/taup/tau.py", line 720, in traveltime_plot

----------------------------------------------------------------------
File "/home/kvan637/obspy/obspy/taup/tau.py", line 752, in obspy.taup.tau.traveltime_plot
Failed example:
    traveltime_plot(source_depth=120,min_degree=0, max_degree=50,
             phases=['P', 'S', 'PP'], model='iasp91', npoints=1000)
Expected nothing
Got:
    <matplotlib.axes._subplots.AxesSubplot object at 0x7fe5fc0c25f8>


----------------------------------------------------------------------
Ran 59 tests in 99.274s
Contributor

kaspervanwijk commented Sep 8, 2017

Running into a problem with creating the image, using the timeplot() method. Just like the plot() method, there is an optional creating of an ax, but in the case of timeplot(), the test in not expecting an ax:

[kvan637@sc-phy-324060 tests]$ obspy-runtests taup --keep-images
Running /home/kvan637/obspy/obspy/scripts/runtests.py, ObsPy version '1.0.3.post0+1502.gca18fa85fc.dirty.kaspervanwijk.timeplot'
.F..s..................E..................s.......s..s.....

======================================================================
ERROR: test_travel_time_plot (obspy.taup.tests.test_plotting.TauPyPlottingTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kvan637/obspy/obspy/taup/tests/test_plotting.py", line 124, in test_travel_time_plot
    plt.savefig(ic.name)
  File "/home/kvan637/obspy/obspy/core/util/testing.py", line 423, in __exit__
    msg = self.compare()
  File "/home/kvan637/obspy/obspy/core/util/testing.py", line 523, in compare
    return compare_images(self.baseline_image, self.name, tol=self.tol)
  File "/home/kvan637/obspy/obspy/core/util/testing.py", line 195, in compare_images
    raise IOError('Baseline image %r does not exist.' % expected)
OSError: Baseline image '/home/kvan637/obspy/obspy/taup/tests/images/traveltimeplot.png' does not exist.

======================================================================
FAIL: traveltime_plot (obspy.taup.tau)
Doctest: obspy.taup.tau.traveltime_plot
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kvan637/anaconda3/lib/python3.5/doctest.py", line 2190, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for obspy.taup.tau.traveltime_plot
  File "/home/kvan637/obspy/obspy/taup/tau.py", line 720, in traveltime_plot

----------------------------------------------------------------------
File "/home/kvan637/obspy/obspy/taup/tau.py", line 752, in obspy.taup.tau.traveltime_plot
Failed example:
    traveltime_plot(source_depth=120,min_degree=0, max_degree=50,
             phases=['P', 'S', 'PP'], model='iasp91', npoints=1000)
Expected nothing
Got:
    <matplotlib.axes._subplots.AxesSubplot object at 0x7fe5fc0c25f8>


----------------------------------------------------------------------
Ran 59 tests in 99.274s
@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 8, 2017

Member

Oh, I think you can just copy any other base line image to the expected base line image location for the first run.. we should eventually implement some canonical way to create an initial new base line image..

Member

megies commented Sep 8, 2017

Oh, I think you can just copy any other base line image to the expected base line image location for the first run.. we should eventually implement some canonical way to create an initial new base line image..

@kaspervanwijk

This comment has been minimized.

Show comment
Hide comment
@kaspervanwijk

kaspervanwijk Sep 8, 2017

Contributor

Ok, I hope I got those changes in correctly... thanks for the flake8 tip!

potential issues:

  • I failed to downgrade to matplotlib 1.3.1 for the image. If it is crucial, I will try harder than
    conda install matplotlib=1.3.1 (which clashed with other things I have)
  • My baseline image is made by hand, and not from the test plotting
  • gallery.rst seemed ok already. I was not seeing any changes to be made
Contributor

kaspervanwijk commented Sep 8, 2017

Ok, I hope I got those changes in correctly... thanks for the flake8 tip!

potential issues:

  • I failed to downgrade to matplotlib 1.3.1 for the image. If it is crucial, I will try harder than
    conda install matplotlib=1.3.1 (which clashed with other things I have)
  • My baseline image is made by hand, and not from the test plotting
  • gallery.rst seemed ok already. I was not seeing any changes to be made
Show outdated Hide outdated obspy/taup/tau.py
@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Oct 4, 2017

Member

This looks good to me now. Only thing that's changed is that we have more paths in this one Tutorial plot (maybe due to this change: https://github.com/obspy/obspy/pull/1877/files#diff-4343e81d5f94dd2b0905e41df4cae7c2L54):

(compare e.g. rays arriving from both sides at SSS arrival near south pole)

Also arrival labels seem to need more space, but I guess that's just due to the reduced figure size in the tutorial example (I guess you reduced size to make plots align nicer in the bootstrap gallery mosaic?)?

This PR

master


One more thing: The logic to use same color across a single phase now causes this plot to use the same color for both ray paths: https://github.com/kaspervanwijk/obspy/blob/ddbbc459eb40651d234836cf776591062b78bbfc/obspy/taup/tests/images/spherical_more_then_360.png
For plots with just a few rays of same phase but different distance it might still be nice to have the possibility to color each ray differently?

Member

megies commented Oct 4, 2017

This looks good to me now. Only thing that's changed is that we have more paths in this one Tutorial plot (maybe due to this change: https://github.com/obspy/obspy/pull/1877/files#diff-4343e81d5f94dd2b0905e41df4cae7c2L54):

(compare e.g. rays arriving from both sides at SSS arrival near south pole)

Also arrival labels seem to need more space, but I guess that's just due to the reduced figure size in the tutorial example (I guess you reduced size to make plots align nicer in the bootstrap gallery mosaic?)?

This PR

master


One more thing: The logic to use same color across a single phase now causes this plot to use the same color for both ray paths: https://github.com/kaspervanwijk/obspy/blob/ddbbc459eb40651d234836cf776591062b78bbfc/obspy/taup/tests/images/spherical_more_then_360.png
For plots with just a few rays of same phase but different distance it might still be nice to have the possibility to color each ray differently?

@kaspervanwijk

This comment has been minimized.

Show comment
Hide comment
@kaspervanwijk

kaspervanwijk Oct 5, 2017

Contributor

the new version of the plot above is much cleaner, and only a fraction of the coding. I also found a bug in tau.py for negative epicentral distances, as a bonus. I added some color to the plot in the latest version, as requested.

Rays of the same phase and same distance, just a different path, will have the same color. Rays of the same phase different distance, or same distance, different phase, will have different colors (if in ttall; if not, they will be black unless a phase_list is explicitly defined)

I should probably increase the distance between label and symbol: I wanted to keep the plot the standard figure() size.

Contributor

kaspervanwijk commented Oct 5, 2017

the new version of the plot above is much cleaner, and only a fraction of the coding. I also found a bug in tau.py for negative epicentral distances, as a bonus. I added some color to the plot in the latest version, as requested.

Rays of the same phase and same distance, just a different path, will have the same color. Rays of the same phase different distance, or same distance, different phase, will have different colors (if in ttall; if not, they will be black unless a phase_list is explicitly defined)

I should probably increase the distance between label and symbol: I wanted to keep the plot the standard figure() size.

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Oct 5, 2017

Member

@kaspervanwijk are you adding more changes to this PR? I think I can take over for last changes and rebasing and then it can be merged..

Member

megies commented Oct 5, 2017

@kaspervanwijk are you adding more changes to this PR? I think I can take over for last changes and rebasing and then it can be merged..

@megies megies self-assigned this Oct 5, 2017

Kasper Van wijk
amended the docstring to plot_rays(), explaining what will be plotted…
… by default. Also increased the distance between symbol phase name label slightly, so it holds up on a smaller figure.
@kaspervanwijk

This comment has been minimized.

Show comment
Hide comment
@kaspervanwijk

kaspervanwijk Oct 5, 2017

Contributor

@megies: if you are happy with the PR, I am happy. Thanks for letting me contribute. I learned heaps!

Contributor

kaspervanwijk commented Oct 5, 2017

@megies: if you are happy with the PR, I am happy. Thanks for letting me contribute. I learned heaps!

Show outdated Hide outdated obspy/taup/tau.py
@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Oct 6, 2017

Member

Wow.. this takes a really long time on my machine:

from obspy.taup import plot_travel_times
plot_travel_times(source_depth=10)

I think we should lower the default number of points.. maybe to 50, that finishes in a reasonable amount of time for me. People can always crank it up if they need more.

Member

megies commented Oct 6, 2017

Wow.. this takes a really long time on my machine:

from obspy.taup import plot_travel_times
plot_travel_times(source_depth=10)

I think we should lower the default number of points.. maybe to 50, that finishes in a reasonable amount of time for me. People can always crank it up if they need more.

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Oct 6, 2017

Member

@kaspervanwijk I just pushed some changes, would be good if you breifly check them. I'll start rebasing intermediate images out of this now and will then force-push over this branch. For reference, current tip is at 0a0b8ac.

Member

megies commented Oct 6, 2017

@kaspervanwijk I just pushed some changes, would be good if you breifly check them. I'll start rebasing intermediate images out of this now and will then force-push over this branch. For reference, current tip is at 0a0b8ac.

megies added some commits Oct 6, 2017

@kaspervanwijk

This comment has been minimized.

Show comment
Hide comment
@kaspervanwijk

kaspervanwijk Oct 6, 2017

Contributor

thank you, @megies, your edits are all improvements. I agree with making the default number of travel times to calculate a smaller number to speed up the code, but hope we can keep a nice dense graph in the gallery.

Contributor

kaspervanwijk commented Oct 6, 2017

thank you, @megies, your edits are all improvements. I agree with making the default number of travel times to calculate a smaller number to speed up the code, but hope we can keep a nice dense graph in the gallery.

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Oct 7, 2017

Member

hope we can keep a nice dense graph in the gallery.

fair enough, i'll crank it up

Member

megies commented Oct 7, 2017

hope we can keep a nice dense graph in the gallery.

fair enough, i'll crank it up

megies added some commits Oct 7, 2017

ImageComparison decorator: add option to deactivate imgur upload
this can be used in tests that should fail and then might attempt to
upload images which takes several seconds and is totally unwanted in
this case
taup plots: fix ax/fig setup that i garbled in one of the earlier com…
…mits

also sanitize ax/fig kwarg handling in one routine
@megies

megies approved these changes Oct 8, 2017

I think this can be merged. Travis is failing virtually every image test right now, and since this PR is coming from a fork the imgur uploads from Travis don't work unfortunately, because the imgur token in the secure env variable is not available for PRs from forks.

Anyway, good to merge, IMHO.

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Oct 9, 2017

Member

Thanks a bunch @kaspervanwijk, great work on this PR!

Member

megies commented Oct 9, 2017

Thanks a bunch @kaspervanwijk, great work on this PR!

@megies megies merged commit aa91c19 into obspy:master Oct 9, 2017

3 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
docker-testbot docker testbot results not available yet
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
docs-buildbot Check out Pull Request docs build here:
Details
@megies

This comment has been minimized.

Show comment
Hide comment
@megies
Member

megies commented Oct 9, 2017

see 9bd3a80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment