def generate_peak_values(self): """ DEPRECATED: all peak values are lazy loaded - this method does not need to be run. """ deprecation( "generate_peak_values() is no longer in use, all peak values are lazy loaded." )
def generate_peak_values(self): """ Determines the peak signal values """ deprecation( "generate_peak_values() is no longer in use, all peak values are lazy loaded." )
def generate_all_motion_stats(self): """ Deprecated: Use eqsig.im functions to calculate stats """ deprecation("Use eqsig.im functions to calculate stats") self.generate_duration_stats() self.generate_cumulative_stats()
def smooth_freq_range(self, limits): deprecation( 'AccSignal.smooth_freq_range is deprecated. Set AccSignal.smooth_fa_freqs directly' ) lf = np.log10(np.array(limits)) self.smooth_fa_freqs = np.logspace(lf[0], lf[1], self.smooth_freq_points, base=10)
def generate_cumulative_stats(self): """ Deprecated: Use eqsig.im.calc_arias_intensity, eqsig.im.calc_cav """ deprecation("Use eqsig.im.calc_arias_intensity, eqsig.im.calc_cav") # Arias intensity in m/s self.arias_intensity_series = im.calc_arias_intensity(self) self.arias_intensity = self.arias_intensity_series[-1] self.cav_series = im.calc_cav(self) self.cav = self.cav_series[-1]
def generate_duration_stats(self): """ Deprecated: Use eqsig.im.calc_sig_dur or eqsig.im.calc_sig_dur, eqsig.im.calc_brac_dur or esig.im.calc_a_rms """ deprecation( "Use eqsig.im.calc_sig_dur or eqsig.im.calc_sig_dur, eqsig.im.calc_brac_dur or esig.im.calc_a_rms" ) abs_motion = abs(self.values) time = np.arange(self.npts) * self.dt # Bracketed duration ind01 = np.where(abs_motion / 9.8 > 0.01) # 0.01g time2 = time[ind01] try: self.t_b01 = time2[-1] - time2[0] # rms acceleration in m/s/s self.a_rms01 = np.sqrt(1 / self.t_b01 * np.trapz( (self.values[ind01[0][0]:ind01[0][-1]])**2, dx=self.dt)) except IndexError: self.t_b01 = -1. self.a_rms01 = -1. ind05 = np.where(abs_motion / 9.8 > 0.05) # 0.05g time05 = time[ind05] try: self.t_b05 = time05[-1] - time05[0] self.a_rms05 = np.sqrt(1 / self.t_b05 * np.trapz( (self.values[ind05[0][0]:ind05[0][-1]])**2, dx=self.dt)) except IndexError: self.t_b05 = -1. self.a_rms05 = -1. ind10 = np.where(abs_motion / 9.8 > 0.1) # 0.10g time10 = time[ind10] try: self.t_b10 = time10[-1] - time10[0] self.a_rms10 = np.sqrt(1 / self.t_b10 * np.trapz( (self.values[ind10[0][0]:ind10[0][-1]])**2, dx=self.dt)) except IndexError: self.t_b10 = -1. self.a_rms10 = -1. # Trifunac and Brady self.sd_start, self.sd_end = sm.calc_sig_dur_vals(self.values, self.dt, se=True) self.t_595 = self.sd_end - self.sd_start
def calc_significant_duration(motion, dt, start=0.05, end=0.95): """ Deprecated. Use calc_sig_dur_vals Parameters ---------- motion dt start end Returns ------- """ deprecation("Use calc_sig_dur_vals()") return calc_sig_dur_vals(motion, dt, start=start, end=end)
def calculate_peak(motion): """Calculates the peak absolute response""" deprecation("Use calc_peak instead of calculate_peak") return max(abs(min(motion)), max(motion))
def calc_bracketed_duration(asig, threshold): deprecation("Use calc_brac_dur") return calc_brac_dur(asig, threshold)
def calc_bracketed_duration(asig, threshold): """DEPRECATED: Use calc_brac_dur""" deprecation("Use calc_brac_dur") return calc_brac_dur(asig, threshold)
from eqsig.sdof import * from eqsig.exceptions import deprecation deprecation('eqsig.duhamels has deprecated, used eqsig.sdof')
def smooth_freq_points(self, value): deprecation( 'AccSignal.smooth_freq_points is deprecated. Set AccSignal.smooth_fa_freqs directly' ) lf = np.log10(self.smooth_freq_range) self.smooth_fa_freqs = np.logspace(lf[0], lf[1], int(value), base=10)
def smooth_freq_points(self): deprecation( 'AccSignal.smooth_freq_points is deprecated. Use len(AccSignal.smooth_fa_freqs)' ) return len(self.smooth_fa_freqs)
def smooth_freq_range(self): deprecation( 'AccSignal.smooth_freq_range is deprecated. Use AccSignal.smooth_fa_freqs' ) return self.smooth_fa_freqs[0], self.smooth_fa_freqs[-1]