er_w_time_array_A[:,i] = pt.make_slip_rate_w_time(initA, accel, erA1, erA2,
                                                    time_vector = time_vector)
    
    er_w_time_array_B[:,i] = pt.make_slip_rate_w_time(initB, accel, erB1, erB2,
                                                    time_vector = time_vector)

    cum_ext_w_time_array_A[:,i] = pt.get_cum_vector(er_w_time_array_A[:,i],
                                                  time_step)

    cum_ext_w_time_array_B[:,i] = pt.get_cum_vector(er_w_time_array_B[:,i],
                                                  time_step)

    er_w_time_array = er_w_time_array_A + er_w_time_array_B
    
    cum_ext_w_time_array = cum_ext_w_time_array_A + cum_ext_w_time_array_B

# make plots
fig1 = plt.figure(1)
pt.make_fault_histograms(fig1, filtered_runs, initA_col, srA1_col, accel_col,
                                srA2_col)


fig2 = plt.figure(2)
pt.make_fault_histograms(fig2, filtered_runs, initB_col, srB1_col, accel_col,
                                srB2_col)


fig3 = plt.figure(3)
pt.make_ext_histories(fig3, 'nlrT4', time_vector, er_w_time_array,
                             cum_ext_w_time_array)
                                  decimals = 3)
times = len(time_vector)

er_w_time_array = nmp.zeros((times, num_filtered))
cum_ext_w_time_array = nmp.zeros((times, num_filtered))

for i in range(num_filtered):
    init = filtered_runs[i,init_col] 
    accel = filtered_runs[i,accel_col]
    er1 = filtered_runs[i,sr1_col] * nmp.cos(fault_dip)
    er2 = filtered_runs[i,sr2_col] * nmp.cos(fault_dip)
	
    er_w_time_array[:,i] = pt.make_slip_rate_w_time(init, accel, er1, er2,
                                                    time_vector = time_vector)

    cum_ext_w_time_array[:,i] = pt.get_cum_vector(er_w_time_array[:,i],
                                                  time_step)




fig1 = plt.figure(1)
pt.make_fault_histograms(fig1, filtered_runs, init_col, sr1_col, accel_col,
                                sr2_col)

fig2 = plt.figure(2)
pt.make_ext_histories(fig2, 'nlrT3', time_vector, er_w_time_array,
                             cum_ext_w_time_array)

plt.show()