Skip to content

Commit

Permalink
bug fix and doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JackWalpole committed Oct 11, 2017
1 parent fb3f04e commit d1dddbb
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/get_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Second, install **SplitWavePy** with the following terminal command.
.. tip::
Ensure you have the latest release.

``pip upgrade splitwavepy``
``pip install splitwavepy --upgrade``

Now try the code.

Expand Down
4 changes: 2 additions & 2 deletions docs/real_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ It worked, kind of. The maximum delay time in the grid search is a bit high. W
:include-source:

measure = sw.EigenM(realdata, lags=(2,))
measure.plot(marker=True)
measure.plot(marker=True,conf95=True)

That looks better.
That looks better. Notice I've added a marker at the max :math:`\lambda_2/\lambda_2` location using ``marker=True`` and a contour at the 95% confidence level using ``conf95=True``.

Binary file modified docs/temp.eigm
Binary file not shown.
10 changes: 6 additions & 4 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ It is quite common to plot the :math:`\lambda_2` surface. To do this you use th

.. _setgrid:

Setting the lag time search range
Setting the lag time grid search
``````````````````````````````````
The code automatically sets the maximum lag time to be half the window length. To set the max search time manually you use the ``lags`` keyword. This accepts a tuple of length 1, 2, or 3, and will be interpreted differently depending on this length. The rules are as follows: for a 1-tuple ``lags = (maxlag,)``, a 2-tuple ``lags = (maxlag, nlags)``, and finally a 3-tuple ``(minlag, maxlag, nlags)``. In the previous example we can see that the solution has a delay time less than 2 seconds, so let's repeat the measurement using a more sensible grid search.
The code automatically sets the maximum lag time to be half the window length. To set the max search time manually you use the ``lags`` keyword. This accepts a tuple of length 1, 2, or 3, and will be interpreted differently depending on this length. The rules are as follows: for a 1-tuple ``lags = (maxlag,)``, a 2-tuple ``lags = (maxlag, nlags)``, and finally a 3-tuple ``(minlag, maxlag, nlags)``. Alternatively will accept a numpy array containing all nodes to search.

.. note::
The code automatically grid searches every 2 degrees along the fast direction axis. That's ``ndegs = 90`` nodes in total (180/2). You can change this number using the ``ndegs`` keyword.
Setting the fast direction grid search
````````````````````````````````````````

The code automatically grid searches every 2 degrees along the fast direction axis. That's ``degs = 90`` nodes in total (180/2). You can change this number using the ``degs`` keyword and providing an integer. Alternatively will accept a numpy array containing all nodes to search.


Tabulating the result
Expand Down
8 changes: 3 additions & 5 deletions release_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ checklist:
git tag (shows a list of tags)
git push --tags origin master (to put it on github)

---OPTIONAL TEST SERVER
• register package on PyPI Test server (as a check eveything's working)
python setup.py register -r pypitest
• upload to test PyPI repository
UPLOAD TO PYPI

-- (optional test first)
python setup.py sdist upload -r pypitest

---THE REAL DEAL
python setup.py register -r pypi
python setup.py sdist upload -r pypi
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
license = 'MIT',
url = 'https://github.com/JackWalpole/splitwavepy',
packages = find_packages(),
install_requires = [
'matplotlib',
'numpy',
'scipy']
keywords = ['shear', 'wave', 'splitting', 'seismic', 'anisotropy','seismology']
install_requires = ['matplotlib','numpy','scipy'],
keywords = 'shear wave splitting seismic anisotropy seismology',
)
2 changes: 1 addition & 1 deletion splitwavepy/core/pair.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def set_window(self,*args,**kwargs):
time_centre = (start + end)/2
time_width = end - start
tcs = core.time2samps(time_centre,self.delta)
offset = tcs - self.centresamp()
offset = tcs - self._centresamp()
# convert time to nsamples -- must be odd
width = core.time2samps(time_width,self.delta,'odd')
self.window = Window(width,offset,**kwargs)
Expand Down

0 comments on commit d1dddbb

Please sign in to comment.