Skip to content

Commit

Permalink
added more ground motion parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
millen1m committed Apr 2, 2018
1 parent 9b9edee commit d19e421
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion eqsig/__about__.py
@@ -1 +1 @@
__version__ = "0.5.10"
__version__ = "0.5.11"
1 change: 1 addition & 0 deletions eqsig/duhamels.py
Expand Up @@ -209,6 +209,7 @@ def pseudo_response_spectra(motion, step, periods, xi):
:param xi: float, fraction of critical damping (e.g. 0.05)
:return: tuple floats, (spectral displacement, pseudo spectral velocity, pseudo spectral acceleration)
"""
periods = np.array(periods)
resp_u, resp_v, resp_a = nigam_and_jennings_response(motion, periods, step, xi)
sds = absmax(resp_u, axis=1)
svs = 2 * np.pi / periods * sds
Expand Down
12 changes: 8 additions & 4 deletions eqsig/single.py
Expand Up @@ -340,7 +340,9 @@ class AccSignal(Signal):
a_rms01 = 0.0
a_rms05 = 0.0
a_rms10 = 0.0
t_595 = 0.0
t_595 = 0.0 # significant duration
sd_start = 0.0 # start time of significant duration
sd_end = 0.0 # end time of significant duration
arias_intensity_series = None
arias_intensity = 0.0
cav_series = None
Expand Down Expand Up @@ -369,7 +371,7 @@ def clear_cache(self):

def generate_response_spectrum(self, response_times=None, xi=-1):
"""
Generate the response spectrum for the ResponseTimes for a given
Generate the response spectrum for the response_times for a given
damping (xi). default xi = 0.05
"""
if self.verbose:
Expand Down Expand Up @@ -497,9 +499,9 @@ def generate_duration_stats(self):
self.a_rms10 = -1.

# Trifunac and Brady
sd_start, sd_end = sm.significant_duration(self.values, self.dt)
self.sd_start, self.sd_end = sm.significant_duration(self.values, self.dt)

self.t_595 = sd_end - sd_start
self.t_595 = self.sd_end - self.sd_start

def generate_cumulative_stats(self):
"""
Expand Down Expand Up @@ -539,6 +541,8 @@ def reset_all_motion_stats(self):
self.a_rms05 = 0.0
self.a_rms10 = 0.0
self.t_595 = 0.0
self.sd_start = 0.0
self.sd_end = 0.0
self.arias_intensity = 0.0

# deprecated
Expand Down
7 changes: 5 additions & 2 deletions trigger_deploy.py
@@ -1,10 +1,13 @@
import subprocess
import py

about = {}
with open("eqsig/__about__.py") as fp:
exec(fp.read(), about)

version = about['__version__']

subprocess.check_call(["git", "tag", version, "-m", "version %s" % version])
subprocess.check_call(["git", "push", "--tags", "origin", "master"])
failures = py.test.cmdline.main()
if failures == 0:
subprocess.check_call(["git", "tag", version, "-m", "version %s" % version])
subprocess.check_call(["git", "push", "--tags", "origin", "master"])

0 comments on commit d19e421

Please sign in to comment.