Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/maintenance_1.0.x'
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGELOG.txt
  • Loading branch information
megies committed Apr 13, 2016
2 parents a0c6538 + 0b7e39a commit 6b45a68
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ master:
- obspy.css
* Read support for NNSA KB Core format waveform data. (see #1332)

1.0.x:
- <nothing yet>
1.0.2: (doi: 10.5281/zenodo.49636)
- obspy.db:
* Fixed a bug in obspy-indexer command line script (see #1369,
command line script was not working, probably since 0.10.0)

1.0.1: (doi: 10.5281/zenodo.48254)
- General:
Expand Down
3 changes: 2 additions & 1 deletion obspy/db/scripts/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from future.builtins import * # NOQA @UnusedWildImport
from future.utils import native_str
from future import standard_library

import logging
Expand Down Expand Up @@ -142,7 +143,7 @@ def _run_indexer(options):
p.daemon = True
p.start()
# connect to database
engine = create_engine(options.db_uri, encoding='utf-8',
engine = create_engine(options.db_uri, encoding=native_str('utf-8'),
convert_unicode=True)
metadata = Base.metadata
# recreate database
Expand Down
3 changes: 2 additions & 1 deletion obspy/imaging/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,8 @@ def _equalarea_spherical_grid(nlat=30):
ndim = 3
colats = np.linspace(0., np.pi, nlat)
norms = np.sin(colats)
nlons = (2*nlat * norms + 1).astype(int) # scale number of point with lat
# Scale number of point with latitude.
nlons = (2 * nlat * norms + 1).astype(np.int_)

# make colat/lon grid
colatgrid, longrid = [], []
Expand Down
2 changes: 2 additions & 0 deletions obspy/scripts/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@

import numpy as np

import obspy
from obspy.core.util import ALL_MODULES, DEFAULT_MODULES, NETWORK_MODULES
from obspy.core.util.misc import MatplotlibBackend
from obspy.core.util.testing import MODULE_TEST_SKIP_CHECKS
Expand Down Expand Up @@ -521,6 +522,7 @@ def run_tests(verbosity=1, tests=[], report=False, log=None,
:type server: str, optional
:param server: Report server URL (default is ``"tests.obspy.org"``).
"""
print("Running {}, ObsPy version '{}'".format(__file__, obspy.__version__))
if all:
tests = copy.copy(ALL_MODULES)
elif not tests:
Expand Down
4 changes: 2 additions & 2 deletions obspy/signal/hoctavbands.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def sonogram(data, fs, fc1, nofb, no_win):
c = fftpack.fft(data, nfft)
z_tot = np.sum(np.abs(c)**2, axis=1)

start = np.around(fmin * nfft / fs, 0).astype(int) - 1
end = np.around(fmax * nfft / fs, 0).astype(int)
start = np.around(fmin * nfft / fs, 0).astype(np.int_) - 1
end = np.around(fmax * nfft / fs, 0).astype(np.int_)
z = np.zeros([c.shape[0], nofb])
for i in range(nofb):
z[:, i] = np.sum(np.abs(c[:, start[i]:end[i]])**2, axis=1)
Expand Down

0 comments on commit 6b45a68

Please sign in to comment.